Commit 622c8364 authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Teach WebView::scrollBackingStore about compositing mode

Test:
    compositing/scroll-painted-composited-content.html

Fixes <http://webkit.org/b/52720> REGRESSION (r75987): Assertion failure in
WebView::scrollBackingStore when scrolling page with composited content

Reviewed by Anders Carlsson.

Source/WebKit/win:

* WebView.cpp:
(WebView::scrollBackingStore): Do something sensible (though naive) when in compositing
mode, rather than incorrectly asserting that this function is never called in that case. For
now we just repaint the entire scrolled region; someday hopefully we can avoid having to
repaint the areas that have just been moved.

LayoutTests:

Add a test that scrolls composited content that has already been painted

* compositing/scroll-painted-composited-content.html: Added.
* compositing/scroll-painted-composited-content-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 18a6fc4c
2011-01-19 Adam Roben <aroben@apple.com>
Add a test that scrolls composited content that has already been painted
Test for <http://webkit.org/b/52720> REGRESSION (r75987): Assertion failure in
WebView::scrollBackingStore when scrolling page with composited content
Reviewed by Anders Carlsson.
* compositing/scroll-painted-composited-content.html: Added.
* compositing/scroll-painted-composited-content-expected.txt: Added.
2011-01-20 Yury Semikhatsky <yurys@chromium.org>
 
Reviewed by Pavel Feldman.
......
Test for Bug 52720 - REGRESSION (r75987): Assertion failure in WebView::scrollBackingStore when scrolling page with composited content. The test passes if it doesn't assert in Debug builds.
<!DOCTYPE html>
<html>
<head>
<title>Test scrolling with composited content that has already been painted</title>
<style>
body {
width: 600px;
}
div {
-webkit-transform: translateZ(0);
width: 1000px;
height: 800px;
}
</style>
</head>
<body>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=52720">Bug 52720 - REGRESSION
(r75987): Assertion failure in WebView::scrollBackingStore when scrolling page with composited
content</a>. The test passes if it doesn't assert in Debug builds.</p>
<div></div>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
// Force a paint so that the content will be painted at the current scroll offset (0x0)
// before we scroll.
layoutTestController.display();
}
window.scrollBy(300, 0);
</script>
</body>
</html>
2011-01-19 Adam Roben <aroben@apple.com>
Teach WebView::scrollBackingStore about compositing mode
Test:
compositing/scroll-painted-composited-content.html
Fixes <http://webkit.org/b/52720> REGRESSION (r75987): Assertion failure in
WebView::scrollBackingStore when scrolling page with composited content
Reviewed by Anders Carlsson.
* WebView.cpp:
(WebView::scrollBackingStore): Do something sensible (though naive) when in compositing
mode, rather than incorrectly asserting that this function is never called in that case. For
now we just repaint the entire scrolled region; someday hopefully we can avoid having to
repaint the areas that have just been moved.
2011-01-19 Simon Fraser <simon.fraser@apple.com>
Reviewed by Sam Weinig.
......
......@@ -819,7 +819,12 @@ void WebView::addToDirtyRegion(HRGN newRegion)
void WebView::scrollBackingStore(FrameView* frameView, int dx, int dy, const IntRect& scrollViewRect, const IntRect& clipRect)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(!isAcceleratedCompositing());
if (isAcceleratedCompositing()) {
// FIXME: We should be doing something smarter here, like moving tiles around and painting
// any newly-exposed tiles. <http://webkit.org/b/52714>
m_backingLayer->setNeedsDisplayInRect(scrollViewRect);
return;
}
#endif
LOCAL_GDI_COUNTER(0, __FUNCTION__);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment