Title: [186107] trunk/Source/WebCore
- Revision
- 186107
- Author
- [email protected]
- Date
- 2015-06-29 22:33:11 -0700 (Mon, 29 Jun 2015)
Log Message
[iOS WK2] WKWebViews in Facebook app start off black
https://bugs.webkit.org/show_bug.cgi?id=146445
rdar://problem/21600433
Reviewed by Tim Horton.
If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
but only considered the computed document background color, and not the view transparency.
Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
which checks the FrameView transparency. Now we just need to store a transparency bool rather
than the old color (we only checked its alpha anyway).
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (186106 => 186107)
--- trunk/Source/WebCore/ChangeLog 2015-06-30 02:38:36 UTC (rev 186106)
+++ trunk/Source/WebCore/ChangeLog 2015-06-30 05:33:11 UTC (rev 186107)
@@ -1,3 +1,22 @@
+2015-06-29 Simon Fraser <[email protected]>
+
+ [iOS WK2] WKWebViews in Facebook app start off black
+ https://bugs.webkit.org/show_bug.cgi?id=146445
+ rdar://problem/21600433
+
+ Reviewed by Tim Horton.
+
+ If -isOpaque is toggled on a WKWebView, we failed to make the page tiles non-opaque
+ for a while. After r183775, RenderLayerCompositor::rootBackgroundTransparencyChanged() was called,
+ but only considered the computed document background color, and not the view transparency.
+
+ Fix by having rootBackgroundTransparencyChanged() simply use viewHasTransparentBackground(),
+ which checks the FrameView transparency. Now we just need to store a transparency bool rather
+ than the old color (we only checked its alpha anyway).
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
+
2015-06-29 Dean Jackson <[email protected]>
WebKit should use 80% black background for PiP indicator
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (186106 => 186107)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-06-30 02:38:36 UTC (rev 186106)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2015-06-30 05:33:11 UTC (rev 186107)
@@ -3198,12 +3198,12 @@
if (!inCompositingMode())
return;
- Color documentBackgroundColor = m_renderView.frameView().documentBackgroundColor();
- Color lastDocumentBackgroundColor = m_lastDocumentBackgroundColor;
- m_lastDocumentBackgroundColor = documentBackgroundColor;
- if (lastDocumentBackgroundColor.isValid() && lastDocumentBackgroundColor.hasAlpha() == documentBackgroundColor.hasAlpha())
+ bool isTransparent = viewHasTransparentBackground();
+ if (m_viewBackgroundIsTransparent == isTransparent)
return;
+ m_viewBackgroundIsTransparent = isTransparent;
+
// FIXME: We should do something less expensive than a full layer rebuild.
setCompositingLayersNeedRebuild();
scheduleCompositingLayerUpdate();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.h (186106 => 186107)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2015-06-30 02:38:36 UTC (rev 186106)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.h 2015-06-30 05:33:11 UTC (rev 186107)
@@ -545,6 +545,7 @@
bool m_layerFlushThrottlingTemporarilyDisabledForInteraction;
bool m_hasPendingLayerFlush;
bool m_layerNeedsCompositingUpdate { false };
+ bool m_viewBackgroundIsTransparent { false };
Timer m_paintRelatedMilestonesTimer;
@@ -557,7 +558,6 @@
#endif
Color m_rootExtendedBackgroundColor;
- Color m_lastDocumentBackgroundColor;
HashMap<ScrollingNodeID, RenderLayer*> m_scrollingNodeToLayerMap;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes