Title: [214992] releases/WebKitGTK/webkit-2.14
Revision
214992
Author
carlo...@webkit.org
Date
2017-04-05 23:31:21 -0700 (Wed, 05 Apr 2017)

Log Message

Merge r209145 - Use 'childOfType' template when retrieving Shadow DOM elements
https://bugs.webkit.org/show_bug.cgi?id=165145
<rdar://problem/29331830>

Reviewed by Antti Koivisto.

Source/WebCore:

Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html
       fast/shadow-dom/file-input-element-shadow-manipulation.html
       fast/shadow-dom/keygen-shadow-manipulation.html
       fast/shadow-dom/media-shadow-manipulation.html
       fast/shadow-dom/range-input-element-shadow-manipulation.html
       fast/shadow-dom/textarea-shadow-manipulation.html

Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
than relying on expected element positions, as these can be changed by
_javascript_.

Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.

* dom/Element.h:
(WebCore::Element::isUploadButton): Added.
(WebCore::Element::isSliderContainerElement): Added.
* html/ColorInputType.cpp:
(WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
the first child is the one we want.
* html/FileInputType.cpp:
(isType): Added.
(WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
the first child is the one we want.
(WebCore::FileInputType::multipleAttributeChanged): Ditto.
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::shadowSelect): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaControls): Ditto.
(WebCore::HTMLMediaElement::hasMediaControls): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::innerTextElement): Ditto.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::sliderTrackElement): Ditto.
* html/shadow/SliderThumbElement.h:
(isType): Added.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
the first child is the one we want.

LayoutTests:

* fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
* fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
* fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/keygen-shadow-manipulation.html: Added.
* fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/media-shadow-manipulation.html: Added.
* fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
* fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
* fast/shadow-dom/textarea-shadow-manipulation.html: Added.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog (214991 => 214992)


--- releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog	2017-04-06 06:08:26 UTC (rev 214991)
+++ releases/WebKitGTK/webkit-2.14/LayoutTests/ChangeLog	2017-04-06 06:31:21 UTC (rev 214992)
@@ -1,3 +1,24 @@
+2016-11-30  Brent Fulgham  <bfulg...@apple.com>
+
+        Use 'childOfType' template when retrieving Shadow DOM elements
+        https://bugs.webkit.org/show_bug.cgi?id=165145
+        <rdar://problem/29331830>
+
+        Reviewed by Antti Koivisto.
+
+        * fast/shadow-dom/color-input-element-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/color-input-element-shadow-manipulation.html: Added.
+        * fast/shadow-dom/file-input-element-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/file-input-element-shadow-manipulation.html: Added.
+        * fast/shadow-dom/keygen-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/keygen-shadow-manipulation.html: Added.
+        * fast/shadow-dom/media-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/media-shadow-manipulation.html: Added.
+        * fast/shadow-dom/range-input-element-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/range-input-element-shadow-manipulation.html: Added.
+        * fast/shadow-dom/textarea-shadow-manipulation-expected.txt: Added.
+        * fast/shadow-dom/textarea-shadow-manipulation.html: Added.
+
 2016-09-30  Youenn Fablet  <you...@apple.com>
 
         DumpRenderTree crashed in com.apple.WebCore: WTF::Optional<WebCore::FetchBodyOwner::BlobLoader>::operator bool const + 12

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (214991 => 214992)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2017-04-06 06:08:26 UTC (rev 214991)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2017-04-06 06:31:21 UTC (rev 214992)
@@ -1,3 +1,50 @@
+2016-11-30  Brent Fulgham  <bfulg...@apple.com>
+
+        Use 'childOfType' template when retrieving Shadow DOM elements
+        https://bugs.webkit.org/show_bug.cgi?id=165145
+        <rdar://problem/29331830>
+
+        Reviewed by Antti Koivisto.
+
+        Tests: fast/shadow-dom/color-input-element-shadow-manipulation.html
+               fast/shadow-dom/file-input-element-shadow-manipulation.html
+               fast/shadow-dom/keygen-shadow-manipulation.html
+               fast/shadow-dom/media-shadow-manipulation.html
+               fast/shadow-dom/range-input-element-shadow-manipulation.html
+               fast/shadow-dom/textarea-shadow-manipulation.html
+
+        Switch to using 'childOfType' when retrieving Shadow DOM elements, rather
+        than relying on expected element positions, as these can be changed by
+        _javascript_.
+
+        Drive by fix: Make more use of is<> and downcast<> templates rather than blindly casting.
+
+        * dom/Element.h:
+        (WebCore::Element::isUploadButton): Added.
+        (WebCore::Element::isSliderContainerElement): Added.
+        * html/ColorInputType.cpp:
+        (WebCore::ColorInputType::shadowColorSwatch): Use 'childOfType' rather than assuming
+        the first child is the one we want.
+        * html/FileInputType.cpp:
+        (isType): Added.
+        (WebCore::FileInputType::disabledAttributeChanged): Use 'childOfType' rather than assuming
+        the first child is the one we want.
+        (WebCore::FileInputType::multipleAttributeChanged): Ditto.
+        * html/HTMLKeygenElement.cpp:
+        (WebCore::HTMLKeygenElement::shadowSelect): Ditto.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::mediaControls): Ditto.
+        (WebCore::HTMLMediaElement::hasMediaControls): Ditto.
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::innerTextElement): Ditto.
+        * html/RangeInputType.cpp:
+        (WebCore::RangeInputType::sliderTrackElement): Ditto.
+        * html/shadow/SliderThumbElement.h:
+        (isType): Added.
+        * svg/SVGUseElement.cpp:
+        (WebCore::SVGUseElement::targetClone): Use 'childOfType' rather than assuming
+        the first child is the one we want.
+
 2016-10-31  Joseph Pecoraro  <pecor...@apple.com>
 
         Web Inspector: Provide an opportunity to clear ScriptValues associated with debugged target

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/html/shadow/SliderThumbElement.h (214991 => 214992)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/html/shadow/SliderThumbElement.h	2017-04-06 06:08:26 UTC (rev 214991)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/html/shadow/SliderThumbElement.h	2017-04-06 06:31:21 UTC (rev 214992)
@@ -142,7 +142,7 @@
     AtomicString m_shadowPseudoId;
 };
 
-}
+} // namespace WebCore
 
 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::SliderContainerElement)
     static bool isType(const WebCore::Element& element) { return element.isSliderContainerElement(); }
@@ -150,4 +150,3 @@
 SPECIALIZE_TYPE_TRAITS_END()
 
 #endif
-
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to