WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
73731
RenderLayer::backgroundClipRect should not check parent()
https://bugs.webkit.org/show_bug.cgi?id=73731
Summary
RenderLayer::backgroundClipRect should not check parent()
Julien Chaffraix
Reported
2011-12-02 19:15:55 PST
All the callers are already calling parent() and it is a pretty hot function in some benchmark. Let's also clean up the function a bit while at it. Patch forthcoming.
Attachments
Proposed change 1: remove parent() + some clean-up.
(3.63 KB, patch)
2011-12-02 19:29 PST
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2011-12-02 19:29:24 PST
Created
attachment 117734
[details]
Proposed change 1: remove parent() + some clean-up.
Simon Fraser (smfr)
Comment 2
2011-12-05 08:54:14 PST
Comment on
attachment 117734
[details]
Proposed change 1: remove parent() + some clean-up. View in context:
https://bugs.webkit.org/attachment.cgi?id=117734&action=review
Did you do archaeology to see why the parent() check was there?
> Source/WebCore/rendering/RenderLayer.cpp:3617 > + if (position == AbsolutePosition) > + return parentRects.posClipRect();
Does renderer-> isPositioned() return true for position:relative? If so, then you broke stuff.
Julien Chaffraix
Comment 3
2011-12-05 12:41:45 PST
Comment on
attachment 117734
[details]
Proposed change 1: remove parent() + some clean-up. View in context:
https://bugs.webkit.org/attachment.cgi?id=117734&action=review
>> Source/WebCore/rendering/RenderLayer.cpp:3617 >> + return parentRects.posClipRect(); > > Does renderer-> isPositioned() return true for position:relative? If so, then you broke stuff.
No, it does not. Here is the comment in RenderObject (still accurate per RenderBox::updateBoxModelInfoFromStyle): bool isPositioned() const { return m_positioned; } // absolute or fixed positioning isPositioned() also returns true for the RenderView but it will never be called here as it has no parent.
Julien Chaffraix
Comment 4
2011-12-28 07:21:33 PST
(In reply to
comment #2
)
> (From update of
attachment 117734
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=117734&action=review
> > Did you do archaeology to see why the parent() check was there?
I just did as I missed your question. The parent() check inside backgroundClipRect is a legacy of
bug 29346
which split calculateRects in 2. It looks like it was missed during the split that all call sites were already checking parent() which made the check redundant.
WebKit Review Bot
Comment 5
2012-01-03 12:09:02 PST
Comment on
attachment 117734
[details]
Proposed change 1: remove parent() + some clean-up. Clearing flags on attachment: 117734 Committed
r103955
: <
http://trac.webkit.org/changeset/103955
>
WebKit Review Bot
Comment 6
2012-01-03 12:09:06 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug