Changeset 133225 in webkit
- Timestamp:
- Nov 1, 2012 1:57:46 PM (11 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r133109 r133225 1 2012-11-01 Adam Roben <aroben@webkit.org> 2 3 [WK1] Fixed-position elements jiggle up and down slightly during scrolling on a Retina display 4 https://bugs.webkit.org/show_bug.cgi?id=100957 5 6 Reviewed by Simon Fraser. 7 8 WebCore doesn't yet support subpixel scrolling. WebKit2 forces 9 scrolling to always be integral. Now WebKit1 forces this as well. 10 11 I'm not sure how to write a test for this. 12 13 * WebView/WebDynamicScrollBarsView.mm: 14 (shouldRoundScrollOrigin): Returns YES if there are any position:fixed 15 or position:sticky elements in the page. 16 (-[WebDynamicScrollBarsView scrollClipView:toPoint:]): Round the 17 scroll origin to the nearest pixel if needed. 18 1 19 2012-10-31 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
r122400 r133225 30 30 #import "WebFrameView.h" 31 31 #import "WebHTMLViewInternal.h" 32 #import <WebCore/Frame.h>33 32 #import <WebCore/FrameView.h> 34 33 #import <WebKitSystemInterface.h> … … 187 186 { 188 187 return _private->verticalScrollingAllowedButScrollerHidden || [self hasVerticalScroller]; 188 } 189 190 static BOOL shouldRoundScrollOrigin(WebDynamicScrollBarsView *view) 191 { 192 NSView *documentView = [view documentView]; 193 if (![documentView isKindOfClass:[WebHTMLView class]]) 194 return NO; 195 196 Frame* frame = core([(WebHTMLView *)documentView _frame]); 197 if (!frame) 198 return NO; 199 200 FrameView *frameView = frame->view(); 201 if (!frameView) 202 return NO; 203 204 return frameView->hasViewportConstrainedObjects(); 205 } 206 207 - (void)scrollClipView:(NSClipView *)clipView toPoint:(NSPoint)point 208 { 209 if (shouldRoundScrollOrigin(self)) { 210 // WebCore isn't yet able to handle subpixel scrolling, as can happen on Retina displays. For 211 // now we'll round to the nearest pixel. Once subpixel layout is enabled in WebCore we may be 212 // able to remove this method entirely. 213 point.x = round(point.x); 214 point.y = round(point.y); 215 } 216 217 [super scrollClipView:clipView toPoint:point]; 189 218 } 190 219
Note: See TracChangeset
for help on using the changeset viewer.