[Webkit-unassigned] [Bug 94472] [CSSRegions]Add support for text-shadow in region styling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 13 11:08:49 PDT 2012


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


Dave Hyatt <hyatt at apple.com> changed:

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




--- Comment #28 from Dave Hyatt <hyatt at apple.com>  2012-09-13 11:09:14 PST ---
(From update of attachment 163610)
View in context: https://bugs.webkit.org/attachment.cgi?id=163610&action=review

> Source/WebCore/rendering/InlineFlowBox.cpp:163
> -            RenderStyle* childStyle = child->renderer()->style(isFirstLineStyle());
> +            RefPtr<RenderStyle> childStyle = child->styleInRegion(child->regionDuringLayout());

Let's follow this through to its logical conclusion, which is that all style access during layout that needs to get a style that can vary from region to region is going to have to be put in a refptr just to keep it from going away? Ick. If someone repeatedly asks for style, they're going to cause it to be computed again and again.

It seems obvious that we have to change the architecture here for what to do with region styling during layout. My opinion is that the styles should be cached and updated once they are accessed once and they should stick around as long as the region lives (and as long as the renderer that the style is applying to lives). If you had a cache like that it could work for both layout and painting.

Computing the styles and then tossing them for painting is not exactly a great approach either, since you do way more work when painting than you need to.

I think ultimately there's going to need to be a method like styleAtOffset that layout / painting use to fetch the appropriate region-specific style for an object. If the style doesn't exist, then it could be created at that time.

I have no problem with a first-cut cache destroying all render styles at the end of every layout (similar to what painting does today). If you want to take that approach initially of doing something kind of like what painting does, I'd be cool with that.

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