Add the new ShadowRoot interface and Element.prototype.attachShadow behind a build flag.
Created attachment 261248 [details] Adds the interface and method
Comment on attachment 261248 [details] Adds the interface and method View in context: https://bugs.webkit.org/attachment.cgi?id=261248&action=review > Source/WebCore/dom/Element.cpp:1665 > + ShadowRoot::EncapsulationMode encapsulationMode = ShadowRoot::EncapsulationMode::Closed; auto encapsulationMode = > Source/WebCore/dom/ShadowRoot.h:46 > enum ShadowRootType { > UserAgentShadowRoot = 0, > + AuthorShadowRoot = 1, > }; Enum class would be nice here too: enum class ShadowRootType : uint8_t { UserAgent, Author }; > Source/WebCore/dom/ShadowRoot.h:93 > unsigned m_resetStyleInheritance : 1; > unsigned m_type : 1; > + unsigned m_encapsulationMode : 1; We could just use enums instead of bitfields. If you make enum classes uint8_t there is no size difference and there is probably no need to super-optimize shadow root size anyway.
r=me
Comment on attachment 261248 [details] Adds the interface and method View in context: https://bugs.webkit.org/attachment.cgi?id=261248&action=review >> Source/WebCore/dom/ShadowRoot.h:46 >> }; > > Enum class would be nice here too: > > enum class ShadowRootType : uint8_t { UserAgent, Author }; Actually just enum class Type : uint8_t { UserAgent, Author }; since we are in ShadowRoot scope already.
Created attachment 261265 [details] Updated per Antti's comment
Comment on attachment 261265 [details] Updated per Antti's comment View in context: https://bugs.webkit.org/attachment.cgi?id=261265&action=review > Source/WebCore/dom/ShadowRoot.h:86 > unsigned m_resetStyleInheritance : 1; This could a bool.
Created attachment 261269 [details] Patch for landing
Comment on attachment 261269 [details] Patch for landing I'm gonna wait for EWS.
Comment on attachment 261269 [details] Patch for landing Attachment 261269 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/174961 New failing tests: js/dom/constructor-length.html js/dom/dom-static-property-for-in-iteration.html js/dom/global-constructors-attributes.html
Created attachment 261278 [details] Archive of layout-test-results from ews106 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Comment on attachment 261269 [details] Patch for landing Attachment 261269 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/175023 New failing tests: js/dom/constructor-length.html js/dom/dom-static-property-for-in-iteration.html js/dom/global-constructors-attributes.html
Created attachment 261282 [details] Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Committed r189841: <http://trac.webkit.org/changeset/189841>
Could you please update Mavericks results for js/dom/global-constructors-attributes.html ? https://build.webkit.org/results/Apple%20Mavericks%20Release%20WK2%20(Tests)/r189845%20(17187)/js/dom/global-constructors-attributes-diff.txt
(In reply to comment #14) > Could you please update Mavericks results for > js/dom/global-constructors-attributes.html ? > > https://build.webkit.org/results/Apple%20Mavericks%20Release%20WK2%20(Tests)/ > r189845%20(17187)/js/dom/global-constructors-attributes-diff.txt Oops, sorry. I missed that. Rebaselined it in http://trac.webkit.org/changeset/189852.
More test result updating in r189865 (for El Capitan). I hate these mega-tests.
Updated iOS results expectations in r189980