Diff
Modified: trunk/LayoutTests/ChangeLog (108535 => 108536)
--- trunk/LayoutTests/ChangeLog 2012-02-22 20:15:39 UTC (rev 108535)
+++ trunk/LayoutTests/ChangeLog 2012-02-22 20:18:30 UTC (rev 108536)
@@ -1,3 +1,21 @@
+2012-02-22 Alexei Svitkine <[email protected]>
+
+ [chromium] Fix remaining compositing/rubberbanding test failures
+ https://bugs.webkit.org/show_bug.cgi?id=78008
+
+ These were happening due to the fact that ScrollView wasn't updating
+ the overhang layer when the contentsSize was updated. This is necessary
+ because calculateOverhangAreasForPainting() takes the contentsSize into
+ account when determining whether the overhang areas are visible.
+
+ Reviewed by James Robinson.
+
+ Re-enabled the following tests with updated baselines:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-e-expected.png:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-s-expected.png:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-se-expected.png:
+ * platform/chromium/test_expectations.txt:
+
2012-02-22 Dan Bernstein <[email protected]>
REGRESSION (r62632): page-break-inside: avoid is ignored
Modified: trunk/LayoutTests/platform/chromium/compositing/rubberbanding/transform-overhang-e-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium/compositing/rubberbanding/transform-overhang-s-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium/compositing/rubberbanding/transform-overhang-se-expected.png
(Binary files differ)
Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (108535 => 108536)
--- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-22 20:15:39 UTC (rev 108535)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-22 20:18:30 UTC (rev 108536)
@@ -3793,10 +3793,6 @@
BUGWK77183 : svg/as-object/nested-embedded-svg-size-changes.html = IMAGE
-BUGWK78008 : platform/chromium/compositing/rubberbanding/transform-overhang-e.html = IMAGE
-BUGWK78008 : platform/chromium/compositing/rubberbanding/transform-overhang-se.html = IMAGE
-BUGWK78008 : platform/chromium/compositing/rubberbanding/transform-overhang-s.html = IMAGE
-
// SVGLoad event timing changes require some rebaselines.
BUGWK78084 : svg/custom/polyline-setattribute-points-null.svg = IMAGE+TEXT
Modified: trunk/Source/WebCore/ChangeLog (108535 => 108536)
--- trunk/Source/WebCore/ChangeLog 2012-02-22 20:15:39 UTC (rev 108535)
+++ trunk/Source/WebCore/ChangeLog 2012-02-22 20:18:30 UTC (rev 108536)
@@ -1,3 +1,29 @@
+2012-02-22 Alexei Svitkine <[email protected]>
+
+ [chromium] Fix remaining compositing/rubberbanding test failures
+ https://bugs.webkit.org/show_bug.cgi?id=78008
+
+ These were happening due to the fact that ScrollView wasn't updating
+ the overhang layer when the contentsSize was updated. This is necessary
+ because calculateOverhangAreasForPainting() takes the contentsSize into
+ account when determining whether the overhang areas are visible.
+
+ Reviewed by James Robinson.
+
+ Re-enabled the following tests with updated baselines:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-e-expected.png:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-s-expected.png:
+ * platform/chromium/compositing/rubberbanding/transform-overhang-se-expected.png:
+ * platform/chromium/test_expectations.txt:
+
+ * platform/ScrollView.cpp:
+ (WebCore::ScrollView::setContentsSize):
+ (WebCore::ScrollView::scrollContents):
+ (WebCore::ScrollView::updateOverhangAreas):
+ (WebCore):
+ * platform/ScrollView.h:
+ (ScrollView):
+
2012-02-22 Vsevolod Vlasov <[email protected]>
Web Inspector: [Regression] network worker tests crash on qt.
Modified: trunk/Source/WebCore/platform/ScrollView.cpp (108535 => 108536)
--- trunk/Source/WebCore/platform/ScrollView.cpp 2012-02-22 20:15:39 UTC (rev 108535)
+++ trunk/Source/WebCore/platform/ScrollView.cpp 2012-02-22 20:18:30 UTC (rev 108536)
@@ -302,6 +302,7 @@
platformSetContentsSize();
else
updateScrollbars(scrollOffset());
+ updateOverhangAreas();
}
IntPoint ScrollView::maximumScrollPosition() const
@@ -655,21 +656,7 @@
}
// Invalidate the overhang areas if they are visible.
- IntRect horizontalOverhangRect;
- IntRect verticalOverhangRect;
- calculateOverhangAreasForPainting(horizontalOverhangRect, verticalOverhangRect);
-#if USE(ACCELERATED_COMPOSITING) && PLATFORM(CHROMIUM) && ENABLE(RUBBER_BANDING)
- if (GraphicsLayer* overhangLayer = layerForOverhangAreas()) {
- bool hasOverhangArea = !horizontalOverhangRect.isEmpty() || !verticalOverhangRect.isEmpty();
- overhangLayer->setDrawsContent(hasOverhangArea);
- if (hasOverhangArea)
- overhangLayer->setNeedsDisplay();
- }
-#endif
- if (!horizontalOverhangRect.isEmpty())
- hostWindow()->invalidateContentsAndRootView(horizontalOverhangRect, false /*immediate*/);
- if (!verticalOverhangRect.isEmpty())
- hostWindow()->invalidateContentsAndRootView(verticalOverhangRect, false /*immediate*/);
+ updateOverhangAreas();
// This call will move children with native widgets (plugins) and invalidate them as well.
frameRectsChanged();
@@ -1120,6 +1107,28 @@
}
}
+void ScrollView::updateOverhangAreas()
+{
+ if (!hostWindow())
+ return;
+
+ IntRect horizontalOverhangRect;
+ IntRect verticalOverhangRect;
+ calculateOverhangAreasForPainting(horizontalOverhangRect, verticalOverhangRect);
+#if USE(ACCELERATED_COMPOSITING) && PLATFORM(CHROMIUM) && ENABLE(RUBBER_BANDING)
+ if (GraphicsLayer* overhangLayer = layerForOverhangAreas()) {
+ bool hasOverhangArea = !horizontalOverhangRect.isEmpty() || !verticalOverhangRect.isEmpty();
+ overhangLayer->setDrawsContent(hasOverhangArea);
+ if (hasOverhangArea)
+ overhangLayer->setNeedsDisplay();
+ }
+#endif
+ if (!horizontalOverhangRect.isEmpty())
+ hostWindow()->invalidateContentsAndRootView(horizontalOverhangRect, false /*immediate*/);
+ if (!verticalOverhangRect.isEmpty())
+ hostWindow()->invalidateContentsAndRootView(verticalOverhangRect, false /*immediate*/);
+}
+
void ScrollView::paintOverhangAreas(GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect, const IntRect& dirtyRect)
{
ScrollbarTheme::theme()->paintOverhangAreas(this, context, horizontalOverhangRect, verticalOverhangRect, dirtyRect);
Modified: trunk/Source/WebCore/platform/ScrollView.h (108535 => 108536)
--- trunk/Source/WebCore/platform/ScrollView.h 2012-02-22 20:15:39 UTC (rev 108535)
+++ trunk/Source/WebCore/platform/ScrollView.h 2012-02-22 20:18:30 UTC (rev 108536)
@@ -289,7 +289,6 @@
virtual void repaintContentRectangle(const IntRect&, bool now = false);
virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
- void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
virtual void visibleContentsResized() = 0;
@@ -385,6 +384,9 @@
void platformSetScrollOrigin(const IntPoint&, bool updatePositionAtAll, bool updatePositionSynchronously);
+ void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
+ void updateOverhangAreas();
+
#if PLATFORM(MAC) && defined __OBJC__
public:
NSView* documentView() const;