WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
137845
Use is<>() / downcast<>() for all remaining RenderObject subclasses
https://bugs.webkit.org/show_bug.cgi?id=137845
Summary
Use is<>() / downcast<>() for all remaining RenderObject subclasses
Chris Dumez
Reported
2014-10-17 21:07:22 PDT
Use is<>() / downcast<>() for all remaining RenderObject subclasses.
Attachments
Patch
(154.33 KB, patch)
2014-10-17 21:23 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(154.52 KB, patch)
2014-10-18 10:51 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(154.62 KB, patch)
2014-10-19 19:54 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(154.64 KB, patch)
2014-10-19 19:57 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2014-10-17 21:23:48 PDT
Created
attachment 240058
[details]
Patch
Chris Dumez
Comment 2
2014-10-18 10:51:26 PDT
Created
attachment 240066
[details]
Patch
Chris Dumez
Comment 3
2014-10-18 11:41:18 PDT
Finally, all the RenderObjects are ported. Getting really close to killing TYPE_CASTS_BASE() macro.
Darin Adler
Comment 4
2014-10-19 19:45:34 PDT
Comment on
attachment 240066
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240066&action=review
> Source/WebCore/html/HTMLEmbedElement.cpp:63 > + do { > n = n->parentNode(); > - while (n && !n->hasTagName(objectTag)); > + } while (n && !is<HTMLObjectElement>(*n));
Why did you add the braces? Also surprised you didn’t rename the “n” variable.
Chris Dumez
Comment 5
2014-10-19 19:47:45 PDT
Comment on
attachment 240066
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240066&action=review
>> Source/WebCore/html/HTMLEmbedElement.cpp:63 >> + } while (n && !is<HTMLObjectElement>(*n)); > > Why did you add the braces? Also surprised you didn’t rename the “n” variable.
The style checker complained. Was the style script wrong? Are we supposed to omit them in this case? I'll rename the variable.
Chris Dumez
Comment 6
2014-10-19 19:54:05 PDT
Created
attachment 240094
[details]
Patch
Darin Adler
Comment 7
2014-10-19 19:55:39 PDT
Comment on
attachment 240066
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=240066&action=review
>>> Source/WebCore/html/HTMLEmbedElement.cpp:63 >>> + } while (n && !is<HTMLObjectElement>(*n)); >> >> Why did you add the braces? Also surprised you didn’t rename the “n” variable. > > The style checker complained. Was the style script wrong? Are we supposed to omit them in this case? > > I'll rename the variable.
I’m not sure. The coding style document doesn’t say one way or another. I am kind of annoyed at the style script making rules that we didn’t write down first, but I suppose there’s a lot of that. Since I personally prefer braces even for one line if statements, I suppose it would be good to have our strange if rule be only for if statements, and not for looping constructs.
WebKit Commit Bot
Comment 8
2014-10-19 19:56:56 PDT
Attachment 240094
[details]
did not pass style-queue: ERROR: Source/WebCore/html/HTMLEmbedElement.cpp:63: Semicolon defining empty statement for this loop. Use { } instead. [whitespace/semicolon] [5] Total errors found: 1 in 63 files If any of these errors are false positives, please file a bug against check-webkit-style.
Chris Dumez
Comment 9
2014-10-19 19:57:37 PDT
Created
attachment 240095
[details]
Patch
Chris Dumez
Comment 10
2014-10-19 19:58:33 PDT
(In reply to
comment #7
)
> Comment on
attachment 240066
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=240066&action=review
> > >>> Source/WebCore/html/HTMLEmbedElement.cpp:63 > >>> + } while (n && !is<HTMLObjectElement>(*n)); > >> > >> Why did you add the braces? Also surprised you didn’t rename the “n” variable. > > > > The style checker complained. Was the style script wrong? Are we supposed to omit them in this case? > > > > I'll rename the variable. > > I’m not sure. The coding style document doesn’t say one way or another. I am > kind of annoyed at the style script making rules that we didn’t write down > first, but I suppose there’s a lot of that. > > Since I personally prefer braces even for one line if statements, I suppose > it would be good to have our strange if rule be only for if statements, and > not for looping constructs.
Ok, I also prefer the braces in this particular case. I left the braces in but renamed the n variable to node.
WebKit Commit Bot
Comment 11
2014-10-19 20:42:03 PDT
Comment on
attachment 240095
[details]
Patch Clearing flags on attachment: 240095 Committed
r174875
: <
http://trac.webkit.org/changeset/174875
>
WebKit Commit Bot
Comment 12
2014-10-19 20:42:09 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