The render regions with custom styling should be marked appropriately.
Created attachment 112218 [details] Patch
Comment on attachment 112218 [details] Patch 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.
Created attachment 112655 [details] Patch 2
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 on attachment 112655 [details] Patch 2 Clearing flags on attachment: 112655 Committed r98600: <http://trac.webkit.org/changeset/98600>
All reviewed patches have been landed. Closing bug.
fast/regions/render-region-custom-style-mark.html appears to be missing results for lion.