Title: [174287] trunk/Source
- Revision
- 174287
- Author
- [email protected]
- Date
- 2014-10-03 13:36:51 -0700 (Fri, 03 Oct 2014)
Log Message
WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
https://bugs.webkit.org/show_bug.cgi?id=137383
<rdar://problem/18535439>
Reviewed by Sam Weinig.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
* rendering/RenderView.cpp:
(WebCore::RenderView::paintBoxDecorations):
Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (174286 => 174287)
--- trunk/Source/WebCore/ChangeLog 2014-10-03 20:32:34 UTC (rev 174286)
+++ trunk/Source/WebCore/ChangeLog 2014-10-03 20:36:51 UTC (rev 174287)
@@ -1,3 +1,15 @@
+2014-10-03 Tim Horton <[email protected]>
+
+ WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
+ https://bugs.webkit.org/show_bug.cgi?id=137383
+ <rdar://problem/18535439>
+
+ Reviewed by Sam Weinig.
+
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::paintBoxDecorations):
+ Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
+
2014-10-03 Dean Jackson <[email protected]>
webkit-appearance: default-button styling does not set the button font color to white
Modified: trunk/Source/WebCore/rendering/RenderView.cpp (174286 => 174287)
--- trunk/Source/WebCore/rendering/RenderView.cpp 2014-10-03 20:32:34 UTC (rev 174286)
+++ trunk/Source/WebCore/rendering/RenderView.cpp 2014-10-03 20:36:51 UTC (rev 174287)
@@ -570,8 +570,8 @@
rootObscuresBackground = rendererObscuresBackground(rootRenderer);
}
- compositor().setRootExtendedBackgroundColor(frameView().frame().settings().backgroundShouldExtendBeyondPage()
- ? frameView().documentBackgroundColor() : Color());
+ bool backgroundShouldExtendBeyondPage = frameView().frame().settings().backgroundShouldExtendBeyondPage();
+ compositor().setRootExtendedBackgroundColor(backgroundShouldExtendBeyondPage ? frameView().documentBackgroundColor() : Color());
Page* page = document().page();
float pageScaleFactor = page ? page->pageScaleFactor() : 1;
@@ -582,12 +582,14 @@
// This code typically only executes if the root element's visibility has been set to hidden,
// if there is a transform on the <html>, or if there is a page scale factor less than 1.
- // Only fill with the base background color (typically white) if we're the root document,
+ // Only fill with a background color (typically white) if we're the root document,
// since iframes/frames with no background in the child document should show the parent's background.
+ // We use the base background color unless the backgroundShouldExtendBeyondPage setting is set,
+ // in which case we use the document's background color.
if (frameView().isTransparent()) // FIXME: This needs to be dynamic. We should be able to go back to blitting if we ever stop being transparent.
frameView().setCannotBlitToWindow(); // The parent must show behind the child.
else {
- Color backgroundColor = frameView().baseBackgroundColor();
+ Color backgroundColor = backgroundShouldExtendBeyondPage ? frameView().documentBackgroundColor() : frameView().baseBackgroundColor();
if (backgroundColor.alpha()) {
CompositeOperator previousOperator = paintInfo.context->compositeOperation();
paintInfo.context->setCompositeOperation(CompositeCopy);
Modified: trunk/Source/WebKit2/ChangeLog (174286 => 174287)
--- trunk/Source/WebKit2/ChangeLog 2014-10-03 20:32:34 UTC (rev 174286)
+++ trunk/Source/WebKit2/ChangeLog 2014-10-03 20:36:51 UTC (rev 174287)
@@ -1,3 +1,15 @@
+2014-10-03 Tim Horton <[email protected]>
+
+ WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
+ https://bugs.webkit.org/show_bug.cgi?id=137383
+ <rdar://problem/18535439>
+
+ Reviewed by Sam Weinig.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::snapshotAtSize):
+ Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
+
2014-10-03 Andy Estes <[email protected]>
[iOS] Highlight clicked links in WKPDFView
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (174286 => 174287)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-10-03 20:32:34 UTC (rev 174286)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2014-10-03 20:36:51 UTC (rev 174287)
@@ -1668,7 +1668,8 @@
auto graphicsContext = snapshot->bitmap()->createGraphicsContext();
- graphicsContext->fillRect(IntRect(IntPoint(), bitmapSize), frameView->baseBackgroundColor(), ColorSpaceDeviceRGB);
+ Color backgroundColor = coreFrame->settings().backgroundShouldExtendBeyondPage() ? frameView->documentBackgroundColor() : frameView->baseBackgroundColor();
+ graphicsContext->fillRect(IntRect(IntPoint(), bitmapSize), backgroundColor, ColorSpaceDeviceRGB);
if (!(options & SnapshotOptionsExcludeDeviceScaleFactor)) {
double deviceScaleFactor = corePage()->deviceScaleFactor();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes