Bug 70733 - [CSSRegions]Flag regions with custom styling
Summary: [CSSRegions]Flag regions with custom styling
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mihnea Ovidenie
Depends on:
Blocks: 57312
  Show dependency treegraph
Reported: 2011-10-24 09:34 PDT by Mihnea Ovidenie
Modified: 2011-12-02 13:59 PST (History)
4 users (show)

See Also:

Patch (17.52 KB, patch)
2011-10-24 11:44 PDT, Mihnea Ovidenie
hyatt: review-
hyatt: commit-queue-
Details | Formatted Diff | Diff
Patch 2 (10.99 KB, patch)
2011-10-27 02:26 PDT, Mihnea Ovidenie
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihnea Ovidenie 2011-10-24 09:34:12 PDT
The render regions with custom styling should be marked appropriately.
Comment 1 Mihnea Ovidenie 2011-10-24 11:44:16 PDT
Created attachment 112218 [details]
Comment 2 Dave Hyatt 2011-10-25 11:11:32 PDT
Comment on attachment 112218 [details]

I think a better approach is to store the flag in the RenderRegion itself. If you subclass styleDidChange, you could check the RenderStyle at that time. Then you don't have to add isRegionDisplayType(), etc., since we know we made a RenderRegion already.

Basically in RenderRegion::styleDidChange you can call checkRegionStyle I think (doing whatever setup you need to in order to selector check), and then set a bit on RenderRegion instead of inside the RenderStyle itself.
Comment 3 Mihnea Ovidenie 2011-10-27 02:26:49 PDT
Created attachment 112655 [details]
Patch 2
Comment 4 Dave Hyatt 2011-10-27 09:25:43 PDT
Comment on attachment 112655 [details]
Patch 2

Looks good. I'm going to give this r+, but I do think there's an eventual problem we'll need to fix.

If a region is anonymous and doesn't have an element, but is for example created as the result of being a pseudo-element, you need to pass that pseudo-element information through so that it can be checked.

For example, you should be able to make a display:block ::before generated content region. That region will have no element but should be able to match a @region div::before { } rule.
Comment 5 WebKit Review Bot 2011-10-27 10:33:24 PDT
Comment on attachment 112655 [details]
Patch 2

Clearing flags on attachment: 112655

Committed r98600: <http://trac.webkit.org/changeset/98600>
Comment 6 WebKit Review Bot 2011-10-27 10:33:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Eric Seidel (no email) 2011-12-02 13:59:22 PST
fast/regions/render-region-custom-style-mark.html appears to be missing results for lion.