Bug 75959 - Add RenderStyle::isPositioned() helper method
Summary: Add RenderStyle::isPositioned() helper method
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihnea Ovidenie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-10 06:42 PST by Mihnea Ovidenie
Modified: 2012-01-12 02:23 PST (History)
3 users (show)

See Also:


Attachments
Patch (6.87 KB, patch)
2012-01-10 07:55 PST, Mihnea Ovidenie
hyatt: review-
hyatt: commit-queue-
Details | Formatted Diff | Diff
Patch 2 (6.74 KB, patch)
2012-01-11 13:40 PST, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff
Patch for landing (7.13 KB, patch)
2012-01-12 00:48 PST, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

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