[Webkit-unassigned] [Bug 71488] [CSSRegions]Add support for background-color in region styling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 8 13:20:17 PST 2011


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


Dave Hyatt <hyatt at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #114062|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #5 from Dave Hyatt <hyatt at apple.com>  2011-11-08 13:20:17 PST ---
(From update of attachment 114062)
View in context: https://bugs.webkit.org/attachment.cgi?id=114062&action=review

> Source/WebCore/rendering/RenderRegion.cpp:252
> +bool RenderRegion::renderObjectInRegion(const RenderObject* renderObject) const
> +{
> +    ASSERT(renderObject);
> +    return m_renderBoxRegionInfo.contains(renderObject->enclosingBox());
> +}

I don't understand this bit (or why it's checked earlier). You can have a unique style without having a RenderBoxRegionInfo at all. Ultimately I plan to optimize uniform width regions to try to get rid of RenderBoxRegionInfos, so I don't think you should assume that one has to exist.

> Source/WebCore/rendering/RenderRegion.cpp:276
> +    } else {
> +        RenderObject* parent = object->parent();
> +        RenderObjectRegionStyleMap::iterator it = m_renderObjectRegionStyle.find(parent);
> +        ASSERT(it != m_renderObjectRegionStyle.end());
> +        RefPtr<RenderStyle> renderParentStyle = it->second;
> +        m_renderObjectRegionStyle.set(object, renderParentStyle);
> +    }

This is right for RenderText but it's not right for anonymous elements. Anonymous elements have to take the parent style you found and create a new style that inherits from it. This is going to be one of the harder things to get right, since these custom anonymous styles tend to be re-created/handled over in the style change methods of the various renderers.

For now I would probably just support elements and text and return the normal style for anonymous elements. We should try to handle that in a separate patch (and file a followup bug about it). Add an assert that you never enter this function without the node being an element or the object being text and then before even calling this make sure you bailed and just returned the original style for anonymous elements. We'll figure them out in a followup bug.

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