Bug 75959

Summary: Add RenderStyle::isPositioned() helper method
Product: WebKit Reporter: Mihnea Ovidenie <mihnea>
Component: Layout and RenderingAssignee: Mihnea Ovidenie <mihnea>
Status: RESOLVED FIXED    
Severity: Normal CC: hyatt, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
hyatt: review-, hyatt: commit-queue-
Patch 2
none
Patch for landing none

Description Mihnea Ovidenie 2012-01-10 06:42:28 PST
Instead of (style()->position() == AbsolutePosition || style()->position() == FixedPosition) use (style()->isAbsolutelyPositioned()).
Instead of (style()->position() != AbsolutePosition && style()->position() != FixedPosition) use (!style()->isAbsolutelyPositioned()).
Comment 1 Mihnea Ovidenie 2012-01-10 07:55:37 PST
Created attachment 121847 [details]
Patch
Comment 2 Tony Chang 2012-01-10 09:43:35 PST
Should we name the function isPositioned() to match the function on RenderObject?
Comment 3 Mihnea Ovidenie 2012-01-10 10:03:01 PST
(In reply to comment #2)
> Should we name the function isPositioned() to match the function on RenderObject?

I initially thought so, but i decided to name it after looking at the phrase "absolutely positioned element" from http://www.w3.org/TR/CSS2/visuren.html#absolute-positioning.
Comment 4 Dave Hyatt 2012-01-11 12:53:57 PST
Comment on attachment 121847 [details]
Patch

Agree with Tony. Would prefer isPositioned.
Comment 5 Mihnea Ovidenie 2012-01-11 13:40:59 PST
Created attachment 122086 [details]
Patch 2
Comment 6 Tony Chang 2012-01-11 13:45:59 PST
Comment on attachment 122086 [details]
Patch 2

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

> Source/WebCore/rendering/RenderObject.cpp:629
> +        if (!last->isText() && (last->style()->isPositioned())) {

Nit: Remove extra ()s.

> Source/WebCore/rendering/RenderObject.cpp:669
> +    if (b && !alreadyDirty && markParents && (isText() || (!style()->isPositioned())))

Nit: Remove extra ()s.
Comment 7 Mihnea Ovidenie 2012-01-12 00:48:40 PST
Created attachment 122184 [details]
Patch for landing
Comment 8 WebKit Review Bot 2012-01-12 02:23:04 PST
Comment on attachment 122184 [details]
Patch for landing

Clearing flags on attachment: 122184

Committed r104802: <http://trac.webkit.org/changeset/104802>
Comment 9 WebKit Review Bot 2012-01-12 02:23:09 PST
All reviewed patches have been landed.  Closing bug.