Changeset 137836 in webkit


Ignore:
Timestamp:
Dec 16, 2012 3:00:05 AM (11 years ago)
Author:
mihnea@adobe.com
Message:

[CSSRegions] Pseudo-elements should not be directly collected into a named flow
https://bugs.webkit.org/show_bug.cgi?id=105046

Reviewed by Abhishek Arya.

Source/WebCore:

Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
collected into a flow thread.

Tests: fast/regions/pseudo-after-content-node.html

fast/regions/pseudo-before-content-node.html
fast/regions/pseudo-first-letter-content-node.html
fast/regions/pseudo-first-line-content-node.html

  • dom/NodeRenderingContext.cpp:

(WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):

LayoutTests:

Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.

Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
collected into a flow thread.

  • fast/regions/pseudo-after-content-node-expected.txt: Added.
  • fast/regions/pseudo-after-content-node.html: Added.
  • fast/regions/pseudo-before-content-node-expected.txt: Added.
  • fast/regions/pseudo-before-content-node.html: Added.
  • fast/regions/pseudo-first-letter-content-node-expected.txt: Added.
  • fast/regions/pseudo-first-letter-content-node.html: Added.
  • fast/regions/pseudo-first-line-content-node-expected.txt: Added.
  • fast/regions/pseudo-first-line-content-node.html: Added.
Location:
trunk
Files:
8 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r137835 r137836  
     12012-12-16  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Pseudo-elements should not be directly collected into a named flow
     4        https://bugs.webkit.org/show_bug.cgi?id=105046
     5
     6        Reviewed by Abhishek Arya.
     7
     8        Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
     9
     10        Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
     11        like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
     12        collected into a flow thread.
     13
     14        * fast/regions/pseudo-after-content-node-expected.txt: Added.
     15        * fast/regions/pseudo-after-content-node.html: Added.
     16        * fast/regions/pseudo-before-content-node-expected.txt: Added.
     17        * fast/regions/pseudo-before-content-node.html: Added.
     18        * fast/regions/pseudo-first-letter-content-node-expected.txt: Added.
     19        * fast/regions/pseudo-first-letter-content-node.html: Added.
     20        * fast/regions/pseudo-first-line-content-node-expected.txt: Added.
     21        * fast/regions/pseudo-first-line-content-node.html: Added.
     22
    1232012-12-16  Mihai Maerean  <mmaerean@adobe.com>
    224
  • trunk/Source/WebCore/ChangeLog

    r137835 r137836  
     12012-12-16  Mihnea Ovidenie  <mihnea@adobe.com>
     2
     3        [CSSRegions] Pseudo-elements should not be directly collected into a named flow
     4        https://bugs.webkit.org/show_bug.cgi?id=105046
     5
     6        Reviewed by Abhishek Arya.
     7
     8        Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
     9        Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
     10        like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
     11        collected into a flow thread.
     12
     13        Tests: fast/regions/pseudo-after-content-node.html
     14               fast/regions/pseudo-before-content-node.html
     15               fast/regions/pseudo-first-letter-content-node.html
     16               fast/regions/pseudo-first-line-content-node.html
     17
     18        * dom/NodeRenderingContext.cpp:
     19        (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
     20
    1212012-12-16  Mihai Maerean  <mmaerean@adobe.com>
    222
  • trunk/Source/WebCore/dom/NodeRenderingContext.cpp

    r137715 r137836  
    157157        return;
    158158
     159    // As per http://dev.w3.org/csswg/css3-regions/#flow-into, pseudo-elements such as ::first-line, ::first-letter, ::before or ::after
     160    // cannot be directly collected into a named flow.
     161    if (m_node->isPseudoElement())
     162        return;
     163
    159164    // FIXME: Do not collect elements if they are in shadow tree.
    160165    if (m_node->isInShadowTree())
Note: See TracChangeset for help on using the changeset viewer.