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
137704
Use is<>() / downcast<>() for RenderInline
https://bugs.webkit.org/show_bug.cgi?id=137704
Summary
Use is<>() / downcast<>() for RenderInline
Chris Dumez
Reported
2014-10-14 11:21:49 PDT
Use is<>() / downcast<>() for RenderInline.
Attachments
Patch
(71.08 KB, patch)
2014-10-14 11:45 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(70.98 KB, patch)
2014-10-14 16:24 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-10-14 11:45:15 PDT
Created
attachment 239812
[details]
Patch
WebKit Commit Bot
Comment 2
2014-10-14 11:48:07 PDT
Attachment 239812
[details]
did not pass style-queue: ERROR: Source/WebCore/rendering/RenderInline.cpp:1111: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2014-10-14 15:37:44 PDT
Comment on
attachment 239812
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=239812&action=review
> Source/WebCore/rendering/InlineFlowBox.cpp:222 > - toRenderInline(renderer()).lineBoxes().removeLineBox(this); > + downcast<RenderInline>(renderer()).lineBoxes().removeLineBox(this);
Seems like renderer() should return a RenderInline& if it’s guaranteed to be one. Maybe there’s some reason not to do this.
> Source/WebCore/rendering/InlineFlowBox.cpp:1011 > + for (InlineBox* current = lastChild(); current; current = current->prevOnLine()) {
I think I would have called this “child” instead of “current”. I noticed one like this in a previous patch, and probably should have commented then.
> Source/WebCore/rendering/RenderBox.cpp:2013 > + ASSERT(renderer == container() || is<RenderRegion>(*renderer));
Looks like this function should take a RenderElement& given that assertion. Maybe some day we can make that change.
> Source/WebCore/rendering/RenderBoxModelObject.cpp:217 > + while (is<RenderInline>(parent)) {
This would read better as a for loop. If we can’t fit it all on one line we could leave out the initializer, but the termination and “move to parent” would be fit nicely in a for.
Chris Dumez
Comment 4
2014-10-14 16:24:56 PDT
Created
attachment 239832
[details]
Patch
WebKit Commit Bot
Comment 5
2014-10-14 16:27:46 PDT
Attachment 239832
[details]
did not pass style-queue: ERROR: Source/WebCore/rendering/RenderInline.cpp:1111: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 1 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 6
2014-10-14 17:29:57 PDT
Comment on
attachment 239832
[details]
Patch Clearing flags on attachment: 239832 Committed
r174714
: <
http://trac.webkit.org/changeset/174714
>
WebKit Commit Bot
Comment 7
2014-10-14 17:30:02 PDT
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