[webkit-reviews] review granted: [Bug 71856] WebKit should use new NSWindowDidChangeBackingPropertiesNotification instead of old NSWindowDidChangeResolutionNotification : [Attachment 114154] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 8 14:32:15 PST 2011


Timothy Hatcher <timothy at apple.com> has granted Beth Dakin <bdakin at apple.com>'s
request for review:
Bug 71856: WebKit should use new NSWindowDidChangeBackingPropertiesNotification
instead of old NSWindowDidChangeResolutionNotification
https://bugs.webkit.org/show_bug.cgi?id=71856

Attachment 114154: Patch
https://bugs.webkit.org/attachment.cgi?id=114154&action=review

------- Additional Comments from Timothy Hatcher <timothy at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=114154&action=review


> Source/WebKit2/UIProcess/API/mac/WKView.mm:1892
> +    CGFloat oldBackingScaleFactor = [[notification.userInfo
objectForKey:backingPropertyOldScaleFactorKey] doubleValue]; 
> +    CGFloat newBackingScaleFactor = [self _intrinsicDeviceScaleFactor]; 
> +    if (oldBackingScaleFactor == newBackingScaleFactor) 
> +	   return; 
> +
> +    _data->_page->setIntrinsicDeviceScaleFactor(newBackingScaleFactor);

Wouldn't Page::setIntrinsicDeviceScaleFactor know the old scale factor, meaning
you wouldn't need to check here?

> Source/WebKit/mac/WebView/WebView.mm:3382
> +    CGFloat oldBackingScaleFactor = [[notification.userInfo
objectForKey:backingPropertyOldScaleFactorKey] doubleValue]; 
> +    CGFloat newBackingScaleFactor = [self _deviceScaleFactor];
> +    if (oldBackingScaleFactor == newBackingScaleFactor) 
> +	   return; 
> +
> +    _private->page->setDeviceScaleFactor(newBackingScaleFactor);

Wouldn't Page::setDeviceScaleFactor know the old scale factor, meaning you
wouldn't need to check here?


More information about the webkit-reviews mailing list