Changeset 254410 in webkit


Ignore:
Timestamp:
Jan 11, 2020 8:21:40 PM (4 years ago)
Author:
Alan Bujtas
Message:

[LFC] Introduce the concept of independent formatting context
https://bugs.webkit.org/show_bug.cgi?id=206137
<rdar://problem/58508015>

Reviewed by Sam Weinig.

At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
https://www.w3.org/TR/css-display-3/#independent-formatting-context

  • layout/layouttree/LayoutBox.cpp:

(WebCore::Layout::Box::establishesFormattingContext const):
(WebCore::Layout::Box::establishesIndependentFormattingContext const):

  • layout/layouttree/LayoutBox.h:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r254409 r254410  
     12020-01-11  Zalan Bujtas  <zalan@apple.com>
     2
     3        [LFC] Introduce the concept of independent formatting context
     4        https://bugs.webkit.org/show_bug.cgi?id=206137
     5        <rdar://problem/58508015>
     6
     7        Reviewed by Sam Weinig.
     8
     9        At this point it is just about absolute positioned block level boxes since we don't support the "contain" property.
     10        https://www.w3.org/TR/css-display-3/#independent-formatting-context
     11
     12        * layout/layouttree/LayoutBox.cpp:
     13        (WebCore::Layout::Box::establishesFormattingContext const):
     14        (WebCore::Layout::Box::establishesIndependentFormattingContext const):
     15        * layout/layouttree/LayoutBox.h:
     16
    1172020-01-11  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebCore/layout/layouttree/LayoutBox.cpp

    r252905 r254410  
    7676    // We need the final tree structure to tell whether a box establishes a certain formatting context.
    7777    ASSERT(!Phase::isInTreeBuilding());
    78     return establishesBlockFormattingContext() || establishesInlineFormattingContext() || establishesTableFormattingContext();
     78    return establishesBlockFormattingContext() || establishesInlineFormattingContext() || establishesTableFormattingContext() || establishesIndependentFormattingContext();
    7979}
    8080
     
    130130{
    131131    return isTableBox();
     132}
     133
     134bool Box::establishesIndependentFormattingContext() const
     135{
     136    // FIXME: This is where we would check for 'contain' property.
     137    return isAbsolutelyPositioned();
    132138}
    133139
  • trunk/Source/WebCore/layout/layouttree/LayoutBox.h

    r254378 r254410  
    7070    bool establishesFormattingContext() const;
    7171    bool establishesBlockFormattingContext() const;
     72    bool establishesInlineFormattingContext() const;
    7273    bool establishesTableFormattingContext() const;
     74    bool establishesIndependentFormattingContext() const;
     75
    7376    bool establishesBlockFormattingContextOnly() const;
    74     bool establishesInlineFormattingContext() const;
    7577    bool establishesInlineFormattingContextOnly() const;
    7678
Note: See TracChangeset for help on using the changeset viewer.