REGRESSION (r179597): Can't see power saver banner for plugins
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2015 23:18:36 +0000 (23:18 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Mar 2015 23:18:36 +0000 (23:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142312
<rdar://problem/20040517>

Reviewed by Brent Fulgham.

We were being a bit too restrictive when deciding a child
should not create a renderer. All shadow root children
of the snapshotted plugin need one.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
Test if we're part of the shadow tree.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/html/HTMLPlugInImageElement.cpp

index 5010784..c77175e 100644 (file)
@@ -1,3 +1,19 @@
+2015-03-04  Dean Jackson  <dino@apple.com>
+
+        REGRESSION (r179597): Can't see power saver banner for plugins
+        https://bugs.webkit.org/show_bug.cgi?id=142312
+        <rdar://problem/20040517>
+
+        Reviewed by Brent Fulgham.
+
+        We were being a bit too restrictive when deciding a child
+        should not create a renderer. All shadow root children
+        of the snapshotted plugin need one.
+
+        * html/HTMLPlugInImageElement.cpp:
+        (WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
+        Test if we're part of the shadow tree.
+
 2015-03-03  Andy Estes  <aestes@apple.com>
 
         [Content Filtering] Make it easier to add new content filters
index b0f16e7..09bc165 100644 (file)
@@ -223,7 +223,7 @@ RenderPtr<RenderElement> HTMLPlugInImageElement::createElementRenderer(Ref<Rende
 
 bool HTMLPlugInImageElement::childShouldCreateRenderer(const Node& child) const
 {
-    if (is<RenderSnapshottedPlugIn>(renderer()) && !partOfSnapshotOverlay(&child))
+    if (is<RenderSnapshottedPlugIn>(renderer()) && !hasShadowRootParent(child))
         return false;
 
     return HTMLPlugInElement::childShouldCreateRenderer(child);