Implement the HTML <main> element.
https://bugs.webkit.org/show_bug.cgi?id=103172
Patch by Michael[tm] Smith <mike@w3.org> on 2013-01-21
Reviewed by Chris Fleizach.
Source/WebCore:
Authored by Steve Faulkner <faulkner.steve@gmail.com>
<main> should behave the same as <nav>, <section>, and <article>, and <aside>.
<main> should expose AXLandmarkMain correctly on each platform.
Tests: fast/html/main-element.html
platform/chromium/accessibility/main-element.html
platform/mac/accessibility/main-element.html
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* css/html.css:
(article, aside, footer, header, hgroup, main, nav, section):
* editing/FormatBlockCommand.cpp:
(WebCore::isElementForFormatBlock):
* html/HTMLTagNames.in:
* html/parser/HTMLStackItem.h:
(WebCore::HTMLStackItem::isSpecialNode):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
LayoutTests:
<main> should behave the same as <nav>, <section>, <article>, and <aside>.
<main> has no specific parsing rules.
<main> should expose AXLandmarkMain correctly for each platform.
* editing/execCommand/query-format-block-expected.txt:
* editing/execCommand/remove-format-elements-expected.txt:
* editing/execCommand/remove-format-elements.html:
* editing/execCommand/script-tests/query-format-block.js:
* fast/block/child-not-removed-from-parent-lineboxes-crash.html:
* fast/dom/click-method-on-html-element-expected.txt:
* fast/dom/click-method-on-html-element.html:
* fast/dom/wrapper-classes-expected.txt:
* fast/dom/wrapper-classes.html:
* fast/forms/access-key-for-all-elements-expected.txt:
* fast/forms/access-key-for-all-elements.html:
* fast/html/main-element-expected.txt: Added.
* fast/html/main-element.html: Added.
* fast/html/script-tests/main-element.js: Added.
(getWeight):
* platform/chromium/accessibility/main-element-expected.txt: Added.
* platform/chromium/accessibility/main-element.html: Added.
* platform/chromium/fast/dom/wrapper-classes-expected.txt:
* platform/mac/accessibility/main-element-expected.txt: Added.
* platform/mac/accessibility/main-element.html: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@140341 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/Source/WebCore/css/html.css b/Source/WebCore/css/html.css
index 8fdc5bc..1503be8 100644
--- a/Source/WebCore/css/html.css
+++ b/Source/WebCore/css/html.css
@@ -81,7 +81,7 @@
display: block
}
-article, aside, footer, header, hgroup, nav, section {
+article, aside, footer, header, hgroup, main, nav, section {
display: block
}