Remove CSS regions related fields from RenderStyle
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 18:30:54 +0000 (18:30 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Sep 2017 18:30:54 +0000 (18:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177415

Reviewed by Sam Weinig.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator RegionFragment const): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::avoidsFloats const): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::hasNextPage const):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout const):
* rendering/style/RenderStyle.h:
(WebCore::pseudoElementRendererIsNeeded):
(WebCore::RenderStyle::hasFlowInto const): Deleted.
(WebCore::RenderStyle::flowThread const): Deleted.
(WebCore::RenderStyle::hasFlowFrom const): Deleted.
(WebCore::RenderStyle::regionThread const): Deleted.
(WebCore::RenderStyle::regionFragment const): Deleted.
(WebCore::RenderStyle::setFlowThread): Deleted.
(WebCore::RenderStyle::setRegionThread): Deleted.
(WebCore::RenderStyle::setRegionFragment): Deleted.
(WebCore::RenderStyle::initialFlowThread): Deleted.
(WebCore::RenderStyle::initialRegionThread): Deleted.
(WebCore::RenderStyle::initialRegionFragment): Deleted.
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* rendering/style/StyleRareNonInheritedData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h

index 5e29474..e929a8a 100644 (file)
@@ -1,3 +1,42 @@
+2017-09-24  Antti Koivisto  <antti@apple.com>
+
+        Remove CSS regions related fields from RenderStyle
+        https://bugs.webkit.org/show_bug.cgi?id=177415
+
+        Reviewed by Sam Weinig.
+
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::operator RegionFragment const): Deleted.
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::adjustRenderStyle):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::avoidsFloats const): Deleted.
+        * rendering/RenderBlock.h:
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::hasNextPage const):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::calculateClipRects const):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::changeRequiresLayout const):
+        * rendering/style/RenderStyle.h:
+        (WebCore::pseudoElementRendererIsNeeded):
+        (WebCore::RenderStyle::hasFlowInto const): Deleted.
+        (WebCore::RenderStyle::flowThread const): Deleted.
+        (WebCore::RenderStyle::hasFlowFrom const): Deleted.
+        (WebCore::RenderStyle::regionThread const): Deleted.
+        (WebCore::RenderStyle::regionFragment const): Deleted.
+        (WebCore::RenderStyle::setFlowThread): Deleted.
+        (WebCore::RenderStyle::setRegionThread): Deleted.
+        (WebCore::RenderStyle::setRegionFragment): Deleted.
+        (WebCore::RenderStyle::initialFlowThread): Deleted.
+        (WebCore::RenderStyle::initialRegionThread): Deleted.
+        (WebCore::RenderStyle::initialRegionFragment): Deleted.
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        (WebCore::StyleRareNonInheritedData::operator== const):
+        * rendering/style/StyleRareNonInheritedData.h:
+
 2017-09-24  Joanmarie Diggs  <jdiggs@igalia.com>
 
         [ATK] Object attributes are missing for ARIA live region roles
index 20b6072..49253af 100644 (file)
@@ -2052,37 +2052,6 @@ template<> inline CSSPrimitiveValue::operator EMarqueeBehavior() const
     return MNONE;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RegionFragment e)
-    : CSSValue(PrimitiveClass)
-{
-    m_primitiveUnitType = CSS_VALUE_ID;
-    switch (e) {
-    case AutoRegionFragment:
-        m_value.valueID = CSSValueAuto;
-        break;
-    case BreakRegionFragment:
-        m_value.valueID = CSSValueBreak;
-        break;
-    }
-}
-
-template<> inline CSSPrimitiveValue::operator RegionFragment() const
-{
-    ASSERT(isValueID());
-
-    switch (m_value.valueID) {
-    case CSSValueAuto:
-        return AutoRegionFragment;
-    case CSSValueBreak:
-        return BreakRegionFragment;
-    default:
-        break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return AutoRegionFragment;
-}
-
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarqueeDirection e)
     : CSSValue(PrimitiveClass)
 {
index 5a54ca6..3500a01 100644 (file)
@@ -919,7 +919,6 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
             || style.hasIsolation()
             || style.position() == StickyPosition
             || style.position() == FixedPosition
-            || style.hasFlowFrom()
             || style.willChangeCreatesStackingContext())
             style.setZIndex(0);
     }
index e9fc218..48aa111 100644 (file)
@@ -2410,12 +2410,6 @@ LayoutUnit RenderBlock::adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFlo
     return right;
 }
 
