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 |
|