[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:15:36 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e690dd12f1af71a99b94cf65c35e97bb668cc3e4
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 5 23:55:49 2010 +0000
2010-10-05 Nat Duca <nduca at chromium.org>
Reviewed by James Robinson.
[chromium] Handle composited root layer invalidations in screenspace,
fixing the disappearing scrollbar problem.
https://bugs.webkit.org/show_bug.cgi?id=46864
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::composite):
(WebKit::WebViewImpl::scrollRootLayerRect):
(WebKit::WebViewImpl::invalidateRootLayerRect):
(WebKit::WebViewImpl::doComposite):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index eb08542..8daf635 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-05 Nat Duca <nduca at chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] Handle composited root layer invalidations in screenspace,
+ fixing the disappearing scrollbar problem.
+ https://bugs.webkit.org/show_bug.cgi?id=46864
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::composite):
+ (WebKit::WebViewImpl::scrollRootLayerRect):
+ (WebKit::WebViewImpl::invalidateRootLayerRect):
+ (WebKit::WebViewImpl::doComposite):
+
2010-10-05 Kenneth Russell <kbr at google.com>
Unreviewed, follow up to 47216. Add newline above "protected:".
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 5820aaa..599c65e 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -2257,10 +2257,11 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
return;
IntRect contentRect = view->visibleContentRect(false);
+ IntRect screenRect = view->contentsToWindow(contentRect);
// We support fast scrolling in one direction at a time.
if (scrollDelta.width() && scrollDelta.height()) {
- invalidateRootLayerRect(WebRect(contentRect));
+ invalidateRootLayerRect(WebRect(screenRect));
return;
}
@@ -2270,29 +2271,43 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
IntRect damagedContentsRect;
if (scrollDelta.width()) {
int dx = scrollDelta.width();
- damagedContentsRect.setY(contentRect.y());
- damagedContentsRect.setHeight(contentRect.height());
+ damagedContentsRect.setY(screenRect.y());
+ damagedContentsRect.setHeight(screenRect.height());
if (dx > 0) {
- damagedContentsRect.setX(contentRect.x());
+ damagedContentsRect.setX(screenRect.x());
damagedContentsRect.setWidth(dx);
} else {
- damagedContentsRect.setX(contentRect.right() + dx);
+ damagedContentsRect.setX(screenRect.right() + dx);
damagedContentsRect.setWidth(-dx);
}
} else {
int dy = scrollDelta.height();
- damagedContentsRect.setX(contentRect.x());
- damagedContentsRect.setWidth(contentRect.width());
+ damagedContentsRect.setX(screenRect.x());
+ damagedContentsRect.setWidth(screenRect.width());
if (dy > 0) {
- damagedContentsRect.setY(contentRect.y());
+ damagedContentsRect.setY(screenRect.y());
damagedContentsRect.setHeight(dy);
} else {
- damagedContentsRect.setY(contentRect.bottom() + dy);
+ damagedContentsRect.setY(screenRect.bottom() + dy);
damagedContentsRect.setHeight(-dy);
}
}
m_rootLayerScrollDamage.unite(damagedContentsRect);
+
+ // Scroll any existing damage that intersects with clip rect
+ if (clipRect.intersects(m_rootLayerDirtyRect)) {
+ // Find the inner damage
+ IntRect innerDamage(clipRect);
+ innerDamage.intersect(m_rootLayerDirtyRect);
+
+ // Move the damage
+ innerDamage.move(scrollDelta.width(), scrollDelta.height());
+
+ // Merge it back into the damaged rect
+ m_rootLayerDirtyRect.unite(innerDamage);
+ }
+
setRootLayerNeedsDisplay();
}
@@ -2307,15 +2322,10 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
if (!page())
return;
- FrameView* view = page()->mainFrame()->view();
-
- // rect is in viewport space. Convert to content space
- // so that invalidations and scroll invalidations play well with one-another.
- IntRect contentRect = view->windowToContents(rect);
// FIXME: add a smarter damage aggregation logic and/or unify with
// LayerChromium's damage logic
- m_rootLayerDirtyRect.unite(contentRect);
+ m_rootLayerDirtyRect.unite(rect);
setRootLayerNeedsDisplay();
}
@@ -2425,10 +2435,7 @@ void WebViewImpl::doComposite()
damageRects.append(m_rootLayerScrollDamage);
damageRects.append(m_rootLayerDirtyRect);
for (size_t i = 0; i < damageRects.size(); ++i) {
- // The damage rect for the root layer is in content space [e.g. unscrolled].
- // Convert from content space to viewPort space.
- const IntRect damagedContentRect = damageRects[i];
- IntRect damagedRect = view->contentsToWindow(damagedContentRect);
+ IntRect damagedRect = damageRects[i];
// Intersect this rectangle with the viewPort.
damagedRect.intersect(viewPort);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list