Feature flag for shape-inside
https://bugs.webkit.org/show_bug.cgi?id=128001
Reviewed by Simon Fraser.
Source/JavaScriptCore:
Add CSS_SHAPE_INSIDE flag.
* Configurations/FeatureDefines.xcconfig:
Source/WebCore:
Add CSS_SHAPE_INSIDE flag.
I wrapped everything that is specific to shape-inside in
this flag. It is now possible to build with CSS Shapes enabled
but shape-inside disabled. CSS_SHAPE_INSIDE is dependent on
CSS_SHAPES, so disabling the latter should also disable the former.
* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseShapeProperty):
* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::loadPendingImages):
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::updateShapesBeforeBlockLayout):
(WebCore::RenderBlock::updateShapesAfterBlockLayout):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::constructBidiRunsForLine):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::~RenderElement):
(WebCore::RenderElement::initializeStyle):
(WebCore::RenderElement::setStyle):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::createStyle):
* rendering/RenderView.h:
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak):
* rendering/line/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::fitBelowFloats):
* rendering/line/LineWidth.h:
* rendering/shapes/ShapeInsideInfo.cpp:
* rendering/shapes/ShapeInsideInfo.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
Source/WebKit/mac:
Add CSS_SHAPE_INSIDE flag.
* Configurations/FeatureDefines.xcconfig:
Source/WebKit2:
Add CSS_SHAPE_INSIDE flag.
* Configurations/FeatureDefines.xcconfig:
Tools:
Add CSS_SHAPE_INSIDE flag, and -css-shape-inside build
flag.
* Scripts/webkitperl/FeatureList.pm:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
index 9e9c962..e06dc2a 100644
--- a/Source/WebCore/rendering/RenderBlockFlow.cpp
+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp
@@ -42,7 +42,7 @@
#include "VerticalPositionCache.h"
#include "VisiblePosition.h"
-#if ENABLE(CSS_SHAPES)
+#if ENABLE(CSS_SHAPES) && ENABLE(CSS_SHAPE_INSIDE)
#include "ShapeInsideInfo.h"
#endif
@@ -689,7 +689,7 @@
determineLogicalLeftPositionForChild(child, ApplyLayoutDelta);
LayoutSize childOffset = child.location() - oldRect.location();
-#if ENABLE(CSS_SHAPES)
+#if ENABLE(CSS_SHAPES) && ENABLE(CSS_SHAPE_INSIDE)
relayoutShapeDescendantIfMoved(child.isRenderBlock() ? toRenderBlock(&child) : nullptr, childOffset);
#endif
@@ -2165,7 +2165,7 @@
RenderBox& childBox = floatingObject->renderer();
LayoutUnit logicalLeftOffset = logicalLeftOffsetForContent(logicalTopOffset); // Constant part of left offset.
LayoutUnit logicalRightOffset; // Constant part of right offset.
-#if ENABLE(CSS_SHAPES)
+#if ENABLE(CSS_SHAPES) && ENABLE(CSS_SHAPE_INSIDE)
// FIXME Bug 102948: This only works for shape outside directly set on this block.
ShapeInsideInfo* shapeInsideInfo = this->layoutShapeInsideInfo();
// FIXME: Implement behavior for right floats.