-bool RenderBlock::avoidsFloats() const
-{
-    // Floats can't intrude into our box if we have a non-auto column count or width.
-    return RenderBox::avoidsFloats() || style().hasFlowFrom();
-}
-
 bool RenderBlock::isPointInOverflowControl(HitTestResult& result, const LayoutPoint& locationInContainer, const LayoutPoint& accumulatedOffset)
 {
     if (!scrollsOverflow())
index b20fe7b..dee53d3 100644 (file)
@@ -463,8 +463,6 @@ private:
     void paintSelection(PaintInfo&, const LayoutPoint&);
     void paintCaret(PaintInfo&, const LayoutPoint&, CaretType);
 
-    bool avoidsFloats() const override;
-
     virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
     // FIXME-BLOCKFLOW: Remove virtualization when all callers have moved to RenderBlockFlow
     virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&) { return false; }
index 1291453..c5c6d6c 100644 (file)
@@ -1835,7 +1835,7 @@ bool RenderBlockFlow::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pag
         return false;
 
     if (region->isLastRegion())
-        return region->isRenderRegionSet() || region->style().regionFragment() == BreakRegionFragment
+        return region->isRenderRegionSet()
             || (pageBoundaryRule == IncludePageBoundary && pageOffset == region->logicalTopForFlowThreadContent());
 
     RenderRegion* startRegion = nullptr;
index 6ea18c9..8cd72af 100644 (file)
@@ -6275,7 +6275,6 @@ static bool createsStackingContext(const RenderLayer& layer)
 #endif
         || renderer.isTransparent()
         || renderer.isPositioned()
-        || renderer.style().hasFlowFrom()
         || renderer.hasReflection()
         || renderer.style().hasIsolation()
         || layer.needsCompositedScrolling()
index 92cd8b7..53a86d8 100644 (file)
@@ -571,9 +571,6 @@ bool RenderStyle::changeRequiresLayout(const RenderStyle& other, unsigned& chang
             || m_rareNonInheritedData->textOverflow != other.m_rareNonInheritedData->textOverflow)
             return true;
 
-        if (m_rareNonInheritedData->regionFragment != other.m_rareNonInheritedData->regionFragment)
-            return true;
-
         if (m_rareNonInheritedData->shapeMargin != other.m_rareNonInheritedData->shapeMargin)
             return true;
 
index 1c14905..e286248 100644 (file)
@@ -645,12 +645,6 @@ public:
 
     // End CSS3 Getters
 
-    bool hasFlowInto() const { return !m_rareNonInheritedData->flowThread.isNull(); }
-    const AtomicString& flowThread() const { return m_rareNonInheritedData->flowThread; }
-    bool hasFlowFrom() const { return !m_rareNonInheritedData->regionThread.isNull(); }
-    const AtomicString& regionThread() const { return m_rareNonInheritedData->regionThread; }
-    RegionFragment regionFragment() const { return static_cast<RegionFragment>(m_rareNonInheritedData->regionFragment); }
-
     const AtomicString& lineGrid() const { return m_rareInheritedData->lineGrid; }
     LineSnap lineSnap() const { return static_cast<LineSnap>(m_rareInheritedData->lineSnap); }
     LineAlign lineAlign() const { return static_cast<LineAlign>(m_rareInheritedData->lineAlign); }
@@ -1180,10 +1174,6 @@ public:
     void setLineSnap(LineSnap lineSnap) { SET_VAR(m_rareInheritedData, lineSnap, lineSnap); }
     void setLineAlign(LineAlign lineAlign) { SET_VAR(m_rareInheritedData, lineAlign, lineAlign); }
 
-    void setFlowThread(const AtomicString& flowThread) { SET_VAR(m_rareNonInheritedData, flowThread, flowThread); }
-    void setRegionThread(const AtomicString& regionThread) { SET_VAR(m_rareNonInheritedData, regionThread, regionThread); }
-    void setRegionFragment(RegionFragment regionFragment) { SET_VAR(m_rareNonInheritedData, regionFragment, regionFragment); }
-
     void setPointerEvents(EPointerEvents p) { m_inheritedFlags.pointerEvents = p; }
 
     void clearAnimations();
@@ -1644,10 +1634,6 @@ public:
     static LineSnap initialLineSnap() { return LineSnapNone; }
     static LineAlign initialLineAlign() { return LineAlignNone; }
 
-    static const AtomicString& initialFlowThread() { return nullAtom(); }
-    static const AtomicString& initialRegionThread() { return nullAtom(); }
-    static RegionFragment initialRegionFragment() { return AutoRegionFragment; }
-
     static IntSize initialInitialLetter() { return IntSize(); }
     static LineClampValue initialLineClamp() { return LineClampValue(); }
     static ETextSecurity initialTextSecurity() { return TSNONE; }
