Title: [147438] branches/chromium/1453/Source
- Revision
- 147438
- Author
- [email protected]
- Date
- 2013-04-02 08:48:33 -0700 (Tue, 02 Apr 2013)
Log Message
Merge 147178 "[Chromium] Don't create SolidColorLayer for full t..."
> [Chromium] Don't create SolidColorLayer for full transparent background
> https://bugs.webkit.org/show_bug.cgi?id=113524
>
> Reviewed by James Robinson.
>
> Source/WebCore:
>
> Test: GraphicsLayerChromiumTest.setContentsToSolidColor
>
> * platform/graphics/chromium/GraphicsLayerChromium.cpp:
> (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
>
> Source/WebKit/chromium:
>
> * tests/GraphicsLayerChromiumTest.cpp:
> (GraphicsLayerChromiumTest::setContentsToSolidColor):
>
[email protected]
Review URL: https://codereview.chromium.org/13430007
Modified Paths
Diff
Modified: branches/chromium/1453/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp (147437 => 147438)
--- branches/chromium/1453/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2013-04-02 15:43:40 UTC (rev 147437)
+++ branches/chromium/1453/Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp 2013-04-02 15:48:33 UTC (rev 147438)
@@ -524,7 +524,7 @@
m_contentsSolidColor = color;
- if (color.isValid()) {
+ if (color.isValid() && color.alpha()) {
if (!m_contentsSolidColorLayer) {
m_contentsSolidColorLayer = adoptPtr(Platform::current()->compositorSupport()->createSolidColorLayer());
registerContentsLayer(m_contentsSolidColorLayer->layer());
Modified: branches/chromium/1453/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp (147437 => 147438)
--- branches/chromium/1453/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp 2013-04-02 15:43:40 UTC (rev 147437)
+++ branches/chromium/1453/Source/WebKit/chromium/tests/GraphicsLayerChromiumTest.cpp 2013-04-02 15:48:33 UTC (rev 147438)
@@ -147,4 +147,16 @@
EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition()));
}
+TEST_F(GraphicsLayerChromiumTest, setContentsToSolidColor)
+{
+ m_graphicsLayer->setContentsToSolidColor(Color::transparent);
+ EXPECT_FALSE(m_graphicsLayer->contentsLayer());
+
+ m_graphicsLayer->setContentsToSolidColor(Color::white);
+ EXPECT_TRUE(m_graphicsLayer->contentsLayer());
+
+ m_graphicsLayer->setContentsToSolidColor(Color());
+ EXPECT_FALSE(m_graphicsLayer->contentsLayer());
+}
+
} // namespace
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes