Title: [121178] trunk/Source
- Revision
- 121178
- Author
- [email protected]
- Date
- 2012-06-25 13:19:35 -0700 (Mon, 25 Jun 2012)
Log Message
[chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
https://bugs.webkit.org/show_bug.cgi?id=89784
Patch by Ian Vollick <[email protected]> on 2012-06-25
Reviewed by James Robinson.
Previously, we'd only set needs redraw if the old bounds were zero,
and the new bounds were non-zero, but we should actually have
checked that the old bounds were non-empty.
Source/WebCore:
Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds
* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::setBounds):
Source/WebKit/chromium:
* tests/LayerChromiumTest.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (121177 => 121178)
--- trunk/Source/WebCore/ChangeLog 2012-06-25 20:14:19 UTC (rev 121177)
+++ trunk/Source/WebCore/ChangeLog 2012-06-25 20:19:35 UTC (rev 121178)
@@ -1,3 +1,19 @@
+2012-06-25 Ian Vollick <[email protected]>
+
+ [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
+ https://bugs.webkit.org/show_bug.cgi?id=89784
+
+ Reviewed by James Robinson.
+
+ Previously, we'd only set needs redraw if the old bounds were zero,
+ and the new bounds were non-zero, but we should actually have
+ checked that the old bounds were non-empty.
+
+ Unit test: LayerChromiumTestWithoutFixture.setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds
+
+ * platform/graphics/chromium/LayerChromium.cpp:
+ (WebCore::LayerChromium::setBounds):
+
2012-06-25 Scott Graham <[email protected]>
Plumb Scrollbar button dimensions down to WebThemeEngine
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (121177 => 121178)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-06-25 20:14:19 UTC (rev 121177)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-06-25 20:19:35 UTC (rev 121178)
@@ -228,7 +228,7 @@
if (bounds() == size)
return;
- bool firstResize = !bounds().width() && !bounds().height() && size.width() && size.height();
+ bool firstResize = bounds().isEmpty() && !size.isEmpty();
m_bounds = size;
Modified: trunk/Source/WebKit/chromium/ChangeLog (121177 => 121178)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-06-25 20:14:19 UTC (rev 121177)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-25 20:19:35 UTC (rev 121178)
@@ -1,3 +1,16 @@
+2012-06-25 Ian Vollick <[email protected]>
+
+ [chromium] Layer chromium should need a redraw after getting its first non-empty bounds.
+ https://bugs.webkit.org/show_bug.cgi?id=89784
+
+ Reviewed by James Robinson.
+
+ Previously, we'd only set needs redraw if the old bounds were zero,
+ and the new bounds were non-zero, but we should actually have
+ checked that the old bounds were non-empty.
+
+ * tests/LayerChromiumTest.cpp:
+
2012-06-25 Scott Graham <[email protected]>
Plumb Scrollbar button dimensions down to WebThemeEngine
Modified: trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp (121177 => 121178)
--- trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-06-25 20:14:19 UTC (rev 121177)
+++ trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-06-25 20:19:35 UTC (rev 121178)
@@ -813,4 +813,20 @@
WebKit::WebCompositor::shutdown();
}
+class MockLayerChromium : public LayerChromium {
+public:
+ bool needsDisplay() const { return m_needsDisplay; }
+};
+
+TEST(LayerChromiumTestWithoutFixture, setBoundsTriggersSetNeedsRedrawAfterGettingNonEmptyBounds)
+{
+ MockLayerChromium layer;
+ EXPECT_FALSE(layer.needsDisplay());
+ layer.setBounds(IntSize(0, 10));
+ EXPECT_FALSE(layer.needsDisplay());
+ layer.setBounds(IntSize(10, 10));
+ EXPECT_TRUE(layer.needsDisplay());
+}
+
+
} // namespace
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes