[webkit-reviews] review granted: [Bug 50974] getComputedStyle() returns wrong values for zoomed elements when display is none : [Attachment 76438] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 13 22:26:27 PST 2010
Darin Adler <darin at apple.com> has granted Beth Dakin <bdakin at apple.com>'s
request for review:
Bug 50974: getComputedStyle() returns wrong values for zoomed elements when
display is none
https://bugs.webkit.org/show_bug.cgi?id=50974
Attachment 76438: Patch
https://bugs.webkit.org/attachment.cgi?id=76438&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=76438&action=review
r=me, but please consider factoring out the repetitive code into a function
>> WebCore/css/CSSComputedStyleDeclaration.cpp:1550
>> +
>
> I don't know this area but I do see a pattern here.
>
> Why not create a function like this:
>
> PassRefPtr<CSSValue> get{FillInNameHere}(const Length& length, const
RenderStyle* style)
> {
> if (length.isFixed())
> return zoomAdjustedPixelValue(width.value(), style);
> return CSSPrimitiveValue::create(width);
> }
>
> and use this in all of these places
> ?
I was going to make the same suggestion. No need to use the word “get”, though!
More information about the webkit-reviews
mailing list