Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 274566 | Differences between
and this patch

Collapse All | Expand All

(-)branches/KDE/4.2/kdelibs/khtml/svg/SVGList.h (-1 / +5 lines)
Lines 97-103 Link Here
97
97
98
        Item insertItemBefore(Item newItem, unsigned int index, ExceptionCode&)
98
        Item insertItemBefore(Item newItem, unsigned int index, ExceptionCode&)
99
        {
99
        {
100
            m_vector.insert(index, newItem);
100
            if (index < m_vector.size()) {
101
                m_vector.insert(index, newItem);
102
            } else {
103
                m_vector.append(newItem);
104
            }
101
            return newItem;
105
            return newItem;
102
        }
106
        }
103
107
(-)branches/KDE/4.2/kdelibs/khtml/html/htmlparser.cpp (-7 / +5 lines)
Lines 216-222 Link Here
216
216
217
    form = 0;
217
    form = 0;
218
    map = 0;
218
    map = 0;
219
    head = 0;
220
    end = false;
219
    end = false;
221
    isindex = 0;
220
    isindex = 0;
222
221
Lines 678-685 Link Here
678
            case ID_BASE:
677
            case ID_BASE:
679
                if(!head) {
678
                if(!head) {
680
                    head = new HTMLHeadElementImpl(document);
679
                    head = new HTMLHeadElementImpl(document);
681
                    e = head;
680
                    insertNode(head.get());
682
                    insertNode(e);
683
                    handled = true;
681
                    handled = true;
684
                }
682
                }
685
                break;
683
                break;
Lines 894-900 Link Here
894
    case ID_HEAD:
892
    case ID_HEAD:
895
        if(!head && (current->id() == ID_HTML || current->isDocumentNode())) {
893
        if(!head && (current->id() == ID_HTML || current->isDocumentNode())) {
896
            head = new HTMLHeadElementImpl(document);
894
            head = new HTMLHeadElementImpl(document);
897
            n = head;
895
            n = head.get();
898
        }
896
        }
899
        break;
897
        break;
900
    case ID_BODY:
898
    case ID_BODY:
Lines 1907-1925 Link Here
1907
    head = new HTMLHeadElementImpl(document);
1905
    head = new HTMLHeadElementImpl(document);
1908
    HTMLElementImpl *body = doc()->body();
1906
    HTMLElementImpl *body = doc()->body();
1909
    int exceptioncode = 0;
1907
    int exceptioncode = 0;
1910
    doc()->documentElement()->insertBefore(head, body, exceptioncode);
1908
    doc()->documentElement()->insertBefore(head.get(), body, exceptioncode);
1911
    if ( exceptioncode ) {
1909
    if ( exceptioncode ) {
1912
#ifdef PARSER_DEBUG
1910
#ifdef PARSER_DEBUG
1913
        kDebug( 6035 ) << "creation of head failed!!!!:" << exceptioncode;
1911
        kDebug( 6035 ) << "creation of head failed!!!!:" << exceptioncode;
1914
#endif
1912
#endif
1915
        delete head;
1913
        delete head.get();
1916
        head = 0;
1914
        head = 0;
1917
    }
1915
    }
1918
        
1916
        
1919
    // If the body does not exist yet, then the <head> should be pushed as the current 
1917
    // If the body does not exist yet, then the <head> should be pushed as the current 
1920
    if (head && !body) {
1918
    if (head && !body) {
1921
        pushBlock(head->id(), tagPriority(head->id()));
1919
        pushBlock(head->id(), tagPriority(head->id()));
1922
        setCurrent(head);
1920
        setCurrent(head.get());
1923
    }
1921
    }
1924
}
1922
}
1925
1923
(-)branches/KDE/4.2/kdelibs/khtml/html/htmlparser.h (-1 / +1 lines)
Lines 157-163 Link Here
157
    /*
157
    /*
158
     * the head element. Needed for crappy html which defines <base> after </head>
158
     * the head element. Needed for crappy html which defines <base> after </head>
159
     */
159
     */
160
    DOM::HTMLHeadElementImpl *head;
160
    RefPtr<DOM::HTMLHeadElementImpl> head;
161
161
162
    /*
162
    /*
163
     * a possible <isindex> element in the head. Compatibility hack for
163
     * a possible <isindex> element in the head. Compatibility hack for

Return to bug 274566