[webkit-reviews] review granted: [Bug 107041] Tighten RenderLayerModelObject subclass constuctors to operate on ContainerNodes. : [Attachment 183023] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 16 13:08:29 PST 2013


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Antti Koivisto
<koivisto at iki.fi>'s request for review:
Bug 107041: Tighten RenderLayerModelObject subclass constuctors to operate on
ContainerNodes.
https://bugs.webkit.org/show_bug.cgi?id=107041

Attachment 183023: patch
https://bugs.webkit.org/attachment.cgi?id=183023&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=183023&action=review


> Source/WebCore/ChangeLog:8
> +	   The only non-ContainerNodes show up in the text rendering code.
Tighter typing is better in general. It also enables better code

I can't parse "The only non-ContainerNodes show up in the text rendering code"

> Source/WebCore/ChangeLog:28
> +	   (RenderBlock):

Remove useless lines like this.

> Source/WebCore/rendering/RenderFullScreen.cpp:59
> +RenderFullScreen::RenderFullScreen(Document* document)
> +    : RenderDeprecatedFlexibleBox(document)

Is this always the Document, even if some non-document element is taken
fullscreen?

> Source/WebCore/rendering/RenderLayerModelObject.h:51
> +    ContainerNode* node() const { return
toContainerNode(RenderObject::node()); }

A comment noting whether this can be null might be helpful.

> Source/WebCore/rendering/RenderObject.cpp:148
> -    if (contentData && !contentData->next() && contentData->isImage() && doc
!= node && !node->isPseudoElement()) {
> -	   RenderImage* image = new (arena) RenderImage(node);
> +    if (contentData && !contentData->next() && contentData->isImage() &&
!element->isPseudoElement()) {
> +	   RenderImage* image = new (arena) RenderImage(element);

So the element can never be the Document? Would be nice for the Changelog to
note this.

> Source/WebCore/rendering/RenderTextTrackCue.cpp:37
>  RenderTextTrackCue::RenderTextTrackCue(TextTrackCueBox* node)
> -    : RenderBlock(static_cast<Node*>(node))
> +    : RenderBlock(node)

Ugh, so confusing for something called TextTrackCueBox to be en Element (not a
RenderBox*)..


More information about the webkit-reviews mailing list