<style scoped>: Implement registering of <style scoped> with the scoping element
authorrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 06:48:26 +0000 (06:48 +0000)
committerrolandsteiner@chromium.org <rolandsteiner@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Jan 2012 06:48:26 +0000 (06:48 +0000)
commit57ac54b8fd1ddec5b436e3e5edc3018586f20ccd
treebc6d8c41f14bfb548cab866df3ea5d425c3469ab
parentd09eb104038b6dbb336925bdfde4ab07d82ab0ce
<style scoped>: Implement registering of <style scoped> with the scoping element
https://bugs.webkit.org/show_bug.cgi?id=67790

.:

windows.internals updates

Reviewed by Dimitri Glazkov.

* Source/autotools/symbols.filter:

Source/WebCore:

Implement registering of a <style> element with its parent element if the 'scoped' attribute is set.
Update the registration whenever the 'scoped' attribute is changed,
or the <style> element eneters or leaves the tree.

Also, extend windows.internals to allow for testing of the registration ref-counting.

Reviewed by Dimitri Glazkov.

Test: fast/css/style-scoped/registering.html

* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::hasScopedHTMLStyleChild):
(WebCore::Element::numberOfScopedHTMLStyleChildren):
(WebCore::Element::registerScopedHTMLStyleChild):
(WebCore::Element::unregisterScopedHTMLStyleChild):
* dom/Element.h:
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
(WebCore::ElementRareData::registerScopedHTMLStyleChild):
(WebCore::ElementRareData::unregisterScopedHTMLStyleChild):
(WebCore::ElementRareData::hasScopedHTMLStyleChild):
(WebCore::ElementRareData::numberOfScopedHTMLStyleChildren):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement):
(WebCore::HTMLStyleElement::~HTMLStyleElement):
(WebCore::HTMLStyleElement::parseMappedAttribute):
(WebCore::HTMLStyleElement::registerWithScopingNode):
(WebCore::HTMLStyleElement::unregisterWithScopingNode):
(WebCore::HTMLStyleElement::insertedIntoDocument):
(WebCore::HTMLStyleElement::removedFromDocument):
(WebCore::HTMLStyleElement::willRemove):
* html/HTMLStyleElement.h:
* testing/Internals.cpp:
(WebCore::Internals::numberOfScopedHTMLStyleChildren):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

Add symbols for windows.internals.numberOfScopedHTMLStyleChildren

Reviewed by Dimitri Glazkov.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

Tests that registration of <style scoped> with its parent is performed correctly
in various circumstances.

Reviewed by Dimitri Glazkov.

* fast/css/style-scoped/registering-expected.txt: Added.
* fast/css/style-scoped/registering.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/css/style-scoped/registering-expected.txt [new file with mode: 0644]
LayoutTests/fast/css/style-scoped/registering.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementRareData.h
Source/WebCore/html/HTMLStyleElement.cpp
Source/WebCore/html/HTMLStyleElement.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter