Bug 109859 - Intrinsic and preferred widths on replaced elements are wrong in many cases
Summary: Intrinsic and preferred widths on replaced elements are wrong in many cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks: 117474
  Show dependency treegraph
 
Reported: 2013-02-14 14:00 PST by Ojan Vafai
Modified: 2013-06-10 20:37 PDT (History)
11 users (show)

See Also:


Attachments
Patch (207.76 KB, patch)
2013-02-14 14:20 PST, Ojan Vafai
no flags Details | Formatted Diff | Diff
Patch (206.70 KB, patch)
2013-02-14 14:43 PST, Ojan Vafai
no flags Details | Formatted Diff | Diff
Patch (206.71 KB, patch)
2013-02-14 15:03 PST, Ojan Vafai
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.