WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140920
Introduce Document::body() for call sites interested in the <body> element
https://bugs.webkit.org/show_bug.cgi?id=140920
Summary
Introduce Document::body() for call sites interested in the <body> element
Chris Dumez
Reported
2015-01-26 19:35:52 PST
Introduce Document::body() for call sites interested in the <body> element only (not <frameset> like Document::bodyOrFrameset() does).
Attachments
Patch
(26.89 KB, patch)
2015-01-26 19:53 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(26.86 KB, patch)
2015-01-26 21:53 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(26.13 KB, patch)
2015-01-26 21:56 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2015-01-26 19:53:35 PST
Created
attachment 245404
[details]
Patch
Darin Adler
Comment 2
2015-01-26 21:41:57 PST
Comment on
attachment 245404
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245404&action=review
> Source/WebCore/rendering/RenderLayerBacking.cpp:1793 > + auto* rootObject = renderer().document().documentElement() ? renderer().document().documentElement()->renderer() : nullptr;
Surprised you didn’t add a local variable for documentElement here given what you did everywhere else
> Source/WebCore/rendering/RenderLayerBacking.cpp:1806 > + auto* bodyRenderer = body ? body->renderer() : nullptr; > + if (!bodyRenderer) > return false;
Could just return false one more time a line earlier instead of using ? : here
Chris Dumez
Comment 3
2015-01-26 21:50:03 PST
Comment on
attachment 245404
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=245404&action=review
>> Source/WebCore/rendering/RenderLayerBacking.cpp:1793 >> + auto* rootObject = renderer().document().documentElement() ? renderer().document().documentElement()->renderer() : nullptr; > > Surprised you didn’t add a local variable for documentElement here given what you did everywhere else
documentElement() is a trivial getter. I cached the return value of body() and bodyOrFrameset() because those do tree traversal.
>> Source/WebCore/rendering/RenderLayerBacking.cpp:1806 >> return false; > > Could just return false one more time a line earlier instead of using ? : here
Ok.
Chris Dumez
Comment 4
2015-01-26 21:53:10 PST
Created
attachment 245418
[details]
Patch
Chris Dumez
Comment 5
2015-01-26 21:56:16 PST
Created
attachment 245419
[details]
Patch
WebKit Commit Bot
Comment 6
2015-01-26 23:05:10 PST
Comment on
attachment 245419
[details]
Patch Clearing flags on attachment: 245419 Committed
r179172
: <
http://trac.webkit.org/changeset/179172
>
WebKit Commit Bot
Comment 7
2015-01-26 23:05:16 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