Title: [203799] trunk/Source/WebCore
Revision
203799
Author
[email protected]
Date
2016-07-27 15:06:28 -0700 (Wed, 27 Jul 2016)

Log Message

Captions do not render in PiP window when element is hidden
https://bugs.webkit.org/show_bug.cgi?id=160265
<rdar://problem/27556788>

Reviewed by Simon Fraser.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Pass new flag so
caption layers are always rendered.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Paint non-visible layers when PaintLayerIgnoreVisibility
flag is set.
* rendering/RenderLayer.h: Define PaintLayerIgnoreVisibility.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203798 => 203799)


--- trunk/Source/WebCore/ChangeLog	2016-07-27 21:59:02 UTC (rev 203798)
+++ trunk/Source/WebCore/ChangeLog	2016-07-27 22:06:28 UTC (rev 203799)
@@ -1,3 +1,20 @@
+2016-07-27  Eric Carlson  <[email protected]>
+
+        Captions do not render in PiP window when element is hidden
+        https://bugs.webkit.org/show_bug.cgi?id=160265
+        <rdar://problem/27556788>
+
+        Reviewed by Simon Fraser.
+
+        * html/shadow/MediaControlElements.cpp:
+        (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): Pass new flag so
+        caption layers are always rendered.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::paintLayerContents): Paint non-visible layers when PaintLayerIgnoreVisibility
+        flag is set.
+        * rendering/RenderLayer.h: Define PaintLayerIgnoreVisibility.
+
 2016-07-27  Chris Dumez  <[email protected]>
 
         Parameter to named property getter should be mandatory

Modified: trunk/Source/WebCore/html/shadow/MediaControlElements.cpp (203798 => 203799)


--- trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2016-07-27 21:59:02 UTC (rev 203798)
+++ trunk/Source/WebCore/html/shadow/MediaControlElements.cpp	2016-07-27 22:06:28 UTC (rev 203799)
@@ -1372,7 +1372,7 @@
     if (!buffer)
         return nullptr;
 
-    layer->paint(buffer->context(), paintingRect, LayoutSize(), PaintBehaviorFlattenCompositingLayers, nullptr, RenderLayer::PaintLayerPaintingCompositingAllPhases);
+    layer->paint(buffer->context(), paintingRect, LayoutSize(), PaintBehaviorFlattenCompositingLayers, nullptr, RenderLayer::PaintLayerPaintingCompositingAllPhases | RenderLayer::PaintLayerIgnoreVisibility);
 
     return ImageBuffer::sinkIntoImage(WTFMove(buffer));
 }

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (203798 => 203799)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-07-27 21:59:02 UTC (rev 203798)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2016-07-27 22:06:28 UTC (rev 203799)
@@ -4274,7 +4274,7 @@
     bool shouldPaintOutline = isSelfPaintingLayer && !isPaintingOverlayScrollbars
         && ((isPaintingScrollingContent && isPaintingCompositedBackground)
         || (!isPaintingScrollingContent && isPaintingCompositedForeground));
-    bool shouldPaintContent = m_hasVisibleContent && isSelfPaintingLayer && !isPaintingOverlayScrollbars;
+    bool shouldPaintContent = (m_hasVisibleContent || paintFlags & PaintLayerIgnoreVisibility) && isSelfPaintingLayer && !isPaintingOverlayScrollbars;
 
     if (localPaintFlags & PaintLayerPaintingRootBackgroundOnly && !renderer().isRenderView() && !renderer().isDocumentElementRenderer())
         return;

Modified: trunk/Source/WebCore/rendering/RenderLayer.h (203798 => 203799)


--- trunk/Source/WebCore/rendering/RenderLayer.h	2016-07-27 21:59:02 UTC (rev 203798)
+++ trunk/Source/WebCore/rendering/RenderLayer.h	2016-07-27 22:06:28 UTC (rev 203799)
@@ -457,6 +457,7 @@
         PaintLayerPaintingRootBackgroundOnly            = 1 << 11,
         PaintLayerPaintingSkipRootBackground            = 1 << 12,
         PaintLayerPaintingChildClippingMaskPhase        = 1 << 13,
+        PaintLayerIgnoreVisibility                      = 1 << 14,
         PaintLayerPaintingCompositingAllPhases          = PaintLayerPaintingCompositingBackgroundPhase | PaintLayerPaintingCompositingForegroundPhase
     };
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to