Bug 109859

Summary: Intrinsic and preferred widths on replaced elements are wrong in many cases
Product: WebKit Reporter: Ojan Vafai <ojan>
Component: New BugsAssignee: Ojan Vafai <ojan>
Status: RESOLVED FIXED    
Severity: Normal CC: d-r, eric, fmalita, hyatt, jchaffraix, leviw, ojan.autocc, pdr, schenney, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 117474    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Ojan Vafai 2013-02-14 14:00:02 PST
Intrinsic and preferred widths on replaced elements are wrong in many cases
Comment 1 Ojan Vafai 2013-02-14 14:20:13 PST
Created attachment 188425 [details]
Patch
Comment 2 Ojan Vafai 2013-02-14 14:43:11 PST
Created attachment 188432 [details]
Patch
Comment 3 Levi Weintraub 2013-02-14 14:45:01 PST
Comment on attachment 188432 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=188432&action=review

> Source/WebCore/rendering/RenderReplaced.cpp:456
> +    RenderStyle* styleToUse = style();
> +    if (style()->logicalWidth().isPercent() || style()->logicalMaxWidth().isPercent() || hasRelativeIntrinsicLogicalWidth())

Why aren't you using the styleToUse you just created?
Comment 4 Ojan Vafai 2013-02-14 15:03:14 PST
Created attachment 188436 [details]
Patch
Comment 5 Ojan Vafai 2013-02-14 15:03:29 PST
(In reply to comment #3)
> (From update of attachment 188432 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=188432&action=review
> 
> > Source/WebCore/rendering/RenderReplaced.cpp:456
> > +    RenderStyle* styleToUse = style();
> > +    if (style()->logicalWidth().isPercent() || style()->logicalMaxWidth().isPercent() || hasRelativeIntrinsicLogicalWidth())
> 
> Why aren't you using the styleToUse you just created?

Whoops. Fixed.
Comment 6 Levi Weintraub 2013-02-14 15:07:08 PST
Comment on attachment 188436 [details]
Patch

Awesome fix :)
Comment 7 WebKit Review Bot 2013-02-14 15:59:44 PST
Comment on attachment 188436 [details]
Patch

Clearing flags on attachment: 188436

Committed r142931: <http://trac.webkit.org/changeset/142931>
Comment 8 WebKit Review Bot 2013-02-14 15:59:50 PST
All reviewed patches have been landed.  Closing bug.