@@ -2248,7 +2234,7 @@ inline void RenderStyle::setBoxReflect(RefPtr<StyleReflection>&& reflect)
 
 inline bool pseudoElementRendererIsNeeded(const RenderStyle* style)
 {
-    return style && style->display() != NONE && (style->contentData() || style->hasFlowFrom());
+    return style && style->display() != NONE && style->contentData();
 }
 
 } // namespace WebCore
index 13d313b..cb60734 100644 (file)
@@ -628,8 +628,6 @@ enum ImageResolutionSnap { ImageResolutionNoSnap = 0, ImageResolutionSnapPixels
 
 enum Order { LogicalOrder = 0, VisualOrder };
 
-enum RegionFragment { AutoRegionFragment, BreakRegionFragment };
-
 enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis };
 
 enum ColumnProgression { NormalColumnProgression, ReverseColumnProgression };
index 8776b33..95d7260 100644 (file)
@@ -69,8 +69,6 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
     , clipPath(RenderStyle::initialClipPath())
     , visitedLinkBackgroundColor(RenderStyle::initialBackgroundColor())
     , order(RenderStyle::initialOrder())
-    , flowThread(RenderStyle::initialFlowThread())
-    , regionThread(RenderStyle::initialRegionThread())
     , alignContent(RenderStyle::initialContentAlignment())
     , alignItems(RenderStyle::initialDefaultAlignment())
     , alignSelf(RenderStyle::initialSelfAlignment())
@@ -80,7 +78,6 @@ StyleRareNonInheritedData::StyleRareNonInheritedData()
 #if ENABLE(TOUCH_EVENTS)
     , touchAction(static_cast<unsigned>(RenderStyle::initialTouchAction()))
 #endif
-    , regionFragment(RenderStyle::initialRegionFragment())
     , pageSizeType(PAGE_SIZE_AUTO)
     , transformStyle3D(RenderStyle::initialTransformStyle3D())
     , backfaceVisibility(RenderStyle::initialBackfaceVisibility())
@@ -162,8 +159,6 @@ inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn
     , visitedLinkBorderTopColor(o.visitedLinkBorderTopColor)
     , visitedLinkBorderBottomColor(o.visitedLinkBorderBottomColor)
     , order(o.order)
-    , flowThread(o.flowThread)
-    , regionThread(o.regionThread)
     , alignContent(o.alignContent)
     , alignItems(o.alignItems)
     , alignSelf(o.alignSelf)
@@ -173,7 +168,6 @@ inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn
 #if ENABLE(TOUCH_EVENTS)
     , touchAction(o.touchAction)
 #endif
-    , regionFragment(o.regionFragment)
     , pageSizeType(o.pageSizeType)
     , transformStyle3D(o.transformStyle3D)
     , backfaceVisibility(o.backfaceVisibility)
@@ -266,15 +260,12 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c
         && visitedLinkBorderTopColor == o.visitedLinkBorderTopColor
         && visitedLinkBorderBottomColor == o.visitedLinkBorderBottomColor
         && order == o.order
-        && flowThread == o.flowThread
         && alignContent == o.alignContent
         && alignItems == o.alignItems
         && alignSelf == o.alignSelf
         && justifyContent == o.justifyContent
         && justifyItems == o.justifyItems
         && justifySelf == o.justifySelf
-        && regionThread == o.regionThread
-        && regionFragment == o.regionFragment
         && pageSizeType == o.pageSizeType
         && transformStyle3D == o.transformStyle3D
         && backfaceVisibility == o.backfaceVisibility
index 2693a84..3b50eef 100644 (file)
@@ -164,9 +164,6 @@ public:
 
     int order;
 
-    AtomicString flowThread;
-    AtomicString regionThread;
-
     StyleContentAlignmentData alignContent;
     StyleSelfAlignmentData alignItems;
     StyleSelfAlignmentData alignSelf;
@@ -178,13 +175,10 @@ public:
     unsigned touchAction : 1; // TouchAction
 #endif
 
-    unsigned regionFragment : 1; // RegionFragment
-
     unsigned pageSizeType : 2; // PageSizeType
     unsigned transformStyle3D : 1; // ETransformStyle3D
     unsigned backfaceVisibility : 1; // EBackfaceVisibility
 
-
     unsigned userDrag : 2; // EUserDrag
     unsigned textOverflow : 1; // Whether or not lines that spill out should be truncated with "..."
     unsigned marginBeforeCollapse : 2; // EMarginCollapse