[Webkit-unassigned] [Bug 107041] Tighten RenderLayerModelObject subclass constructors to operate on ContainerNodes.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 16 13:33:02 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=107041





--- Comment #5 from Antti Koivisto <koivisto at iki.fi>  2013-01-16 13:34:46 PST ---
(In reply to comment #3)
> > 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?

Giving a Document as the node parameter just makes the renderer anonymous. Looks like the actual element that is going to full screen is provided as a child renderer for RenderFullScreen.

The code for making anonymous renderers could be clearer but that is outside of the scope here.

> > 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.

Documents are not Elements, they are ContainerNodes. Compiler told that the test was unnecessary (showing why tight typing is good!).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list