Changeset 52846 in webkit
- Timestamp:
- Jan 5, 2010, 6:57:02 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52844 r52846 1 2010-01-05 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Maciej Stachowiak. 4 5 Implement HTML5 <header> and <footer> elements. 6 https://bugs.webkit.org/show_bug.cgi?id=32943 7 8 These test: 9 - <p> closing, 10 - No nesting restriction, 11 - Residual style, and 12 - FormatBlock. 13 14 * fast/html/footer-element-expected.txt: Added. 15 * fast/html/footer-element.html: Added. 16 * fast/html/header-element-expected.txt: Added. 17 * fast/html/header-element.html: Added. 18 * fast/html/script-tests/footer-element.js: Added. 19 * fast/html/script-tests/header-element.js: Added. 20 1 21 2010-01-05 Darin Adler <darin@apple.com> 2 22 -
trunk/WebCore/ChangeLog
r52840 r52846 1 2010-01-05 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Maciej Stachowiak. 4 5 Implement HTML5 <header> and <footer> elements. 6 https://bugs.webkit.org/show_bug.cgi?id=32943 7 8 <header> and <footer> should behave the same as <nav>, <section>, 9 <article>, and <aside>. The HTML parser doesn't need to restrict 10 the nesting of header/footer elements. 11 12 Tests: fast/html/footer-element.html 13 fast/html/header-element.html 14 15 * css/html.css: Add header/footer as block elements. 16 * editing/htmlediting.cpp: 17 (WebCore::validBlockTag): Add headerTag and footerTag. 18 * html/HTMLElement.cpp: 19 (WebCore::HTMLElement::tagPriority): Returns 5 for headerTag and footerTag. 20 (WebCore::blockTagList): Add headerTag and footerTag. 21 * html/HTMLParser.cpp: 22 (WebCore::HTMLParser::handleError): Rename isHeaderTag() to isHeadingTag() 23 (WebCore::HTMLParser::getNode): Add headerTag and footerTag. 24 (WebCore::HTMLParser::isHeadingTag): Renamed from isHeaderTag(). 25 * html/HTMLParser.h: 26 - Rename isHeaderTag() to isHeadingTag() 27 - Remove non-existing popNestedHeaderTag(). 28 * html/HTMLTagNames.in: Add header and footer. 29 1 30 2010-01-05 Darin Adler <darin@apple.com> 2 31 -
trunk/WebCore/css/html.css
r52620 r52846 73 73 } 74 74 75 article, aside, nav, section {75 article, aside, footer, header, nav, section { 76 76 display: block 77 77 } -
trunk/WebCore/editing/htmlediting.cpp
r52620 r52846 482 482 blockTags.add(dlTag.localName()); 483 483 blockTags.add(dtTag.localName()); 484 blockTags.add(footerTag.localName()); 484 485 blockTags.add(h1Tag.localName()); 485 486 blockTags.add(h2Tag.localName()); … … 488 489 blockTags.add(h5Tag.localName()); 489 490 blockTags.add(h6Tag.localName()); 491 blockTags.add(headerTag.localName()); 490 492 blockTags.add(navTag.localName()); 491 493 blockTags.add(pTag.localName()); -
trunk/WebCore/html/HTMLElement.cpp
r52620 r52846 89 89 if (hasLocalName(addressTag) || hasLocalName(ddTag) || hasLocalName(dtTag) || hasLocalName(noscriptTag) || hasLocalName(rpTag) || hasLocalName(rtTag)) 90 90 return 3; 91 if (hasLocalName(articleTag) || hasLocalName(asideTag) || hasLocalName(centerTag) || hasLocalName( nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag))91 if (hasLocalName(articleTag) || hasLocalName(asideTag) || hasLocalName(centerTag) || hasLocalName(footerTag) || hasLocalName(headerTag) || hasLocalName(nobrTag) || hasLocalName(rubyTag) || hasLocalName(navTag) || hasLocalName(sectionTag)) 92 92 return 5; // Same as <div>. 93 93 if (hasLocalName(noembedTag) || hasLocalName(noframesTag)) … … 875 875 tagList.add(dtTag.localName().impl()); 876 876 tagList.add(fieldsetTag.localName().impl()); 877 tagList.add(footerTag.localName().impl()); 877 878 tagList.add(formTag.localName().impl()); 878 879 tagList.add(h1Tag.localName().impl()); … … 882 883 tagList.add(h5Tag.localName().impl()); 883 884 tagList.add(h6Tag.localName().impl()); 885 tagList.add(headerTag.localName().impl()); 884 886 tagList.add(hrTag.localName().impl()); 885 887 tagList.add(isindexTag.localName().impl()); -
trunk/WebCore/html/HTMLParser.cpp
r52620 r52846 654 654 popBlock(objectTag); 655 655 handled = true; 656 } else if (h->hasLocalName(pTag) || isHead erTag(currentTagName)) {656 } else if (h->hasLocalName(pTag) || isHeadingTag(currentTagName)) { 657 657 if (!isInline(n)) { 658 658 popBlock(currentTagName); … … 925 925 gFunctionMap.set(formTag.localName().impl(), &HTMLParser::formCreateErrorCheck); 926 926 gFunctionMap.set(fieldsetTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); 927 gFunctionMap.set(footerTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); 927 928 gFunctionMap.set(framesetTag.localName().impl(), &HTMLParser::framesetCreateErrorCheck); 928 929 gFunctionMap.set(h1Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); … … 933 934 gFunctionMap.set(h6Tag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); 934 935 gFunctionMap.set(headTag.localName().impl(), &HTMLParser::headCreateErrorCheck); 936 gFunctionMap.set(headerTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); 935 937 gFunctionMap.set(hrTag.localName().impl(), &HTMLParser::pCloserCreateErrorCheck); 936 938 gFunctionMap.set(iTag.localName().impl(), &HTMLParser::nestedStyleCreateErrorCheck); … … 1020 1022 } 1021 1023 1022 bool HTMLParser::isHead erTag(const AtomicString& tagName)1023 { 1024 DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, head erTags, ());1025 if (head erTags.isEmpty()) {1026 head erTags.add(h1Tag.localName().impl());1027 head erTags.add(h2Tag.localName().impl());1028 head erTags.add(h3Tag.localName().impl());1029 head erTags.add(h4Tag.localName().impl());1030 head erTags.add(h5Tag.localName().impl());1031 head erTags.add(h6Tag.localName().impl());1024 bool HTMLParser::isHeadingTag(const AtomicString& tagName) 1025 { 1026 DEFINE_STATIC_LOCAL(HashSet<AtomicStringImpl*>, headingTags, ()); 1027 if (headingTags.isEmpty()) { 1028 headingTags.add(h1Tag.localName().impl()); 1029 headingTags.add(h2Tag.localName().impl()); 1030 headingTags.add(h3Tag.localName().impl()); 1031 headingTags.add(h4Tag.localName().impl()); 1032 headingTags.add(h5Tag.localName().impl()); 1033 headingTags.add(h6Tag.localName().impl()); 1032 1034 } 1033 1035 1034 return head erTags.contains(tagName.impl());1036 return headingTags.contains(tagName.impl()); 1035 1037 } 1036 1038 -
trunk/WebCore/html/HTMLParser.h
r51101 r52846 137 137 bool allowNestedRedundantTag(const AtomicString& tagName); 138 138 139 static bool isHeaderTag(const AtomicString& tagName); 140 void popNestedHeaderTag(); 139 static bool isHeadingTag(const AtomicString& tagName); 141 140 142 141 bool isInline(Node*) const; -
trunk/WebCore/html/HTMLTagNames.in
r52620 r52846 44 44 fieldset interfaceName=HTMLFieldSetElement, constructorNeedsFormElement, createWithNew 45 45 font createWithNew 46 footer interfaceName=HTMLElement 46 47 form createWithNew 47 48 frame … … 54 55 h6 interfaceName=HTMLHeadingElement, createWithNew 55 56 head createWithNew 57 header interfaceName=HTMLElement 56 58 hr interfaceName=HTMLHRElement, createWithNew 57 59 html createWithNew
Note:
See TracChangeset
for help on using the changeset viewer.