Summary: | Virtualize createAnonymousBlockWithSameTypeAs and move to RenderBox | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Abhishek Arya <inferno> | ||||||||
Component: | Layout and Rendering | Assignee: | Abhishek Arya <inferno> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, jchaffraix, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 82630 | ||||||||||
Attachments: |
|
Description
Abhishek Arya
2012-04-04 15:52:26 PDT
Created attachment 135713 [details]
Patch
Comment on attachment 135713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=135713&action=review > Source/WebCore/ChangeLog:9 > + This helps to use the same function to create anonymous > + table parts as well. This is also in preparation of adding more of them IIRC. > Source/WebCore/rendering/RenderTable.h:215 > + virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const Does this function need to be public? Also let's to annotate the overridden functions with OVERRIDE. (comments not repeated on all the other table renderers) (In reply to comment #2) > (From update of attachment 135713 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=135713&action=review > > > Source/WebCore/ChangeLog:9 > > + This helps to use the same function to create anonymous > > + table parts as well. > > This is also in preparation of adding more of them IIRC. Correcting the comment. > > > Source/WebCore/rendering/RenderTable.h:215 > > + virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject* parent) const > > Does this function need to be public? Also let's to annotate the overridden functions with OVERRIDE. (comments not repeated on all the other table renderers) Doing the OVERRIDE now. It needs to be public since it will be called from the otherAnonymousBlock as otherAnonymousBlock->createAnonymousBoxWithSameTypeAs(parent). Created attachment 136040 [details]
Patch
Comment on attachment 136040 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=136040&action=review > Source/WebCore/ChangeLog:9 > + table parts and in the future extend to more derived Nit: "more derived" was like deeper class hierarchy in my first reading, I would just re-arrange the wording: in the future extend to more classes derived from RenderBox. > Source/WebCore/ChangeLog:11 > + Let's add a comment about why we did that: the current switch case situation was going to be messy as we will need to mix cases that were very dependent on the class so it made sense to add a virtual function. > Source/WebCore/rendering/RenderBox.h:517 > + virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) const If you are exposing this function in the derived class, we may as well expose this one. It's unfortunate that we have to but I see your point. Created attachment 136066 [details]
Patch
Comment on attachment 136066 [details] Patch Clearing flags on attachment: 136066 Committed r113497: <http://trac.webkit.org/changeset/113497> All reviewed patches have been landed. Closing bug. |