[webkit-reviews] review granted: [Bug 32230] getComputedStyle() returns different values for different zoom levels : [Attachment 67621] Style fixes and reuse zoom adjusting code from RenderObject.h
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 14 22:19:05 PDT 2010
Darin Adler <darin at apple.com> has granted Erik Arvidsson <arv at chromium.org>'s
request for review:
Bug 32230: getComputedStyle() returns different values for different zoom
levels
https://bugs.webkit.org/show_bug.cgi?id=32230
Attachment 67621: Style fixes and reuse zoom adjusting code from RenderObject.h
https://bugs.webkit.org/attachment.cgi?id=67621&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context:
https://bugs.webkit.org/attachment.cgi?id=67621&action=prettypatch
Looks good.
> WebCore/css/CSSComputedStyleDeclaration.cpp:341
> + double zoomFactor = style->effectiveZoom();
> + if (zoomFactor != 1)
> + value = value / zoomFactor;
> +
> + return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER);
Why the if statement and special handling of 1? Is it a performance
optimization? This would read better if it just said value /
style->effectiveZoom() without a local variable.
More information about the webkit-reviews
mailing list