Bug 80163

Summary: [CSS Regions] ::before and ::after pseudo-elements are not displayed for regions
Product: WebKit Reporter: Mihai Balan <mibalan>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achicu, bdakin, commit-queue, dino, donggwan.kim, esprehn+autocc, glenn, igor.oliveira, mihnea, rniwa, shanestephens, WebkitBugTracker
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 57312    
Attachments:
Description Flags
Ref test highlighting the problem
none
Proposed patch none

Description Mihai Balan 2012-03-02 08:54:34 PST
If an element has the -webkit-flow-from property set, then the pseudo-elements ::before and ::after are not displayed. Trying to get the computed style for them returns a CSSStyleDeclaration object, but its properties do not have the values specified in CSS. Namely, the 'content' property has the value equal to the name of the flow that flows in the region, instead of what's specified via the 'content' declaration in CSS.
Comment 1 Mihai Balan 2012-03-02 08:55:45 PST
Created attachment 129906 [details]
Ref test highlighting the problem
Comment 2 Michelangelo De Simone 2013-06-13 20:47:50 PDT
Still repros on today's nightly (r151543)
Comment 3 Igor Trindade Oliveira 2013-06-14 16:45:36 PDT
Created attachment 204749 [details]
Proposed patch

patch
Comment 4 Dave Hyatt 2013-06-17 09:56:45 PDT
Comment on attachment 204749 [details]
Proposed patch

r=me
Comment 5 WebKit Commit Bot 2013-06-17 11:05:37 PDT
Comment on attachment 204749 [details]
Proposed patch

Clearing flags on attachment: 204749

Committed r151647: <http://trac.webkit.org/changeset/151647>
Comment 6 WebKit Commit Bot 2013-06-17 11:05:40 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Mihai Maerean 2013-06-18 00:07:39 PDT
Comment on attachment 204749 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=204749&action=review

> LayoutTests/platform/mac/fast/regions/region-dynamic-after-before-expected.txt:1
> +layer at (0,0) size 800x600

These tests should be ref tests (the expected result should be an html file that renders the same as the test but without using regions).
Please file another bug to change the expected results of these new tests.
Comment 8 Mihnea Ovidenie 2013-06-18 05:33:42 PDT
Hi Igor,

Why did you need { position: absolute, top: 0, left: 0 } for before and { position: absolute, bottom: 0, right: 0 } for after in your tests? Looking at your patch, i doubt that it follows the processing model for pseudo-elements, as described http://dev.w3.org/csswg/css-regions/#pseudo_elements. Have you tested the regions pseudo-elements with different display values?
Comment 9 Igor Trindade Oliveira 2013-06-18 11:10:29 PDT
Hi Mihai,

display: run-in is a totally different beast, specially because run-in + generated content open a can of worms. I will open a different bug for css region processing model.
About the the current bug tests case, i will change it.

(In reply to comment #8)
> Hi Igor,
> 
> Why did you need { position: absolute, top: 0, left: 0 } for before and { position: absolute, bottom: 0, right: 0 } for after in your tests? Looking at your patch, i doubt that it follows the processing model for pseudo-elements, as described http://dev.w3.org/csswg/css-regions/#pseudo_elements. Have you tested the regions pseudo-elements with different display values?