[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
mitz at apple.com
mitz at apple.com
Wed Mar 17 17:57:30 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 1bc8e10fc6551e7ac5d340a996e0c88597fef584
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 23 17:54:37 2010 +0000
WebKit/mac: <rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling
https://bugs.webkit.org/show_bug.cgi?id=34381
Reviewed by Simon Fraser.
Test: fast/repaint/repaint-during-scroll.html
NSClipView offsets any rects marked as needing display during scrolling
by the scroll offset. Compensate for this when -setNeedsDisplay: is called
during scrolling.
* WebView/WebHTMLView.mm:
(-[WebHTMLView _frameOrBoundsChanged]): Set inScrollPositionChanged to YES
around to call to FrameView::scrollPositionChanged().
(-[WebHTMLView setNeedsDisplayInRect:]): When called beneath
scrollPositionChanged(), adjust the rect by the inverse of the scroll offset.
LayoutTests: Rubber-stamped by Simon Fraser.
<rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling
https://bugs.webkit.org/show_bug.cgi?id=34381
* fast/repaint/repaint-during-scroll.html: Added.
* platform/mac/fast/repaint/repaint-during-scroll-expected.checksum: Added.
* platform/mac/fast/repaint/repaint-during-scroll-expected.png: Added.
* platform/mac/fast/repaint/repaint-during-scroll-expected.txt: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index d7e965d..8fd02bf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-02-23 Dan Bernstein <mitz at apple.com>
+
+ Rubber-stamped by Simon Fraser.
+
+ <rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=34381
+
+ * fast/repaint/repaint-during-scroll.html: Added.
+ * platform/mac/fast/repaint/repaint-during-scroll-expected.checksum: Added.
+ * platform/mac/fast/repaint/repaint-during-scroll-expected.png: Added.
+ * platform/mac/fast/repaint/repaint-during-scroll-expected.txt: Added.
+
2010-02-23 Brady Eidson <beidson at apple.com>
Reviewed by Alexey Proskuryakov.
diff --git a/LayoutTests/fast/repaint/repaint-during-scroll.html b/LayoutTests/fast/repaint/repaint-during-scroll.html
new file mode 100644
index 0000000..e3f0ac4
--- /dev/null
+++ b/LayoutTests/fast/repaint/repaint-during-scroll.html
@@ -0,0 +1,19 @@
+<head>
+ <script src="resources/repaint.js"></script>
+ <script>
+ function repaintTest()
+ {
+ var target = document.getElementById("target");
+ scrollBy(0, 100);
+ }
+
+ function handleScroll()
+ {
+ var target = document.getElementById("target");
+ target.style.backgroundColor = "green";
+ }
+ </script>
+</head>
+<body onload="runRepaintTest()" onscroll="handleScroll()" style="height: 200%;">
+ <div id="target" style="position: absolute; top: 300px; left: 300px; background-color: red; width: 100px; height: 100px;"></div>
+</body>
diff --git a/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.checksum b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.checksum
new file mode 100644
index 0000000..74a3260
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.checksum
@@ -0,0 +1 @@
+8f8a493fb0c7f6c63db9a68dbfc250be
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.png b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.png
new file mode 100644
index 0000000..7a574f4
Binary files /dev/null and b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.txt b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.txt
new file mode 100644
index 0000000..ce8fc03
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/repaint/repaint-during-scroll-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 785x1216
+ RenderView at (0,0) size 785x600
+layer at (0,0) size 785x1216
+ RenderBlock {HTML} at (0,0) size 785x1216
+ RenderBody {BODY} at (8,8) size 769x1200
+layer at (300,300) size 100x100
+ RenderBlock (positioned) {DIV} at (300,300) size 100x100 [bgcolor=#008000]
+scrolled to 0,100
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 56ebdc6..9119ca2 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2010-02-23 Dan Bernstein <mitz at apple.com>
+
+ Reviewed by Simon Fraser.
+
+ <rdar://problem/7611158> Incomplete repaint of YouTube timeline thumb while scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=34381
+
+ Test: fast/repaint/repaint-during-scroll.html
+
+ NSClipView offsets any rects marked as needing display during scrolling
+ by the scroll offset. Compensate for this when -setNeedsDisplay: is called
+ during scrolling.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _frameOrBoundsChanged]): Set inScrollPositionChanged to YES
+ around to call to FrameView::scrollPositionChanged().
+ (-[WebHTMLView setNeedsDisplayInRect:]): When called beneath
+ scrollPositionChanged(), adjust the rect by the inverse of the scroll offset.
+
2010-02-23 Steve Block <steveblock at google.com>
Reviewed by Darin Adler.
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 120a8fc..8990d2f 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -429,6 +429,9 @@ struct WebHTMLViewInterpretKeyEventsParameters {
BOOL exposeInputContext;
NSPoint lastScrollPosition;
+#ifndef BUILDING_ON_TIGER
+ BOOL inScrollPositionChanged;
+#endif
WebPluginController *pluginController;
@@ -1171,8 +1174,15 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
NSPoint origin = [[self superview] bounds].origin;
if (!NSEqualPoints(_private->lastScrollPosition, origin)) {
if (Frame* coreFrame = core([self _frame])) {
- if (FrameView* coreView = coreFrame->view())
+ if (FrameView* coreView = coreFrame->view()) {
+#ifndef BUILDING_ON_TIGER
+ _private->inScrollPositionChanged = YES;
+#endif
coreView->scrollPositionChanged();
+#ifndef BUILDING_ON_TIGER
+ _private->inScrollPositionChanged = NO;
+#endif
+ }
}
[_private->completionController endRevertingChange:NO moveLeft:NO];
@@ -3137,11 +3147,29 @@ WEBCORE_COMMAND(yankAndSelect)
return [[self _webView] drawsBackground];
}
+#if !LOG_DISABLED
- (void)setNeedsDisplay:(BOOL)flag
{
LOG(View, "%@ setNeedsDisplay:%@", self, flag ? @"YES" : @"NO");
[super setNeedsDisplay:flag];
}
+#endif
+
+#ifndef BUILDING_ON_TIGER
+- (void)setNeedsDisplayInRect:(NSRect)invalidRect
+{
+ if (_private->inScrollPositionChanged) {
+ // When scrolling, the dirty regions are adjusted for the scroll only
+ // after NSViewBoundsDidChangeNotification is sent. Translate the invalid
+ // rect to pre-scrolled coordinates in order to get the right dirty region
+ // after adjustment. See <rdar://problem/7678927>.
+ NSPoint origin = [[self superview] bounds].origin;
+ invalidRect.origin.x -= _private->lastScrollPosition.x - origin.x;
+ invalidRect.origin.y -= _private->lastScrollPosition.y - origin.y;
+ }
+ [super setNeedsDisplayInRect:invalidRect];
+}
+#endif
- (void)setNeedsLayout: (BOOL)flag
{
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list