WebKit Bugzilla
Attachment 340817 Details for
Bug 185809
: Modernize RenderStyleConstants.h - Part 1
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185809-20180520202835.patch (text/plain), 674.12 KB, created by
Sam Weinig
on 2018-05-20 20:28:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sam Weinig
Created:
2018-05-20 20:28:37 PDT
Size:
674.12 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 232008) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,934 @@ >+2018-05-20 Sam Weinig <sam@webkit.org> >+ >+ Modernize RenderStyleConstants.h - Part 1 >+ https://bugs.webkit.org/show_bug.cgi?id=185809 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Modernized the first set of enums in RenderStyleConstants.h by: >+ - Converting them to enum classes >+ - Renaming them to remove unnecessary prefix 'E's >+ - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal) >+ - Renaming to match modern conventions (e.g BNONE -> None) >+ - Reformatting them so that each value is on its own line. >+ >+ Modernizes the following enums: >+ PrintColorAdjust >+ StyleDifference >+ StyleDifferenceContextSensitiveProperty >+ ColumnFill >+ ColumnSpan >+ BorderCollapse (renamed from EBorderCollapse) >+ BorderStyle (renamed from EBorderStyle) >+ BorderPrecedence (renamed from EBorderPrecedence) >+ OutlineIsAuto >+ PositionType (renamed from EPosition) >+ Float (renamed from EFloat) >+ MarginCollapse (renamed from EMarginCollapse) >+ BoxDecorationBreak (renamed from EBoxDecorationBreak) >+ BoxSizing (renamed from EBoxSizing) >+ Overflow (renamed from EOverflow) >+ VerticalAlign (renamed from EVerticalAlign) >+ Clear (renamed from EClear) >+ TableLayoutType (renamed from ETableLayout) >+ TextCombine >+ FillAttachment (renamed from EFillAttachment) >+ FillBox (renamed from EFillBox) >+ FillRepeat (renamed from EFillRepeat) >+ FillLayerType (renamed from EFillLayerType) >+ FillSizeType (renamed from EFillSizeType) >+ MaskSourceType (renamed from EMaskSourceType) >+ BoxPack (renamed from EBoxPack) >+ BoxAlignment (renamed from EBoxAlignment) >+ BoxOrient (renamed from EBoxOrient) >+ BoxLines (renamed from EBoxLines) >+ BoxDirection (renamed from EBoxDirection) >+ AlignContent (renamed from EAlignContent) >+ FlexDirection (renamed from EFlexDirection) >+ FlexWrap (renamed from EFlexWrap) >+ ItemPosition >+ OverflowAlignment >+ ItemPositionType >+ ContentPosition >+ ContentDistribution (renamed from ContentDistributionType) >+ TextSecurity (renamed from ETextSecurity) >+ UserModify (renamed from EUserModify) >+ UserDrag (renamed from EUserDrag) >+ UserSelect (renamed from EUserSelect) >+ ObjectFit >+ AspectRatioType >+ WordBreak (renamed from EWordBreak) >+ OverflowWrap (renamed from EOverflowWrap) >+ NBSPMode (renamed from ENBSPMode) >+ LineBreak >+ Resize (renamed from EResize) >+ QuoteType >+ TransformStyle3D (renamed from ETransformStyle3D) >+ BackfaceVisibility (renamed from EBackfaceVisibility) >+ LineClamp (renamed from ELineClamp) >+ TextOverflow >+ ImageRendering (renamed from EImageRendering) >+ TextIndentLine >+ TextIndentType >+ Isolation >+ >+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >+ (AXAttributeStringSetStyle): >+ * css/BasicShapeFunctions.cpp: >+ (WebCore::valueForCenterCoordinate): >+ (WebCore::valueForBasicShape): >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::sizingBox): >+ (WebCore::fillRepeatToCSSValue): >+ (WebCore::fillSourceTypeToCSSValue): >+ (WebCore::fillSizeToCSSValue): >+ (WebCore::valueForItemPositionWithOverflowAlignment): >+ (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment): >+ (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): >+ * css/CSSPrimitiveValueMappings.h: >+ (WebCore::CSSPrimitiveValue::operator LineClampValue const): >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ (WebCore::CSSPrimitiveValue::operator ColumnFill const): >+ (WebCore::CSSPrimitiveValue::operator ColumnSpan const): >+ (WebCore::CSSPrimitiveValue::operator PrintColorAdjust const): >+ (WebCore::CSSPrimitiveValue::operator BorderStyle const): >+ (WebCore::CSSPrimitiveValue::operator OutlineIsAuto const): >+ (WebCore::CSSPrimitiveValue::operator BackfaceVisibility const): >+ (WebCore::CSSPrimitiveValue::operator FillAttachment const): >+ (WebCore::CSSPrimitiveValue::operator FillBox const): >+ (WebCore::CSSPrimitiveValue::operator FillRepeat const): >+ (WebCore::CSSPrimitiveValue::operator BoxPack const): >+ (WebCore::CSSPrimitiveValue::operator BoxAlignment const): >+ (WebCore::CSSPrimitiveValue::operator BoxDecorationBreak const): >+ (WebCore::CSSPrimitiveValue::operator BoxSizing const): >+ (WebCore::CSSPrimitiveValue::operator BoxDirection const): >+ (WebCore::CSSPrimitiveValue::operator BoxLines const): >+ (WebCore::CSSPrimitiveValue::operator BoxOrient const): >+ (WebCore::CSSPrimitiveValue::operator Clear const): >+ (WebCore::CSSPrimitiveValue::operator FlexDirection const): >+ (WebCore::CSSPrimitiveValue::operator AlignContent const): >+ (WebCore::CSSPrimitiveValue::operator FlexWrap const): >+ (WebCore::CSSPrimitiveValue::operator Float const): >+ (WebCore::CSSPrimitiveValue::operator LineBreak const): >+ (WebCore::CSSPrimitiveValue::operator MarginCollapse const): >+ (WebCore::CSSPrimitiveValue::operator NBSPMode const): >+ (WebCore::CSSPrimitiveValue::operator Overflow const): >+ (WebCore::CSSPrimitiveValue::operator PositionType const): >+ (WebCore::CSSPrimitiveValue::operator Resize const): >+ (WebCore::CSSPrimitiveValue::operator TableLayoutType const): >+ (WebCore::CSSPrimitiveValue::operator TextSecurity const): >+ (WebCore::CSSPrimitiveValue::operator UserDrag const): >+ (WebCore::CSSPrimitiveValue::operator UserModify const): >+ (WebCore::CSSPrimitiveValue::operator UserSelect const): >+ (WebCore::CSSPrimitiveValue::operator VerticalAlign const): >+ (WebCore::CSSPrimitiveValue::operator WordBreak const): >+ (WebCore::CSSPrimitiveValue::operator OverflowWrap const): >+ (WebCore::CSSPrimitiveValue::operator TextCombine const): >+ (WebCore::CSSPrimitiveValue::operator TextOverflow const): >+ (WebCore::CSSPrimitiveValue::operator ObjectFit const): >+ (WebCore::CSSPrimitiveValue::operator Isolation const): >+ (WebCore::CSSPrimitiveValue::operator BorderCollapse const): >+ (WebCore::CSSPrimitiveValue::operator ImageRendering const): >+ (WebCore::CSSPrimitiveValue::operator TransformStyle3D const): >+ (WebCore::CSSPrimitiveValue::operator ItemPosition const): >+ (WebCore::CSSPrimitiveValue::operator OverflowAlignment const): >+ (WebCore::CSSPrimitiveValue::operator ContentPosition const): >+ (WebCore::CSSPrimitiveValue::operator ContentDistribution const): >+ (WebCore::CSSPrimitiveValue::operator EBorderStyle const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFillAttachment const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFillBox const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFillRepeat const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxPack const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxAlignment const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxSizing const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxDirection const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxLines const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBoxOrient const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EClear const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFlexDirection const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EAlignContent const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFlexWrap const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EFloat const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EMarginCollapse const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator ENBSPMode const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EOverflow const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EPosition const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EResize const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator ETableLayout const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator ETextSecurity const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EUserDrag const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EUserModify const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EUserSelect const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EVerticalAlign const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EWordBreak const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EOverflowWrap const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EBorderCollapse const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator EImageRendering const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator ETransformStyle3D const): Deleted. >+ (WebCore::CSSPrimitiveValue::operator ContentDistributionType const): Deleted. >+ * css/CSSProperties.json: >+ * css/CSSToStyleMap.cpp: >+ (WebCore::CSSToStyleMap::mapFillAttachment): >+ (WebCore::CSSToStyleMap::mapFillSize): >+ (WebCore::CSSToStyleMap::mapFillMaskSourceType): >+ * css/CSSValueKeywords.in: >+ * css/StyleBuilderConverter.h: >+ (WebCore::StyleBuilderConverter::convertResize): >+ (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): >+ * css/StyleBuilderCustom.h: >+ (WebCore::StyleBuilderCustom::applyValueTextIndent): >+ (WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio): >+ (WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio): >+ (WebCore::StyleBuilderCustom::applyValueContent): >+ * css/StyleResolver.cpp: >+ (WebCore::isScrollableOverflow): >+ (WebCore::StyleResolver::adjustRenderStyle): >+ * css/StyleResolver.h: >+ * css/makeprop.pl: >+ (getFillLayerType): >+ * dom/Element.h: >+ * dom/Node.cpp: >+ (WebCore::computeEditabilityFromComputedStyle): >+ (WebCore::Node::canStartSelection const): >+ * dom/Position.cpp: >+ (WebCore::Position::nodeIsUserSelectNone): >+ (WebCore::Position::nodeIsUserSelectAll): >+ * dom/Range.cpp: >+ (WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines const): >+ * editing/ApplyBlockElementCommand.cpp: >+ (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): >+ * editing/DeleteSelectionCommand.cpp: >+ (WebCore::DeleteSelectionCommand::doApply): >+ * editing/Editing.cpp: >+ (WebCore::isSpecialHTMLElement): >+ * editing/EditorCommand.cpp: >+ (WebCore::verticalScrollDistance): >+ * editing/ReplaceSelectionCommand.cpp: >+ (WebCore::ReplaceSelectionCommand::doApply): >+ * editing/SimplifyMarkupCommand.cpp: >+ (WebCore::SimplifyMarkupCommand::doApply): >+ * editing/VisibleUnits.cpp: >+ (WebCore::backwardSearchForBoundaryWithTextIterator): >+ (WebCore::forwardSearchForBoundaryWithTextIterator): >+ * editing/cocoa/EditorCocoa.mm: >+ (WebCore::Editor::fontAttributesForSelectionStart const): >+ * editing/cocoa/HTMLConverter.mm: >+ (WebCore::editingAttributedStringFromRange): >+ * html/HTMLInputElement.cpp: >+ (WebCore::HTMLInputElement::shouldTruncateText const): >+ (WebCore::HTMLInputElement::createInnerTextStyle): >+ * html/HTMLTextFormControlElement.cpp: >+ (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const): >+ * html/shadow/SliderThumbElement.cpp: >+ (WebCore::RenderSliderContainer::layout): >+ * html/shadow/TextControlInnerElements.cpp: >+ (WebCore::TextControlInnerContainer::resolveCustomStyle): >+ (WebCore::TextControlInnerElement::resolveCustomStyle): >+ (WebCore::TextControlPlaceholderElement::resolveCustomStyle): >+ * layout/displaytree/DisplayBox.cpp: >+ (WebCore::Display::Box::borderBox const): >+ (WebCore::Display::Box::contentBox const): >+ * layout/displaytree/DisplayBox.h: >+ * layout/layouttree/LayoutBox.cpp: >+ (WebCore::Layout::Box::isRelativelyPositioned const): >+ (WebCore::Layout::Box::isStickyPositioned const): >+ (WebCore::Layout::Box::isAbsolutelyPositioned const): >+ (WebCore::Layout::Box::isFixedPositioned const): >+ (WebCore::Layout::Box::isFloatingPositioned const): >+ (WebCore::Layout::Box::isOverflowVisible const): >+ * page/DragController.cpp: >+ (WebCore::DragController::draggableElement const): >+ * page/Frame.cpp: >+ (WebCore::Frame::rangeForPoint): >+ * page/FrameView.cpp: >+ (WebCore::paginationModeForRenderStyle): >+ (WebCore::FrameView::applyOverflowToViewport): >+ (WebCore::FrameView::applyPaginationToViewport): >+ (WebCore::FrameView::calculateScrollbarModesForLayout): >+ (WebCore::FrameView::calculateExtendedBackgroundMode const): >+ (WebCore::FrameView::adjustScrollStepForFixedContent): >+ * page/SpatialNavigation.cpp: >+ (WebCore::canScrollInDirection): >+ (WebCore::canBeScrolledIntoView): >+ * page/ios/FrameIOS.mm: >+ (WebCore::Frame::nodeRespondingToScrollWheelEvents): >+ * page/mac/EventHandlerMac.mm: >+ (WebCore::scrolledToEdgeInDominantDirection): >+ * rendering/BorderEdge.cpp: >+ (WebCore::BorderEdge::BorderEdge): >+ (WebCore::BorderEdge::obscuresBackgroundEdge const): >+ (WebCore::BorderEdge::obscuresBackground const): >+ * rendering/BorderEdge.h: >+ (WebCore::BorderEdge::style const): >+ (WebCore::BorderEdge::hasVisibleColorAndStyle const): >+ * rendering/FlexibleBoxAlgorithm.h: >+ (WebCore::FlexLayoutAlgorithm::isMultiline const): >+ * rendering/FloatingObjects.cpp: >+ (WebCore::FloatingObject::FloatingObject): >+ * rendering/GridTrackSizingAlgorithm.cpp: >+ (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): >+ (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks): >+ * rendering/HitTestResult.cpp: >+ (WebCore::HitTestResult::innerTextIfTruncated const): >+ * rendering/ImageQualityController.cpp: >+ (WebCore::ImageQualityController::interpolationQualityFromStyle): >+ * rendering/InlineBox.h: >+ (WebCore::InlineBox::verticalAlign const): >+ * rendering/InlineFlowBox.cpp: >+ (WebCore::InlineFlowBox::addToLine): >+ (WebCore::InlineFlowBox::determineSpacingForFlowBoxes): >+ (WebCore::InlineFlowBox::adjustMaxAscentAndDescent): >+ (WebCore::InlineFlowBox::computeLogicalBoxHeights): >+ (WebCore::InlineFlowBox::placeBoxesInBlockDirection): >+ (WebCore::InlineFlowBox::paintFillLayer): >+ * rendering/LogicalSelectionOffsetCaches.h: >+ (WebCore::LogicalSelectionOffsetCaches::containingBlockInfo const): >+ * rendering/RenderBlock.cpp: >+ (WebCore::RenderBlock::removePositionedObjectsIfNeeded): >+ (WebCore::RenderBlock::styleDidChange): >+ (WebCore::RenderBlock::isSelfCollapsingBlock const): >+ (WebCore::RenderBlock::addOverflowFromPositionedObjects): >+ (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded): >+ (WebCore::RenderBlock::isSelectionRoot const): >+ (WebCore::RenderBlock::selectionGaps): >+ (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const): >+ (WebCore::RenderBlock::adjustBorderBoxLogicalHeightForBoxSizing const): >+ (WebCore::RenderBlock::adjustContentBoxLogicalHeightForBoxSizing const): >+ * rendering/RenderBlockFlow.cpp: >+ (WebCore::RenderBlockFlow::MarginInfo::MarginInfo): >+ (WebCore::RenderBlockFlow::willCreateColumns const): >+ (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock): >+ (WebCore::RenderBlockFlow::clearFloatsIfNeeded): >+ (WebCore::RenderBlockFlow::marginBeforeEstimateForChild const): >+ (WebCore::RenderBlockFlow::setMustDiscardMarginBefore): >+ (WebCore::RenderBlockFlow::setMustDiscardMarginAfter): >+ (WebCore::RenderBlockFlow::mustDiscardMarginBefore const): >+ (WebCore::RenderBlockFlow::mustDiscardMarginAfter const): >+ (WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild const): >+ (WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild const): >+ (WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild const): >+ (WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild const): >+ (WebCore::RenderBlockFlow::styleDidChange): >+ (WebCore::RenderBlockFlow::styleWillChange): >+ (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): >+ (WebCore::RenderBlockFlow::positionNewFloats): >+ (WebCore::RenderBlockFlow::clearFloats): >+ (WebCore::RenderBlockFlow::getClearDelta): >+ (WebCore::RenderBlockFlow::inlineBlockBaseline const): >+ (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const): >+ * rendering/RenderBlockFlow.h: >+ * rendering/RenderBlockLineLayout.cpp: >+ (WebCore::expansionBehaviorForInlineTextBox): >+ (WebCore::isCollapsibleSpace): >+ (WebCore::RenderBlockFlow::layoutRunsAndFloats): >+ (WebCore::RenderBlockFlow::layoutLineBoxes): >+ * rendering/RenderBox.cpp: >+ (WebCore::RenderBox::styleWillChange): >+ (WebCore::RenderBox::styleDidChange): >+ (WebCore::RenderBox::updateFromStyle): >+ (WebCore::RenderBox::includeVerticalScrollbarSize const): >+ (WebCore::RenderBox::includeHorizontalScrollbarSize const): >+ (WebCore::RenderBox::intrinsicScrollbarLogicalWidth const): >+ (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const): >+ (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const): >+ (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing const): >+ (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing const): >+ (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing const): >+ (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing const): >+ (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const): >+ (WebCore::isCandidateForOpaquenessTest): >+ (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const): >+ (WebCore::RenderBox::backgroundHasOpaqueTopLayer const): >+ (WebCore::RenderBox::computeRectForRepaint const): >+ (WebCore::RenderBox::computeLogicalWidthInFragment const): >+ (WebCore::RenderBox::columnFlexItemHasStretchAlignment const): >+ (WebCore::RenderBox::isStretchingColumnFlexItem const): >+ (WebCore::RenderBox::hasStretchedLogicalWidth const): >+ (WebCore::RenderBox::sizesLogicalWidthToFitContent const): >+ (WebCore::RenderBox::computeLogicalHeight const): >+ (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const): >+ (WebCore::RenderBox::createsNewFormattingContext const): >+ * rendering/RenderBox.h: >+ (WebCore::RenderBox::scrollsOverflowX const): >+ (WebCore::RenderBox::scrollsOverflowY const): >+ (WebCore::RenderBox::selfAlignmentNormalBehavior const): >+ * rendering/RenderBoxModelObject.cpp: >+ (WebCore::RenderBoxModelObject::paintFillLayerExtended): >+ (WebCore::RenderBoxModelObject::calculateFillTileSize const): >+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const): >+ (WebCore::styleRequiresClipPolygon): >+ (WebCore::borderStyleFillsBorderArea): >+ (WebCore::borderStyleHasInnerDetail): >+ (WebCore::borderStyleIsDottedOrDashed): >+ (WebCore::borderStyleHasUnmatchedColorsAtCorner): >+ (WebCore::borderStylesRequireMitre): >+ (WebCore::RenderBoxModelObject::paintBorder): >+ (WebCore::RenderBoxModelObject::drawBoxSideFromPath): >+ (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const): >+ * rendering/RenderBoxModelObject.h: >+ * rendering/RenderDeprecatedFlexibleBox.cpp: >+ (WebCore::FlexBoxIterator::FlexBoxIterator): >+ (WebCore::RenderDeprecatedFlexibleBox::layoutBlock): >+ (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): >+ (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): >+ * rendering/RenderDeprecatedFlexibleBox.h: >+ * rendering/RenderElement.cpp: >+ (WebCore::RenderElement::adjustStyleDifference const): >+ (WebCore::RenderElement::shouldRepaintForStyleDifference const): >+ (WebCore::RenderElement::initializeStyle): >+ (WebCore::RenderElement::setStyle): >+ (WebCore::RenderElement::didAttachChild): >+ (WebCore::RenderElement::propagateStyleToAnonymousChildren): >+ (WebCore::RenderElement::styleWillChange): >+ (WebCore::RenderElement::styleDidChange): >+ (WebCore::mustRepaintFillLayers): >+ (WebCore::RenderElement::selectionColor const): >+ (WebCore::RenderElement::selectionBackgroundColor const): >+ (WebCore::RenderElement::drawLineForBoxSide const): >+ (WebCore::RenderElement::paintFocusRing): >+ (WebCore::RenderElement::paintOutline): >+ (WebCore::RenderElement::updateOutlineAutoAncestor): >+ (WebCore::includeNonFixedHeight): >+ * rendering/RenderElement.h: >+ (WebCore::RenderElement::hasHiddenBackface const): >+ (WebCore::RenderElement::canContainAbsolutelyPositionedObjects const): >+ * rendering/RenderFlexibleBox.cpp: >+ (WebCore::RenderFlexibleBox::firstLineBaseline const): >+ (WebCore::contentAlignmentNormalBehavior): >+ (WebCore::RenderFlexibleBox::styleDidChange): >+ (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): >+ (WebCore::RenderFlexibleBox::isLeftToRightFlow const): >+ (WebCore::RenderFlexibleBox::isMultiline const): >+ (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax): >+ (WebCore::RenderFlexibleBox::crossSizeForPercentageResolution): >+ (WebCore::initialJustifyContentOffset): >+ (WebCore::justifyContentSpaceBetweenChildren): >+ (WebCore::alignmentOffset): >+ (WebCore::RenderFlexibleBox::staticMainAxisPositionForPositionedChild): >+ (WebCore::RenderFlexibleBox::staticCrossAxisPositionForPositionedChild): >+ (WebCore::RenderFlexibleBox::alignmentForChild const): >+ (WebCore::RenderFlexibleBox::needToStretchChildLogicalHeight const): >+ (WebCore::RenderFlexibleBox::mainAxisOverflowForChild const): >+ (WebCore::RenderFlexibleBox::crossAxisOverflowForChild const): >+ (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): >+ (WebCore::RenderFlexibleBox::layoutColumnReverse): >+ (WebCore::initialAlignContentOffset): >+ (WebCore::alignContentSpaceBetweenChildren): >+ (WebCore::RenderFlexibleBox::alignFlexLines): >+ (WebCore::RenderFlexibleBox::alignChildren): >+ * rendering/RenderFlexibleBox.h: >+ * rendering/RenderFragmentContainer.cpp: >+ (WebCore::RenderFragmentContainer::overflowRectForFragmentedFlowPortion): >+ * rendering/RenderFullScreen.cpp: >+ (WebCore::createFullScreenStyle): >+ * rendering/RenderFullScreen.h: >+ * rendering/RenderGrid.cpp: >+ (WebCore::RenderGrid::selfAlignmentChangedToStretch const): >+ (WebCore::RenderGrid::selfAlignmentChangedFromStretch const): >+ (WebCore::RenderGrid::styleDidChange): >+ (WebCore::contentAlignmentNormalBehaviorGrid): >+ (WebCore::computeOverflowAlignmentOffset): >+ (WebCore::RenderGrid::isInlineBaselineAlignedChild const): >+ (WebCore::RenderGrid::columnAxisPositionForChild const): >+ (WebCore::RenderGrid::rowAxisPositionForChild const): >+ (WebCore::RenderGrid::resolveAutoStartGridPosition const): >+ (WebCore::RenderGrid::resolveAutoEndGridPosition const): >+ (WebCore::resolveContentDistributionFallback): >+ (WebCore::contentDistributionOffset): >+ (WebCore::RenderGrid::computeContentPositionAndDistributionOffset const): >+ * rendering/RenderGrid.h: >+ * rendering/RenderIFrame.cpp: >+ (WebCore::RenderIFrame::requiresLayer const): >+ * rendering/RenderImage.cpp: >+ (WebCore::RenderImage::styleDidChange): >+ (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect const): >+ * rendering/RenderInline.cpp: >+ (WebCore::RenderInline::styleWillChange): >+ (WebCore::RenderInline::updateAlwaysCreateLineBoxes): >+ (WebCore::RenderInline::paintOutline): >+ (WebCore::RenderInline::paintOutlineForLine): >+ * rendering/RenderLayer.cpp: >+ (WebCore::isContainerForPositioned): >+ (WebCore::RenderLayer::enclosingAncestorForPosition const): >+ (WebCore::accumulateOffsetTowardsAncestor): >+ (WebCore::RenderLayer::canResize const): >+ (WebCore::RenderLayer::resize): >+ (WebCore::RenderLayer::scrollCornerRect const): >+ (WebCore::resizerCornerRect): >+ (WebCore::RenderLayer::hasOverflowControls const): >+ (WebCore::styleRequiresScrollbar): >+ (WebCore::styleDefinesAutomaticScrollbar): >+ (WebCore::RenderLayer::updateScrollbarsAfterLayout): >+ (WebCore::RenderLayer::paintResizer): >+ (WebCore::RenderLayer::hitTestOverflowControls): >+ (WebCore::RenderLayer::hitTestLayer): >+ (WebCore::RenderLayer::calculateClipRects const): >+ * rendering/RenderLayer.h: >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::updateGeometry): >+ (WebCore::canDirectlyCompositeBackgroundBackgroundImage): >+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer const): >+ (WebCore::backgroundRectForBox): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::isScrollableOverflow): >+ (WebCore::styleChangeRequiresLayerRebuild): >+ (WebCore::RenderLayerCompositor::layerStyleChanged): >+ (WebCore::RenderLayerCompositor::reasonsForCompositing const): >+ (WebCore::RenderLayerCompositor::requiresCompositingForBackfaceVisibility const): >+ (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const): >+ (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const): >+ (WebCore::RenderLayerCompositor::requiresCompositingForPosition const): >+ (WebCore::RenderLayerCompositor::layerHas3DContent const): >+ (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): >+ * rendering/RenderLayerModelObject.cpp: >+ (WebCore::RenderLayerModelObject::styleWillChange): >+ * rendering/RenderMenuList.cpp: >+ (WebCore::RenderMenuList::adjustInnerStyle): >+ * rendering/RenderMultiColumnFlow.cpp: >+ (WebCore::RenderMultiColumnFlow::isColumnSpanningDescendant const): >+ * rendering/RenderMultiColumnSet.cpp: >+ (WebCore::RenderMultiColumnSet::requiresBalancing const): >+ (WebCore::RenderMultiColumnSet::paintColumnRules): >+ * rendering/RenderMultiColumnSpannerPlaceholder.cpp: >+ (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous): >+ * rendering/RenderObject.cpp: >+ (WebCore::RenderObject::propagateRepaintToParentWithOutlineAutoIfNeeded const): >+ (WebCore::containerForElement): >+ (WebCore::RenderObject::calculateBorderStyleColor): >+ * rendering/RenderObject.h: >+ (WebCore::RenderObject::isFixedPositioned const): >+ (WebCore::RenderObject::isAbsolutelyPositioned const): >+ (WebCore::RenderObject::setPositionState): >+ (WebCore::RenderObject::RenderObjectBitfields::setPositionedState): >+ (WebCore::RenderObject::RenderObjectBitfields::clearPositionedState): >+ * rendering/RenderQuote.cpp: >+ (WebCore::RenderQuote::styleDidChange): >+ (WebCore::RenderQuote::computeText const): >+ (WebCore::RenderQuote::isOpen const): >+ * rendering/RenderReplaced.cpp: >+ (WebCore::RenderReplaced::layout): >+ (WebCore::RenderReplaced::setNeedsLayoutIfNeededAfterIntrinsicSizeChange): >+ (WebCore::RenderReplaced::replacedContentRect const): >+ * rendering/RenderScrollbarPart.cpp: >+ (WebCore::RenderScrollbarPart::styleDidChange): >+ * rendering/RenderTable.cpp: >+ (WebCore::RenderTable::styleDidChange): >+ (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth): >+ (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight): >+ (WebCore::RenderTable::calcBorderStart const): >+ (WebCore::RenderTable::calcBorderEnd const): >+ (WebCore::RenderTable::outerBorderBefore const): >+ (WebCore::RenderTable::outerBorderAfter const): >+ (WebCore::RenderTable::outerBorderStart const): >+ (WebCore::RenderTable::outerBorderEnd const): >+ * rendering/RenderTable.h: >+ (WebCore::RenderTable::collapseBorders const): >+ * rendering/RenderTableCell.cpp: >+ (WebCore::RenderTableCell::computeIntrinsicPadding): >+ (WebCore::RenderTableCell::styleDidChange): >+ (WebCore::compareBorders): >+ (WebCore::chooseBorder): >+ (WebCore::emptyBorder): >+ (WebCore::RenderTableCell::computeCollapsedStartBorder const): >+ (WebCore::RenderTableCell::computeCollapsedEndBorder const): >+ (WebCore::RenderTableCell::computeCollapsedBeforeBorder const): >+ (WebCore::RenderTableCell::computeCollapsedAfterBorder const): >+ (WebCore::CollapsedBorders::addBorder): >+ (WebCore::RenderTableCell::paintCollapsedBorders): >+ (WebCore::RenderTableCell::scrollbarsChanged): >+ * rendering/RenderTableCell.h: >+ (WebCore::RenderTableCell::logicalHeightForRowSizing const): >+ (WebCore::RenderTableCell::isBaselineAligned const): >+ * rendering/RenderTableRow.cpp: >+ (WebCore::RenderTableRow::styleDidChange): >+ * rendering/RenderTableSection.cpp: >+ (WebCore::RenderTableSection::calcOuterBorderBefore const): >+ (WebCore::RenderTableSection::calcOuterBorderAfter const): >+ (WebCore::RenderTableSection::calcOuterBorderStart const): >+ (WebCore::RenderTableSection::calcOuterBorderEnd const): >+ (WebCore::RenderTableSection::paintRowGroupBorder): >+ (WebCore::RenderTableSection::paintRowGroupBorderIfRequired): >+ (WebCore::RenderTableSection::cachedCollapsedBorder): >+ * rendering/RenderTableSection.h: >+ * rendering/RenderText.cpp: >+ (WebCore::RenderText::styleDidChange): >+ (WebCore::RenderText::absoluteQuadsClippedToEllipsis const): >+ (WebCore::isSpaceAccordingToStyle): >+ (WebCore::mapLineBreakToIteratorMode): >+ (WebCore::RenderText::computePreferredLogicalWidths): >+ (WebCore::RenderText::setRenderedText): >+ (WebCore::RenderText::textWithoutConvertingBackslashToYenSymbol const): >+ (WebCore::RenderText::momentarilyRevealLastTypedCharacter): >+ * rendering/RenderTextControl.cpp: >+ (WebCore::RenderTextControl::computeLogicalHeight const): >+ * rendering/RenderTextControlSingleLine.cpp: >+ (WebCore::RenderTextControlSingleLine::styleDidChange): >+ * rendering/RenderTheme.cpp: >+ (WebCore::RenderTheme::extractControlStatesForRenderer const): >+ * rendering/RenderThemeIOS.mm: >+ (WebCore::adjustInputElementButtonStyle): >+ * rendering/RenderThemeMac.mm: >+ (WebCore::RenderThemeMac::updateFocusedState): >+ (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): >+ (WebCore::RenderThemeMac::adjustSearchFieldStyle const): >+ * rendering/RenderTreeAsText.cpp: >+ (WebCore::printBorderStyle): >+ * rendering/RenderVideo.cpp: >+ (WebCore::RenderVideo::updatePlayer): >+ * rendering/RenderView.cpp: >+ (WebCore::RenderView::RenderView): >+ (WebCore::rendererObscuresBackground): >+ * rendering/RootInlineBox.cpp: >+ (WebCore::RootInlineBox::verticalPositionForBox): >+ * rendering/SimpleLineLayout.cpp: >+ (WebCore::SimpleLineLayout::canUseForStyle): >+ (WebCore::SimpleLineLayout::canUseForWithReason): >+ * rendering/SimpleLineLayoutTextFragmentIterator.cpp: >+ (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): >+ * rendering/TextPaintStyle.cpp: >+ (WebCore::computeTextPaintStyle): >+ * rendering/line/BreakingContext.h: >+ (WebCore::BreakingContext::handleBR): >+ (WebCore::shouldAddBorderPaddingMargin): >+ (WebCore::BreakingContext::handleText): >+ (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): >+ * rendering/line/LineBreaker.cpp: >+ (WebCore::LineBreaker::reset): >+ * rendering/line/LineBreaker.h: >+ (WebCore::LineBreaker::clear): >+ * rendering/line/LineInlineHeaders.h: >+ (WebCore::skipNonBreakingSpace): >+ * rendering/line/LineWidth.cpp: >+ (WebCore::requiresIndent): >+ * rendering/style/BorderData.h: >+ (WebCore::BorderData::borderLeftWidth const): >+ (WebCore::BorderData::borderRightWidth const): >+ (WebCore::BorderData::borderTopWidth const): >+ (WebCore::BorderData::borderBottomWidth const): >+ * rendering/style/BorderValue.h: >+ (WebCore::BorderValue::BorderValue): >+ (WebCore::BorderValue::nonZero const): >+ (WebCore::BorderValue::isVisible const): >+ (WebCore::BorderValue::style const): >+ * rendering/style/CollapsedBorderValue.h: >+ (WebCore::CollapsedBorderValue::CollapsedBorderValue): >+ (WebCore::CollapsedBorderValue::width const): >+ (WebCore::CollapsedBorderValue::style const): >+ (WebCore::CollapsedBorderValue::exists const): >+ (WebCore::CollapsedBorderValue::precedence const): >+ * rendering/style/FillLayer.cpp: >+ (WebCore::FillLayer::FillLayer): >+ (WebCore::clipMax): >+ (WebCore::FillLayer::computeClipMax const): >+ (WebCore::FillLayer::hasRepeatXY const): >+ (WebCore::FillLayer::hasFixedImage const): >+ * rendering/style/FillLayer.h: >+ (WebCore::FillSize::FillSize): >+ (WebCore::FillLayer::attachment const): >+ (WebCore::FillLayer::clip const): >+ (WebCore::FillLayer::origin const): >+ (WebCore::FillLayer::repeatX const): >+ (WebCore::FillLayer::repeatY const): >+ (WebCore::FillLayer::sizeType const): >+ (WebCore::FillLayer::size const): >+ (WebCore::FillLayer::maskSourceType const): >+ (WebCore::FillLayer::isSizeSet const): >+ (WebCore::FillLayer::setAttachment): >+ (WebCore::FillLayer::setClip): >+ (WebCore::FillLayer::setOrigin): >+ (WebCore::FillLayer::setRepeatX): >+ (WebCore::FillLayer::setRepeatY): >+ (WebCore::FillLayer::setComposite): >+ (WebCore::FillLayer::setBlendMode): >+ (WebCore::FillLayer::setSizeType): >+ (WebCore::FillLayer::setSize): >+ (WebCore::FillLayer::setMaskSourceType): >+ (WebCore::FillLayer::clearSize): >+ (WebCore::FillLayer::type const): >+ (WebCore::FillLayer::initialFillAttachment): >+ (WebCore::FillLayer::initialFillClip): >+ (WebCore::FillLayer::initialFillOrigin): >+ (WebCore::FillLayer::initialFillRepeatX): >+ (WebCore::FillLayer::initialFillRepeatY): >+ (WebCore::FillLayer::initialFillComposite): >+ (WebCore::FillLayer::initialFillBlendMode): >+ (WebCore::FillLayer::initialFillSize): >+ (WebCore::FillLayer::initialFillXPosition): >+ (WebCore::FillLayer::initialFillYPosition): >+ (WebCore::FillLayer::initialFillImage): >+ (WebCore::FillLayer::initialFillMaskSourceType): >+ * rendering/style/LineClampValue.h: >+ (WebCore::LineClampValue::LineClampValue): >+ (WebCore::LineClampValue::isPercentage const): >+ * rendering/style/RenderStyle.cpp: >+ (WebCore::RenderStyle::RenderStyle): >+ (WebCore::resolvedSelfAlignment): >+ (WebCore::RenderStyle::resolvedAlignSelf const): >+ (WebCore::RenderStyle::resolvedJustifySelf const): >+ (WebCore::resolvedContentAlignment): >+ (WebCore::resolvedContentAlignmentPosition): >+ (WebCore::resolvedContentAlignmentDistribution): >+ (WebCore::RenderStyle::resolvedJustifyContentDistribution const): >+ (WebCore::RenderStyle::resolvedAlignContentDistribution const): >+ (WebCore::RenderStyle::changeRequiresLayout const): >+ (WebCore::RenderStyle::changeRequiresPositionedLayoutOnly const): >+ (WebCore::RenderStyle::changeRequiresLayerRepaint const): >+ (WebCore::RenderStyle::changeRequiresRepaint const): >+ (WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline const): >+ (WebCore::RenderStyle::changeRequiresRecompositeLayer const): >+ (WebCore::RenderStyle::diff const): >+ (WebCore::RenderStyle::diffRequiresLayerRepaint const): >+ (WebCore::allLayersAreFixed): >+ (WebCore::RenderStyle::colorIncludingFallback const): >+ (WebCore::RenderStyle::setColumnStylesFromPaginationMode): >+ (WebCore::RenderStyle::outlineWidth const): >+ (WebCore::RenderStyle::outlineOffset const): >+ * rendering/style/RenderStyle.h: >+ (WebCore::RenderStyle::isFloating const): >+ (WebCore::RenderStyle::position const): >+ (WebCore::RenderStyle::hasOutOfFlowPosition const): >+ (WebCore::RenderStyle::hasInFlowPosition const): >+ (WebCore::RenderStyle::hasViewportConstrainedPosition const): >+ (WebCore::RenderStyle::floating const): >+ (WebCore::RenderStyle::borderLeftStyle const): >+ (WebCore::RenderStyle::borderRightStyle const): >+ (WebCore::RenderStyle::borderTopStyle const): >+ (WebCore::RenderStyle::borderBottomStyle const): >+ (WebCore::RenderStyle::hasOutline const): >+ (WebCore::RenderStyle::outlineStyle const): >+ (WebCore::RenderStyle::overflowX const): >+ (WebCore::RenderStyle::overflowY const): >+ (WebCore::RenderStyle::overflowInlineDirection const): >+ (WebCore::RenderStyle::overflowBlockDirection const): >+ (WebCore::RenderStyle::verticalAlign const): >+ (WebCore::RenderStyle::clear const): >+ (WebCore::RenderStyle::tableLayout const): >+ (WebCore::RenderStyle::backgroundRepeatX const): >+ (WebCore::RenderStyle::backgroundRepeatY const): >+ (WebCore::RenderStyle::backgroundAttachment const): >+ (WebCore::RenderStyle::backgroundClip const): >+ (WebCore::RenderStyle::backgroundOrigin const): >+ (WebCore::RenderStyle::backgroundSizeType const): >+ (WebCore::RenderStyle::maskRepeatX const): >+ (WebCore::RenderStyle::maskRepeatY const): >+ (WebCore::RenderStyle::maskClip const): >+ (WebCore::RenderStyle::maskOrigin const): >+ (WebCore::RenderStyle::maskSizeType const): >+ (WebCore::RenderStyle::borderCollapse const): >+ (WebCore::RenderStyle::boxAlign const): >+ (WebCore::RenderStyle::boxDirection const): >+ (WebCore::RenderStyle::boxLines const): >+ (WebCore::RenderStyle::boxOrient const): >+ (WebCore::RenderStyle::boxPack const): >+ (WebCore::RenderStyle::flexDirection const): >+ (WebCore::RenderStyle::isColumnFlexDirection const): >+ (WebCore::RenderStyle::isReverseFlexDirection const): >+ (WebCore::RenderStyle::flexWrap const): >+ (WebCore::RenderStyle::boxDecorationBreak const): >+ (WebCore::RenderStyle::boxSizing const): >+ (WebCore::RenderStyle::userModify const): >+ (WebCore::RenderStyle::userDrag const): >+ (WebCore::RenderStyle::userSelect const): >+ (WebCore::RenderStyle::marginBeforeCollapse const): >+ (WebCore::RenderStyle::marginAfterCollapse const): >+ (WebCore::RenderStyle::wordBreak const): >+ (WebCore::RenderStyle::overflowWrap const): >+ (WebCore::RenderStyle::nbspMode const): >+ (WebCore::RenderStyle::resize const): >+ (WebCore::RenderStyle::columnRuleStyle const): >+ (WebCore::RenderStyle::hasTextCombine const): >+ (WebCore::RenderStyle::transformStyle3D const): >+ (WebCore::RenderStyle::preserves3D const): >+ (WebCore::RenderStyle::backfaceVisibility const): >+ (WebCore::RenderStyle::textSecurity const): >+ (WebCore::RenderStyle::imageRendering const): >+ (WebCore::RenderStyle::setIsolation): >+ (WebCore::RenderStyle::hasIsolation const): >+ (WebCore::RenderStyle::isolation const): >+ (WebCore::RenderStyle::setPosition): >+ (WebCore::RenderStyle::setFloating): >+ (WebCore::RenderStyle::setBackgroundSize): >+ (WebCore::RenderStyle::setBorderLeftStyle): >+ (WebCore::RenderStyle::setBorderRightStyle): >+ (WebCore::RenderStyle::setBorderTopStyle): >+ (WebCore::RenderStyle::setBorderBottomStyle): >+ (WebCore::RenderStyle::setOutlineStyleIsAuto): >+ (WebCore::RenderStyle::setOutlineStyle): >+ (WebCore::RenderStyle::setOverflowX): >+ (WebCore::RenderStyle::setOverflowY): >+ (WebCore::RenderStyle::setVerticalAlign): >+ (WebCore::RenderStyle::setVerticalAlignLength): >+ (WebCore::RenderStyle::setClear): >+ (WebCore::RenderStyle::setTableLayout): >+ (WebCore::RenderStyle::setImageRendering): >+ (WebCore::RenderStyle::clearBackgroundLayers): >+ (WebCore::RenderStyle::clearMaskLayers): >+ (WebCore::RenderStyle::setBorderCollapse): >+ (WebCore::RenderStyle::setAspectRatioType): >+ (WebCore::RenderStyle::setPrintColorAdjust): >+ (WebCore::RenderStyle::setBoxAlign): >+ (WebCore::RenderStyle::setBoxDirection): >+ (WebCore::RenderStyle::setBoxLines): >+ (WebCore::RenderStyle::setBoxOrient): >+ (WebCore::RenderStyle::setBoxPack): >+ (WebCore::RenderStyle::setBoxSizing): >+ (WebCore::RenderStyle::setFlexDirection): >+ (WebCore::RenderStyle::setFlexWrap): >+ (WebCore::RenderStyle::setBoxDecorationBreak): >+ (WebCore::RenderStyle::setUserModify): >+ (WebCore::RenderStyle::setUserDrag): >+ (WebCore::RenderStyle::setUserSelect): >+ (WebCore::RenderStyle::setTextOverflow): >+ (WebCore::RenderStyle::setMarginBeforeCollapse): >+ (WebCore::RenderStyle::setMarginAfterCollapse): >+ (WebCore::RenderStyle::setWordBreak): >+ (WebCore::RenderStyle::setOverflowWrap): >+ (WebCore::RenderStyle::setNBSPMode): >+ (WebCore::RenderStyle::setLineBreak): >+ (WebCore::RenderStyle::setResize): >+ (WebCore::RenderStyle::setColumnFill): >+ (WebCore::RenderStyle::setColumnRuleStyle): >+ (WebCore::RenderStyle::setColumnSpan): >+ (WebCore::RenderStyle::setTextCombine): >+ (WebCore::RenderStyle::setObjectFit): >+ (WebCore::RenderStyle::setTransformStyle3D): >+ (WebCore::RenderStyle::setBackfaceVisibility): >+ (WebCore::RenderStyle::setTextSecurity): >+ (WebCore::RenderStyle::initialOverflowX): >+ (WebCore::RenderStyle::initialOverflowY): >+ (WebCore::RenderStyle::initialClear): >+ (WebCore::RenderStyle::initialPosition): >+ (WebCore::RenderStyle::initialVerticalAlign): >+ (WebCore::RenderStyle::initialFloating): >+ (WebCore::RenderStyle::initialTableLayout): >+ (WebCore::RenderStyle::initialBorderCollapse): >+ (WebCore::RenderStyle::initialBorderStyle): >+ (WebCore::RenderStyle::initialOutlineStyleIsAuto): >+ (WebCore::RenderStyle::initialTextCombine): >+ (WebCore::RenderStyle::initialObjectFit): >+ (WebCore::RenderStyle::initialBoxAlign): >+ (WebCore::RenderStyle::initialBoxDecorationBreak): >+ (WebCore::RenderStyle::initialBoxDirection): >+ (WebCore::RenderStyle::initialBoxLines): >+ (WebCore::RenderStyle::initialBoxOrient): >+ (WebCore::RenderStyle::initialBoxPack): >+ (WebCore::RenderStyle::initialBoxSizing): >+ (WebCore::RenderStyle::initialJustifyItems): >+ (WebCore::RenderStyle::initialSelfAlignment): >+ (WebCore::RenderStyle::initialDefaultAlignment): >+ (WebCore::RenderStyle::initialContentAlignment): >+ (WebCore::RenderStyle::initialFlexDirection): >+ (WebCore::RenderStyle::initialFlexWrap): >+ (WebCore::RenderStyle::initialUserModify): >+ (WebCore::RenderStyle::initialUserDrag): >+ (WebCore::RenderStyle::initialUserSelect): >+ (WebCore::RenderStyle::initialTextOverflow): >+ (WebCore::RenderStyle::initialMarginBeforeCollapse): >+ (WebCore::RenderStyle::initialMarginAfterCollapse): >+ (WebCore::RenderStyle::initialWordBreak): >+ (WebCore::RenderStyle::initialOverflowWrap): >+ (WebCore::RenderStyle::initialNBSPMode): >+ (WebCore::RenderStyle::initialLineBreak): >+ (WebCore::RenderStyle::initialResize): >+ (WebCore::RenderStyle::initialAspectRatioType): >+ (WebCore::RenderStyle::initialColumnFill): >+ (WebCore::RenderStyle::initialColumnSpan): >+ (WebCore::RenderStyle::initialTransformStyle3D): >+ (WebCore::RenderStyle::initialBackfaceVisibility): >+ (WebCore::RenderStyle::initialImageRendering): >+ (WebCore::RenderStyle::initialPrintColorAdjust): >+ (WebCore::RenderStyle::initialTextIndentLine): >+ (WebCore::RenderStyle::initialTextIndentType): >+ (WebCore::RenderStyle::initialTextSecurity): >+ (WebCore::RenderStyle::initialIsolation): >+ (WebCore::collapsedBorderStyle): >+ (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const): >+ (WebCore::RenderStyle::breakWords const): >+ (WebCore::RenderStyle::setTextOrientation): >+ * rendering/style/RenderStyleConstants.cpp: >+ (WebCore::operator<<): >+ * rendering/style/RenderStyleConstants.h: >+ (WebCore::operator|): >+ (WebCore::operator|=): >+ (WebCore::operator| ): Deleted. >+ (WebCore::operator|= ): Deleted. >+ * rendering/style/SVGRenderStyle.cpp: >+ (WebCore::SVGRenderStyle::diff const): >+ * rendering/style/StyleBackgroundData.cpp: >+ (WebCore::StyleBackgroundData::StyleBackgroundData): >+ * rendering/style/StyleBoxData.cpp: >+ (WebCore::StyleBoxData::StyleBoxData): >+ * rendering/style/StyleBoxData.h: >+ (WebCore::StyleBoxData::boxSizing const): >+ (WebCore::StyleBoxData::boxDecorationBreak const): >+ * rendering/style/StyleContentAlignmentData.h: >+ (WebCore::StyleContentAlignmentData::StyleContentAlignmentData): >+ (WebCore::StyleContentAlignmentData::setPosition): >+ (WebCore::StyleContentAlignmentData::setDistribution): >+ (WebCore::StyleContentAlignmentData::setOverflow): >+ (WebCore::StyleContentAlignmentData::distribution const): >+ * rendering/style/StyleDeprecatedFlexibleBoxData.cpp: >+ (WebCore::StyleDeprecatedFlexibleBoxData::StyleDeprecatedFlexibleBoxData): >+ * rendering/style/StyleDeprecatedFlexibleBoxData.h: >+ * rendering/style/StyleFlexibleBoxData.cpp: >+ (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): >+ * rendering/style/StyleFlexibleBoxData.h: >+ * rendering/style/StyleMultiColData.cpp: >+ (WebCore::StyleMultiColData::StyleMultiColData): >+ * rendering/style/StyleMultiColData.h: >+ (WebCore::StyleMultiColData::ruleWidth const): >+ * rendering/style/StyleRareInheritedData.cpp: >+ (WebCore::StyleRareInheritedData::StyleRareInheritedData): >+ * rendering/style/StyleRareInheritedData.h: >+ * rendering/style/StyleRareNonInheritedData.cpp: >+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): >+ * rendering/style/StyleRareNonInheritedData.h: >+ * rendering/style/StyleSelfAlignmentData.h: >+ (WebCore::StyleSelfAlignmentData::StyleSelfAlignmentData): >+ (WebCore::StyleSelfAlignmentData::setPosition): >+ (WebCore::StyleSelfAlignmentData::setPositionType): >+ (WebCore::StyleSelfAlignmentData::setOverflow): >+ * rendering/svg/RenderSVGBlock.cpp: >+ (WebCore::RenderSVGBlock::styleDidChange): >+ * rendering/svg/RenderSVGGradientStop.cpp: >+ (WebCore::RenderSVGGradientStop::styleDidChange): >+ * rendering/svg/RenderSVGInline.cpp: >+ (WebCore::RenderSVGInline::styleDidChange): >+ * rendering/svg/RenderSVGInlineText.cpp: >+ (WebCore::RenderSVGInlineText::styleDidChange): >+ * rendering/svg/RenderSVGModelObject.cpp: >+ (WebCore::RenderSVGModelObject::styleDidChange): >+ * rendering/svg/RenderSVGResourceContainer.cpp: >+ (WebCore::RenderSVGResourceContainer::registerResource): >+ * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: >+ (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange): >+ * rendering/svg/RenderSVGRoot.cpp: >+ (WebCore::RenderSVGRoot::layout): >+ (WebCore::RenderSVGRoot::shouldApplyViewportClip const): >+ (WebCore::RenderSVGRoot::styleDidChange): >+ * rendering/svg/SVGInlineTextBox.cpp: >+ (WebCore::SVGInlineTextBox::paintText): >+ * rendering/svg/SVGRenderSupport.cpp: >+ (WebCore::SVGRenderSupport::isOverflowHidden): >+ * rendering/svg/SVGResourcesCache.cpp: >+ (WebCore::SVGResourcesCache::clientStyleChanged): >+ * rendering/updating/RenderTreeBuilder.cpp: >+ (WebCore::RenderTreeBuilder::attachToRenderElementInternal): >+ * rendering/updating/RenderTreeBuilderBlock.cpp: >+ (WebCore::RenderTreeBuilder::Block::insertChildToContinuation): >+ * rendering/updating/RenderTreeBuilderFirstLetter.cpp: >+ (WebCore::styleForFirstLetter): >+ * rendering/updating/RenderTreeBuilderMultiColumn.cpp: >+ (WebCore::isValidColumnSpanner): >+ (WebCore::RenderTreeBuilder::MultiColumn::resolveMovedChild): >+ (WebCore::RenderTreeBuilder::MultiColumn::multiColumnRelativeWillBeRemoved): >+ * rendering/updating/RenderTreeUpdater.cpp: >+ (WebCore::RenderTreeUpdater::updateElementRenderer): >+ * style/StyleResolveForDocument.cpp: >+ (WebCore::Style::resolveForDocument): >+ > 2018-05-19 Eric Carlson <eric.carlson@apple.com> > > Improve NowPlaying "title" >Index: Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >=================================================================== >--- Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (revision 232008) >+++ Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (working copy) >@@ -830,10 +830,10 @@ static void AXAttributeStringSetStyle(NS > AXAttributeStringSetColor(attrString, NSAccessibilityBackgroundColorTextAttribute, nsColor(style.visitedDependentColor(CSSPropertyBackgroundColor)), range); > > // set super/sub scripting >- EVerticalAlign alignment = style.verticalAlign(); >- if (alignment == SUB) >+ VerticalAlign alignment = style.verticalAlign(); >+ if (alignment == VerticalAlign::Sub) > AXAttributeStringSetNumber(attrString, NSAccessibilitySuperscriptTextAttribute, [NSNumber numberWithInt:(-1)], range); >- else if (alignment == SUPER) >+ else if (alignment == VerticalAlign::Super) > AXAttributeStringSetNumber(attrString, NSAccessibilitySuperscriptTextAttribute, [NSNumber numberWithInt:1], range); > else > [attrString removeAttribute:NSAccessibilitySuperscriptTextAttribute range:range]; >Index: Source/WebCore/css/BasicShapeFunctions.cpp >=================================================================== >--- Source/WebCore/css/BasicShapeFunctions.cpp (revision 232008) >+++ Source/WebCore/css/BasicShapeFunctions.cpp (working copy) >@@ -40,12 +40,12 @@ > > namespace WebCore { > >-static Ref<CSSPrimitiveValue> valueForCenterCoordinate(CSSValuePool& pool, const RenderStyle& style, const BasicShapeCenterCoordinate& center, EBoxOrient orientation) >+static Ref<CSSPrimitiveValue> valueForCenterCoordinate(CSSValuePool& pool, const RenderStyle& style, const BasicShapeCenterCoordinate& center, BoxOrient orientation) > { > if (center.direction() == BasicShapeCenterCoordinate::TopLeft) > return pool.createValue(center.length(), style); > >- CSSValueID keyword = orientation == HORIZONTAL ? CSSValueRight : CSSValueBottom; >+ CSSValueID keyword = orientation == BoxOrient::Horizontal ? CSSValueRight : CSSValueBottom; > > return pool.createValue(Pair::create(pool.createIdentifierValue(keyword), pool.createValue(center.length(), style))); > } >@@ -75,8 +75,8 @@ Ref<CSSPrimitiveValue> valueForBasicShap > auto& circle = downcast<BasicShapeCircle>(basicShape); > auto circleValue = CSSBasicShapeCircle::create(); > >- circleValue->setCenterX(valueForCenterCoordinate(cssValuePool, style, circle.centerX(), HORIZONTAL)); >- circleValue->setCenterY(valueForCenterCoordinate(cssValuePool, style, circle.centerY(), VERTICAL)); >+ circleValue->setCenterX(valueForCenterCoordinate(cssValuePool, style, circle.centerX(), BoxOrient::Horizontal)); >+ circleValue->setCenterY(valueForCenterCoordinate(cssValuePool, style, circle.centerY(), BoxOrient::Vertical)); > circleValue->setRadius(basicShapeRadiusToCSSValue(style, cssValuePool, circle.radius())); > > basicShapeValue = WTFMove(circleValue); >@@ -86,8 +86,8 @@ Ref<CSSPrimitiveValue> valueForBasicShap > auto& ellipse = downcast<BasicShapeEllipse>(basicShape); > auto ellipseValue = CSSBasicShapeEllipse::create(); > >- ellipseValue->setCenterX(valueForCenterCoordinate(cssValuePool, style, ellipse.centerX(), HORIZONTAL)); >- ellipseValue->setCenterY(valueForCenterCoordinate(cssValuePool, style, ellipse.centerY(), VERTICAL)); >+ ellipseValue->setCenterX(valueForCenterCoordinate(cssValuePool, style, ellipse.centerX(), BoxOrient::Horizontal)); >+ ellipseValue->setCenterY(valueForCenterCoordinate(cssValuePool, style, ellipse.centerY(), BoxOrient::Vertical)); > ellipseValue->setRadiusX(basicShapeRadiusToCSSValue(style, cssValuePool, ellipse.radiusX())); > ellipseValue->setRadiusY(basicShapeRadiusToCSSValue(style, cssValuePool, ellipse.radiusY())); > >Index: Source/WebCore/css/CSSComputedStyleDeclaration.cpp >=================================================================== >--- Source/WebCore/css/CSSComputedStyleDeclaration.cpp (revision 232008) >+++ Source/WebCore/css/CSSComputedStyleDeclaration.cpp (working copy) >@@ -878,7 +878,7 @@ static LayoutRect sizingBox(RenderObject > return LayoutRect(); > > auto& box = downcast<RenderBox>(renderer); >- return box.style().boxSizing() == BORDER_BOX ? box.borderBoxRect() : box.computedCSSContentBoxRect(); >+ return box.style().boxSizing() == BoxSizing::BorderBox ? box.borderBoxRect() : box.computedCSSContentBoxRect(); > } > > static Ref<CSSFunctionValue> matrixTransformValue(const TransformationMatrix& transform, const RenderStyle& style) >@@ -1868,16 +1868,16 @@ static Ref<CSSValue> hangingPunctuationT > return WTFMove(list); > } > >-static Ref<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepeat yRepeat) >+static Ref<CSSValue> fillRepeatToCSSValue(FillRepeat xRepeat, FillRepeat yRepeat) > { > // For backwards compatibility, if both values are equal, just return one of them. And > // if the two values are equivalent to repeat-x or repeat-y, just return the shorthand. > auto& cssValuePool = CSSValuePool::singleton(); > if (xRepeat == yRepeat) > return cssValuePool.createValue(xRepeat); >- if (xRepeat == RepeatFill && yRepeat == NoRepeatFill) >+ if (xRepeat == FillRepeat::Repeat && yRepeat == FillRepeat::NoRepeat) > return cssValuePool.createIdentifierValue(CSSValueRepeatX); >- if (xRepeat == NoRepeatFill && yRepeat == RepeatFill) >+ if (xRepeat == FillRepeat::NoRepeat && yRepeat == FillRepeat::Repeat) > return cssValuePool.createIdentifierValue(CSSValueRepeatY); > > auto list = CSSValueList::createSpaceSeparated(); >@@ -1886,23 +1886,23 @@ static Ref<CSSValue> fillRepeatToCSSValu > return WTFMove(list); > } > >-static Ref<CSSValue> fillSourceTypeToCSSValue(EMaskSourceType type) >+static Ref<CSSValue> fillSourceTypeToCSSValue(MaskSourceType type) > { > switch (type) { >- case MaskAlpha: >+ case MaskSourceType::Alpha: > return CSSValuePool::singleton().createValue(CSSValueAlpha); > default: >- ASSERT(type == MaskLuminance); >+ ASSERT(type == MaskSourceType::Luminance); > return CSSValuePool::singleton().createValue(CSSValueLuminance); > } > } > > static Ref<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle& style) > { >- if (fillSize.type == Contain) >+ if (fillSize.type == FillSizeType::Contain) > return CSSValuePool::singleton().createIdentifierValue(CSSValueContain); > >- if (fillSize.type == Cover) >+ if (fillSize.type == FillSizeType::Cover) > return CSSValuePool::singleton().createIdentifierValue(CSSValueCover); > > if (fillSize.size.height.isAuto()) >@@ -2515,17 +2515,17 @@ static Ref<CSSValueList> valueForItemPos > { > auto& cssValuePool = CSSValuePool::singleton(); > auto result = CSSValueList::createSpaceSeparated(); >- if (data.positionType() == LegacyPosition) >+ if (data.positionType() == ItemPositionType::Legacy) > result->append(cssValuePool.createIdentifierValue(CSSValueLegacy)); >- if (data.position() == ItemPositionBaseline) >+ if (data.position() == ItemPosition::Baseline) > result->append(cssValuePool.createIdentifierValue(CSSValueBaseline)); >- else if (data.position() == ItemPositionLastBaseline) { >+ else if (data.position() == ItemPosition::LastBaseline) { > result->append(cssValuePool.createIdentifierValue(CSSValueLast)); > result->append(cssValuePool.createIdentifierValue(CSSValueBaseline)); > } else { >- if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlignmentDefault) >+ if (data.position() >= ItemPosition::Center && data.overflow() != OverflowAlignment::Default) > result->append(cssValuePool.createValue(data.overflow())); >- if (data.position() == ItemPositionLegacy) >+ if (data.position() == ItemPosition::Legacy) > result->append(cssValuePool.createIdentifierValue(CSSValueNormal)); > else > result->append(cssValuePool.createValue(data.position())); >@@ -2539,23 +2539,23 @@ static Ref<CSSValueList> valueForContent > auto& cssValuePool = CSSValuePool::singleton(); > auto result = CSSValueList::createSpaceSeparated(); > // Handle content-distribution values >- if (data.distribution() != ContentDistributionDefault) >+ if (data.distribution() != ContentDistribution::Default) > result->append(cssValuePool.createValue(data.distribution())); > > // Handle content-position values (either as fallback or actual value) > switch (data.position()) { >- case ContentPositionNormal: >+ case ContentPosition::Normal: > // Handle 'normal' value, not valid as content-distribution fallback. >- if (data.distribution() == ContentDistributionDefault) >+ if (data.distribution() == ContentDistribution::Default) > result->append(cssValuePool.createIdentifierValue(CSSValueNormal)); > break; >- case ContentPositionLastBaseline: >+ case ContentPosition::LastBaseline: > result->append(cssValuePool.createIdentifierValue(CSSValueLast)); > result->append(cssValuePool.createIdentifierValue(CSSValueBaseline)); > break; > default: > // Handle overflow-alignment (only allowed for content-position values) >- if ((data.position() >= ContentPositionCenter || data.distribution() != ContentDistributionDefault) && data.overflow() != OverflowAlignmentDefault) >+ if ((data.position() >= ContentPosition::Center || data.distribution() != ContentDistribution::Default) && data.overflow() != OverflowAlignment::Default) > result->append(cssValuePool.createValue(data.overflow())); > result->append(cssValuePool.createValue(data.position())); > } >@@ -2837,7 +2837,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > return WTFMove(list); > } > case CSSPropertyBorderCollapse: >- if (style.borderCollapse()) >+ if (style.borderCollapse() == BorderCollapse::Collapse) > return cssValuePool.createIdentifierValue(CSSValueCollapse); > return cssValuePool.createIdentifierValue(CSSValueSeparate); > case CSSPropertyBorderSpacing: { >@@ -2884,7 +2884,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > return cssValuePool.createValue(style.boxAlign()); > #if ENABLE(CSS_BOX_DECORATION_BREAK) > case CSSPropertyWebkitBoxDecorationBreak: >- if (style.boxDecorationBreak() == DSLICE) >+ if (style.boxDecorationBreak() == BoxDecorationBreak::Slice) > return cssValuePool.createIdentifierValue(CSSValueSlice); > return cssValuePool.createIdentifierValue(CSSValueClone); > #endif >@@ -2942,7 +2942,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > case CSSPropertyColumnRuleWidth: > return zoomAdjustedPixelValue(style.columnRuleWidth(), style); > case CSSPropertyColumnSpan: >- return cssValuePool.createIdentifierValue(style.columnSpan() ? CSSValueAll : CSSValueNone); >+ return cssValuePool.createIdentifierValue(style.columnSpan() == ColumnSpan::All ? CSSValueAll : CSSValueNone); > case CSSPropertyWebkitColumnBreakAfter: > return cssValuePool.createValue(convertToColumnBreak(style.breakAfter())); > case CSSPropertyWebkitColumnBreakBefore: >@@ -3270,7 +3270,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > case CSSPropertyOutlineOffset: > return zoomAdjustedPixelValue(style.outlineOffset(), style); > case CSSPropertyOutlineStyle: >- if (style.outlineStyleIsAuto()) >+ if (style.outlineStyleIsAuto() == OutlineIsAuto::On) > return cssValuePool.createIdentifierValue(CSSValueAuto); > return cssValuePool.createValue(style.outlineStyle()); > case CSSPropertyOutlineWidth: >@@ -3372,12 +3372,12 @@ RefPtr<CSSValue> ComputedStyleExtractor: > #if ENABLE(CSS3_TEXT) > // If CSS3_TEXT is enabled and text-indent has -webkit-each-line or -webkit-hanging, > // getPropertyCSSValue() returns CSSValueList. >- if (style.textIndentLine() == TextIndentEachLine || style.textIndentType() == TextIndentHanging) { >+ if (style.textIndentLine() == TextIndentLine::EachLine || style.textIndentType() == TextIndentType::Hanging) { > auto list = CSSValueList::createSpaceSeparated(); > list->append(WTFMove(textIndent)); >- if (style.textIndentLine() == TextIndentEachLine) >+ if (style.textIndentLine() == TextIndentLine::EachLine) > list->append(cssValuePool.createIdentifierValue(CSSValueWebkitEachLine)); >- if (style.textIndentType() == TextIndentHanging) >+ if (style.textIndentType() == TextIndentType::Hanging) > list->append(cssValuePool.createIdentifierValue(CSSValueWebkitHanging)); > return WTFMove(list); > } >@@ -3389,7 +3389,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > case CSSPropertyTextRendering: > return cssValuePool.createValue(style.fontDescription().textRenderingMode()); > case CSSPropertyTextOverflow: >- if (style.textOverflow()) >+ if (style.textOverflow() == TextOverflow::Ellipsis) > return cssValuePool.createIdentifierValue(CSSValueEllipsis); > return cssValuePool.createIdentifierValue(CSSValueClip); > case CSSPropertyWebkitTextSecurity: >@@ -3414,25 +3414,25 @@ RefPtr<CSSValue> ComputedStyleExtractor: > return cssValuePool.createValue(style.unicodeBidi()); > case CSSPropertyVerticalAlign: > switch (style.verticalAlign()) { >- case BASELINE: >+ case VerticalAlign::Baseline: > return cssValuePool.createIdentifierValue(CSSValueBaseline); >- case MIDDLE: >+ case VerticalAlign::Middle: > return cssValuePool.createIdentifierValue(CSSValueMiddle); >- case SUB: >+ case VerticalAlign::Sub: > return cssValuePool.createIdentifierValue(CSSValueSub); >- case SUPER: >+ case VerticalAlign::Super: > return cssValuePool.createIdentifierValue(CSSValueSuper); >- case TEXT_TOP: >+ case VerticalAlign::TextTop: > return cssValuePool.createIdentifierValue(CSSValueTextTop); >- case TEXT_BOTTOM: >+ case VerticalAlign::TextBottom: > return cssValuePool.createIdentifierValue(CSSValueTextBottom); >- case TOP: >+ case VerticalAlign::Top: > return cssValuePool.createIdentifierValue(CSSValueTop); >- case BOTTOM: >+ case VerticalAlign::Bottom: > return cssValuePool.createIdentifierValue(CSSValueBottom); >- case BASELINE_MIDDLE: >+ case VerticalAlign::BaselineMiddle: > return cssValuePool.createIdentifierValue(CSSValueWebkitBaselineMiddle); >- case LENGTH: >+ case VerticalAlign::Length: > return cssValuePool.createValue(style.verticalAlignLength()); > } > ASSERT_NOT_REACHED(); >@@ -3491,7 +3491,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > case CSSPropertyZoom: > return cssValuePool.createValue(style.zoom(), CSSPrimitiveValue::CSS_NUMBER); > case CSSPropertyBoxSizing: >- if (style.boxSizing() == CONTENT_BOX) >+ if (style.boxSizing() == BoxSizing::ContentBox) > return cssValuePool.createIdentifierValue(CSSValueContentBox); > return cssValuePool.createIdentifierValue(CSSValueBorderBox); > #if ENABLE(DASHBOARD_SUPPORT) >@@ -3627,15 +3627,20 @@ RefPtr<CSSValue> ComputedStyleExtractor: > case CSSPropertyWebkitAppearance: > return cssValuePool.createValue(style.appearance()); > case CSSPropertyWebkitAspectRatio: >- if (style.aspectRatioType() == AspectRatioAuto) >+ switch (style.aspectRatioType()) { >+ case AspectRatioType::Auto: > return cssValuePool.createIdentifierValue(CSSValueAuto); >- if (style.aspectRatioType() == AspectRatioFromDimensions) >+ case AspectRatioType::FromDimensions: > return cssValuePool.createIdentifierValue(CSSValueFromDimensions); >- if (style.aspectRatioType() == AspectRatioFromIntrinsic) >+ case AspectRatioType::FromIntrinsic: > return cssValuePool.createIdentifierValue(CSSValueFromIntrinsic); >- return CSSAspectRatioValue::create(style.aspectRatioNumerator(), style.aspectRatioDenominator()); >+ case AspectRatioType::Specified: >+ return CSSAspectRatioValue::create(style.aspectRatioNumerator(), style.aspectRatioDenominator()); >+ } >+ ASSERT_NOT_REACHED(); >+ return nullptr; > case CSSPropertyWebkitBackfaceVisibility: >- return cssValuePool.createIdentifierValue((style.backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible); >+ return cssValuePool.createIdentifierValue((style.backfaceVisibility() == BackfaceVisibility::Hidden) ? CSSValueHidden : CSSValueVisible); > case CSSPropertyWebkitBorderImage: > return valueForNinePieceImage(style.borderImage()); > case CSSPropertyBorderImageOutset: >@@ -3762,7 +3767,7 @@ RefPtr<CSSValue> ComputedStyleExtractor: > } > case CSSPropertyTransformStyle: > case CSSPropertyWebkitTransformStyle: >- return cssValuePool.createIdentifierValue((style.transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat); >+ return cssValuePool.createIdentifierValue((style.transformStyle3D() == TransformStyle3D::Preserve3D) ? CSSValuePreserve3d : CSSValueFlat); > case CSSPropertyTransitionDelay: > return delayValue(style.transitions()); > case CSSPropertyTransitionDuration: >Index: Source/WebCore/css/CSSPrimitiveValueMappings.h >=================================================================== >--- Source/WebCore/css/CSSPrimitiveValueMappings.h (revision 232008) >+++ Source/WebCore/css/CSSPrimitiveValueMappings.h (working copy) >@@ -129,10 +129,10 @@ template<> inline CSSPrimitiveValue::CSS > template<> inline CSSPrimitiveValue::operator LineClampValue() const > { > if (primitiveType() == CSS_NUMBER) >- return LineClampValue(value<int>(), LineClampLineCount); >+ return LineClampValue(value<int>(), LineClamp::LineCount); > > if (primitiveType() == CSS_PERCENTAGE) >- return LineClampValue(value<int>(), LineClampPercentage); >+ return LineClampValue(value<int>(), LineClamp::Percentage); > > ASSERT_NOT_REACHED(); > return LineClampValue(); >@@ -183,10 +183,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (columnFill) { >- case ColumnFillAuto: >+ case ColumnFill::Auto: > m_value.valueID = CSSValueAuto; > break; >- case ColumnFillBalance: >+ case ColumnFill::Balance: > m_value.valueID = CSSValueBalance; > break; > } >@@ -196,12 +196,12 @@ template<> inline CSSPrimitiveValue::ope > { > if (m_primitiveUnitType == CSS_VALUE_ID) { > if (m_value.valueID == CSSValueBalance) >- return ColumnFillBalance; >+ return ColumnFill::Balance; > if (m_value.valueID == CSSValueAuto) >- return ColumnFillAuto; >+ return ColumnFill::Auto; > } > ASSERT_NOT_REACHED(); >- return ColumnFillBalance; >+ return ColumnFill::Balance; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan) >@@ -209,10 +209,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (columnSpan) { >- case ColumnSpanAll: >+ case ColumnSpan::All: > m_value.valueID = CSSValueAll; > break; >- case ColumnSpanNone: >+ case ColumnSpan::None: > m_value.valueID = CSSValueNone; > break; > } >@@ -222,21 +222,21 @@ template<> inline CSSPrimitiveValue::ope > { > // Map 1 to none for compatibility reasons. > if (m_primitiveUnitType == CSS_NUMBER && m_value.num == 1) >- return ColumnSpanNone; >+ return ColumnSpan::None; > > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueAll: >- return ColumnSpanAll; >+ return ColumnSpan::All; > case CSSValueNone: >- return ColumnSpanNone; >+ return ColumnSpan::None; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return ColumnSpanNone; >+ return ColumnSpan::None; > } > > >@@ -245,10 +245,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (value) { >- case PrintColorAdjustExact: >+ case PrintColorAdjust::Exact: > m_value.valueID = CSSValueExact; > break; >- case PrintColorAdjustEconomy: >+ case PrintColorAdjust::Economy: > m_value.valueID = CSSValueEconomy; > break; > } >@@ -260,63 +260,63 @@ template<> inline CSSPrimitiveValue::ope > > switch (m_value.valueID) { > case CSSValueEconomy: >- return PrintColorAdjustEconomy; >+ return PrintColorAdjust::Economy; > case CSSValueExact: >- return PrintColorAdjustExact; >+ return PrintColorAdjust::Exact; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return PrintColorAdjustEconomy; >+ return PrintColorAdjust::Economy; > } > > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderStyle e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BorderStyle e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BNONE: >+ case BorderStyle::None: > m_value.valueID = CSSValueNone; > break; >- case BHIDDEN: >+ case BorderStyle::Hidden: > m_value.valueID = CSSValueHidden; > break; >- case INSET: >+ case BorderStyle::Inset: > m_value.valueID = CSSValueInset; > break; >- case GROOVE: >+ case BorderStyle::Groove: > m_value.valueID = CSSValueGroove; > break; >- case RIDGE: >+ case BorderStyle::Ridge: > m_value.valueID = CSSValueRidge; > break; >- case OUTSET: >+ case BorderStyle::Outset: > m_value.valueID = CSSValueOutset; > break; >- case DOTTED: >+ case BorderStyle::Dotted: > m_value.valueID = CSSValueDotted; > break; >- case DASHED: >+ case BorderStyle::Dashed: > m_value.valueID = CSSValueDashed; > break; >- case SOLID: >+ case BorderStyle::Solid: > m_value.valueID = CSSValueSolid; > break; >- case DOUBLE: >+ case BorderStyle::Double: > m_value.valueID = CSSValueDouble; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBorderStyle() const >+template<> inline CSSPrimitiveValue::operator BorderStyle() const > { > ASSERT(isValueID()); > > if (m_value.valueID == CSSValueAuto) // Valid for CSS outline-style >- return DOTTED; >- return (EBorderStyle)(m_value.valueID - CSSValueNone); >+ return BorderStyle::Dotted; >+ return static_cast<BorderStyle>(m_value.valueID - CSSValueNone); > } > > template<> inline CSSPrimitiveValue::operator OutlineIsAuto() const >@@ -324,8 +324,8 @@ template<> inline CSSPrimitiveValue::ope > ASSERT(isValueID()); > > if (m_value.valueID == CSSValueAuto) >- return AUTO_ON; >- return AUTO_OFF; >+ return OutlineIsAuto::On; >+ return OutlineIsAuto::Off; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CompositeOperator e) >@@ -632,277 +632,277 @@ template<> inline CSSPrimitiveValue::ope > return ControlPart(m_value.valueID - CSSValueCheckbox + 1); > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBackfaceVisibility e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BackfaceVisibility e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BackfaceVisibilityVisible: >+ case BackfaceVisibility::Visible: > m_value.valueID = CSSValueVisible; > break; >- case BackfaceVisibilityHidden: >+ case BackfaceVisibility::Hidden: > m_value.valueID = CSSValueHidden; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBackfaceVisibility() const >+template<> inline CSSPrimitiveValue::operator BackfaceVisibility() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueVisible: >- return BackfaceVisibilityVisible; >+ return BackfaceVisibility::Visible; > case CSSValueHidden: >- return BackfaceVisibilityHidden; >+ return BackfaceVisibility::Hidden; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BackfaceVisibilityHidden; >+ return BackfaceVisibility::Hidden; > } > > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillAttachment e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FillAttachment e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case ScrollBackgroundAttachment: >+ case FillAttachment::ScrollBackground: > m_value.valueID = CSSValueScroll; > break; >- case LocalBackgroundAttachment: >+ case FillAttachment::LocalBackground: > m_value.valueID = CSSValueLocal; > break; >- case FixedBackgroundAttachment: >+ case FillAttachment::FixedBackground: > m_value.valueID = CSSValueFixed; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFillAttachment() const >+template<> inline CSSPrimitiveValue::operator FillAttachment() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueScroll: >- return ScrollBackgroundAttachment; >+ return FillAttachment::ScrollBackground; > case CSSValueLocal: >- return LocalBackgroundAttachment; >+ return FillAttachment::LocalBackground; > case CSSValueFixed: >- return FixedBackgroundAttachment; >+ return FillAttachment::FixedBackground; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return ScrollBackgroundAttachment; >+ return FillAttachment::ScrollBackground; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillBox e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FillBox e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BorderFillBox: >+ case FillBox::Border: > m_value.valueID = CSSValueBorderBox; > break; >- case PaddingFillBox: >+ case FillBox::Padding: > m_value.valueID = CSSValuePaddingBox; > break; >- case ContentFillBox: >+ case FillBox::Content: > m_value.valueID = CSSValueContentBox; > break; >- case TextFillBox: >+ case FillBox::Text: > m_value.valueID = CSSValueText; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFillBox() const >+template<> inline CSSPrimitiveValue::operator FillBox() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueBorder: > case CSSValueBorderBox: >- return BorderFillBox; >+ return FillBox::Border; > case CSSValuePadding: > case CSSValuePaddingBox: >- return PaddingFillBox; >+ return FillBox::Padding; > case CSSValueContent: > case CSSValueContentBox: >- return ContentFillBox; >+ return FillBox::Content; > case CSSValueText: > case CSSValueWebkitText: >- return TextFillBox; >+ return FillBox::Text; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BorderFillBox; >+ return FillBox::Border; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFillRepeat e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FillRepeat e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case RepeatFill: >+ case FillRepeat::Repeat: > m_value.valueID = CSSValueRepeat; > break; >- case NoRepeatFill: >+ case FillRepeat::NoRepeat: > m_value.valueID = CSSValueNoRepeat; > break; >- case RoundFill: >+ case FillRepeat::Round: > m_value.valueID = CSSValueRound; > break; >- case SpaceFill: >+ case FillRepeat::Space: > m_value.valueID = CSSValueSpace; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFillRepeat() const >+template<> inline CSSPrimitiveValue::operator FillRepeat() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueRepeat: >- return RepeatFill; >+ return FillRepeat::Repeat; > case CSSValueNoRepeat: >- return NoRepeatFill; >+ return FillRepeat::NoRepeat; > case CSSValueRound: >- return RoundFill; >+ return FillRepeat::Round; > case CSSValueSpace: >- return SpaceFill; >+ return FillRepeat::Space; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return RepeatFill; >+ return FillRepeat::Repeat; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxPack e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxPack e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case Start: >+ case BoxPack::Start: > m_value.valueID = CSSValueStart; > break; >- case Center: >+ case BoxPack::Center: > m_value.valueID = CSSValueCenter; > break; >- case End: >+ case BoxPack::End: > m_value.valueID = CSSValueEnd; > break; >- case Justify: >+ case BoxPack::Justify: > m_value.valueID = CSSValueJustify; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxPack() const >+template<> inline CSSPrimitiveValue::operator BoxPack() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueStart: >- return Start; >+ return BoxPack::Start; > case CSSValueEnd: >- return End; >+ return BoxPack::End; > case CSSValueCenter: >- return Center; >+ return BoxPack::Center; > case CSSValueJustify: >- return Justify; >+ return BoxPack::Justify; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return Justify; >+ return BoxPack::Justify; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxAlignment e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxAlignment e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BSTRETCH: >+ case BoxAlignment::Stretch: > m_value.valueID = CSSValueStretch; > break; >- case BSTART: >+ case BoxAlignment::Start: > m_value.valueID = CSSValueStart; > break; >- case BCENTER: >+ case BoxAlignment::Center: > m_value.valueID = CSSValueCenter; > break; >- case BEND: >+ case BoxAlignment::End: > m_value.valueID = CSSValueEnd; > break; >- case BBASELINE: >+ case BoxAlignment::Baseline: > m_value.valueID = CSSValueBaseline; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxAlignment() const >+template<> inline CSSPrimitiveValue::operator BoxAlignment() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueStretch: >- return BSTRETCH; >+ return BoxAlignment::Stretch; > case CSSValueStart: >- return BSTART; >+ return BoxAlignment::Start; > case CSSValueEnd: >- return BEND; >+ return BoxAlignment::End; > case CSSValueCenter: >- return BCENTER; >+ return BoxAlignment::Center; > case CSSValueBaseline: >- return BBASELINE; >+ return BoxAlignment::Baseline; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BSTRETCH; >+ return BoxAlignment::Stretch; > } > > #if ENABLE(CSS_BOX_DECORATION_BREAK) >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxDecorationBreak e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxDecorationBreak e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case DSLICE: >+ case BoxDecorationBreak::Slice: > m_value.valueID = CSSValueSlice; > break; >- case DCLONE: >+ case BoxDecorationBreak::Clone: > m_value.valueID = CSSValueClone; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxDecorationBreak() const >+template<> inline CSSPrimitiveValue::operator BoxDecorationBreak() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueSlice: >- return DSLICE; >+ return BoxDecorationBreak::Slice; > case CSSValueClone: >- return DCLONE; >+ return BoxDecorationBreak::Clone; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return DSLICE; >+ return BoxDecorationBreak::Slice; > } > #endif > >@@ -947,130 +947,130 @@ template<> inline CSSPrimitiveValue::ope > return Edge::Top; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxSizing e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxSizing e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BORDER_BOX: >+ case BoxSizing::BorderBox: > m_value.valueID = CSSValueBorderBox; > break; >- case CONTENT_BOX: >+ case BoxSizing::ContentBox: > m_value.valueID = CSSValueContentBox; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxSizing() const >+template<> inline CSSPrimitiveValue::operator BoxSizing() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueBorderBox: >- return BORDER_BOX; >+ return BoxSizing::BorderBox; > case CSSValueContentBox: >- return CONTENT_BOX; >+ return BoxSizing::ContentBox; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BORDER_BOX; >+ return BoxSizing::BorderBox; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxDirection e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxDirection e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BNORMAL: >+ case BoxDirection::Normal: > m_value.valueID = CSSValueNormal; > break; >- case BREVERSE: >+ case BoxDirection::Reverse: > m_value.valueID = CSSValueReverse; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxDirection() const >+template<> inline CSSPrimitiveValue::operator BoxDirection() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueNormal: >- return BNORMAL; >+ return BoxDirection::Normal; > case CSSValueReverse: >- return BREVERSE; >+ return BoxDirection::Reverse; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BNORMAL; >+ return BoxDirection::Normal; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxLines e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxLines e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case SINGLE: >+ case BoxLines::Single: > m_value.valueID = CSSValueSingle; > break; >- case MULTIPLE: >+ case BoxLines::Multiple: > m_value.valueID = CSSValueMultiple; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxLines() const >+template<> inline CSSPrimitiveValue::operator BoxLines() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueSingle: >- return SINGLE; >+ return BoxLines::Single; > case CSSValueMultiple: >- return MULTIPLE; >+ return BoxLines::Multiple; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return SINGLE; >+ return BoxLines::Single; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBoxOrient e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BoxOrient e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case HORIZONTAL: >+ case BoxOrient::Horizontal: > m_value.valueID = CSSValueHorizontal; > break; >- case VERTICAL: >+ case BoxOrient::Vertical: > m_value.valueID = CSSValueVertical; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBoxOrient() const >+template<> inline CSSPrimitiveValue::operator BoxOrient() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueHorizontal: > case CSSValueInlineAxis: >- return HORIZONTAL; >+ return BoxOrient::Horizontal; > case CSSValueVertical: > case CSSValueBlockAxis: >- return VERTICAL; >+ return BoxOrient::Vertical; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return HORIZONTAL; >+ return BoxOrient::Horizontal; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECaptionSide e) >@@ -1114,45 +1114,45 @@ template<> inline CSSPrimitiveValue::ope > return CAPTOP; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EClear e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Clear e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case CNONE: >+ case Clear::None: > m_value.valueID = CSSValueNone; > break; >- case CLEFT: >+ case Clear::Left: > m_value.valueID = CSSValueLeft; > break; >- case CRIGHT: >+ case Clear::Right: > m_value.valueID = CSSValueRight; > break; >- case CBOTH: >+ case Clear::Both: > m_value.valueID = CSSValueBoth; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EClear() const >+template<> inline CSSPrimitiveValue::operator Clear() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueNone: >- return CNONE; >+ return Clear::None; > case CSSValueLeft: >- return CLEFT; >+ return Clear::Left; > case CSSValueRight: >- return CRIGHT; >+ return Clear::Right; > case CSSValueBoth: >- return CBOTH; >+ return Clear::Both; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return CNONE; >+ return Clear::None; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e) >@@ -1447,169 +1447,169 @@ template<> inline CSSPrimitiveValue::ope > return SHOW; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexDirection e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FlexDirection e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case FlowRow: >+ case FlexDirection::Row: > m_value.valueID = CSSValueRow; > break; >- case FlowRowReverse: >+ case FlexDirection::RowReverse: > m_value.valueID = CSSValueRowReverse; > break; >- case FlowColumn: >+ case FlexDirection::Column: > m_value.valueID = CSSValueColumn; > break; >- case FlowColumnReverse: >+ case FlexDirection::ColumnReverse: > m_value.valueID = CSSValueColumnReverse; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFlexDirection() const >+template<> inline CSSPrimitiveValue::operator FlexDirection() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueRow: >- return FlowRow; >+ return FlexDirection::Row; > case CSSValueRowReverse: >- return FlowRowReverse; >+ return FlexDirection::RowReverse; > case CSSValueColumn: >- return FlowColumn; >+ return FlexDirection::Column; > case CSSValueColumnReverse: >- return FlowColumnReverse; >+ return FlexDirection::ColumnReverse; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return FlowRow; >+ return FlexDirection::Row; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EAlignContent e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(AlignContent e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case AlignContentFlexStart: >+ case AlignContent::FlexStart: > m_value.valueID = CSSValueFlexStart; > break; >- case AlignContentFlexEnd: >+ case AlignContent::FlexEnd: > m_value.valueID = CSSValueFlexEnd; > break; >- case AlignContentCenter: >+ case AlignContent::Center: > m_value.valueID = CSSValueCenter; > break; >- case AlignContentSpaceBetween: >+ case AlignContent::SpaceBetween: > m_value.valueID = CSSValueSpaceBetween; > break; >- case AlignContentSpaceAround: >+ case AlignContent::SpaceAround: > m_value.valueID = CSSValueSpaceAround; > break; >- case AlignContentStretch: >+ case AlignContent::Stretch: > m_value.valueID = CSSValueStretch; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EAlignContent() const >+template<> inline CSSPrimitiveValue::operator AlignContent() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueFlexStart: >- return AlignContentFlexStart; >+ return AlignContent::FlexStart; > case CSSValueFlexEnd: >- return AlignContentFlexEnd; >+ return AlignContent::FlexEnd; > case CSSValueCenter: >- return AlignContentCenter; >+ return AlignContent::Center; > case CSSValueSpaceBetween: >- return AlignContentSpaceBetween; >+ return AlignContent::SpaceBetween; > case CSSValueSpaceAround: >- return AlignContentSpaceAround; >+ return AlignContent::SpaceAround; > case CSSValueStretch: >- return AlignContentStretch; >+ return AlignContent::Stretch; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return AlignContentStretch; >+ return AlignContent::Stretch; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexWrap e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FlexWrap e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case FlexNoWrap: >+ case FlexWrap::NoWrap: > m_value.valueID = CSSValueNowrap; > break; >- case FlexWrap: >+ case FlexWrap::Wrap: > m_value.valueID = CSSValueWrap; > break; >- case FlexWrapReverse: >+ case FlexWrap::Reverse: > m_value.valueID = CSSValueWrapReverse; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFlexWrap() const >+template<> inline CSSPrimitiveValue::operator FlexWrap() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueNowrap: >- return FlexNoWrap; >+ return FlexWrap::NoWrap; > case CSSValueWrap: >- return FlexWrap; >+ return FlexWrap::Wrap; > case CSSValueWrapReverse: >- return FlexWrapReverse; >+ return FlexWrap::Reverse; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return FlexNoWrap; >+ return FlexWrap::NoWrap; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFloat e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Float e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case NoFloat: >+ case Float::No: > m_value.valueID = CSSValueNone; > break; >- case LeftFloat: >+ case Float::Left: > m_value.valueID = CSSValueLeft; > break; >- case RightFloat: >+ case Float::Right: > m_value.valueID = CSSValueRight; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EFloat() const >+template<> inline CSSPrimitiveValue::operator Float() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueLeft: >- return LeftFloat; >+ return Float::Left; > case CSSValueRight: >- return RightFloat; >+ return Float::Right; > case CSSValueNone: > case CSSValueCenter: // Non-standard CSS value. >- return NoFloat; >+ return Float::No; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return NoFloat; >+ return Float::No; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineBreak e) >@@ -1617,19 +1617,19 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case LineBreakAuto: >+ case LineBreak::Auto: > m_value.valueID = CSSValueAuto; > break; >- case LineBreakLoose: >+ case LineBreak::Loose: > m_value.valueID = CSSValueLoose; > break; >- case LineBreakNormal: >+ case LineBreak::Normal: > m_value.valueID = CSSValueNormal; > break; >- case LineBreakStrict: >+ case LineBreak::Strict: > m_value.valueID = CSSValueStrict; > break; >- case LineBreakAfterWhiteSpace: >+ case LineBreak::AfterWhiteSpace: > m_value.valueID = CSSValueAfterWhiteSpace; > break; > } >@@ -1664,21 +1664,21 @@ template<> inline CSSPrimitiveValue::ope > > switch (m_value.valueID) { > case CSSValueAuto: >- return LineBreakAuto; >+ return LineBreak::Auto; > case CSSValueLoose: >- return LineBreakLoose; >+ return LineBreak::Loose; > case CSSValueNormal: >- return LineBreakNormal; >+ return LineBreak::Normal; > case CSSValueStrict: >- return LineBreakStrict; >+ return LineBreak::Strict; > case CSSValueAfterWhiteSpace: >- return LineBreakAfterWhiteSpace; >+ return LineBreak::AfterWhiteSpace; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return LineBreakAuto; >+ return LineBreak::Auto; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStylePosition e) >@@ -1975,40 +1975,40 @@ template<> inline CSSPrimitiveValue::ope > } > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarginCollapse e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(MarginCollapse e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case MCOLLAPSE: >+ case MarginCollapse::Collapse: > m_value.valueID = CSSValueCollapse; > break; >- case MSEPARATE: >+ case MarginCollapse::Separate: > m_value.valueID = CSSValueSeparate; > break; >- case MDISCARD: >+ case MarginCollapse::Discard: > m_value.valueID = CSSValueDiscard; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EMarginCollapse() const >+template<> inline CSSPrimitiveValue::operator MarginCollapse() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueCollapse: >- return MCOLLAPSE; >+ return MarginCollapse::Collapse; > case CSSValueSeparate: >- return MSEPARATE; >+ return MarginCollapse::Separate; > case CSSValueDiscard: >- return MDISCARD; >+ return MarginCollapse::Discard; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return MCOLLAPSE; >+ return MarginCollapse::Collapse; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(MarqueeBehavior e) >@@ -2110,91 +2110,91 @@ template<> inline CSSPrimitiveValue::ope > return MarqueeDirection::Auto; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ENBSPMode e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(NBSPMode e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case NBNORMAL: >+ case NBSPMode::Normal: > m_value.valueID = CSSValueNormal; > break; >- case SPACE: >+ case NBSPMode::Space: > m_value.valueID = CSSValueSpace; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator ENBSPMode() const >+template<> inline CSSPrimitiveValue::operator NBSPMode() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueSpace: >- return SPACE; >+ return NBSPMode::Space; > case CSSValueNormal: >- return NBNORMAL; >+ return NBSPMode::Normal; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return NBNORMAL; >+ return NBSPMode::Normal; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Overflow e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case OVISIBLE: >+ case Overflow::Visible: > m_value.valueID = CSSValueVisible; > break; >- case OHIDDEN: >+ case Overflow::Hidden: > m_value.valueID = CSSValueHidden; > break; >- case OSCROLL: >+ case Overflow::Scroll: > m_value.valueID = CSSValueScroll; > break; >- case OAUTO: >+ case Overflow::Auto: > m_value.valueID = CSSValueAuto; > break; >- case OOVERLAY: >+ case Overflow::Overlay: > m_value.valueID = CSSValueOverlay; > break; >- case OPAGEDX: >+ case Overflow::PagedX: > m_value.valueID = CSSValueWebkitPagedX; > break; >- case OPAGEDY: >+ case Overflow::PagedY: > m_value.valueID = CSSValueWebkitPagedY; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EOverflow() const >+template<> inline CSSPrimitiveValue::operator Overflow() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueVisible: >- return OVISIBLE; >+ return Overflow::Visible; > case CSSValueHidden: >- return OHIDDEN; >+ return Overflow::Hidden; > case CSSValueScroll: >- return OSCROLL; >+ return Overflow::Scroll; > case CSSValueAuto: >- return OAUTO; >+ return Overflow::Auto; > case CSSValueOverlay: >- return OOVERLAY; >+ return Overflow::Overlay; > case CSSValueWebkitPagedX: >- return OPAGEDX; >+ return Overflow::PagedX; > case CSSValueWebkitPagedY: >- return OPAGEDY; >+ return Overflow::PagedY; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return OVISIBLE; >+ return Overflow::Visible; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BreakBetween e) >@@ -2309,125 +2309,125 @@ template<> inline CSSPrimitiveValue::ope > return AutoBreakInside; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPosition e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PositionType e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case StaticPosition: >+ case PositionType::Static: > m_value.valueID = CSSValueStatic; > break; >- case RelativePosition: >+ case PositionType::Relative: > m_value.valueID = CSSValueRelative; > break; >- case AbsolutePosition: >+ case PositionType::Absolute: > m_value.valueID = CSSValueAbsolute; > break; >- case FixedPosition: >+ case PositionType::Fixed: > m_value.valueID = CSSValueFixed; > break; >- case StickyPosition: >+ case PositionType::Sticky: > m_value.valueID = CSSValueWebkitSticky; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EPosition() const >+template<> inline CSSPrimitiveValue::operator PositionType() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueStatic: >- return StaticPosition; >+ return PositionType::Static; > case CSSValueRelative: >- return RelativePosition; >+ return PositionType::Relative; > case CSSValueAbsolute: >- return AbsolutePosition; >+ return PositionType::Absolute; > case CSSValueFixed: >- return FixedPosition; >+ return PositionType::Fixed; > case CSSValueWebkitSticky: >- return StickyPosition; >+ return PositionType::Sticky; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return StaticPosition; >+ return PositionType::Static; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EResize e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Resize e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case RESIZE_BOTH: >+ case Resize::Both: > m_value.valueID = CSSValueBoth; > break; >- case RESIZE_HORIZONTAL: >+ case Resize::Horizontal: > m_value.valueID = CSSValueHorizontal; > break; >- case RESIZE_VERTICAL: >+ case Resize::Vertical: > m_value.valueID = CSSValueVertical; > break; >- case RESIZE_NONE: >+ case Resize::None: > m_value.valueID = CSSValueNone; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EResize() const >+template<> inline CSSPrimitiveValue::operator Resize() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueBoth: >- return RESIZE_BOTH; >+ return Resize::Both; > case CSSValueHorizontal: >- return RESIZE_HORIZONTAL; >+ return Resize::Horizontal; > case CSSValueVertical: >- return RESIZE_VERTICAL; >+ return Resize::Vertical; > case CSSValueAuto: > ASSERT_NOT_REACHED(); // Depends on settings, thus should be handled by the caller. >- return RESIZE_NONE; >+ return Resize::None; > case CSSValueNone: >- return RESIZE_NONE; >+ return Resize::None; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return RESIZE_NONE; >+ return Resize::None; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETableLayout e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TableLayoutType e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case TAUTO: >+ case TableLayoutType::Auto: > m_value.valueID = CSSValueAuto; > break; >- case TFIXED: >+ case TableLayoutType::Fixed: > m_value.valueID = CSSValueFixed; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator ETableLayout() const >+template<> inline CSSPrimitiveValue::operator TableLayoutType() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueFixed: >- return TFIXED; >+ return TableLayoutType::Fixed; > case CSSValueAuto: >- return TAUTO; >+ return TableLayoutType::Auto; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TAUTO; >+ return TableLayoutType::Auto; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e) >@@ -2669,45 +2669,45 @@ template<> inline CSSPrimitiveValue::ope > return TextUnderlinePositionAuto; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextSecurity e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextSecurity e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case TSNONE: >+ case TextSecurity::None: > m_value.valueID = CSSValueNone; > break; >- case TSDISC: >+ case TextSecurity::Disc: > m_value.valueID = CSSValueDisc; > break; >- case TSCIRCLE: >+ case TextSecurity::Circle: > m_value.valueID = CSSValueCircle; > break; >- case TSSQUARE: >+ case TextSecurity::Square: > m_value.valueID = CSSValueSquare; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator ETextSecurity() const >+template<> inline CSSPrimitiveValue::operator TextSecurity() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueNone: >- return TSNONE; >+ return TextSecurity::None; > case CSSValueDisc: >- return TSDISC; >+ return TextSecurity::Disc; > case CSSValueCircle: >- return TSCIRCLE; >+ return TextSecurity::Circle; > case CSSValueSquare: >- return TSSQUARE; >+ return TextSecurity::Square; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TSNONE; >+ return TextSecurity::None; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextTransform e) >@@ -2805,18 +2805,18 @@ template<> inline CSSPrimitiveValue::ope > return UBNormal; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserDrag e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(UserDrag e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case DRAG_AUTO: >+ case UserDrag::Auto: > m_value.valueID = CSSValueAuto; > break; >- case DRAG_NONE: >+ case UserDrag::None: > m_value.valueID = CSSValueNone; > break; >- case DRAG_ELEMENT: >+ case UserDrag::Element: > m_value.valueID = CSSValueElement; > break; > default: >@@ -2824,165 +2824,165 @@ template<> inline CSSPrimitiveValue::CSS > } > } > >-template<> inline CSSPrimitiveValue::operator EUserDrag() const >+template<> inline CSSPrimitiveValue::operator UserDrag() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueAuto: >- return DRAG_AUTO; >+ return UserDrag::Auto; > case CSSValueNone: >- return DRAG_NONE; >+ return UserDrag::None; > case CSSValueElement: >- return DRAG_ELEMENT; >+ return UserDrag::Element; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return DRAG_AUTO; >+ return UserDrag::Auto; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserModify e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(UserModify e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case READ_ONLY: >+ case UserModify::ReadOnly: > m_value.valueID = CSSValueReadOnly; > break; >- case READ_WRITE: >+ case UserModify::ReadWrite: > m_value.valueID = CSSValueReadWrite; > break; >- case READ_WRITE_PLAINTEXT_ONLY: >+ case UserModify::ReadWritePlaintextOnly: > m_value.valueID = CSSValueReadWritePlaintextOnly; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EUserModify() const >+template<> inline CSSPrimitiveValue::operator UserModify() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueReadOnly: >- return READ_ONLY; >+ return UserModify::ReadOnly; > case CSSValueReadWrite: >- return READ_WRITE; >+ return UserModify::ReadWrite; > case CSSValueReadWritePlaintextOnly: >- return READ_WRITE_PLAINTEXT_ONLY; >+ return UserModify::ReadWritePlaintextOnly; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return READ_ONLY; >+ return UserModify::ReadOnly; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUserSelect e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(UserSelect e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case SELECT_NONE: >+ case UserSelect::None: > m_value.valueID = CSSValueNone; > break; >- case SELECT_TEXT: >+ case UserSelect::Text: > m_value.valueID = CSSValueText; > break; >- case SELECT_ALL: >+ case UserSelect::All: > m_value.valueID = CSSValueAll; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EUserSelect() const >+template<> inline CSSPrimitiveValue::operator UserSelect() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueAuto: >- return SELECT_TEXT; >+ return UserSelect::Text; > case CSSValueNone: >- return SELECT_NONE; >+ return UserSelect::None; > case CSSValueText: >- return SELECT_TEXT; >+ return UserSelect::Text; > case CSSValueAll: >- return SELECT_ALL; >+ return UserSelect::All; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return SELECT_TEXT; >+ return UserSelect::Text; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVerticalAlign a) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(VerticalAlign a) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (a) { >- case TOP: >+ case VerticalAlign::Top: > m_value.valueID = CSSValueTop; > break; >- case BOTTOM: >+ case VerticalAlign::Bottom: > m_value.valueID = CSSValueBottom; > break; >- case MIDDLE: >+ case VerticalAlign::Middle: > m_value.valueID = CSSValueMiddle; > break; >- case BASELINE: >+ case VerticalAlign::Baseline: > m_value.valueID = CSSValueBaseline; > break; >- case TEXT_BOTTOM: >+ case VerticalAlign::TextBottom: > m_value.valueID = CSSValueTextBottom; > break; >- case TEXT_TOP: >+ case VerticalAlign::TextTop: > m_value.valueID = CSSValueTextTop; > break; >- case SUB: >+ case VerticalAlign::Sub: > m_value.valueID = CSSValueSub; > break; >- case SUPER: >+ case VerticalAlign::Super: > m_value.valueID = CSSValueSuper; > break; >- case BASELINE_MIDDLE: >+ case VerticalAlign::BaselineMiddle: > m_value.valueID = CSSValueWebkitBaselineMiddle; > break; >- case LENGTH: >+ case VerticalAlign::Length: > m_value.valueID = CSSValueInvalid; > } > } > >-template<> inline CSSPrimitiveValue::operator EVerticalAlign() const >+template<> inline CSSPrimitiveValue::operator VerticalAlign() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueTop: >- return TOP; >+ return VerticalAlign::Top; > case CSSValueBottom: >- return BOTTOM; >+ return VerticalAlign::Bottom; > case CSSValueMiddle: >- return MIDDLE; >+ return VerticalAlign::Middle; > case CSSValueBaseline: >- return BASELINE; >+ return VerticalAlign::Baseline; > case CSSValueTextBottom: >- return TEXT_BOTTOM; >+ return VerticalAlign::TextBottom; > case CSSValueTextTop: >- return TEXT_TOP; >+ return VerticalAlign::TextTop; > case CSSValueSub: >- return SUB; >+ return VerticalAlign::Sub; > case CSSValueSuper: >- return SUPER; >+ return VerticalAlign::Super; > case CSSValueWebkitBaselineMiddle: >- return BASELINE_MIDDLE; >+ return VerticalAlign::BaselineMiddle; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TOP; >+ return VerticalAlign::Top; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e) >@@ -3072,76 +3072,76 @@ template<> inline CSSPrimitiveValue::ope > return NORMAL; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWordBreak e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WordBreak e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case NormalWordBreak: >+ case WordBreak::Normal: > m_value.valueID = CSSValueNormal; > break; >- case BreakAllWordBreak: >+ case WordBreak::BreakAll: > m_value.valueID = CSSValueBreakAll; > break; >- case KeepAllWordBreak: >+ case WordBreak::KeepAll: > m_value.valueID = CSSValueKeepAll; > break; >- case BreakWordBreak: >+ case WordBreak::Break: > m_value.valueID = CSSValueBreakWord; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EWordBreak() const >+template<> inline CSSPrimitiveValue::operator WordBreak() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueBreakAll: >- return BreakAllWordBreak; >+ return WordBreak::BreakAll; > case CSSValueKeepAll: >- return KeepAllWordBreak; >+ return WordBreak::KeepAll; > case CSSValueBreakWord: >- return BreakWordBreak; >+ return WordBreak::Break; > case CSSValueNormal: >- return NormalWordBreak; >+ return WordBreak::Normal; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return NormalWordBreak; >+ return WordBreak::Normal; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflowWrap e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverflowWrap e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case NormalOverflowWrap: >+ case OverflowWrap::Normal: > m_value.valueID = CSSValueNormal; > break; >- case BreakOverflowWrap: >+ case OverflowWrap::Break: > m_value.valueID = CSSValueBreakWord; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EOverflowWrap() const >+template<> inline CSSPrimitiveValue::operator OverflowWrap() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueBreakWord: >- return BreakOverflowWrap; >+ return OverflowWrap::Break; > case CSSValueNormal: >- return NormalOverflowWrap; >+ return OverflowWrap::Normal; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return NormalOverflowWrap; >+ return OverflowWrap::Normal; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextDirection e) >@@ -3227,10 +3227,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case TextCombineNone: >+ case TextCombine::None: > m_value.valueID = CSSValueNone; > break; >- case TextCombineHorizontal: >+ case TextCombine::Horizontal: > m_value.valueID = CSSValueHorizontal; > break; > } >@@ -3242,15 +3242,15 @@ template<> inline CSSPrimitiveValue::ope > > switch (m_value.valueID) { > case CSSValueNone: >- return TextCombineNone; >+ return TextCombine::None; > case CSSValueHorizontal: >- return TextCombineHorizontal; >+ return TextCombine::Horizontal; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TextCombineNone; >+ return TextCombine::None; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RubyPosition position) >@@ -3294,10 +3294,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (overflow) { >- case TextOverflowClip: >+ case TextOverflow::Clip: > m_value.valueID = CSSValueClip; > break; >- case TextOverflowEllipsis: >+ case TextOverflow::Ellipsis: > m_value.valueID = CSSValueEllipsis; > break; > } >@@ -3309,15 +3309,15 @@ template<> inline CSSPrimitiveValue::ope > > switch (m_value.valueID) { > case CSSValueClip: >- return TextOverflowClip; >+ return TextOverflow::Clip; > case CSSValueEllipsis: >- return TextOverflowEllipsis; >+ return TextOverflow::Ellipsis; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TextOverflowClip; >+ return TextOverflow::Clip; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisFill fill) >@@ -3560,19 +3560,19 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (fit) { >- case ObjectFitFill: >+ case ObjectFit::Fill: > m_value.valueID = CSSValueFill; > break; >- case ObjectFitContain: >+ case ObjectFit::Contain: > m_value.valueID = CSSValueContain; > break; >- case ObjectFitCover: >+ case ObjectFit::Cover: > m_value.valueID = CSSValueCover; > break; >- case ObjectFitNone: >+ case ObjectFit::None: > m_value.valueID = CSSValueNone; > break; >- case ObjectFitScaleDown: >+ case ObjectFit::ScaleDown: > m_value.valueID = CSSValueScaleDown; > break; > } >@@ -3584,18 +3584,18 @@ template<> inline CSSPrimitiveValue::ope > > switch (m_value.valueID) { > case CSSValueFill: >- return ObjectFitFill; >+ return ObjectFit::Fill; > case CSSValueContain: >- return ObjectFitContain; >+ return ObjectFit::Contain; > case CSSValueCover: >- return ObjectFitCover; >+ return ObjectFit::Cover; > case CSSValueNone: >- return ObjectFitNone; >+ return ObjectFit::None; > case CSSValueScaleDown: >- return ObjectFitScaleDown; >+ return ObjectFit::ScaleDown; > default: > ASSERT_NOT_REACHED(); >- return ObjectFitFill; >+ return ObjectFit::Fill; > } > } > >@@ -4013,10 +4013,10 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (isolation) { >- case IsolationAuto: >+ case Isolation::Auto: > m_value.valueID = CSSValueAuto; > break; >- case IsolationIsolate: >+ case Isolation::Isolate: > m_value.valueID = CSSValueIsolate; > break; > default: >@@ -4029,15 +4029,15 @@ template<> inline CSSPrimitiveValue::ope > ASSERT(isValueID()); > switch (m_value.valueID) { > case CSSValueAuto: >- return IsolationAuto; >+ return Isolation::Auto; > case CSSValueIsolate: >- return IsolationIsolate; >+ return Isolation::Isolate; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return IsolationAuto; >+ return Isolation::Auto; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e) >@@ -4225,35 +4225,35 @@ template<> inline CSSPrimitiveValue::ope > return AB_AUTO; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderCollapse e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BorderCollapse e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case BSEPARATE: >+ case BorderCollapse::Separate: > m_value.valueID = CSSValueSeparate; > break; >- case BCOLLAPSE: >+ case BorderCollapse::Collapse: > m_value.valueID = CSSValueCollapse; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EBorderCollapse() const >+template<> inline CSSPrimitiveValue::operator BorderCollapse() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueSeparate: >- return BSEPARATE; >+ return BorderCollapse::Separate; > case CSSValueCollapse: >- return BCOLLAPSE; >+ return BorderCollapse::Collapse; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return BSEPARATE; >+ return BorderCollapse::Separate; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderFit e) >@@ -4287,83 +4287,83 @@ template<> inline CSSPrimitiveValue::ope > return BorderFitLines; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EImageRendering imageRendering) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ImageRendering imageRendering) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (imageRendering) { >- case ImageRenderingAuto: >+ case ImageRendering::Auto: > m_value.valueID = CSSValueAuto; > break; >- case ImageRenderingCrispEdges: >+ case ImageRendering::CrispEdges: > m_value.valueID = CSSValueCrispEdges; > break; >- case ImageRenderingPixelated: >+ case ImageRendering::Pixelated: > m_value.valueID = CSSValuePixelated; > break; >- case ImageRenderingOptimizeSpeed: >+ case ImageRendering::OptimizeSpeed: > m_value.valueID = CSSValueOptimizeSpeed; > break; >- case ImageRenderingOptimizeQuality: >+ case ImageRendering::OptimizeQuality: > m_value.valueID = CSSValueOptimizeQuality; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator EImageRendering() const >+template<> inline CSSPrimitiveValue::operator ImageRendering() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueAuto: >- return ImageRenderingAuto; >+ return ImageRendering::Auto; > case CSSValueWebkitOptimizeContrast: > case CSSValueCrispEdges: > case CSSValueWebkitCrispEdges: >- return ImageRenderingCrispEdges; >+ return ImageRendering::CrispEdges; > case CSSValuePixelated: >- return ImageRenderingPixelated; >+ return ImageRendering::Pixelated; > case CSSValueOptimizeSpeed: >- return ImageRenderingOptimizeSpeed; >+ return ImageRendering::OptimizeSpeed; > case CSSValueOptimizeQuality: >- return ImageRenderingOptimizeQuality; >+ return ImageRendering::OptimizeQuality; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return ImageRenderingAuto; >+ return ImageRendering::Auto; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETransformStyle3D e) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TransformStyle3D e) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (e) { >- case TransformStyle3DFlat: >+ case TransformStyle3D::Flat: > m_value.valueID = CSSValueFlat; > break; >- case TransformStyle3DPreserve3D: >+ case TransformStyle3D::Preserve3D: > m_value.valueID = CSSValuePreserve3d; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator ETransformStyle3D() const >+template<> inline CSSPrimitiveValue::operator TransformStyle3D() const > { > ASSERT(isValueID()); > > switch (m_value.valueID) { > case CSSValueFlat: >- return TransformStyle3DFlat; >+ return TransformStyle3D::Flat; > case CSSValuePreserve3d: >- return TransformStyle3DPreserve3D; >+ return TransformStyle3D::Preserve3D; > default: > break; > } > > ASSERT_NOT_REACHED(); >- return TransformStyle3DFlat; >+ return TransformStyle3D::Flat; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TransformBox box) >@@ -4963,49 +4963,49 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (itemPosition) { >- case ItemPositionLegacy: >+ case ItemPosition::Legacy: > m_value.valueID = CSSValueLegacy; > break; >- case ItemPositionAuto: >+ case ItemPosition::Auto: > m_value.valueID = CSSValueAuto; > break; >- case ItemPositionNormal: >+ case ItemPosition::Normal: > m_value.valueID = CSSValueNormal; > break; >- case ItemPositionStretch: >+ case ItemPosition::Stretch: > m_value.valueID = CSSValueStretch; > break; >- case ItemPositionBaseline: >+ case ItemPosition::Baseline: > m_value.valueID = CSSValueBaseline; > break; >- case ItemPositionLastBaseline: >+ case ItemPosition::LastBaseline: > m_value.valueID = CSSValueLastBaseline; > break; >- case ItemPositionCenter: >+ case ItemPosition::Center: > m_value.valueID = CSSValueCenter; > break; >- case ItemPositionStart: >+ case ItemPosition::Start: > m_value.valueID = CSSValueStart; > break; >- case ItemPositionEnd: >+ case ItemPosition::End: > m_value.valueID = CSSValueEnd; > break; >- case ItemPositionSelfStart: >+ case ItemPosition::SelfStart: > m_value.valueID = CSSValueSelfStart; > break; >- case ItemPositionSelfEnd: >+ case ItemPosition::SelfEnd: > m_value.valueID = CSSValueSelfEnd; > break; >- case ItemPositionFlexStart: >+ case ItemPosition::FlexStart: > m_value.valueID = CSSValueFlexStart; > break; >- case ItemPositionFlexEnd: >+ case ItemPosition::FlexEnd: > m_value.valueID = CSSValueFlexEnd; > break; >- case ItemPositionLeft: >+ case ItemPosition::Left: > m_value.valueID = CSSValueLeft; > break; >- case ItemPositionRight: >+ case ItemPosition::Right: > m_value.valueID = CSSValueRight; > break; > } >@@ -5015,42 +5015,42 @@ template<> inline CSSPrimitiveValue::ope > { > switch (m_value.valueID) { > case CSSValueLegacy: >- return ItemPositionLegacy; >+ return ItemPosition::Legacy; > case CSSValueAuto: >- return ItemPositionAuto; >+ return ItemPosition::Auto; > case CSSValueNormal: >- return ItemPositionNormal; >+ return ItemPosition::Normal; > case CSSValueStretch: >- return ItemPositionStretch; >+ return ItemPosition::Stretch; > case CSSValueBaseline: >- return ItemPositionBaseline; >+ return ItemPosition::Baseline; > case CSSValueFirstBaseline: >- return ItemPositionBaseline; >+ return ItemPosition::Baseline; > case CSSValueLastBaseline: >- return ItemPositionLastBaseline; >+ return ItemPosition::LastBaseline; > case CSSValueCenter: >- return ItemPositionCenter; >+ return ItemPosition::Center; > case CSSValueStart: >- return ItemPositionStart; >+ return ItemPosition::Start; > case CSSValueEnd: >- return ItemPositionEnd; >+ return ItemPosition::End; > case CSSValueSelfStart: >- return ItemPositionSelfStart; >+ return ItemPosition::SelfStart; > case CSSValueSelfEnd: >- return ItemPositionSelfEnd; >+ return ItemPosition::SelfEnd; > case CSSValueFlexStart: >- return ItemPositionFlexStart; >+ return ItemPosition::FlexStart; > case CSSValueFlexEnd: >- return ItemPositionFlexEnd; >+ return ItemPosition::FlexEnd; > case CSSValueLeft: >- return ItemPositionLeft; >+ return ItemPosition::Left; > case CSSValueRight: >- return ItemPositionRight; >+ return ItemPosition::Right; > default: > break; > } > ASSERT_NOT_REACHED(); >- return ItemPositionAuto; >+ return ItemPosition::Auto; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(OverflowAlignment overflowAlignment) >@@ -5058,13 +5058,13 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (overflowAlignment) { >- case OverflowAlignmentDefault: >+ case OverflowAlignment::Default: > m_value.valueID = CSSValueDefault; > break; >- case OverflowAlignmentUnsafe: >+ case OverflowAlignment::Unsafe: > m_value.valueID = CSSValueUnsafe; > break; >- case OverflowAlignmentSafe: >+ case OverflowAlignment::Safe: > m_value.valueID = CSSValueSafe; > break; > } >@@ -5074,14 +5074,14 @@ template<> inline CSSPrimitiveValue::ope > { > switch (m_value.valueID) { > case CSSValueUnsafe: >- return OverflowAlignmentUnsafe; >+ return OverflowAlignment::Unsafe; > case CSSValueSafe: >- return OverflowAlignmentSafe; >+ return OverflowAlignment::Safe; > default: > break; > } > ASSERT_NOT_REACHED(); >- return OverflowAlignmentUnsafe; >+ return OverflowAlignment::Unsafe; > } > > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentPosition contentPosition) >@@ -5089,34 +5089,34 @@ template<> inline CSSPrimitiveValue::CSS > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (contentPosition) { >- case ContentPositionNormal: >+ case ContentPosition::Normal: > m_value.valueID = CSSValueNormal; > break; >- case ContentPositionBaseline: >+ case ContentPosition::Baseline: > m_value.valueID = CSSValueBaseline; > break; >- case ContentPositionLastBaseline: >+ case ContentPosition::LastBaseline: > m_value.valueID = CSSValueLastBaseline; > break; >- case ContentPositionCenter: >+ case ContentPosition::Center: > m_value.valueID = CSSValueCenter; > break; >- case ContentPositionStart: >+ case ContentPosition::Start: > m_value.valueID = CSSValueStart; > break; >- case ContentPositionEnd: >+ case ContentPosition::End: > m_value.valueID = CSSValueEnd; > break; >- case ContentPositionFlexStart: >+ case ContentPosition::FlexStart: > m_value.valueID = CSSValueFlexStart; > break; >- case ContentPositionFlexEnd: >+ case ContentPosition::FlexEnd: > m_value.valueID = CSSValueFlexEnd; > break; >- case ContentPositionLeft: >+ case ContentPosition::Left: > m_value.valueID = CSSValueLeft; > break; >- case ContentPositionRight: >+ case ContentPosition::Right: > m_value.valueID = CSSValueRight; > break; > } >@@ -5126,73 +5126,73 @@ template<> inline CSSPrimitiveValue::ope > { > switch (m_value.valueID) { > case CSSValueNormal: >- return ContentPositionNormal; >+ return ContentPosition::Normal; > case CSSValueBaseline: >- return ContentPositionBaseline; >+ return ContentPosition::Baseline; > case CSSValueFirstBaseline: >- return ContentPositionBaseline; >+ return ContentPosition::Baseline; > case CSSValueLastBaseline: >- return ContentPositionLastBaseline; >+ return ContentPosition::LastBaseline; > case CSSValueCenter: >- return ContentPositionCenter; >+ return ContentPosition::Center; > case CSSValueStart: >- return ContentPositionStart; >+ return ContentPosition::Start; > case CSSValueEnd: >- return ContentPositionEnd; >+ return ContentPosition::End; > case CSSValueFlexStart: >- return ContentPositionFlexStart; >+ return ContentPosition::FlexStart; > case CSSValueFlexEnd: >- return ContentPositionFlexEnd; >+ return ContentPosition::FlexEnd; > case CSSValueLeft: >- return ContentPositionLeft; >+ return ContentPosition::Left; > case CSSValueRight: >- return ContentPositionRight; >+ return ContentPosition::Right; > default: > break; > } > ASSERT_NOT_REACHED(); >- return ContentPositionNormal; >+ return ContentPosition::Normal; > } > >-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistributionType contentDistribution) >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ContentDistribution contentDistribution) > : CSSValue(PrimitiveClass) > { > m_primitiveUnitType = CSS_VALUE_ID; > switch (contentDistribution) { >- case ContentDistributionDefault: >+ case ContentDistribution::Default: > m_value.valueID = CSSValueDefault; > break; >- case ContentDistributionSpaceBetween: >+ case ContentDistribution::SpaceBetween: > m_value.valueID = CSSValueSpaceBetween; > break; >- case ContentDistributionSpaceAround: >+ case ContentDistribution::SpaceAround: > m_value.valueID = CSSValueSpaceAround; > break; >- case ContentDistributionSpaceEvenly: >+ case ContentDistribution::SpaceEvenly: > m_value.valueID = CSSValueSpaceEvenly; > break; >- case ContentDistributionStretch: >+ case ContentDistribution::Stretch: > m_value.valueID = CSSValueStretch; > break; > } > } > >-template<> inline CSSPrimitiveValue::operator ContentDistributionType() const >+template<> inline CSSPrimitiveValue::operator ContentDistribution() const > { > switch (m_value.valueID) { > case CSSValueSpaceBetween: >- return ContentDistributionSpaceBetween; >+ return ContentDistribution::SpaceBetween; > case CSSValueSpaceAround: >- return ContentDistributionSpaceAround; >+ return ContentDistribution::SpaceAround; > case CSSValueSpaceEvenly: >- return ContentDistributionSpaceEvenly; >+ return ContentDistribution::SpaceEvenly; > case CSSValueStretch: >- return ContentDistributionStretch; >+ return ContentDistribution::Stretch; > default: > break; > } > ASSERT_NOT_REACHED(); >- return ContentDistributionStretch; >+ return ContentDistribution::Stretch; > } > > template<> inline CSSPrimitiveValue::operator TextZoom() const >Index: Source/WebCore/css/CSSProperties.json >=================================================================== >--- Source/WebCore/css/CSSProperties.json (revision 232008) >+++ Source/WebCore/css/CSSProperties.json (working copy) >@@ -6062,7 +6062,7 @@ > ], > "codegen-properties": { > "name-for-methods": "TransformStyle3D", >- "comment": "Keeping -webkit-transform-style around is how we'll detect legacy content. At that point, we'll have to add a custom builder and a new ETransformStyle3D type. FIXME: this never happened." >+ "comment": "Keeping -webkit-transform-style around is how we'll detect legacy content. At that point, we'll have to add a custom builder and a new TransformStyle3D type. FIXME: this never happened." > } > }, > "-webkit-user-drag": { >Index: Source/WebCore/css/CSSToStyleMap.cpp >=================================================================== >--- Source/WebCore/css/CSSToStyleMap.cpp (revision 232008) >+++ Source/WebCore/css/CSSToStyleMap.cpp (working copy) >@@ -83,13 +83,13 @@ void CSSToStyleMap::mapFillAttachment(CS > > switch (downcast<CSSPrimitiveValue>(value).valueID()) { > case CSSValueFixed: >- layer.setAttachment(FixedBackgroundAttachment); >+ layer.setAttachment(FillAttachment::FixedBackground); > break; > case CSSValueScroll: >- layer.setAttachment(ScrollBackgroundAttachment); >+ layer.setAttachment(FillAttachment::ScrollBackground); > break; > case CSSValueLocal: >- layer.setAttachment(LocalBackgroundAttachment); >+ layer.setAttachment(FillAttachment::LocalBackground); > break; > default: > return; >@@ -208,13 +208,13 @@ void CSSToStyleMap::mapFillSize(CSSPrope > FillSize fillSize; > switch (primitiveValue.valueID()) { > case CSSValueContain: >- fillSize.type = Contain; >+ fillSize.type = FillSizeType::Contain; > break; > case CSSValueCover: >- fillSize.type = Cover; >+ fillSize.type = FillSizeType::Cover; > break; > default: >- ASSERT(fillSize.type == SizeLength); >+ ASSERT(fillSize.type == FillSizeType::Size); > if (!convertToLengthSize(primitiveValue, m_resolver->state().cssToLengthConversionData(), fillSize.size)) > return; > break; >@@ -272,7 +272,7 @@ void CSSToStyleMap::mapFillYPosition(CSS > > void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value) > { >- EMaskSourceType type = FillLayer::initialFillMaskSourceType(layer.type()); >+ MaskSourceType type = FillLayer::initialFillMaskSourceType(layer.type()); > if (value.treatAsInitialValue(propertyID)) { > layer.setMaskSourceType(type); > return; >@@ -283,10 +283,10 @@ void CSSToStyleMap::mapFillMaskSourceTyp > > switch (downcast<CSSPrimitiveValue>(value).valueID()) { > case CSSValueAlpha: >- type = EMaskSourceType::MaskAlpha; >+ type = MaskSourceType::Alpha; > break; > case CSSValueLuminance: >- type = EMaskSourceType::MaskLuminance; >+ type = MaskSourceType::Luminance; > break; > case CSSValueAuto: > break; >Index: Source/WebCore/css/CSSValueKeywords.in >=================================================================== >--- Source/WebCore/css/CSSValueKeywords.in (revision 232008) >+++ Source/WebCore/css/CSSValueKeywords.in (working copy) >@@ -11,7 +11,7 @@ revert > // CSS_PROP_BORDER_TOP_STYLE > // CSS_PROP_BORDER_BOTTOM_STYLE > // CSS_PROP_BORDER_LEFT_STYLE >-// The order here must match the order of the EBorderStyle enum in RenderStyleConstants.h. >+// The order here must match the order of the BorderStyle enum in RenderStyleConstants.h. > none > hidden > inset >Index: Source/WebCore/css/StyleBuilderConverter.h >=================================================================== >--- Source/WebCore/css/StyleBuilderConverter.h (revision 232008) >+++ Source/WebCore/css/StyleBuilderConverter.h (working copy) >@@ -83,7 +83,7 @@ public: > static TextEmphasisPosition convertTextEmphasisPosition(StyleResolver&, const CSSValue&); > static ETextAlign convertTextAlign(StyleResolver&, const CSSValue&); > static RefPtr<ClipPathOperation> convertClipPath(StyleResolver&, const CSSValue&); >- static EResize convertResize(StyleResolver&, const CSSValue&); >+ static Resize convertResize(StyleResolver&, const CSSValue&); > static int convertMarqueeRepetition(StyleResolver&, const CSSValue&); > static int convertMarqueeSpeed(StyleResolver&, const CSSValue&); > static Ref<QuotesData> convertQuotes(StyleResolver&, const CSSValue&); >@@ -562,13 +562,13 @@ inline RefPtr<ClipPathOperation> StyleBu > return operation; > } > >-inline EResize StyleBuilderConverter::convertResize(StyleResolver& styleResolver, const CSSValue& value) >+inline Resize StyleBuilderConverter::convertResize(StyleResolver& styleResolver, const CSSValue& value) > { > auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > >- EResize resize = RESIZE_NONE; >+ Resize resize = Resize::None; > if (primitiveValue.valueID() == CSSValueAuto) >- resize = styleResolver.settings().textAreasAreResizable() ? RESIZE_BOTH : RESIZE_NONE; >+ resize = styleResolver.settings().textAreasAreResizable() ? Resize::Both : Resize::None; > else > resize = primitiveValue; > >@@ -1355,12 +1355,12 @@ inline StyleSelfAlignmentData StyleBuild > auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > if (Pair* pairValue = primitiveValue.pairValue()) { > if (pairValue->first()->valueID() == CSSValueLegacy) { >- alignmentData.setPositionType(LegacyPosition); >+ alignmentData.setPositionType(ItemPositionType::Legacy); > alignmentData.setPosition(*pairValue->second()); > } else if (pairValue->first()->valueID() == CSSValueFirst) { >- alignmentData.setPosition(ItemPositionBaseline); >+ alignmentData.setPosition(ItemPosition::Baseline); > } else if (pairValue->first()->valueID() == CSSValueLast) { >- alignmentData.setPosition(ItemPositionLastBaseline); >+ alignmentData.setPosition(ItemPosition::LastBaseline); > } else { > alignmentData.setOverflow(*pairValue->first()); > alignmentData.setPosition(*pairValue->second()); >Index: Source/WebCore/css/StyleBuilderCustom.h >=================================================================== >--- Source/WebCore/css/StyleBuilderCustom.h (revision 232008) >+++ Source/WebCore/css/StyleBuilderCustom.h (working copy) >@@ -518,9 +518,9 @@ inline void StyleBuilderCustom::applyVal > lengthOrPercentageValue = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(styleResolver.state().cssToLengthConversionData()); > #if ENABLE(CSS3_TEXT) > else if (primitiveValue.valueID() == CSSValueWebkitEachLine) >- textIndentLineValue = TextIndentEachLine; >+ textIndentLineValue = TextIndentLine::EachLine; > else if (primitiveValue.valueID() == CSSValueWebkitHanging) >- textIndentTypeValue = TextIndentHanging; >+ textIndentTypeValue = TextIndentType::Hanging; > #endif > } > >@@ -1058,7 +1058,7 @@ inline void StyleBuilderCustom::applyIni > > inline void StyleBuilderCustom::applyInheritWebkitAspectRatio(StyleResolver& styleResolver) > { >- if (styleResolver.parentStyle()->aspectRatioType() == AspectRatioAuto) >+ if (styleResolver.parentStyle()->aspectRatioType() == AspectRatioType::Auto) > return; > styleResolver.style()->setAspectRatioType(styleResolver.parentStyle()->aspectRatioType()); > styleResolver.style()->setAspectRatioDenominator(styleResolver.parentStyle()->aspectRatioDenominator()); >@@ -1071,16 +1071,16 @@ inline void StyleBuilderCustom::applyVal > auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > > if (primitiveValue.valueID() == CSSValueFromDimensions) >- return styleResolver.style()->setAspectRatioType(AspectRatioFromDimensions); >+ return styleResolver.style()->setAspectRatioType(AspectRatioType::FromDimensions); > if (primitiveValue.valueID() == CSSValueFromIntrinsic) >- return styleResolver.style()->setAspectRatioType(AspectRatioFromIntrinsic); >+ return styleResolver.style()->setAspectRatioType(AspectRatioType::FromIntrinsic); > > ASSERT(primitiveValue.valueID() == CSSValueAuto); >- return styleResolver.style()->setAspectRatioType(AspectRatioAuto); >+ return styleResolver.style()->setAspectRatioType(AspectRatioType::Auto); > } > > auto& aspectRatioValue = downcast<CSSAspectRatioValue>(value); >- styleResolver.style()->setAspectRatioType(AspectRatioSpecified); >+ styleResolver.style()->setAspectRatioType(AspectRatioType::Specified); > styleResolver.style()->setAspectRatioDenominator(aspectRatioValue.denominatorValue()); > styleResolver.style()->setAspectRatioNumerator(aspectRatioValue.numeratorValue()); > } >@@ -1436,19 +1436,19 @@ inline void StyleBuilderCustom::applyVal > } else { > switch (contentValue.valueID()) { > case CSSValueOpenQuote: >- styleResolver.style()->setContent(OPEN_QUOTE, didSet); >+ styleResolver.style()->setContent(QuoteType::OpenQuote, didSet); > didSet = true; > break; > case CSSValueCloseQuote: >- styleResolver.style()->setContent(CLOSE_QUOTE, didSet); >+ styleResolver.style()->setContent(QuoteType::CloseQuote, didSet); > didSet = true; > break; > case CSSValueNoOpenQuote: >- styleResolver.style()->setContent(NO_OPEN_QUOTE, didSet); >+ styleResolver.style()->setContent(QuoteType::NoOpenQuote, didSet); > didSet = true; > break; > case CSSValueNoCloseQuote: >- styleResolver.style()->setContent(NO_CLOSE_QUOTE, didSet); >+ styleResolver.style()->setContent(QuoteType::NoCloseQuote, didSet); > didSet = true; > break; > default: >Index: Source/WebCore/css/StyleResolver.cpp >=================================================================== >--- Source/WebCore/css/StyleResolver.cpp (revision 232008) >+++ Source/WebCore/css/StyleResolver.cpp (working copy) >@@ -733,9 +733,9 @@ static bool doesNotInheritTextDecoration > } > > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >-static bool isScrollableOverflow(EOverflow overflow) >+static bool isScrollableOverflow(Overflow overflow) > { >- return overflow == OSCROLL || overflow == OAUTO || overflow == OOVERLAY; >+ return overflow == Overflow::Scroll || overflow == Overflow::Auto || overflow == Overflow::Overlay; > } > #endif > >@@ -851,7 +851,7 @@ void StyleResolver::adjustRenderStyle(Re > if (document().inQuirksMode()) { > if (element->hasTagName(tdTag)) { > style.setDisplay(TABLE_CELL); >- style.setFloating(NoFloat); >+ style.setFloating(Float::No); > } else if (is<HTMLTableElement>(*element)) > style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE); > } >@@ -875,14 +875,14 @@ void StyleResolver::adjustRenderStyle(Re > // Frames and framesets never honor position:relative or position:absolute. This is necessary to > // fix a crash where a site tries to position these objects. They also never honor display. > if (element->hasTagName(frameTag) || element->hasTagName(framesetTag)) { >- style.setPosition(StaticPosition); >+ style.setPosition(PositionType::Static); > style.setDisplay(BLOCK); > } > > // Ruby text does not support float or position. This might change with evolution of the specification. > if (element->hasTagName(rtTag)) { >- style.setPosition(StaticPosition); >- style.setFloating(NoFloat); >+ style.setPosition(PositionType::Static); >+ style.setFloating(Float::No); > } > > // User agents are expected to have a rule in their user agent stylesheet that matches th elements that have a parent >@@ -910,8 +910,8 @@ void StyleResolver::adjustRenderStyle(Re > // on some sites). > if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_GROUP > || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW) >- && style.position() == RelativePosition) >- style.setPosition(StaticPosition); >+ && style.position() == PositionType::Relative) >+ style.setPosition(PositionType::Static); > > // writing-mode does not apply to table row groups, table column groups, table rows, and table columns. > // FIXME: Table cells should be allowed to be perpendicular or flipped with respect to the table, though. >@@ -929,13 +929,13 @@ void StyleResolver::adjustRenderStyle(Re > // https://www.w3.org/TR/css-display/#transformations > // "A parent with a grid or flex display value blockifies the box’s display type." > if (parentBoxStyle->isDisplayFlexibleOrGridBox()) { >- style.setFloating(NoFloat); >+ style.setFloating(Float::No); > style.setDisplay(equivalentBlockDisplay(style, document())); > } > } > > // Make sure our z-index value is only applied if the object is positioned. >- if (style.position() == StaticPosition && !parentBoxStyle->isDisplayFlexibleOrGridBox()) >+ if (style.position() == PositionType::Static && !parentBoxStyle->isDisplayFlexibleOrGridBox()) > style.setHasAutoZIndex(); > > // Auto z-index becomes 0 for the root element and transparent objects. This prevents >@@ -954,8 +954,8 @@ void StyleResolver::adjustRenderStyle(Re > #endif > || style.hasBlendMode() > || style.hasIsolation() >- || style.position() == StickyPosition >- || style.position() == FixedPosition >+ || style.position() == PositionType::Sticky >+ || style.position() == PositionType::Fixed > || style.willChangeCreatesStackingContext()) > style.setZIndex(0); > } >@@ -963,18 +963,18 @@ void StyleResolver::adjustRenderStyle(Re > if (element) { > // Textarea considers overflow visible as auto. > if (is<HTMLTextAreaElement>(*element)) { >- style.setOverflowX(style.overflowX() == OVISIBLE ? OAUTO : style.overflowX()); >- style.setOverflowY(style.overflowY() == OVISIBLE ? OAUTO : style.overflowY()); >+ style.setOverflowX(style.overflowX() == Overflow::Visible ? Overflow::Auto : style.overflowX()); >+ style.setOverflowY(style.overflowY() == Overflow::Visible ? Overflow::Auto : style.overflowY()); > } > > // Disallow -webkit-user-modify on :pseudo and ::pseudo elements. > if (!element->shadowPseudoId().isNull()) >- style.setUserModify(READ_ONLY); >+ style.setUserModify(UserModify::ReadOnly); > > if (is<HTMLMarqueeElement>(*element)) { > // For now, <marquee> requires an overflow clip to work properly. >- style.setOverflowX(OHIDDEN); >- style.setOverflowY(OHIDDEN); >+ style.setOverflowX(Overflow::Hidden); >+ style.setOverflowY(Overflow::Hidden); > > bool isVertical = style.marqueeDirection() == MarqueeDirection::Up || style.marqueeDirection() == MarqueeDirection::Down; > // Make horizontal marquees not wrap. >@@ -994,34 +994,34 @@ void StyleResolver::adjustRenderStyle(Re > style.addToTextDecorationsInEffect(style.textDecoration()); > > // If either overflow value is not visible, change to auto. >- if (style.overflowX() == OVISIBLE && style.overflowY() != OVISIBLE) { >+ if (style.overflowX() == Overflow::Visible && style.overflowY() != Overflow::Visible) { > // FIXME: Once we implement pagination controls, overflow-x should default to hidden > // if overflow-y is set to -webkit-paged-x or -webkit-page-y. For now, we'll let it > // default to auto so we can at least scroll through the pages. >- style.setOverflowX(OAUTO); >- } else if (style.overflowY() == OVISIBLE && style.overflowX() != OVISIBLE) >- style.setOverflowY(OAUTO); >+ style.setOverflowX(Overflow::Auto); >+ } else if (style.overflowY() == Overflow::Visible && style.overflowX() != Overflow::Visible) >+ style.setOverflowY(Overflow::Auto); > > // Call setStylesForPaginationMode() if a pagination mode is set for any non-root elements. If these > // styles are specified on a root element, then they will be incorporated in > // Style::createForDocument(). >- if ((style.overflowY() == OPAGEDX || style.overflowY() == OPAGEDY) && !(element && (element->hasTagName(htmlTag) || element->hasTagName(bodyTag)))) >+ if ((style.overflowY() == Overflow::PagedX || style.overflowY() == Overflow::PagedY) && !(element && (element->hasTagName(htmlTag) || element->hasTagName(bodyTag)))) > style.setColumnStylesFromPaginationMode(WebCore::paginationModeForRenderStyle(style)); > > // Table rows, sections and the table itself will support overflow:hidden and will ignore scroll/auto. > // FIXME: Eventually table sections will support auto and scroll. > if (style.display() == TABLE || style.display() == INLINE_TABLE > || style.display() == TABLE_ROW_GROUP || style.display() == TABLE_ROW) { >- if (style.overflowX() != OVISIBLE && style.overflowX() != OHIDDEN) >- style.setOverflowX(OVISIBLE); >- if (style.overflowY() != OVISIBLE && style.overflowY() != OHIDDEN) >- style.setOverflowY(OVISIBLE); >+ if (style.overflowX() != Overflow::Visible && style.overflowX() != Overflow::Hidden) >+ style.setOverflowX(Overflow::Visible); >+ if (style.overflowY() != Overflow::Visible && style.overflowY() != Overflow::Hidden) >+ style.setOverflowY(Overflow::Visible); > } > > // Menulists should have visible overflow > if (style.appearance() == MenulistPart) { >- style.setOverflowX(OVISIBLE); >- style.setOverflowY(OVISIBLE); >+ style.setOverflowX(Overflow::Visible); >+ style.setOverflowY(Overflow::Visible); > } > > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >@@ -1056,8 +1056,8 @@ void StyleResolver::adjustRenderStyle(Re > style.setUnique(); > > // FIXME: when dropping the -webkit prefix on transform-style, we should also have opacity < 1 cause flattening. >- if (style.preserves3D() && (style.overflowX() != OVISIBLE >- || style.overflowY() != OVISIBLE >+ if (style.preserves3D() && (style.overflowX() != Overflow::Visible >+ || style.overflowY() != Overflow::Visible > || style.hasClip() > || style.clipPath() > || style.hasFilter() >@@ -1065,14 +1065,14 @@ void StyleResolver::adjustRenderStyle(Re > || style.hasBackdropFilter() > #endif > || style.hasBlendMode())) >- style.setTransformStyle3D(TransformStyle3DFlat); >+ style.setTransformStyle3D(TransformStyle3D::Flat); > > if (is<SVGElement>(element)) > adjustSVGElementStyle(downcast<SVGElement>(*element), style); > > // If the inherited value of justify-items includes the 'legacy' keyword (plus 'left', 'right' or > // 'center'), 'legacy' computes to the the inherited value. Otherwise, 'auto' computes to 'normal'. >- if (parentBoxStyle->justifyItems().positionType() == LegacyPosition && style.justifyItems().position() == ItemPositionLegacy) >+ if (parentBoxStyle->justifyItems().positionType() == ItemPositionType::Legacy && style.justifyItems().position() == ItemPosition::Legacy) > style.setJustifyItems(parentBoxStyle->justifyItems()); > } > >Index: Source/WebCore/css/StyleResolver.h >=================================================================== >--- Source/WebCore/css/StyleResolver.h (revision 232008) >+++ Source/WebCore/css/StyleResolver.h (working copy) >@@ -418,7 +418,7 @@ public: > bool m_hasUAAppearance { false }; > > BorderData m_borderData; >- FillLayer m_backgroundData { BackgroundFillLayer }; >+ FillLayer m_backgroundData { FillLayerType::Background }; > Color m_backgroundColor; > > CSSToLengthConversionData m_cssToLengthConversionData; >Index: Source/WebCore/css/makeprop.pl >=================================================================== >--- Source/WebCore/css/makeprop.pl (revision 232008) >+++ Source/WebCore/css/makeprop.pl (working copy) >@@ -576,8 +576,8 @@ sub getLayersAccessorFunction { > sub getFillLayerType { > my $name = shift; > >- return "BackgroundFillLayer" if $name =~ /background-/; >- return "MaskFillLayer" if $name =~ /mask-/; >+ return "FillLayerType::Background" if $name =~ /background-/; >+ return "FillLayerType::Mask" if $name =~ /mask-/; > } > > sub getFillLayerMapfunction { >Index: Source/WebCore/dom/Element.h >=================================================================== >--- Source/WebCore/dom/Element.h (revision 232008) >+++ Source/WebCore/dom/Element.h (working copy) >@@ -539,7 +539,7 @@ public: > // This should be called whenever an element changes in a manner that can affect its style. > void invalidateStyle(); > >- // As above but also call RenderElement::setStyle with StyleDifferenceRecompositeLayer flag for >+ // As above but also call RenderElement::setStyle with StyleDifference::RecompositeLayer flag for > // the element even when the style doesn't change. This is mostly needed by the animation code. > WEBCORE_EXPORT void invalidateStyleAndLayerComposition(); > >Index: Source/WebCore/dom/Node.cpp >=================================================================== >--- Source/WebCore/dom/Node.cpp (revision 232008) >+++ Source/WebCore/dom/Node.cpp (working copy) >@@ -685,17 +685,17 @@ static Node::Editability computeEditabil > #if ENABLE(USERSELECT_ALL) > // Elements with user-select: all style are considered atomic > // therefore non editable. >- if (treatment == Node::UserSelectAllIsAlwaysNonEditable && style->userSelect() == SELECT_ALL) >+ if (treatment == Node::UserSelectAllIsAlwaysNonEditable && style->userSelect() == UserSelect::All) > return Node::Editability::ReadOnly; > #else > UNUSED_PARAM(treatment); > #endif > switch (style->userModify()) { >- case READ_ONLY: >+ case UserModify::ReadOnly: > return Node::Editability::ReadOnly; >- case READ_WRITE: >+ case UserModify::ReadWrite: > return Node::Editability::CanEditRichly; >- case READ_WRITE_PLAINTEXT_ONLY: >+ case UserModify::ReadWritePlaintextOnly: > return Node::Editability::CanEditPlainText; > } > ASSERT_NOT_REACHED(); >@@ -1070,7 +1070,7 @@ bool Node::canStartSelection() const > const RenderStyle& style = renderer()->style(); > // We allow selections to begin within an element that has -webkit-user-select: none set, > // but if the element is draggable then dragging should take priority over selection. >- if (style.userDrag() == DRAG_ELEMENT && style.userSelect() == SELECT_NONE) >+ if (style.userDrag() == UserDrag::Element && style.userSelect() == UserSelect::None) > return false; > } > return parentOrShadowHostNode() ? parentOrShadowHostNode()->canStartSelection() : true; >Index: Source/WebCore/dom/Position.cpp >=================================================================== >--- Source/WebCore/dom/Position.cpp (revision 232008) >+++ Source/WebCore/dom/Position.cpp (working copy) >@@ -954,13 +954,13 @@ bool Position::hasRenderedNonAnonymousDe > > bool Position::nodeIsUserSelectNone(Node* node) > { >- return node && node->renderer() && node->renderer()->style().userSelect() == SELECT_NONE; >+ return node && node->renderer() && node->renderer()->style().userSelect() == UserSelect::None; > } > > #if ENABLE(USERSELECT_ALL) > bool Position::nodeIsUserSelectAll(const Node* node) > { >- return node && node->renderer() && node->renderer()->style().userSelect() == SELECT_ALL; >+ return node && node->renderer() && node->renderer()->style().userSelect() == UserSelect::All; > } > > Node* Position::rootUserSelectAllForNode(Node* node) >Index: Source/WebCore/dom/Range.cpp >=================================================================== >--- Source/WebCore/dom/Range.cpp (revision 232008) >+++ Source/WebCore/dom/Range.cpp (working copy) >@@ -1310,7 +1310,7 @@ int Range::collectSelectionRectsWithoutU > for (Node* node = firstNode(); node && node != stopNode; node = NodeTraversal::next(*node)) { > RenderObject* renderer = node->renderer(); > // Only ask leaf render objects for their line box rects. >- if (renderer && !renderer->firstChildSlow() && renderer->style().userSelect() != SELECT_NONE) { >+ if (renderer && !renderer->firstChildSlow() && renderer->style().userSelect() != UserSelect::None) { > bool isStartNode = renderer->node() == &startContainer; > bool isEndNode = renderer->node() == &endContainer; > if (hasFlippedWritingMode != renderer->style().isFlippedBlocksWritingMode()) >Index: Source/WebCore/editing/ApplyBlockElementCommand.cpp >=================================================================== >--- Source/WebCore/editing/ApplyBlockElementCommand.cpp (revision 232008) >+++ Source/WebCore/editing/ApplyBlockElementCommand.cpp (working copy) >@@ -238,7 +238,7 @@ void ApplyBlockElementCommand::rangeForP > } > > // If end is in the middle of a text node and the text node is editable, split. >- if (endStyle->userModify() != READ_ONLY && !endStyle->collapseWhiteSpace() && end.offsetInContainerNode() && end.offsetInContainerNode() < end.containerNode()->maxCharacterOffset()) { >+ if (endStyle->userModify() != UserModify::ReadOnly && !endStyle->collapseWhiteSpace() && end.offsetInContainerNode() && end.offsetInContainerNode() < end.containerNode()->maxCharacterOffset()) { > RefPtr<Text> endContainer = end.containerText(); > splitTextNode(*endContainer, end.offsetInContainerNode()); > if (isStartAndEndOnSameNode) >Index: Source/WebCore/editing/DeleteSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/DeleteSelectionCommand.cpp (revision 232008) >+++ Source/WebCore/editing/DeleteSelectionCommand.cpp (working copy) >@@ -900,7 +900,7 @@ void DeleteSelectionCommand::doApply() > if (is<Text>(node)) { > Text& textNode = downcast<Text>(*node); > if (textNode.length() && textNode.renderer()) >- shouldRebalaceWhiteSpace = textNode.renderer()->style().textSecurity() == TSNONE; >+ shouldRebalaceWhiteSpace = textNode.renderer()->style().textSecurity() == TextSecurity::None; > } > } > if (shouldRebalaceWhiteSpace) >Index: Source/WebCore/editing/Editing.cpp >=================================================================== >--- Source/WebCore/editing/Editing.cpp (revision 232008) >+++ Source/WebCore/editing/Editing.cpp (working copy) >@@ -462,7 +462,7 @@ static bool isSpecialHTMLElement(const N > if (renderer->style().isFloating()) > return true; > >- if (renderer->style().position() != StaticPosition) >+ if (renderer->style().position() != PositionType::Static) > return true; > > return false; >Index: Source/WebCore/editing/EditorCommand.cpp >=================================================================== >--- Source/WebCore/editing/EditorCommand.cpp (revision 232008) >+++ Source/WebCore/editing/EditorCommand.cpp (working copy) >@@ -219,7 +219,7 @@ static unsigned verticalScrollDistance(F > if (!is<RenderBox>(renderer)) > return 0; > const RenderStyle& style = renderer->style(); >- if (!(style.overflowY() == OSCROLL || style.overflowY() == OAUTO || focusedElement->hasEditableStyle())) >+ if (!(style.overflowY() == Overflow::Scroll || style.overflowY() == Overflow::Auto || focusedElement->hasEditableStyle())) > return 0; > int height = std::min<int>(downcast<RenderBox>(*renderer).clientHeight(), frame.view()->visibleHeight()); > return static_cast<unsigned>(Scrollbar::pageStep(height)); >Index: Source/WebCore/editing/ReplaceSelectionCommand.cpp >=================================================================== >--- Source/WebCore/editing/ReplaceSelectionCommand.cpp (revision 232008) >+++ Source/WebCore/editing/ReplaceSelectionCommand.cpp (working copy) >@@ -935,8 +935,8 @@ void ReplaceSelectionCommand::doApply() > return; > > // We can skip matching the style if the selection is plain text. >- if ((selection.start().deprecatedNode()->renderer() && selection.start().deprecatedNode()->renderer()->style().userModify() == READ_WRITE_PLAINTEXT_ONLY) >- && (selection.end().deprecatedNode()->renderer() && selection.end().deprecatedNode()->renderer()->style().userModify() == READ_WRITE_PLAINTEXT_ONLY)) >+ if ((selection.start().deprecatedNode()->renderer() && selection.start().deprecatedNode()->renderer()->style().userModify() == UserModify::ReadWritePlaintextOnly) >+ && (selection.end().deprecatedNode()->renderer() && selection.end().deprecatedNode()->renderer()->style().userModify() == UserModify::ReadWritePlaintextOnly)) > m_matchStyle = false; > > if (m_matchStyle) { >Index: Source/WebCore/editing/SimplifyMarkupCommand.cpp >=================================================================== >--- Source/WebCore/editing/SimplifyMarkupCommand.cpp (revision 232008) >+++ Source/WebCore/editing/SimplifyMarkupCommand.cpp (working copy) >@@ -79,8 +79,8 @@ void SimplifyMarkupCommand::doApply() > break; > } > >- unsigned context; >- if (currentNode->renderStyle()->diff(*startingStyle, context) == StyleDifferenceEqual) >+ OptionSet<StyleDifferenceContextSensitiveProperty> contextSensitiveProperties; >+ if (currentNode->renderStyle()->diff(*startingStyle, contextSensitiveProperties) == StyleDifference::Equal) > topNodeWithStartingStyle = currentNode; > > } >Index: Source/WebCore/editing/VisibleUnits.cpp >=================================================================== >--- Source/WebCore/editing/VisibleUnits.cpp (revision 232008) >+++ Source/WebCore/editing/VisibleUnits.cpp (working copy) >@@ -510,7 +510,7 @@ unsigned backwardSearchForBoundaryWithTe > unsigned next = 0; > bool needMoreContext = false; > while (!it.atEnd()) { >- bool inTextSecurityMode = it.node() && it.node()->renderer() && it.node()->renderer()->style().textSecurity() != TSNONE; >+ bool inTextSecurityMode = it.node() && it.node()->renderer() && it.node()->renderer()->style().textSecurity() != TextSecurity::None; > // iterate to get chunks until the searchFunction returns a non-zero value. > if (!inTextSecurityMode) > prepend(string, it.text()); >@@ -540,7 +540,7 @@ unsigned forwardSearchForBoundaryWithTex > unsigned next = 0; > bool needMoreContext = false; > while (!it.atEnd()) { >- bool inTextSecurityMode = it.node() && it.node()->renderer() && it.node()->renderer()->style().textSecurity() != TSNONE; >+ bool inTextSecurityMode = it.node() && it.node()->renderer() && it.node()->renderer()->style().textSecurity() != TextSecurity::None; > // Keep asking the iterator for chunks until the search function > // returns an end value not equal to the length of the string passed to it. > if (!inTextSecurityMode) >Index: Source/WebCore/editing/cocoa/EditorCocoa.mm >=================================================================== >--- Source/WebCore/editing/cocoa/EditorCocoa.mm (revision 232008) >+++ Source/WebCore/editing/cocoa/EditorCocoa.mm (working copy) >@@ -110,19 +110,19 @@ RetainPtr<NSDictionary> Editor::fontAttr > > int superscriptInt = 0; > switch (style->verticalAlign()) { >- case BASELINE: >- case BOTTOM: >- case BASELINE_MIDDLE: >- case LENGTH: >- case MIDDLE: >- case TEXT_BOTTOM: >- case TEXT_TOP: >- case TOP: >+ case VerticalAlign::Baseline: >+ case VerticalAlign::Bottom: >+ case VerticalAlign::BaselineMiddle: >+ case VerticalAlign::Length: >+ case VerticalAlign::Middle: >+ case VerticalAlign::TextBottom: >+ case VerticalAlign::TextTop: >+ case VerticalAlign::Top: > break; >- case SUB: >+ case VerticalAlign::Sub: > superscriptInt = -1; > break; >- case SUPER: >+ case VerticalAlign::Super: > superscriptInt = 1; > break; > } >Index: Source/WebCore/editing/cocoa/HTMLConverter.mm >=================================================================== >--- Source/WebCore/editing/cocoa/HTMLConverter.mm (revision 232008) >+++ Source/WebCore/editing/cocoa/HTMLConverter.mm (working copy) >@@ -2523,7 +2523,7 @@ NSAttributedString *editingAttributedStr > [attrs.get() removeObjectForKey:NSBackgroundColorAttributeName]; > > RetainPtr<NSString> text; >- if (style.nbspMode() == NBNORMAL) >+ if (style.nbspMode() == NBSPMode::Normal) > text = it.text().createNSStringWithoutCopying(); > else > text = it.text().toString().replace(noBreakSpace, ' '); >Index: Source/WebCore/html/HTMLInputElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLInputElement.cpp (revision 232008) >+++ Source/WebCore/html/HTMLInputElement.cpp (working copy) >@@ -1974,7 +1974,7 @@ bool HTMLInputElement::shouldTruncateTex > { > if (!isTextField()) > return false; >- return document().focusedElement() != this && style.textOverflow() == TextOverflowEllipsis; >+ return document().focusedElement() != this && style.textOverflow() == TextOverflow::Ellipsis; > } > > ExceptionOr<int> HTMLInputElement::selectionStartForBindings() const >@@ -2061,16 +2061,16 @@ RenderStyle HTMLInputElement::createInne > adjustInnerTextStyle(style, textBlockStyle); > > textBlockStyle.setWhiteSpace(PRE); >- textBlockStyle.setOverflowWrap(NormalOverflowWrap); >- textBlockStyle.setOverflowX(OHIDDEN); >- textBlockStyle.setOverflowY(OHIDDEN); >- textBlockStyle.setTextOverflow(shouldTruncateText(style) ? TextOverflowEllipsis : TextOverflowClip); >+ textBlockStyle.setOverflowWrap(OverflowWrap::Normal); >+ textBlockStyle.setOverflowX(Overflow::Hidden); >+ textBlockStyle.setOverflowY(Overflow::Hidden); >+ textBlockStyle.setTextOverflow(shouldTruncateText(style) ? TextOverflow::Ellipsis : TextOverflow::Clip); > > textBlockStyle.setDisplay(BLOCK); > > if (hasAutoFillStrongPasswordButton()) { > textBlockStyle.setColor({ 0.0f, 0.0f, 0.0f, 0.6f }); >- textBlockStyle.setTextOverflow(TextOverflowClip); >+ textBlockStyle.setTextOverflow(TextOverflow::Clip); > textBlockStyle.setMaskImage(styleResolver().styleImage(autoFillStrongPasswordMaskImage())); > // A stacking context is needed for the mask. > if (textBlockStyle.hasAutoZIndex()) >Index: Source/WebCore/html/HTMLTextFormControlElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLTextFormControlElement.cpp (revision 232008) >+++ Source/WebCore/html/HTMLTextFormControlElement.cpp (working copy) >@@ -816,7 +816,7 @@ void HTMLTextFormControlElement::adjustI > if (isDisabledFormControl()) > textBlockStyle.setColor(RenderTheme::singleton().disabledTextColor(textBlockStyle.visitedDependentColorWithColorFilter(CSSPropertyColor), parentStyle.visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor))); > #if PLATFORM(IOS) >- if (textBlockStyle.textSecurity() != TSNONE && !textBlockStyle.isLeftToRightDirection()) { >+ if (textBlockStyle.textSecurity() != TextSecurity::None && !textBlockStyle.isLeftToRightDirection()) { > // Preserve the alignment but force the direction to LTR so that the last-typed, unmasked character > // (which cannot have RTL directionality) will appear to the right of the masked characters. See <rdar://problem/7024375>. > >Index: Source/WebCore/html/shadow/SliderThumbElement.cpp >=================================================================== >--- Source/WebCore/html/shadow/SliderThumbElement.cpp (revision 232008) >+++ Source/WebCore/html/shadow/SliderThumbElement.cpp (working copy) >@@ -165,7 +165,7 @@ void RenderSliderContainer::layout() > ASSERT(element()->shadowHost()); > auto& input = downcast<HTMLInputElement>(*element()->shadowHost()); > bool isVertical = hasVerticalAppearance(input); >- mutableStyle().setFlexDirection(isVertical ? FlowColumn : FlowRow); >+ mutableStyle().setFlexDirection(isVertical ? FlexDirection::Column : FlexDirection::Row); > TextDirection oldTextDirection = style().direction(); > if (isVertical) { > // FIXME: Work around rounding issues in RTL vertical sliders. We want them to >Index: Source/WebCore/html/shadow/TextControlInnerElements.cpp >=================================================================== >--- Source/WebCore/html/shadow/TextControlInnerElements.cpp (revision 232008) >+++ Source/WebCore/html/shadow/TextControlInnerElements.cpp (working copy) >@@ -84,9 +84,9 @@ std::optional<ElementStyle> TextControlI > { > auto elementStyle = resolveStyle(&parentStyle); > if (isStrongPasswordTextField(shadowHost())) { >- elementStyle.renderStyle->setFlexWrap(FlexWrap); >- elementStyle.renderStyle->setOverflowX(OHIDDEN); >- elementStyle.renderStyle->setOverflowY(OHIDDEN); >+ elementStyle.renderStyle->setFlexWrap(FlexWrap::Wrap); >+ elementStyle.renderStyle->setOverflowX(Overflow::Hidden); >+ elementStyle.renderStyle->setOverflowY(Overflow::Hidden); > } > return WTFMove(elementStyle); > } >@@ -111,13 +111,13 @@ std::optional<ElementStyle> TextControlI > newStyle->setDisplay(BLOCK); > newStyle->setDirection(LTR); > // We don't want the shadow DOM to be editable, so we set this block to read-only in case the input itself is editable. >- newStyle->setUserModify(READ_ONLY); >+ newStyle->setUserModify(UserModify::ReadOnly); > > if (isStrongPasswordTextField(shadowHost())) { > newStyle->setFlexShrink(0); >- newStyle->setTextOverflow(TextOverflowClip); >- newStyle->setOverflowX(OHIDDEN); >- newStyle->setOverflowY(OHIDDEN); >+ newStyle->setTextOverflow(TextOverflow::Clip); >+ newStyle->setOverflowX(Overflow::Hidden); >+ newStyle->setOverflowY(Overflow::Hidden); > > // Set "flex-basis: 1em". Note that CSSPrimitiveValue::computeLengthInt() only needs the element's > // style to calculate em lengths. Since the element might not be in a document, just pass nullptr >@@ -201,7 +201,7 @@ std::optional<ElementStyle> TextControlP > > if (is<HTMLInputElement>(controlElement)) { > auto& inputElement = downcast<HTMLInputElement>(controlElement); >- style.renderStyle->setTextOverflow(inputElement.shouldTruncateText(*shadowHostStyle) ? TextOverflowEllipsis : TextOverflowClip); >+ style.renderStyle->setTextOverflow(inputElement.shouldTruncateText(*shadowHostStyle) ? TextOverflow::Ellipsis : TextOverflow::Clip); > } > return WTFMove(style); > } >Index: Source/WebCore/layout/displaytree/DisplayBox.cpp >=================================================================== >--- Source/WebCore/layout/displaytree/DisplayBox.cpp (revision 232008) >+++ Source/WebCore/layout/displaytree/DisplayBox.cpp (working copy) >@@ -66,7 +66,7 @@ LayoutRect Box::marginBox() const > > LayoutRect Box::borderBox() const > { >- if (m_style.boxSizing == BORDER_BOX) >+ if (m_style.boxSizing == BoxSizing::BorderBox) > return LayoutRect( { }, size()); > > // Width is content box. >@@ -92,7 +92,7 @@ LayoutRect Box::paddingBox() const > > LayoutRect Box::contentBox() const > { >- if (m_style.boxSizing == CONTENT_BOX) >+ if (m_style.boxSizing == BoxSizing::ContentBox) > return LayoutRect(LayoutPoint(0, 0), size()); > > // Width is border box. >Index: Source/WebCore/layout/displaytree/DisplayBox.h >=================================================================== >--- Source/WebCore/layout/displaytree/DisplayBox.h (revision 232008) >+++ Source/WebCore/layout/displaytree/DisplayBox.h (working copy) >@@ -94,7 +94,7 @@ private: > struct Style { > Style(const RenderStyle&); > >- EBoxSizing boxSizing { CONTENT_BOX }; >+ BoxSizing boxSizing { BoxSizing::ContentBox }; > }; > > void setRect(const LayoutRect&); >Index: Source/WebCore/layout/layouttree/LayoutBox.cpp >=================================================================== >--- Source/WebCore/layout/layouttree/LayoutBox.cpp (revision 232008) >+++ Source/WebCore/layout/layouttree/LayoutBox.cpp (working copy) >@@ -72,27 +72,27 @@ bool Box::establishesBlockFormattingCont > > bool Box::isRelativelyPositioned() const > { >- return m_style.position() == RelativePosition; >+ return m_style.position() == PositionType::Relative; > } > > bool Box::isStickyPositioned() const > { >- return m_style.position() == StickyPosition; >+ return m_style.position() == PositionType::Sticky; > } > > bool Box::isAbsolutelyPositioned() const > { >- return m_style.position() == AbsolutePosition; >+ return m_style.position() == PositionType::Absolute; > } > > bool Box::isFixedPositioned() const > { >- return m_style.position() == FixedPosition; >+ return m_style.position() == PositionType::Fixed; > } > > bool Box::isFloatingPositioned() const > { >- return m_style.floating() != NoFloat; >+ return m_style.floating() != Float::No; > } > > const Container* Box::containingBlock() const >@@ -221,7 +221,7 @@ const Box* Box::previousInFlowOrFloating > > bool Box::isOverflowVisible() const > { >- return m_style.overflowX() == OVISIBLE || m_style.overflowY() == OVISIBLE; >+ return m_style.overflowX() == Overflow::Visible || m_style.overflowY() == Overflow::Visible; > } > > } >Index: Source/WebCore/page/DragController.cpp >=================================================================== >--- Source/WebCore/page/DragController.cpp (revision 232008) >+++ Source/WebCore/page/DragController.cpp (working copy) >@@ -761,12 +761,12 @@ Element* DragController::draggableElemen > if (!renderer) > continue; > >- EUserDrag dragMode = renderer->style().userDrag(); >- if ((m_dragSourceAction & DragSourceActionDHTML) && dragMode == DRAG_ELEMENT) { >+ UserDrag dragMode = renderer->style().userDrag(); >+ if ((m_dragSourceAction & DragSourceActionDHTML) && dragMode == UserDrag::Element) { > state.type = static_cast<DragSourceAction>(state.type | DragSourceActionDHTML); > return element; > } >- if (dragMode == DRAG_AUTO) { >+ if (dragMode == UserDrag::Auto) { > if ((m_dragSourceAction & DragSourceActionImage) > && is<HTMLImageElement>(*element) > && imageElementIsDraggable(downcast<HTMLImageElement>(*element), *sourceFrame)) { >Index: Source/WebCore/page/Frame.cpp >=================================================================== >--- Source/WebCore/page/Frame.cpp (revision 232008) >+++ Source/WebCore/page/Frame.cpp (working copy) >@@ -883,7 +883,7 @@ RefPtr<Range> Frame::rangeForPoint(const > > Position deepPosition = position.deepEquivalent(); > Text* containerText = deepPosition.containerText(); >- if (!containerText || !containerText->renderer() || containerText->renderer()->style().userSelect() == SELECT_NONE) >+ if (!containerText || !containerText->renderer() || containerText->renderer()->style().userSelect() == UserSelect::None) > return nullptr; > > VisiblePosition previous = position.previous(); >Index: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 232008) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -143,8 +143,8 @@ static RenderLayer::UpdateLayerPositions > > Pagination::Mode paginationModeForRenderStyle(const RenderStyle& style) > { >- EOverflow overflow = style.overflowY(); >- if (overflow != OPAGEDX && overflow != OPAGEDY) >+ Overflow overflow = style.overflowY(); >+ if (overflow != Overflow::PagedX && overflow != Overflow::PagedY) > return Pagination::Unpaginated; > > bool isHorizontalWritingMode = style.isHorizontalWritingMode(); >@@ -154,7 +154,7 @@ Pagination::Mode paginationModeForRender > // paged-x always corresponds to LeftToRightPaginated or RightToLeftPaginated. If the WritingMode > // is horizontal, then we use TextDirection to choose between those options. If the WritingMode > // is vertical, then the direction of the verticality dictates the choice. >- if (overflow == OPAGEDX) { >+ if (overflow == Overflow::PagedX) { > if ((isHorizontalWritingMode && textDirection == LTR) || writingMode == LeftToRightWritingMode) > return Pagination::LeftToRightPaginated; > return Pagination::RightToLeftPaginated; >@@ -650,29 +650,29 @@ void FrameView::applyOverflowToViewport( > > bool overrideHidden = frame().isMainFrame() && ((frame().frameScaleFactor() > 1) || headerHeight() || footerHeight()); > >- EOverflow overflowX = renderer.style().overflowX(); >- EOverflow overflowY = renderer.style().overflowY(); >+ Overflow overflowX = renderer.style().overflowX(); >+ Overflow overflowY = renderer.style().overflowY(); > > if (is<RenderSVGRoot>(renderer)) { > // FIXME: evaluate if we can allow overflow for these cases too. > // Overflow is always hidden when stand-alone SVG documents are embedded. > if (downcast<RenderSVGRoot>(renderer).isEmbeddedThroughFrameContainingSVGDocument()) { >- overflowX = OHIDDEN; >- overflowY = OHIDDEN; >+ overflowX = Overflow::Hidden; >+ overflowY = Overflow::Hidden; > } > } > > switch (overflowX) { >- case OHIDDEN: >+ case Overflow::Hidden: > if (overrideHidden) > hMode = ScrollbarAuto; > else > hMode = ScrollbarAlwaysOff; > break; >- case OSCROLL: >+ case Overflow::Scroll: > hMode = ScrollbarAlwaysOn; > break; >- case OAUTO: >+ case Overflow::Auto: > hMode = ScrollbarAuto; > break; > default: >@@ -681,20 +681,20 @@ void FrameView::applyOverflowToViewport( > } > > switch (overflowY) { >- case OHIDDEN: >+ case Overflow::Hidden: > if (overrideHidden) > vMode = ScrollbarAuto; > else > vMode = ScrollbarAlwaysOff; > break; >- case OSCROLL: >+ case Overflow::Scroll: > vMode = ScrollbarAlwaysOn; > break; >- case OAUTO: >+ case Overflow::Auto: > vMode = ScrollbarAuto; > break; > default: >- // Don't set it at all. Values of OPAGEDX and OPAGEDY are handled by applyPaginationToViewPort(). >+ // Don't set it at all. Values of Overflow::PagedX and Overflow::PagedY are handled by applyPaginationToViewPort(). > ; > } > } >@@ -713,13 +713,13 @@ void FrameView::applyPaginationToViewpor > > auto* body = document->body(); > if (body && body->renderer()) { >- documentOrBodyRenderer = documentRenderer.style().overflowX() == OVISIBLE && is<HTMLHtmlElement>(*documentElement) ? >+ documentOrBodyRenderer = documentRenderer.style().overflowX() == Overflow::Visible && is<HTMLHtmlElement>(*documentElement) ? > body->renderer() : &documentRenderer; > } > > Pagination pagination; >- EOverflow overflowY = documentOrBodyRenderer->style().overflowY(); >- if (overflowY == OPAGEDX || overflowY == OPAGEDY) { >+ Overflow overflowY = documentOrBodyRenderer->style().overflowY(); >+ if (overflowY == Overflow::PagedX || overflowY == Overflow::PagedY) { > pagination.mode = WebCore::paginationModeForRenderStyle(documentOrBodyRenderer->style()); > GapLength columnGapLength = documentOrBodyRenderer->style().columnGap(); > pagination.gap = 0; >@@ -780,7 +780,7 @@ void FrameView::calculateScrollbarModesF > if (is<HTMLBodyElement>(*bodyOrFrameset) && rootRenderer) { > // It's sufficient to just check the X overflow, > // since it's illegal to have visible in only one direction. >- if (rootRenderer->style().overflowX() == OVISIBLE && is<HTMLHtmlElement>(documentElement)) { >+ if (rootRenderer->style().overflowX() == Overflow::Visible && is<HTMLHtmlElement>(documentElement)) { > auto* bodyRenderer = bodyOrFrameset->renderer(); > if (bodyRenderer) { > applyOverflowToViewport(*bodyRenderer, hMode, vMode); >@@ -2987,9 +2987,9 @@ FrameView::ExtendedBackgroundMode FrameV > return ExtendedBackgroundModeNone; > > ExtendedBackgroundMode mode = ExtendedBackgroundModeNone; >- if (rootBackgroundRenderer->style().backgroundRepeatX() == RepeatFill) >+ if (rootBackgroundRenderer->style().backgroundRepeatX() == FillRepeat::Repeat) > mode |= ExtendedBackgroundModeHorizontal; >- if (rootBackgroundRenderer->style().backgroundRepeatY() == RepeatFill) >+ if (rootBackgroundRenderer->style().backgroundRepeatY() == FillRepeat::Repeat) > mode |= ExtendedBackgroundModeVertical; > > return mode; >@@ -3604,7 +3604,7 @@ float FrameView::adjustScrollStepForFixe > float bottomObscuredArea = 0; > for (const auto& positionedObject : *positionedObjects) { > const RenderStyle& style = positionedObject->style(); >- if (style.position() != FixedPosition || style.visibility() == HIDDEN || !style.opacity()) >+ if (style.position() != PositionType::Fixed || style.visibility() == HIDDEN || !style.opacity()) > continue; > > FloatQuad contentQuad = positionedObject->absoluteContentQuad(); >Index: Source/WebCore/page/SpatialNavigation.cpp >=================================================================== >--- Source/WebCore/page/SpatialNavigation.cpp (revision 232008) >+++ Source/WebCore/page/SpatialNavigation.cpp (working copy) >@@ -454,13 +454,13 @@ bool canScrollInDirection(const Node* co > > switch (direction) { > case FocusDirectionLeft: >- return (container->renderer()->style().overflowX() != OHIDDEN && container->renderBox()->scrollLeft() > 0); >+ return (container->renderer()->style().overflowX() != Overflow::Hidden && container->renderBox()->scrollLeft() > 0); > case FocusDirectionUp: >- return (container->renderer()->style().overflowY() != OHIDDEN && container->renderBox()->scrollTop() > 0); >+ return (container->renderer()->style().overflowY() != Overflow::Hidden && container->renderBox()->scrollTop() > 0); > case FocusDirectionRight: >- return (container->renderer()->style().overflowX() != OHIDDEN && container->renderBox()->scrollLeft() + container->renderBox()->clientWidth() < container->renderBox()->scrollWidth()); >+ return (container->renderer()->style().overflowX() != Overflow::Hidden && container->renderBox()->scrollLeft() + container->renderBox()->clientWidth() < container->renderBox()->scrollWidth()); > case FocusDirectionDown: >- return (container->renderer()->style().overflowY() != OHIDDEN && container->renderBox()->scrollTop() + container->renderBox()->clientHeight() < container->renderBox()->scrollHeight()); >+ return (container->renderer()->style().overflowY() != Overflow::Hidden && container->renderBox()->scrollTop() + container->renderBox()->clientHeight() < container->renderBox()->scrollHeight()); > default: > ASSERT_NOT_REACHED(); > return false; >@@ -707,8 +707,8 @@ bool canBeScrolledIntoView(FocusDirectio > for (Node* parentNode = candidate.visibleNode->parentNode(); parentNode; parentNode = parentNode->parentNode()) { > LayoutRect parentRect = nodeRectInAbsoluteCoordinates(parentNode); > if (!candidateRect.intersects(parentRect)) { >- if (((direction == FocusDirectionLeft || direction == FocusDirectionRight) && parentNode->renderer()->style().overflowX() == OHIDDEN) >- || ((direction == FocusDirectionUp || direction == FocusDirectionDown) && parentNode->renderer()->style().overflowY() == OHIDDEN)) >+ if (((direction == FocusDirectionLeft || direction == FocusDirectionRight) && parentNode->renderer()->style().overflowX() == Overflow::Hidden) >+ || ((direction == FocusDirectionUp || direction == FocusDirectionDown) && parentNode->renderer()->style().overflowY() == Overflow::Hidden)) > return false; > } > if (parentNode == candidate.enclosingScrollableBox) >Index: Source/WebCore/page/ios/FrameIOS.mm >=================================================================== >--- Source/WebCore/page/ios/FrameIOS.mm (revision 232008) >+++ Source/WebCore/page/ios/FrameIOS.mm (working copy) >@@ -468,8 +468,8 @@ Node* Frame::nodeRespondingToScrollWheel > auto& style = renderer->style(); > > if (renderer->hasOverflowClip() >- && (style.overflowY() == OAUTO || style.overflowY() == OSCROLL || style.overflowY() == OOVERLAY >- || style.overflowX() == OAUTO || style.overflowX() == OSCROLL || style.overflowX() == OOVERLAY)) { >+ && (style.overflowY() == Overflow::Auto || style.overflowY() == Overflow::Scroll || style.overflowY() == Overflow::Overlay >+ || style.overflowX() == Overflow::Auto || style.overflowX() == Overflow::Scroll || style.overflowX() == Overflow::Overlay)) { > scrollingAncestor = node; > } > } >Index: Source/WebCore/page/mac/EventHandlerMac.mm >=================================================================== >--- Source/WebCore/page/mac/EventHandlerMac.mm (revision 232008) >+++ Source/WebCore/page/mac/EventHandlerMac.mm (working copy) >@@ -821,7 +821,7 @@ static bool scrolledToEdgeInDominantDire > const RenderStyle& style = container.renderer()->style(); > > if (!deltaIsPredominantlyVertical(deltaX, deltaY) && deltaX) { >- if (style.overflowX() == OHIDDEN) >+ if (style.overflowX() == Overflow::Hidden) > return true; > > if (deltaX < 0) >@@ -830,7 +830,7 @@ static bool scrolledToEdgeInDominantDire > return area.scrolledToLeft(); > } > >- if (style.overflowY() == OHIDDEN) >+ if (style.overflowY() == Overflow::Hidden) > return true; > > if (deltaY < 0) >Index: Source/WebCore/rendering/BorderEdge.cpp >=================================================================== >--- Source/WebCore/rendering/BorderEdge.cpp (revision 232008) >+++ Source/WebCore/rendering/BorderEdge.cpp (working copy) >@@ -33,7 +33,7 @@ > > namespace WebCore { > >-BorderEdge::BorderEdge(float edgeWidth, Color edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio) >+BorderEdge::BorderEdge(float edgeWidth, Color edgeColor, BorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio) > : m_width(edgeWidth) > , m_color(edgeColor) > , m_style(edgeStyle) >@@ -41,8 +41,8 @@ BorderEdge::BorderEdge(float edgeWidth, > , m_isPresent(edgeIsPresent) > , m_devicePixelRatio(devicePixelRatio) > { >- if (edgeStyle == DOUBLE && edgeWidth < borderWidthInDevicePixel(3)) >- m_style = SOLID; >+ if (edgeStyle == BorderStyle::Double && edgeWidth < borderWidthInDevicePixel(3)) >+ m_style = BorderStyle::Solid; > m_flooredToDevicePixelWidth = floorf(edgeWidth * devicePixelRatio) / devicePixelRatio; > } > >@@ -62,13 +62,13 @@ void BorderEdge::getBorderEdgeInfo(Borde > > bool BorderEdge::obscuresBackgroundEdge(float scale) const > { >- if (!m_isPresent || m_isTransparent || (m_width * scale) < borderWidthInDevicePixel(2) || !m_color.isOpaque() || m_style == BHIDDEN) >+ if (!m_isPresent || m_isTransparent || (m_width * scale) < borderWidthInDevicePixel(2) || !m_color.isOpaque() || m_style == BorderStyle::Hidden) > return false; > >- if (m_style == DOTTED || m_style == DASHED) >+ if (m_style == BorderStyle::Dotted || m_style == BorderStyle::Dashed) > return false; > >- if (m_style == DOUBLE) >+ if (m_style == BorderStyle::Double) > return m_width >= scale * borderWidthInDevicePixel(5); // The outer band needs to be >= 2px wide at unit scale. > > return true; >@@ -76,10 +76,10 @@ bool BorderEdge::obscuresBackgroundEdge( > > bool BorderEdge::obscuresBackground() const > { >- if (!m_isPresent || m_isTransparent || !m_color.isOpaque() || m_style == BHIDDEN) >+ if (!m_isPresent || m_isTransparent || !m_color.isOpaque() || m_style == BorderStyle::Hidden) > return false; > >- if (m_style == DOTTED || m_style == DASHED || m_style == DOUBLE) >+ if (m_style == BorderStyle::Dotted || m_style == BorderStyle::Dashed || m_style == BorderStyle::Double) > return false; > > return true; >Index: Source/WebCore/rendering/BorderEdge.h >=================================================================== >--- Source/WebCore/rendering/BorderEdge.h (revision 232008) >+++ Source/WebCore/rendering/BorderEdge.h (working copy) >@@ -47,16 +47,16 @@ public: > }; > > BorderEdge() = default; >- BorderEdge(float edgeWidth, Color edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio); >+ BorderEdge(float edgeWidth, Color edgeColor, BorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent, float devicePixelRatio); > > static void getBorderEdgeInfo(BorderEdge edges[], const RenderStyle&, float deviceScaleFactor, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true); > >- EBorderStyle style() const { return m_style; } >+ BorderStyle style() const { return m_style; } > const Color& color() const { return m_color; } > bool isTransparent() const { return m_isTransparent; } > bool isPresent() const { return m_isPresent; } > >- inline bool hasVisibleColorAndStyle() const { return m_style > BHIDDEN && !m_isTransparent; } >+ inline bool hasVisibleColorAndStyle() const { return m_style > BorderStyle::Hidden && !m_isTransparent; } > inline bool shouldRender() const { return m_isPresent && widthForPainting() && hasVisibleColorAndStyle(); } > inline bool presentButInvisible() const { return widthForPainting() && !hasVisibleColorAndStyle(); } > inline float widthForPainting() const { return m_isPresent ? m_flooredToDevicePixelWidth : 0; } >@@ -69,7 +69,7 @@ private: > > LayoutUnit m_width; > Color m_color; >- EBorderStyle m_style { BHIDDEN }; >+ BorderStyle m_style { BorderStyle::Hidden }; > bool m_isTransparent { false }; > bool m_isPresent { false }; > float m_flooredToDevicePixelWidth { 0 }; >Index: Source/WebCore/rendering/FlexibleBoxAlgorithm.h >=================================================================== >--- Source/WebCore/rendering/FlexibleBoxAlgorithm.h (revision 232008) >+++ Source/WebCore/rendering/FlexibleBoxAlgorithm.h (working copy) >@@ -78,7 +78,7 @@ public: > bool computeNextFlexLine(size_t& nextIndex, Vector<FlexItem>& lineItems, LayoutUnit& sumFlexBaseSize, double& totalFlexGrow, double& totalFlexShrink, double& totalWeightedFlexShrink, LayoutUnit& sumHypotheticalMainSize); > > private: >- bool isMultiline() const { return m_style.flexWrap() != FlexNoWrap; } >+ bool isMultiline() const { return m_style.flexWrap() != FlexWrap::NoWrap; } > > const RenderStyle& m_style; > LayoutUnit m_lineBreakLength; >Index: Source/WebCore/rendering/FloatingObjects.cpp >=================================================================== >--- Source/WebCore/rendering/FloatingObjects.cpp (revision 232008) >+++ Source/WebCore/rendering/FloatingObjects.cpp (working copy) >@@ -51,11 +51,11 @@ FloatingObject::FloatingObject(RenderBox > , m_isInPlacedTree(false) > #endif > { >- EFloat type = renderer.style().floating(); >- ASSERT(type != NoFloat); >- if (type == LeftFloat) >+ Float type = renderer.style().floating(); >+ ASSERT(type != Float::No); >+ if (type == Float::Left) > m_type = FloatLeft; >- else if (type == RightFloat) >+ else if (type == Float::Right) > m_type = FloatRight; > } > >Index: Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp >=================================================================== >--- Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (revision 232008) >+++ Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (working copy) >@@ -745,7 +745,7 @@ LayoutUnit GridTrackSizingAlgorithmStrat > const Length& childMinSize = isRowAxis ? child.style().logicalMinWidth() : child.style().logicalMinHeight(); > const Length& childSize = isRowAxis ? child.style().logicalWidth() : child.style().logicalHeight(); > >- bool overflowIsVisible = isRowAxis ? child.style().overflowInlineDirection() == OVISIBLE : child.style().overflowBlockDirection() == OVISIBLE; >+ bool overflowIsVisible = isRowAxis ? child.style().overflowInlineDirection() == Overflow::Visible : child.style().overflowBlockDirection() == Overflow::Visible; > if (childSize.isAuto() && childMinSize.isAuto() && overflowIsVisible) { > auto minSize = minContentForChild(child); > LayoutUnit maxBreadth; >@@ -1070,7 +1070,7 @@ void GridTrackSizingAlgorithm::stretchAu > { > auto currentFreeSpace = m_strategy->freeSpaceForStretchAutoTracksStep(); > if (m_autoSizedTracksForStretchIndex.isEmpty() || currentFreeSpace <= 0 >- || (m_renderGrid->contentAlignment(m_direction).distribution() != ContentDistributionStretch)) >+ || (m_renderGrid->contentAlignment(m_direction).distribution() != ContentDistribution::Stretch)) > return; > > Vector<GridTrack>& allTracks = tracks(m_direction); >Index: Source/WebCore/rendering/HitTestResult.cpp >=================================================================== >--- Source/WebCore/rendering/HitTestResult.cpp (revision 232008) >+++ Source/WebCore/rendering/HitTestResult.cpp (working copy) >@@ -277,7 +277,7 @@ String HitTestResult::innerTextIfTruncat > if (auto renderer = downcast<Element>(*truncatedNode).renderer()) { > if (is<RenderBlockFlow>(*renderer)) { > RenderBlockFlow& block = downcast<RenderBlockFlow>(*renderer); >- if (block.style().textOverflow()) { >+ if (block.style().textOverflow() == TextOverflow::Ellipsis) { > for (RootInlineBox* line = block.firstRootBox(); line; line = line->nextRootBox()) { > if (line->hasEllipsisBox()) { > dir = block.style().direction(); >Index: Source/WebCore/rendering/ImageQualityController.cpp >=================================================================== >--- Source/WebCore/rendering/ImageQualityController.cpp (revision 232008) >+++ Source/WebCore/rendering/ImageQualityController.cpp (working copy) >@@ -100,14 +100,14 @@ void ImageQualityController::restartTime > std::optional<InterpolationQuality> ImageQualityController::interpolationQualityFromStyle(const RenderStyle& style) > { > switch (style.imageRendering()) { >- case ImageRenderingOptimizeSpeed: >+ case ImageRendering::OptimizeSpeed: > return InterpolationLow; >- case ImageRenderingCrispEdges: >- case ImageRenderingPixelated: >+ case ImageRendering::CrispEdges: >+ case ImageRendering::Pixelated: > return InterpolationNone; >- case ImageRenderingOptimizeQuality: >+ case ImageRendering::OptimizeQuality: > return InterpolationDefault; // FIXME: CSS 3 Images says that optimizeQuality should behave like 'auto', but that prevents authors from overriding this low quality rendering behavior. >- case ImageRenderingAuto: >+ case ImageRendering::Auto: > break; > } > return std::nullopt; >Index: Source/WebCore/rendering/InlineBox.h >=================================================================== >--- Source/WebCore/rendering/InlineBox.h (revision 232008) >+++ Source/WebCore/rendering/InlineBox.h (working copy) >@@ -245,7 +245,7 @@ public: > > const RenderStyle& lineStyle() const { return m_bitfields.firstLine() ? renderer().firstLineStyle() : renderer().style(); } > >- EVerticalAlign verticalAlign() const { return lineStyle().verticalAlign(); } >+ VerticalAlign verticalAlign() const { return lineStyle().verticalAlign(); } > > // Use with caution! The type is not checked! > RenderBoxModelObject* boxModelObject() const >Index: Source/WebCore/rendering/InlineFlowBox.cpp >=================================================================== >--- Source/WebCore/rendering/InlineFlowBox.cpp (revision 232008) >+++ Source/WebCore/rendering/InlineFlowBox.cpp (working copy) >@@ -126,7 +126,7 @@ void InlineFlowBox::addToLine(InlineBox* > if (child->renderer().isLineBreak() || child->renderer().parent() != &renderer()) { > if (!parentStyle.fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics()) > || parentStyle.lineHeight() != childStyle.lineHeight() >- || (parentStyle.verticalAlign() != BASELINE && !isRootInlineBox()) || childStyle.verticalAlign() != BASELINE) >+ || (parentStyle.verticalAlign() != VerticalAlign::Baseline && !isRootInlineBox()) || childStyle.verticalAlign() != VerticalAlign::Baseline) > shouldClearDescendantsHaveSameLineHeightAndBaseline = true; > } > if (childStyle.hasTextCombine() || childStyle.textEmphasisMark() != TextEmphasisMarkNone) >@@ -142,7 +142,7 @@ void InlineFlowBox::addToLine(InlineBox* > if (!childFlowBox.descendantsHaveSameLineHeightAndBaseline() > || !parentStyle.fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics()) > || parentStyle.lineHeight() != childStyle.lineHeight() >- || (parentStyle.verticalAlign() != BASELINE && !isRootInlineBox()) || childStyle.verticalAlign() != BASELINE >+ || (parentStyle.verticalAlign() != VerticalAlign::Baseline && !isRootInlineBox()) || childStyle.verticalAlign() != VerticalAlign::Baseline > || childStyle.hasBorder() || childStyle.hasPadding() || childStyle.hasTextCombine()) > shouldClearDescendantsHaveSameLineHeightAndBaseline = true; > } >@@ -313,7 +313,7 @@ void InlineFlowBox::determineSpacingForF > const auto& lineBoxList = inlineFlow.lineBoxes(); > if (!lineBoxList.firstLineBox()->isConstructed() && !inlineFlow.isContinuation()) { > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- if (renderer().style().boxDecorationBreak() == DCLONE) >+ if (renderer().style().boxDecorationBreak() == BoxDecorationBreak::Clone) > includeLeftEdge = includeRightEdge = true; > else > #endif >@@ -332,7 +332,7 @@ void InlineFlowBox::determineSpacingForF > // (3) The logicallyLastRun is a descendant of this renderer, but it is the last child of this renderer and it does not wrap to the next line. > #if ENABLE(CSS_BOX_DECORATION_BREAK) > // (4) The decoration break is set to clone therefore there will be borders on every sides. >- if (renderer().style().boxDecorationBreak() == DCLONE) >+ if (renderer().style().boxDecorationBreak() == BoxDecorationBreak::Clone) > includeLeftEdge = includeRightEdge = true; > else > #endif >@@ -492,9 +492,9 @@ void InlineFlowBox::adjustMaxAscentAndDe > if (child->renderer().isOutOfFlowPositioned()) > continue; // Positioned placeholders don't affect calculations. > >- if ((child->verticalAlign() == TOP || child->verticalAlign() == BOTTOM) && verticalAlignApplies(child->renderer())) { >+ if ((child->verticalAlign() == VerticalAlign::Top || child->verticalAlign() == VerticalAlign::Bottom) && verticalAlignApplies(child->renderer())) { > int lineHeight = child->lineHeight(); >- if (child->verticalAlign() == TOP) { >+ if (child->verticalAlign() == VerticalAlign::Top) { > if (maxAscent + maxDescent < lineHeight) > maxDescent = lineHeight - maxAscent; > } >@@ -575,10 +575,10 @@ void InlineFlowBox::computeLogicalBoxHei > rootBox.ascentAndDescentForBox(*child, textBoxDataMap, ascent, descent, affectsAscent, affectsDescent); > > LayoutUnit boxHeight = ascent + descent; >- if (child->verticalAlign() == TOP && verticalAlignApplies(child->renderer())) { >+ if (child->verticalAlign() == VerticalAlign::Top && verticalAlignApplies(child->renderer())) { > if (maxPositionTop < boxHeight) > maxPositionTop = boxHeight; >- } else if (child->verticalAlign() == BOTTOM && verticalAlignApplies(child->renderer())) { >+ } else if (child->verticalAlign() == VerticalAlign::Bottom && verticalAlignApplies(child->renderer())) { > if (maxPositionBottom < boxHeight) > maxPositionBottom = boxHeight; > } else if (!inlineFlowBox || strictMode || inlineFlowBox->hasTextChildren() || (inlineFlowBox->descendantsHaveSameLineHeightAndBaseline() && inlineFlowBox->hasTextDescendants()) >@@ -639,9 +639,9 @@ void InlineFlowBox::placeBoxesInBlockDir > InlineFlowBox* inlineFlowBox = is<InlineFlowBox>(*child) ? downcast<InlineFlowBox>(child) : nullptr; > bool childAffectsTopBottomPos = true; > >- if (child->verticalAlign() == TOP && verticalAlignApplies(child->renderer())) >+ if (child->verticalAlign() == VerticalAlign::Top && verticalAlignApplies(child->renderer())) > child->setLogicalTop(top); >- else if (child->verticalAlign() == BOTTOM && verticalAlignApplies(child->renderer())) >+ else if (child->verticalAlign() == VerticalAlign::Bottom && verticalAlignApplies(child->renderer())) > child->setLogicalTop(top + maxHeight - child->lineHeight()); > else { > if (!strictMode && inlineFlowBox && !inlineFlowBox->hasTextChildren() && !inlineFlowBox->renderer().hasInlineDirectionBordersOrPadding() >@@ -1236,7 +1236,7 @@ void InlineFlowBox::paintFillLayer(const > if ((!hasFillImage && !renderer().style().hasBorderRadius()) || (!prevLineBox() && !nextLineBox()) || !parent()) > renderer().paintFillLayerExtended(paintInfo, color, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- else if (renderer().style().boxDecorationBreak() == DCLONE) { >+ else if (renderer().style().boxDecorationBreak() == BoxDecorationBreak::Clone) { > GraphicsContextStateSaver stateSaver(paintInfo.context()); > paintInfo.context().clip(LayoutRect(rect.x(), rect.y(), width(), height())); > renderer().paintFillLayerExtended(paintInfo, color, fillLayer, rect, BackgroundBleedNone, this, rect.size(), op); >Index: Source/WebCore/rendering/LogicalSelectionOffsetCaches.h >=================================================================== >--- Source/WebCore/rendering/LogicalSelectionOffsetCaches.h (revision 232008) >+++ Source/WebCore/rendering/LogicalSelectionOffsetCaches.h (working copy) >@@ -109,12 +109,12 @@ public: > > const ContainingBlockInfo& containingBlockInfo(RenderBlock& block) const > { >- EPosition position = block.style().position(); >- if (position == FixedPosition) { >+ auto position = block.style().position(); >+ if (position == PositionType::Fixed) { > ASSERT(block.containingBlock() == m_containingBlockForFixedPosition.block()); > return m_containingBlockForFixedPosition; > } >- if (position == AbsolutePosition) { >+ if (position == PositionType::Absolute) { > ASSERT(block.containingBlock() == m_containingBlockForAbsolutePosition.block()); > return m_containingBlockForAbsolutePosition; > } >Index: Source/WebCore/rendering/RenderBlock.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlock.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderBlock.cpp (working copy) >@@ -385,20 +385,20 @@ void RenderBlock::removePositionedObject > } > > // We are no longer the containing block for absolute positioned descendants. >- if (newStyle.position() == StaticPosition && !willHaveTransform) { >+ if (newStyle.position() == PositionType::Static && !willHaveTransform) { > // Our positioned descendants will be inserted into a new containing block's positioned objects list during the next layout. > removePositionedObjects(nullptr, NewContainingBlock); > return; > } > > // We are a new containing block. >- if (oldStyle.position() == StaticPosition && !hadTransform) { >+ if (oldStyle.position() == PositionType::Static && !hadTransform) { > // Remove our absolutely positioned descendants from their current containing block. > // They will be inserted into our positioned objects list during layout. > auto* containingBlock = parent(); > while (containingBlock && !is<RenderView>(*containingBlock) >- && (containingBlock->style().position() == StaticPosition || (containingBlock->isInline() && !containingBlock->isReplaced()))) { >- if (containingBlock->style().position() == RelativePosition && containingBlock->isInline() && !containingBlock->isReplaced()) { >+ && (containingBlock->style().position() == PositionType::Static || (containingBlock->isInline() && !containingBlock->isReplaced()))) { >+ if (containingBlock->style().position() == PositionType::Relative && containingBlock->isInline() && !containingBlock->isReplaced()) { > containingBlock = containingBlock->containingBlock(); > break; > } >@@ -445,7 +445,7 @@ void RenderBlock::styleDidChange(StyleDi > > // It's possible for our border/padding to change, but for the overall logical width of the block to > // end up being the same. We keep track of this change so in layoutBlock, we can know to set relayoutChildren=true. >- setShouldForceRelayoutChildren(oldStyle && diff == StyleDifferenceLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(*oldStyle, style())); >+ setShouldForceRelayoutChildren(oldStyle && diff == StyleDifference::Layout && needsLayout() && borderOrPaddingLogicalWidthChanged(*oldStyle, style())); > } > > RenderPtr<RenderBlock> RenderBlock::clone() const >@@ -498,7 +498,7 @@ bool RenderBlock::isSelfCollapsingBlock( > if (logicalHeight() > 0 > || isTable() || borderAndPaddingLogicalHeight() > || style().logicalMinHeight().isPositive() >- || style().marginBeforeCollapse() == MSEPARATE || style().marginAfterCollapse() == MSEPARATE) >+ || style().marginBeforeCollapse() == MarginCollapse::Separate || style().marginAfterCollapse() == MarginCollapse::Separate) > return false; > > Length logicalHeightLength = style().logicalHeight(); >@@ -728,7 +728,7 @@ void RenderBlock::addOverflowFromPositio > RenderBox* positionedObject = *it; > > // Fixed positioned elements don't contribute to layout overflow, since they don't scroll with the content. >- if (positionedObject->style().position() != FixedPosition) >+ if (positionedObject->style().position() != PositionType::Fixed) > addOverflowFromChild(positionedObject, { positionedObject->x(), positionedObject->y() }); > } > } >@@ -935,7 +935,7 @@ bool RenderBlock::simplifiedLayout() > > void RenderBlock::markFixedPositionObjectForLayoutIfNeeded(RenderBox& positionedChild) > { >- if (positionedChild.style().position() != FixedPosition) >+ if (positionedChild.style().position() != PositionType::Fixed) > return; > > bool hasStaticBlockPosition = positionedChild.style().hasStaticBlockPosition(isHorizontalWritingMode()); >@@ -944,9 +944,9 @@ void RenderBlock::markFixedPositionObjec > return; > > auto* parent = positionedChild.parent(); >- while (parent && !is<RenderView>(*parent) && parent->style().position() != AbsolutePosition) >+ while (parent && !is<RenderView>(*parent) && parent->style().position() != PositionType::Absolute) > parent = parent->parent(); >- if (!parent || parent->style().position() != AbsolutePosition) >+ if (!parent || parent->style().position() != PositionType::Absolute) > return; > > if (hasStaticInlinePosition) { >@@ -1390,7 +1390,7 @@ bool RenderBlock::isSelectionRoot() cons > || isPositioned() || isFloating() > || isTableCell() || isInlineBlockOrInlineTable() > || hasTransform() || hasReflection() || hasMask() || isWritingModeRoot() >- || isRenderFragmentedFlow() || style().columnSpan() == ColumnSpanAll) >+ || isRenderFragmentedFlow() || style().columnSpan() == ColumnSpan::All) > return true; > > if (view().selection().start()) { >@@ -1509,7 +1509,7 @@ GapRects RenderBlock::selectionGaps(Rend > if (!isRenderBlockFlow()) // FIXME: Make multi-column selection gap filling work someday. > return result; > >- if (hasTransform() || style().columnSpan() == ColumnSpanAll || isInFlowRenderFragmentedFlow()) { >+ if (hasTransform() || style().columnSpan() == ColumnSpan::All || isInFlowRenderFragmentedFlow()) { > // FIXME: We should learn how to gap fill multiple columns and transforms eventually. > lastLogicalTop = blockDirectionOffset(rootBlock, offsetFromRootBlock) + logicalHeight(); > lastLogicalLeft = logicalLeftSelectionOffset(rootBlock, logicalHeight(), cache); >@@ -2284,11 +2284,11 @@ void RenderBlock::computeBlockPreferredL > const RenderStyle& childStyle = child->style(); > if (child->isFloating() || (is<RenderBox>(*child) && downcast<RenderBox>(*child).avoidsFloats())) { > LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth; >- if (childStyle.clear() & CLEFT) { >+ if (childStyle.clear() == Clear::Left || childStyle.clear() == Clear::Both) { > maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); > floatLeftWidth = 0; > } >- if (childStyle.clear() & CRIGHT) { >+ if (childStyle.clear() == Clear::Right || childStyle.clear() == Clear::Both) { > maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth); > floatRightWidth = 0; > } >@@ -2339,7 +2339,7 @@ void RenderBlock::computeBlockPreferredL > } > > if (child->isFloating()) { >- if (childStyle.floating() == LeftFloat) >+ if (childStyle.floating() == Float::Left) > floatLeftWidth += w; > else > floatRightWidth += w; >@@ -3434,7 +3434,7 @@ LayoutUnit RenderBlock::adjustBorderBoxL > // Shouldn't height:100px mean the fieldset content gets 100px of height even if the > // resulting fieldset becomes much taller because of the legend? > LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight(); >- if (style().boxSizing() == CONTENT_BOX) >+ if (style().boxSizing() == BoxSizing::ContentBox) > return height + bordersPlusPadding - intrinsicBorderForFieldset(); > return std::max(height, bordersPlusPadding); > } >@@ -3447,7 +3447,7 @@ LayoutUnit RenderBlock::adjustContentBox > if (!height) > return 0; > LayoutUnit result = height.value(); >- if (style().boxSizing() == BORDER_BOX) >+ if (style().boxSizing() == BoxSizing::BorderBox) > result -= borderAndPaddingLogicalHeight(); > else > result -= intrinsicBorderForFieldset(); >Index: Source/WebCore/rendering/RenderBlockFlow.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlockFlow.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderBlockFlow.cpp (working copy) >@@ -86,14 +86,14 @@ RenderBlockFlow::MarginInfo::MarginInfo( > ASSERT(block.isRenderView() || block.parent()); > m_canCollapseWithChildren = !block.createsNewFormattingContext() && !block.isRenderView(); > >- m_canCollapseMarginBeforeWithChildren = m_canCollapseWithChildren && !beforeBorderPadding && blockStyle.marginBeforeCollapse() != MSEPARATE; >+ m_canCollapseMarginBeforeWithChildren = m_canCollapseWithChildren && !beforeBorderPadding && blockStyle.marginBeforeCollapse() != MarginCollapse::Separate; > > // If any height other than auto is specified in CSS, then we don't collapse our bottom > // margins with our children's margins. To do otherwise would be to risk odd visual > // effects when the children overflow out of the parent block and yet still collapse > // with it. We also don't collapse if we have any bottom border/padding. > m_canCollapseMarginAfterWithChildren = m_canCollapseWithChildren && !afterBorderPadding >- && (blockStyle.logicalHeight().isAuto() && !blockStyle.logicalHeight().value()) && blockStyle.marginAfterCollapse() != MSEPARATE; >+ && (blockStyle.logicalHeight().isAuto() && !blockStyle.logicalHeight().value()) && blockStyle.marginAfterCollapse() != MarginCollapse::Separate; > > m_quirkContainer = block.isTableCell() || block.isBody(); > >@@ -422,7 +422,7 @@ bool RenderBlockFlow::willCreateColumns( > return false; > > // If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating in the RenderView instead. >- if ((style().overflowY() == OPAGEDX || style().overflowY() == OPAGEDY) && !(isDocumentElementRenderer() || isBody())) >+ if ((style().overflowY() == Overflow::PagedX || style().overflowY() == Overflow::PagedY) && !(isDocumentElementRenderer() || isBody())) > return true; > > // Lines clamping creates columns. >@@ -846,7 +846,7 @@ LayoutUnit RenderBlockFlow::marginOffset > { > ASSERT(isSelfCollapsingBlock()); > RenderBlockFlow* parentBlock = downcast<RenderBlockFlow>(parent()); >- if (parentBlock && style().clear() && parentBlock->getClearDelta(*this, logicalHeight())) >+ if (parentBlock && style().clear() != Clear::None && parentBlock->getClearDelta(*this, logicalHeight())) > return marginValuesForChild(*this).positiveMarginBefore(); > return LayoutUnit(); > } >@@ -1198,7 +1198,7 @@ LayoutUnit RenderBlockFlow::clearFloatsI > marginInfo.setAtBeforeSideOfBlock(false); > > // In case the child discarded the before margin of the block we need to reset the mustDiscardMarginBefore flag to the initial value. >- setMustDiscardMarginBefore(style().marginBeforeCollapse() == MDISCARD); >+ setMustDiscardMarginBefore(style().marginBeforeCollapse() == MarginCollapse::Discard); > } > > return yPos + heightIncrease; >@@ -1209,12 +1209,12 @@ void RenderBlockFlow::marginBeforeEstima > // Give up if in quirks mode and we're a body/table cell and the top margin of the child box is quirky. > // Give up if the child specified -webkit-margin-collapse: separate that prevents collapsing. > // FIXME: Use writing mode independent accessor for marginBeforeCollapse. >- if ((document().inQuirksMode() && hasMarginAfterQuirk(child) && (isTableCell() || isBody())) || child.style().marginBeforeCollapse() == MSEPARATE) >+ if ((document().inQuirksMode() && hasMarginAfterQuirk(child) && (isTableCell() || isBody())) || child.style().marginBeforeCollapse() == MarginCollapse::Separate) > return; > > // The margins are discarded by a child that specified -webkit-margin-collapse: discard. > // FIXME: Use writing mode independent accessor for marginBeforeCollapse. >- if (child.style().marginBeforeCollapse() == MDISCARD) { >+ if (child.style().marginBeforeCollapse() == MarginCollapse::Discard) { > positiveMarginBefore = 0; > negativeMarginBefore = 0; > discardMarginBefore = true; >@@ -1243,7 +1243,7 @@ void RenderBlockFlow::marginBeforeEstima > } > > // Give up if there is clearance on the box, since it probably won't collapse into us. >- if (!grandchildBox || grandchildBox->style().clear() != CNONE) >+ if (!grandchildBox || grandchildBox->style().clear() != Clear::None) > return; > > // Make sure to update the block margins now for the grandchild box so that we're looking at current values. >@@ -1389,7 +1389,7 @@ void RenderBlockFlow::setMaxMarginAfterV > > void RenderBlockFlow::setMustDiscardMarginBefore(bool value) > { >- if (style().marginBeforeCollapse() == MDISCARD) { >+ if (style().marginBeforeCollapse() == MarginCollapse::Discard) { > ASSERT(value); > return; > } >@@ -1405,7 +1405,7 @@ void RenderBlockFlow::setMustDiscardMarg > > void RenderBlockFlow::setMustDiscardMarginAfter(bool value) > { >- if (style().marginAfterCollapse() == MDISCARD) { >+ if (style().marginAfterCollapse() == MarginCollapse::Discard) { > ASSERT(value); > return; > } >@@ -1421,21 +1421,21 @@ void RenderBlockFlow::setMustDiscardMarg > > bool RenderBlockFlow::mustDiscardMarginBefore() const > { >- return style().marginBeforeCollapse() == MDISCARD || (hasRareBlockFlowData() && rareBlockFlowData()->m_discardMarginBefore); >+ return style().marginBeforeCollapse() == MarginCollapse::Discard || (hasRareBlockFlowData() && rareBlockFlowData()->m_discardMarginBefore); > } > > bool RenderBlockFlow::mustDiscardMarginAfter() const > { >- return style().marginAfterCollapse() == MDISCARD || (hasRareBlockFlowData() && rareBlockFlowData()->m_discardMarginAfter); >+ return style().marginAfterCollapse() == MarginCollapse::Discard || (hasRareBlockFlowData() && rareBlockFlowData()->m_discardMarginAfter); > } > > bool RenderBlockFlow::mustDiscardMarginBeforeForChild(const RenderBox& child) const > { > ASSERT(!child.selfNeedsLayout()); > if (!child.isWritingModeRoot()) >- return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginBefore() : (child.style().marginBeforeCollapse() == MDISCARD); >+ return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginBefore() : (child.style().marginBeforeCollapse() == MarginCollapse::Discard); > if (child.isHorizontalWritingMode() == isHorizontalWritingMode()) >- return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginAfter() : (child.style().marginAfterCollapse() == MDISCARD); >+ return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginAfter() : (child.style().marginAfterCollapse() == MarginCollapse::Discard); > > // FIXME: We return false here because the implementation is not geometrically complete. We have values only for before/after, not start/end. > // In case the boxes are perpendicular we assume the property is not specified. >@@ -1446,9 +1446,9 @@ bool RenderBlockFlow::mustDiscardMarginA > { > ASSERT(!child.selfNeedsLayout()); > if (!child.isWritingModeRoot()) >- return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginAfter() : (child.style().marginAfterCollapse() == MDISCARD); >+ return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginAfter() : (child.style().marginAfterCollapse() == MarginCollapse::Discard); > if (child.isHorizontalWritingMode() == isHorizontalWritingMode()) >- return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginBefore() : (child.style().marginBeforeCollapse() == MDISCARD); >+ return is<RenderBlockFlow>(child) ? downcast<RenderBlockFlow>(child).mustDiscardMarginBefore() : (child.style().marginBeforeCollapse() == MarginCollapse::Discard); > > // FIXME: See |mustDiscardMarginBeforeForChild| above. > return false; >@@ -1459,9 +1459,9 @@ bool RenderBlockFlow::mustSeparateMargin > ASSERT(!child.selfNeedsLayout()); > const RenderStyle& childStyle = child.style(); > if (!child.isWritingModeRoot()) >- return childStyle.marginBeforeCollapse() == MSEPARATE; >+ return childStyle.marginBeforeCollapse() == MarginCollapse::Separate; > if (child.isHorizontalWritingMode() == isHorizontalWritingMode()) >- return childStyle.marginAfterCollapse() == MSEPARATE; >+ return childStyle.marginAfterCollapse() == MarginCollapse::Separate; > > // FIXME: See |mustDiscardMarginBeforeForChild| above. > return false; >@@ -1472,9 +1472,9 @@ bool RenderBlockFlow::mustSeparateMargin > ASSERT(!child.selfNeedsLayout()); > const RenderStyle& childStyle = child.style(); > if (!child.isWritingModeRoot()) >- return childStyle.marginAfterCollapse() == MSEPARATE; >+ return childStyle.marginAfterCollapse() == MarginCollapse::Separate; > if (child.isHorizontalWritingMode() == isHorizontalWritingMode()) >- return childStyle.marginBeforeCollapse() == MSEPARATE; >+ return childStyle.marginBeforeCollapse() == MarginCollapse::Separate; > > // FIXME: See |mustDiscardMarginBeforeForChild| above. > return false; >@@ -2000,7 +2000,7 @@ void RenderBlockFlow::styleDidChange(Sty > // then mark its descendants with floats for layout and clear all floats from its next > // sibling blocks that exist in our floating objects list. See bug 56299 and 62875. > bool canPropagateFloatIntoSibling = !isFloatingOrOutOfFlowPositioned() && !avoidsFloats(); >- if (diff == StyleDifferenceLayout && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) { >+ if (diff == StyleDifference::Layout && s_canPropagateFloatIntoSibling && !canPropagateFloatIntoSibling && hasOverhangingFloats()) { > RenderBlockFlow* parentBlock = this; > const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); > >@@ -2022,7 +2022,7 @@ void RenderBlockFlow::styleDidChange(Sty > parentBlock->markSiblingsWithFloatsForLayout(); > } > >- if (diff >= StyleDifferenceRepaint) { >+ if (diff >= StyleDifference::Repaint) { > // FIXME: This could use a cheaper style-only test instead of SimpleLineLayout::canUseFor. > if (selfNeedsLayout() || !m_simpleLineLayout || !SimpleLineLayout::canUseFor(*this)) > invalidateLineLayoutPath(); >@@ -2044,10 +2044,10 @@ void RenderBlockFlow::styleWillChange(St > s_canPropagateFloatIntoSibling = oldStyle ? !isFloatingOrOutOfFlowPositioned() && !avoidsFloats() : false; > > if (oldStyle) { >- EPosition oldPosition = oldStyle->position(); >- EPosition newPosition = newStyle.position(); >+ auto oldPosition = oldStyle->position(); >+ auto newPosition = newStyle.position(); > >- if (parent() && diff == StyleDifferenceLayout && oldPosition != newPosition) { >+ if (parent() && diff == StyleDifference::Layout && oldPosition != newPosition) { > if (containsFloats() && !isFloating() && !isOutOfFlowPositioned() && newStyle.hasOutOfFlowPosition()) > markAllDescendantsWithFloatsForLayout(); > } >@@ -2355,7 +2355,7 @@ void RenderBlockFlow::computeLogicalLoca > } > } > >- if (childBox.style().floating() == LeftFloat) { >+ if (childBox.style().floating() == Float::Left) { > LayoutUnit heightRemainingLeft = 1; > LayoutUnit heightRemainingRight = 1; > floatLogicalLeft = logicalLeftOffsetForPositioningFloat(logicalTopOffset, logicalLeftOffset, false, &heightRemainingLeft); >@@ -2480,9 +2480,9 @@ bool RenderBlockFlow::positionNewFloats( > > LayoutRect oldRect = childBox.frameRect(); > >- if (childBox.style().clear() & CLEFT) >+ if (childBox.style().clear() == Clear::Left) > logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatLeft), logicalTop); >- if (childBox.style().clear() & CRIGHT) >+ if (childBox.style().clear() == Clear::Right) > logicalTop = std::max(lowestFloatLogicalBottom(FloatingObject::FloatRight), logicalTop); > > computeLogicalLocationForFloat(floatingObject, logicalTop); >@@ -2537,22 +2537,22 @@ bool RenderBlockFlow::positionNewFloats( > return true; > } > >-void RenderBlockFlow::clearFloats(EClear clear) >+void RenderBlockFlow::clearFloats(Clear clear) > { > positionNewFloats(); > // set y position > LayoutUnit newY = 0; > switch (clear) { >- case CLEFT: >+ case Clear::Left: > newY = lowestFloatLogicalBottom(FloatingObject::FloatLeft); > break; >- case CRIGHT: >+ case Clear::Right: > newY = lowestFloatLogicalBottom(FloatingObject::FloatRight); > break; >- case CBOTH: >+ case Clear::Both: > newY = lowestFloatLogicalBottom(); > break; >- default: >+ case Clear::None: > break; > } > if (height() < newY) >@@ -2803,18 +2803,18 @@ LayoutUnit RenderBlockFlow::getClearDelt > return 0; > > // At least one float is present. We need to perform the clearance computation. >- bool clearSet = child.style().clear() != CNONE; >+ bool clearSet = child.style().clear() != Clear::None; > LayoutUnit logicalBottom = 0; > switch (child.style().clear()) { >- case CNONE: >+ case Clear::None: > break; >- case CLEFT: >+ case Clear::Left: > logicalBottom = lowestFloatLogicalBottom(FloatingObject::FloatLeft); > break; >- case CRIGHT: >+ case Clear::Right: > logicalBottom = lowestFloatLogicalBottom(FloatingObject::FloatRight); > break; >- case CBOTH: >+ case Clear::Both: > logicalBottom = lowestFloatLogicalBottom(); > break; > } >@@ -3055,7 +3055,7 @@ std::optional<int> RenderBlockFlow::inli > // According to the CSS spec http://www.w3.org/TR/CSS21/visudet.html, we shouldn't be performing this min, but should > // instead be returning boxHeight directly. However, we feel that a min here is better behavior (and is consistent > // enough with the spec to not cause tons of breakages). >- return style().overflowY() == OVISIBLE ? lastBaseline : std::min(boxHeight, lastBaseline); >+ return style().overflowY() == Overflow::Visible ? lastBaseline : std::min(boxHeight, lastBaseline); > } > > void RenderBlockFlow::setSelectionState(SelectionState state) >@@ -4189,8 +4189,8 @@ void RenderBlockFlow::computeInlinePrefe > bool clearPreviousFloat; > if (child->isFloating()) { > clearPreviousFloat = (prevFloat >- && ((prevFloat->style().floating() == LeftFloat && (childStyle.clear() & CLEFT)) >- || (prevFloat->style().floating() == RightFloat && (childStyle.clear() & CRIGHT)))); >+ && ((prevFloat->style().floating() == Float::Left && (childStyle.clear() == Clear::Left || childStyle.clear() == Clear::Both)) >+ || (prevFloat->style().floating() == Float::Right && (childStyle.clear() == Clear::Right || childStyle.clear() == Clear::Both)))); > prevFloat = child; > } else > clearPreviousFloat = false; >Index: Source/WebCore/rendering/RenderBlockFlow.h >=================================================================== >--- Source/WebCore/rendering/RenderBlockFlow.h (revision 232008) >+++ Source/WebCore/rendering/RenderBlockFlow.h (working copy) >@@ -487,7 +487,7 @@ private: > // Returns true if and only if it has positioned any floats. > bool positionNewFloats(); > >- void clearFloats(EClear); >+ void clearFloats(Clear); > > LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const override; > LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedOffset, LayoutUnit logicalHeight) const override; >Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy) >@@ -705,7 +705,7 @@ void RenderBlockFlow::computeInlineDirec > static inline ExpansionBehavior expansionBehaviorForInlineTextBox(RenderBlockFlow& block, InlineTextBox& textBox, BidiRun* previousRun, BidiRun* nextRun, ETextAlign textAlign, bool isAfterExpansion) > { > // Tatechuyoko is modeled as the Object Replacement Character (U+FFFC), which can never have expansion opportunities inside nor intrinsically adjacent to it. >- if (textBox.renderer().style().textCombine() == TextCombineHorizontal) >+ if (textBox.renderer().style().textCombine() == TextCombine::Horizontal) > return ForbidLeadingExpansion | ForbidTrailingExpansion; > > ExpansionBehavior result = 0; >@@ -1020,7 +1020,7 @@ static inline bool isCollapsibleSpace(UC > if (character == '\n') > return !renderer.style().preserveNewline(); > if (character == noBreakSpace) >- return renderer.style().nbspMode() == SPACE; >+ return renderer.style().nbspMode() == NBSPMode::Space; > return false; > } > >@@ -1304,8 +1304,8 @@ void RenderBlockFlow::layoutRunsAndFloat > if (!lastObject->isBR()) > lastObject = &lastRootBox()->firstLeafChild()->renderer(); > if (lastObject->isBR()) { >- EClear clear = lastObject->style().clear(); >- if (clear != CNONE) >+ Clear clear = lastObject->style().clear(); >+ if (clear != Clear::None) > clearFloats(clear); > } > } >@@ -1658,8 +1658,8 @@ void RenderBlockFlow::layoutLineBoxes(bo > // FIXME: CSS3 says that descendants that are clipped must also know how to truncate. This is insanely > // difficult to figure out in general (especially in the middle of doing layout), so we only handle the > // simple case of an anonymous block truncating when it's parent is clipped. >- bool hasTextOverflow = (style().textOverflow() && hasOverflowClip()) >- || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && parent()->style().textOverflow() && parent()->hasOverflowClip()); >+ bool hasTextOverflow = (style().textOverflow() == TextOverflow::Ellipsis && hasOverflowClip()) >+ || (isAnonymousBlock() && parent() && parent()->isRenderBlock() && parent()->style().textOverflow() == TextOverflow::Ellipsis && parent()->hasOverflowClip()); > > // Walk all the lines and delete our ellipsis line boxes if they exist. > if (hasTextOverflow) >Index: Source/WebCore/rendering/RenderBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBox.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderBox.cpp (working copy) >@@ -262,7 +262,7 @@ void RenderBox::styleWillChange(StyleDif > if (oldStyle) { > // The background of the root element or the body element could propagate up to > // the canvas. Issue full repaint, when our style changes substantially. >- if (diff >= StyleDifferenceRepaint && (isDocumentElementRenderer() || isBody())) { >+ if (diff >= StyleDifference::Repaint && (isDocumentElementRenderer() || isBody())) { > view().repaintRootContents(); > if (oldStyle->hasEntirelyFixedBackground() != newStyle.hasEntirelyFixedBackground()) > view().compositor().rootFixedBackgroundsChanged(); >@@ -270,9 +270,9 @@ void RenderBox::styleWillChange(StyleDif > > // When a layout hint happens and an object's position style changes, we have to do a layout > // to dirty the render tree using the old position value now. >- if (diff == StyleDifferenceLayout && parent() && oldStyle->position() != newStyle.position()) { >+ if (diff == StyleDifference::Layout && parent() && oldStyle->position() != newStyle.position()) { > markContainingBlocksForLayout(); >- if (oldStyle->position() == StaticPosition) >+ if (oldStyle->position() == PositionType::Static) > repaint(); > else if (newStyle.hasOutOfFlowPosition()) > parent()->setChildNeedsLayout(); >@@ -330,7 +330,7 @@ void RenderBox::styleDidChange(StyleDiff > } > > // Our opaqueness might have changed without triggering layout. >- if (diff >= StyleDifferenceRepaint && diff <= StyleDifferenceRepaintLayer) { >+ if (diff >= StyleDifference::Repaint && diff <= StyleDifference::RepaintLayer) { > auto parentToInvalidate = parent(); > for (unsigned i = 0; i < backgroundObscurationTestMaxDepth && parentToInvalidate; ++i) { > parentToInvalidate->invalidateBackgroundObscurationStatus(); >@@ -397,7 +397,7 @@ void RenderBox::styleDidChange(StyleDiff > } > } > >- if (diff != StyleDifferenceEqual) >+ if (diff != StyleDifference::Equal) > view().compositor().rootOrBodyStyleChanged(*this, oldStyle); > } > >@@ -469,7 +469,7 @@ void RenderBox::updateFromStyle() > setFloating(!isOutOfFlowPositioned() && styleToUse.isFloating()); > > // We also handle <body> and <html>, whose overflow applies to the viewport. >- if (styleToUse.overflowX() != OVISIBLE && !isDocElementRenderer && isRenderBlock()) { >+ if (styleToUse.overflowX() != Overflow::Visible && !isDocElementRenderer && isRenderBlock()) { > bool boxHasOverflowClip = true; > if (isBody()) { > // Overflow on the body can propagate to the viewport under the following conditions. >@@ -478,7 +478,7 @@ void RenderBox::updateFromStyle() > // (3) The root element has visible overflow. > if (is<HTMLHtmlElement>(*document().documentElement()) > && document().body() == element() >- && document().documentElement()->renderer()->style().overflowX() == OVISIBLE) { >+ && document().documentElement()->renderer()->style().overflowX() == Overflow::Visible) { > boxHasOverflowClip = false; > } > } >@@ -752,13 +752,13 @@ bool RenderBox::fixedElementLaysOutRelat > bool RenderBox::includeVerticalScrollbarSize() const > { > return hasOverflowClip() && layer() && !layer()->hasOverlayScrollbars() >- && (style().overflowY() == OSCROLL || style().overflowY() == OAUTO); >+ && (style().overflowY() == Overflow::Scroll || style().overflowY() == Overflow::Auto); > } > > bool RenderBox::includeHorizontalScrollbarSize() const > { > return hasOverflowClip() && layer() && !layer()->hasOverlayScrollbars() >- && (style().overflowX() == OSCROLL || style().overflowX() == OAUTO); >+ && (style().overflowX() == Overflow::Scroll || style().overflowX() == Overflow::Auto); > } > > int RenderBox::verticalScrollbarWidth() const >@@ -776,12 +776,12 @@ int RenderBox::intrinsicScrollbarLogical > if (!hasOverflowClip()) > return 0; > >- if (isHorizontalWritingMode() && (style().overflowY() == OSCROLL && !hasVerticalScrollbarWithAutoBehavior())) { >+ if (isHorizontalWritingMode() && (style().overflowY() == Overflow::Scroll && !hasVerticalScrollbarWithAutoBehavior())) { > ASSERT(layer() && layer()->hasVerticalScrollbar()); > return verticalScrollbarWidth(); > } > >- if (!isHorizontalWritingMode() && (style().overflowX() == OSCROLL && !hasHorizontalScrollbarWithAutoBehavior())) { >+ if (!isHorizontalWritingMode() && (style().overflowX() == Overflow::Scroll && !hasHorizontalScrollbarWithAutoBehavior())) { > ASSERT(layer() && layer()->hasHorizontalScrollbar()); > return horizontalScrollbarHeight(); > } >@@ -940,14 +940,14 @@ void RenderBox::panScroll(const IntPoint > > bool RenderBox::hasVerticalScrollbarWithAutoBehavior() const > { >- bool overflowScrollActsLikeAuto = style().overflowY() == OSCROLL && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >- return hasOverflowClip() && (style().overflowY() == OAUTO || style().overflowY() == OOVERLAY || overflowScrollActsLikeAuto); >+ bool overflowScrollActsLikeAuto = style().overflowY() == Overflow::Scroll && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ return hasOverflowClip() && (style().overflowY() == Overflow::Auto || style().overflowY() == Overflow::Overlay || overflowScrollActsLikeAuto); > } > > bool RenderBox::hasHorizontalScrollbarWithAutoBehavior() const > { >- bool overflowScrollActsLikeAuto = style().overflowX() == OSCROLL && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >- return hasOverflowClip() && (style().overflowX() == OAUTO || style().overflowX() == OOVERLAY || overflowScrollActsLikeAuto); >+ bool overflowScrollActsLikeAuto = style().overflowX() == Overflow::Scroll && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ return hasOverflowClip() && (style().overflowX() == Overflow::Auto || style().overflowX() == Overflow::Overlay || overflowScrollActsLikeAuto); > } > > bool RenderBox::needsPreferredWidthsRecalculation() const >@@ -1126,7 +1126,7 @@ void RenderBox::clearOverrideContainingB > LayoutUnit RenderBox::adjustBorderBoxLogicalWidthForBoxSizing(LayoutUnit width) const > { > LayoutUnit bordersPlusPadding = borderAndPaddingLogicalWidth(); >- if (style().boxSizing() == CONTENT_BOX) >+ if (style().boxSizing() == BoxSizing::ContentBox) > return width + bordersPlusPadding; > return std::max(width, bordersPlusPadding); > } >@@ -1134,14 +1134,14 @@ LayoutUnit RenderBox::adjustBorderBoxLog > LayoutUnit RenderBox::adjustBorderBoxLogicalHeightForBoxSizing(LayoutUnit height) const > { > LayoutUnit bordersPlusPadding = borderAndPaddingLogicalHeight(); >- if (style().boxSizing() == CONTENT_BOX) >+ if (style().boxSizing() == BoxSizing::ContentBox) > return height + bordersPlusPadding; > return std::max(height, bordersPlusPadding); > } > > LayoutUnit RenderBox::adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const > { >- if (style().boxSizing() == BORDER_BOX) >+ if (style().boxSizing() == BoxSizing::BorderBox) > width -= borderAndPaddingLogicalWidth(); > return std::max<LayoutUnit>(0, width); > } >@@ -1151,7 +1151,7 @@ LayoutUnit RenderBox::adjustContentBoxLo > if (!height) > return 0; > LayoutUnit result = height.value(); >- if (style().boxSizing() == BORDER_BOX) >+ if (style().boxSizing() == BoxSizing::BorderBox) > result -= borderAndPaddingLogicalHeight(); > return std::max(LayoutUnit(), result); > } >@@ -1378,13 +1378,13 @@ bool RenderBox::backgroundIsKnownToBeOpa > return false; > LayoutRect backgroundRect; > switch (style().backgroundClip()) { >- case BorderFillBox: >+ case FillBox::Border: > backgroundRect = borderBoxRect(); > break; >- case PaddingFillBox: >+ case FillBox::Padding: > backgroundRect = paddingBoxRect(); > break; >- case ContentFillBox: >+ case FillBox::Content: > backgroundRect = contentBoxRect(); > break; > default: >@@ -1396,7 +1396,7 @@ bool RenderBox::backgroundIsKnownToBeOpa > static bool isCandidateForOpaquenessTest(const RenderBox& childBox) > { > const RenderStyle& childStyle = childBox.style(); >- if (childStyle.position() != StaticPosition && childBox.containingBlock() != childBox.parent()) >+ if (childStyle.position() != PositionType::Static && childBox.containingBlock() != childBox.parent()) > return false; > if (childStyle.visibility() != VISIBLE) > return false; >@@ -1433,7 +1433,7 @@ bool RenderBox::foregroundIsKnownToBeOpa > childLocalRect.moveBy(-childLocation); > if (childLocalRect.y() < 0 || childLocalRect.x() < 0) { > // If there is unobscured area above/left of a static positioned box then the rect is probably not covered. >- if (childBox.style().position() == StaticPosition) >+ if (childBox.style().position() == PositionType::Static) > return false; > continue; > } >@@ -1470,11 +1470,11 @@ bool RenderBox::computeBackgroundIsKnown > bool RenderBox::backgroundHasOpaqueTopLayer() const > { > auto& fillLayer = style().backgroundLayers(); >- if (fillLayer.clip() != BorderFillBox) >+ if (fillLayer.clip() != FillBox::Border) > return false; > > // Clipped with local scrolling >- if (hasOverflowClip() && fillLayer.attachment() == LocalBackgroundAttachment) >+ if (hasOverflowClip() && fillLayer.attachment() == FillAttachment::LocalBackground) > return false; > > if (fillLayer.hasOpaqueImage(*this) && fillLayer.hasRepeatXY() && fillLayer.image()->canRender(this, style().effectiveZoom())) >@@ -2141,7 +2141,7 @@ LayoutRect RenderBox::computeRectForRepa > LayoutRect adjustedRect = rect; > const RenderStyle& styleToUse = style(); > // Paint offset cache is only valid for root-relative, non-fixed position repainting >- if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !repaintContainer && styleToUse.position() != FixedPosition) { >+ if (view().frameView().layoutContext().isPaintOffsetCacheEnabled() && !repaintContainer && styleToUse.position() != PositionType::Fixed) { > auto* layoutState = view().frameView().layoutContext().layoutState(); > > if (layer() && layer()->transform()) >@@ -2179,8 +2179,8 @@ LayoutRect RenderBox::computeRectForRepa > // us to add the height twice. > // The same logic applies for elements flowed directly into the flow thread. Their topLeft member > // will already contain the portion rect of the fragment. >- EPosition position = styleToUse.position(); >- if (container->isOutOfFlowRenderFragmentedFlow() && position != AbsolutePosition && containingBlock() != enclosingFragmentedFlow()) { >+ auto position = styleToUse.position(); >+ if (container->isOutOfFlowRenderFragmentedFlow() && position != PositionType::Absolute && containingBlock() != enclosingFragmentedFlow()) { > RenderFragmentContainer* firstFragment = nullptr; > RenderFragmentContainer* lastFragment = nullptr; > if (downcast<RenderFragmentedFlow>(*container).getFragmentRangeForBox(this, firstFragment, lastFragment)) >@@ -2222,14 +2222,14 @@ LayoutRect RenderBox::computeRectForRepa > // We are now in our parent container's coordinate space. Apply our transform to obtain a bounding box > // in the parent's coordinate space that encloses us. > if (hasLayer() && layer()->transform()) { >- context.m_hasPositionFixedDescendant = position == FixedPosition; >+ context.m_hasPositionFixedDescendant = position == PositionType::Fixed; > adjustedRect = LayoutRect(encloseRectToDevicePixels(layer()->transform()->mapRect(adjustedRect), document().deviceScaleFactor())); > topLeft = adjustedRect.location(); > topLeft.move(locationOffset); >- } else if (position == FixedPosition) >+ } else if (position == PositionType::Fixed) > context.m_hasPositionFixedDescendant = true; > >- if (position == AbsolutePosition && container->isInFlowPositioned() && is<RenderInline>(*container)) >+ if (position == PositionType::Absolute && container->isInFlowPositioned() && is<RenderInline>(*container)) > topLeft += downcast<RenderInline>(*container).offsetForInFlowPositionedInline(this); > else if (styleToUse.hasInFlowPosition() && layer()) { > // Apply the relative position offset when invalidating a rectangle. The layer >@@ -2319,8 +2319,8 @@ void RenderBox::computeLogicalWidthInFra > > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style().boxOrient() == VERTICAL); >- bool stretching = (parent()->style().boxAlign() == BSTRETCH); >+ bool inVerticalBox = parent()->isDeprecatedFlexibleBox() && (parent()->style().boxOrient() == BoxOrient::Vertical); >+ bool stretching = (parent()->style().boxAlign() == BoxAlignment::Stretch); > // FIXME: Stretching is the only reason why we don't want the box to be treated as a replaced element, so we could perhaps > // refactor all this logic, not only for flex and grid since alignment is intended to be applied to any block. > bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inVerticalBox || !stretching); >@@ -2459,16 +2459,16 @@ bool RenderBox::columnFlexItemHasStretch > ASSERT(parentStyle.isColumnFlexDirection()); > if (style().marginStart().isAuto() || style().marginEnd().isAuto()) > return false; >- return style().resolvedAlignSelf(&parentStyle, containingBlock()->selfAlignmentNormalBehavior()).position() == ItemPositionStretch; >+ return style().resolvedAlignSelf(&parentStyle, containingBlock()->selfAlignmentNormalBehavior()).position() == ItemPosition::Stretch; > } > > bool RenderBox::isStretchingColumnFlexItem() const > { >- if (parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == VERTICAL && parent()->style().boxAlign() == BSTRETCH) >+ if (parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == BoxOrient::Vertical && parent()->style().boxAlign() == BoxAlignment::Stretch) > return true; > > // We don't stretch multiline flexboxes because they need to apply line spacing (align-content) first. >- if (parent()->isFlexibleBox() && parent()->style().flexWrap() == FlexNoWrap && parent()->style().isColumnFlexDirection() && columnFlexItemHasStretchAlignment()) >+ if (parent()->isFlexibleBox() && parent()->style().flexWrap() == FlexWrap::NoWrap && parent()->style().isColumnFlexDirection() && columnFlexItemHasStretchAlignment()) > return true; > return false; > } >@@ -2486,8 +2486,8 @@ bool RenderBox::hasStretchedLogicalWidth > return false; > } > if (containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode()) >- return style.resolvedAlignSelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPositionStretch; >- return style.resolvedJustifySelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPositionStretch; >+ return style.resolvedAlignSelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; >+ return style.resolvedJustifySelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; > } > > bool RenderBox::sizesLogicalWidthToFitContent(SizeType widthType) const >@@ -2528,7 +2528,7 @@ bool RenderBox::sizesLogicalWidthToFitCo > // to avoid an extra layout when applying alignment. > if (parent()->isFlexibleBox()) { > // For multiline columns, we need to apply align-content first, so we can't stretch now. >- if (!parent()->style().isColumnFlexDirection() || parent()->style().flexWrap() != FlexNoWrap) >+ if (!parent()->style().isColumnFlexDirection() || parent()->style().flexWrap() != FlexWrap::NoWrap) > return true; > if (!columnFlexItemHasStretchAlignment()) > return true; >@@ -2538,7 +2538,7 @@ bool RenderBox::sizesLogicalWidthToFitCo > // that don't stretch their kids lay out their children at their intrinsic widths. > // FIXME: Think about block-flow here. > // https://bugs.webkit.org/show_bug.cgi?id=46473 >- if (parent()->isDeprecatedFlexibleBox() && (parent()->style().boxOrient() == HORIZONTAL || parent()->style().boxAlign() != BSTRETCH)) >+ if (parent()->isDeprecatedFlexibleBox() && (parent()->style().boxOrient() == BoxOrient::Horizontal || parent()->style().boxAlign() != BoxAlignment::Stretch)) > return true; > > // Button, input, select, textarea, and legend treat width value of 'auto' as 'intrinsic' unless it's in a >@@ -2707,8 +2707,8 @@ RenderBox::LogicalExtentComputedValues R > > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == HORIZONTAL; >- bool stretching = parent()->style().boxAlign() == BSTRETCH; >+ bool inHorizontalBox = parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == BoxOrient::Horizontal; >+ bool stretching = parent()->style().boxAlign() == BoxAlignment::Stretch; > bool treatAsReplaced = shouldComputeSizeAsReplaced() && (!inHorizontalBox || !stretching); > bool checkMinMaxHeight = false; > >@@ -2728,7 +2728,7 @@ RenderBox::LogicalExtentComputedValues R > // Block children of horizontal flexible boxes fill the height of the box. > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- if (h.isAuto() && is<RenderDeprecatedFlexibleBox>(*parent()) && parent()->style().boxOrient() == HORIZONTAL >+ if (h.isAuto() && is<RenderDeprecatedFlexibleBox>(*parent()) && parent()->style().boxOrient() == BoxOrient::Horizontal > && downcast<RenderDeprecatedFlexibleBox>(*parent()).isStretchingChildren()) { > h = Length(parentBox()->contentLogicalHeight() - marginBefore() - marginAfter() - borderAndPaddingLogicalHeight(), Fixed); > checkMinMaxHeight = false; >@@ -2807,7 +2807,7 @@ std::optional<LayoutUnit> RenderBox::com > if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent()) { > if (!intrinsicContentHeight) > return intrinsicContentHeight; >- if (style().boxSizing() == BORDER_BOX) >+ if (style().boxSizing() == BoxSizing::BorderBox) > return intrinsicContentHeight.value() + borderAndPaddingLogicalHeight(); > return intrinsicContentHeight; > } >@@ -4453,7 +4453,7 @@ bool RenderBox::createsNewFormattingCont > { > return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated() > || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFragmentedFlow() || isRenderFragmentContainer() >- || isGridItem() || style().specifiesColumns() || style().columnSpan(); >+ || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All; > } > > bool RenderBox::avoidsFloats() const >Index: Source/WebCore/rendering/RenderBox.h >=================================================================== >--- Source/WebCore/rendering/RenderBox.h (revision 232008) >+++ Source/WebCore/rendering/RenderBox.h (working copy) >@@ -459,8 +459,8 @@ public: > bool hasHorizontalScrollbarWithAutoBehavior() const; > > bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY(); } >- bool scrollsOverflowX() const { return hasOverflowClip() && (style().overflowX() == OSCROLL || hasHorizontalScrollbarWithAutoBehavior()); } >- bool scrollsOverflowY() const { return hasOverflowClip() && (style().overflowY() == OSCROLL || hasVerticalScrollbarWithAutoBehavior()); } >+ bool scrollsOverflowX() const { return hasOverflowClip() && (style().overflowX() == Overflow::Scroll || hasHorizontalScrollbarWithAutoBehavior()); } >+ bool scrollsOverflowY() const { return hasOverflowClip() && (style().overflowY() == Overflow::Scroll || hasVerticalScrollbarWithAutoBehavior()); } > > bool hasHorizontalOverflow() const { return scrollWidth() != roundToInt(clientWidth()); } > bool hasVerticalOverflow() const { return scrollHeight() != roundToInt(clientHeight()); } >@@ -633,7 +633,7 @@ protected: > > bool createsNewFormattingContext() const; > >- virtual ItemPosition selfAlignmentNormalBehavior(const RenderBox* = nullptr) const { return ItemPositionStretch; } >+ virtual ItemPosition selfAlignmentNormalBehavior(const RenderBox* = nullptr) const { return ItemPosition::Stretch; } > > // Returns false if it could not cheaply compute the extent (e.g. fixed background), in which case the returned rect may be incorrect. > bool getBackgroundPaintedExtent(const LayoutPoint& paintOffset, LayoutRect&) const; >Index: Source/WebCore/rendering/RenderBoxModelObject.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy) >@@ -749,8 +749,8 @@ void RenderBoxModelObject::paintFillLaye > bool includeRightEdge = box ? box->includeLogicalRightEdge() : true; > > bool hasRoundedBorder = style().hasBorderRadius() && (includeLeftEdge || includeRightEdge); >- bool clippedWithLocalScrolling = hasOverflowClip() && bgLayer.attachment() == LocalBackgroundAttachment; >- bool isBorderFill = bgLayer.clip() == BorderFillBox; >+ bool clippedWithLocalScrolling = hasOverflowClip() && bgLayer.attachment() == FillAttachment::LocalBackground; >+ bool isBorderFill = bgLayer.clip() == FillBox::Border; > bool isRoot = this->isDocumentElementRenderer(); > > Color bgColor = color; >@@ -759,7 +759,7 @@ void RenderBoxModelObject::paintFillLaye > > bool forceBackgroundToWhite = false; > if (document().printing()) { >- if (style().printColorAdjust() == PrintColorAdjustEconomy) >+ if (style().printColorAdjust() == PrintColorAdjust::Economy) > forceBackgroundToWhite = true; > if (settings().shouldPrintBackgrounds()) > forceBackgroundToWhite = false; >@@ -816,17 +816,17 @@ void RenderBoxModelObject::paintFillLaye > return; > } > >- // BorderFillBox radius clipping is taken care of by BackgroundBleedUseTransparencyLayer >+ // FillBox::Border radius clipping is taken care of by BackgroundBleedUseTransparencyLayer > bool clipToBorderRadius = hasRoundedBorder && !(isBorderFill && bleedAvoidance == BackgroundBleedUseTransparencyLayer); > GraphicsContextStateSaver clipToBorderStateSaver(context, clipToBorderRadius); > if (clipToBorderRadius) { > RoundedRect border = isBorderFill ? backgroundRoundedRectAdjustedForBleedAvoidance(context, rect, bleedAvoidance, box, boxSize, includeLeftEdge, includeRightEdge) : getBackgroundRoundedRect(rect, box, boxSize.width(), boxSize.height(), includeLeftEdge, includeRightEdge); > > // Clip to the padding or content boxes as necessary. >- if (bgLayer.clip() == ContentFillBox) { >+ if (bgLayer.clip() == FillBox::Content) { > border = style().getRoundedInnerBorderFor(border.rect(), > paddingTop() + borderTop(), paddingBottom() + borderBottom(), paddingLeft() + borderLeft(), paddingRight() + borderRight(), includeLeftEdge, includeRightEdge); >- } else if (bgLayer.clip() == PaddingFillBox) >+ } else if (bgLayer.clip() == FillBox::Padding) > border = style().getRoundedInnerBorderFor(border.rect(), includeLeftEdge, includeRightEdge); > > clipRoundedInnerRect(context, pixelSnappedRect, border.pixelSnappedRoundedRectForPainting(deviceScaleFactor)); >@@ -854,10 +854,10 @@ void RenderBoxModelObject::paintFillLaye > std::unique_ptr<ImageBuffer> maskImage; > IntRect maskRect; > >- if (bgLayer.clip() == PaddingFillBox || bgLayer.clip() == ContentFillBox) { >+ if (bgLayer.clip() == FillBox::Padding || bgLayer.clip() == FillBox::Content) { > // Clip to the padding or content boxes as necessary. > if (!clipToBorderRadius) { >- bool includePadding = bgLayer.clip() == ContentFillBox; >+ bool includePadding = bgLayer.clip() == FillBox::Content; > LayoutRect clipRect = LayoutRect(scrolledPaintRect.x() + bLeft + (includePadding ? pLeft : LayoutUnit()), > scrolledPaintRect.y() + borderTop() + (includePadding ? paddingTop() : LayoutUnit()), > scrolledPaintRect.width() - bLeft - bRight - (includePadding ? pLeft + pRight : LayoutUnit()), >@@ -865,7 +865,7 @@ void RenderBoxModelObject::paintFillLaye > backgroundClipStateSaver.save(); > context.clip(clipRect); > } >- } else if (bgLayer.clip() == TextFillBox) { >+ } else if (bgLayer.clip() == FillBox::Text) { > // We have to draw our text into a mask that can then be used to clip background drawing. > // First figure out how big the mask has to be. It should be no bigger than what we need > // to actually render, so we should intersect the dirty rect with the border box of the background. >@@ -954,7 +954,7 @@ void RenderBoxModelObject::paintFillLaye > RefPtr<Image> image; > if (!geometry.destRect().isEmpty() && (image = bgImage->image(backgroundObject ? backgroundObject : this, geometry.tileSize()))) { > auto compositeOp = op == CompositeSourceOver ? bgLayer.composite() : op; >- context.setDrawLuminanceMask(bgLayer.maskSourceType() == MaskLuminance); >+ context.setDrawLuminanceMask(bgLayer.maskSourceType() == MaskSourceType::Luminance); > > if (is<BitmapImage>(image)) > downcast<BitmapImage>(*image).updateFromSettings(settings()); >@@ -969,7 +969,7 @@ void RenderBoxModelObject::paintFillLaye > } > } > >- if (maskImage && bgLayer.clip() == TextFillBox) { >+ if (maskImage && bgLayer.clip() == FillBox::Text) { > context.drawConsumingImageBuffer(WTFMove(maskImage), maskRect, CompositeDestinationIn); > context.endTransparencyLayer(); > } >@@ -1069,7 +1069,7 @@ LayoutSize RenderBoxModelObject::calcula > LayoutSize RenderBoxModelObject::calculateFillTileSize(const FillLayer& fillLayer, const LayoutSize& positioningAreaSize) const > { > StyleImage* image = fillLayer.image(); >- EFillSizeType type = fillLayer.size().type; >+ FillSizeType type = fillLayer.size().type; > > LayoutSize imageIntrinsicSize; > if (image) { >@@ -1079,7 +1079,7 @@ LayoutSize RenderBoxModelObject::calcula > imageIntrinsicSize = positioningAreaSize; > > switch (type) { >- case SizeLength: { >+ case FillSizeType::Size: { > LayoutSize tileSize = positioningAreaSize; > > Length layerWidth = fillLayer.size().size.width; >@@ -1111,24 +1111,24 @@ LayoutSize RenderBoxModelObject::calcula > tileSize.clampNegativeToZero(); > return tileSize; > } >- case SizeNone: { >+ case FillSizeType::None: { > // If both values are ‘auto’ then the intrinsic width and/or height of the image should be used, if any. > if (!imageIntrinsicSize.isEmpty()) > return imageIntrinsicSize; > > // If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for ‘contain’. >- type = Contain; >+ type = FillSizeType::Contain; > } > FALLTHROUGH; >- case Contain: >- case Cover: { >+ case FillSizeType::Contain: >+ case FillSizeType::Cover: { > // Scale computation needs higher precision than what LayoutUnit can offer. > FloatSize localImageIntrinsicSize = imageIntrinsicSize; > FloatSize localPositioningAreaSize = positioningAreaSize; > > float horizontalScaleFactor = localImageIntrinsicSize.width() ? (localPositioningAreaSize.width() / localImageIntrinsicSize.width()) : 1; > float verticalScaleFactor = localImageIntrinsicSize.height() ? (localPositioningAreaSize.height() / localImageIntrinsicSize.height()) : 1; >- float scaleFactor = type == Contain ? std::min(horizontalScaleFactor, verticalScaleFactor) : std::max(horizontalScaleFactor, verticalScaleFactor); >+ float scaleFactor = type == FillSizeType::Contain ? std::min(horizontalScaleFactor, verticalScaleFactor) : std::max(horizontalScaleFactor, verticalScaleFactor); > float deviceScaleFactor = document().deviceScaleFactor(); > return LayoutSize(std::max<LayoutUnit>(1 / deviceScaleFactor, localImageIntrinsicSize.width() * scaleFactor), > std::max<LayoutUnit>(1 / deviceScaleFactor, localImageIntrinsicSize.height() * scaleFactor)); >@@ -1196,18 +1196,18 @@ BackgroundImageGeometry RenderBoxModelOb > // Destination rect will be adjusted later if the background is non-repeating. > // FIXME: transforms spec says that fixed backgrounds behave like scroll inside transforms. https://bugs.webkit.org/show_bug.cgi?id=15679 > LayoutRect destinationRect(borderBoxRect); >- bool fixedAttachment = fillLayer.attachment() == FixedBackgroundAttachment; >+ bool fixedAttachment = fillLayer.attachment() == FillAttachment::FixedBackground; > float deviceScaleFactor = document().deviceScaleFactor(); > if (!fixedAttachment) { > LayoutUnit right = 0; > LayoutUnit bottom = 0; > // Scroll and Local. >- if (fillLayer.origin() != BorderFillBox) { >+ if (fillLayer.origin() != FillBox::Border) { > left = borderLeft(); > right = borderRight(); > top = borderTop(); > bottom = borderBottom(); >- if (fillLayer.origin() == ContentFillBox) { >+ if (fillLayer.origin() == FillBox::Content) { > left += paddingLeft(); > right += paddingRight(); > top += paddingTop(); >@@ -1281,8 +1281,8 @@ BackgroundImageGeometry RenderBoxModelOb > if (StyleImage* layerImage = fillLayer.image()) > layerImage->setContainerContextForRenderer(*clientForBackgroundImage, tileSize, style().effectiveZoom()); > >- EFillRepeat backgroundRepeatX = fillLayer.repeatX(); >- EFillRepeat backgroundRepeatY = fillLayer.repeatY(); >+ FillRepeat backgroundRepeatX = fillLayer.repeatX(); >+ FillRepeat backgroundRepeatY = fillLayer.repeatY(); > LayoutUnit availableWidth = positioningAreaSize.width() - tileSize.width(); > LayoutUnit availableHeight = positioningAreaSize.height() - tileSize.height(); > >@@ -1290,9 +1290,9 @@ BackgroundImageGeometry RenderBoxModelOb > LayoutSize phase; > LayoutSize noRepeat; > LayoutUnit computedXPosition = resolveEdgeRelativeLength(fillLayer.xPosition(), fillLayer.backgroundXOrigin(), availableWidth, positioningAreaSize, tileSize); >- if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && tileSize.width() > 0) { >+ if (backgroundRepeatX == FillRepeat::Round && positioningAreaSize.width() > 0 && tileSize.width() > 0) { > int numTiles = std::max(1, roundToInt(positioningAreaSize.width() / tileSize.width())); >- if (fillLayer.size().size.height.isAuto() && backgroundRepeatY != RoundFill) >+ if (fillLayer.size().size.height.isAuto() && backgroundRepeatY != FillRepeat::Round) > tileSize.setHeight(tileSize.height() * positioningAreaSize.width() / (numTiles * tileSize.width())); > > tileSize.setWidth(positioningAreaSize.width() / numTiles); >@@ -1300,19 +1300,19 @@ BackgroundImageGeometry RenderBoxModelOb > } > > LayoutUnit computedYPosition = resolveEdgeRelativeLength(fillLayer.yPosition(), fillLayer.backgroundYOrigin(), availableHeight, positioningAreaSize, tileSize); >- if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && tileSize.height() > 0) { >+ if (backgroundRepeatY == FillRepeat::Round && positioningAreaSize.height() > 0 && tileSize.height() > 0) { > int numTiles = std::max(1, roundToInt(positioningAreaSize.height() / tileSize.height())); >- if (fillLayer.size().size.width.isAuto() && backgroundRepeatX != RoundFill) >+ if (fillLayer.size().size.width.isAuto() && backgroundRepeatX != FillRepeat::Round) > tileSize.setWidth(tileSize.width() * positioningAreaSize.height() / (numTiles * tileSize.height())); > > tileSize.setHeight(positioningAreaSize.height() / numTiles); > phase.setHeight(tileSize.height() ? tileSize.height() - fmodf((computedYPosition + top), tileSize.height()) : 0); > } > >- if (backgroundRepeatX == RepeatFill) { >+ if (backgroundRepeatX == FillRepeat::Repeat) { > phase.setWidth(tileSize.width() ? tileSize.width() - fmodf(computedXPosition + left, tileSize.width()) : 0); > spaceSize.setWidth(0); >- } else if (backgroundRepeatX == SpaceFill && tileSize.width() > 0) { >+ } else if (backgroundRepeatX == FillRepeat::Space && tileSize.width() > 0) { > LayoutUnit space = getSpace(positioningAreaSize.width(), tileSize.width()); > if (space >= 0) { > LayoutUnit actualWidth = tileSize.width() + space; >@@ -1321,10 +1321,10 @@ BackgroundImageGeometry RenderBoxModelOb > spaceSize.setHeight(0); > phase.setWidth(actualWidth ? actualWidth - fmodf((computedXPosition + left), actualWidth) : 0); > } else >- backgroundRepeatX = NoRepeatFill; >+ backgroundRepeatX = FillRepeat::NoRepeat; > } > >- if (backgroundRepeatX == NoRepeatFill) { >+ if (backgroundRepeatX == FillRepeat::NoRepeat) { > LayoutUnit xOffset = left + computedXPosition; > if (xOffset > 0) > destinationRect.move(xOffset, 0); >@@ -1334,10 +1334,10 @@ BackgroundImageGeometry RenderBoxModelOb > spaceSize.setWidth(0); > } > >- if (backgroundRepeatY == RepeatFill) { >+ if (backgroundRepeatY == FillRepeat::Repeat) { > phase.setHeight(tileSize.height() ? tileSize.height() - fmodf(computedYPosition + top, tileSize.height()) : 0); > spaceSize.setHeight(0); >- } else if (backgroundRepeatY == SpaceFill && tileSize.height() > 0) { >+ } else if (backgroundRepeatY == FillRepeat::Space && tileSize.height() > 0) { > LayoutUnit space = getSpace(positioningAreaSize.height(), tileSize.height()); > > if (space >= 0) { >@@ -1346,9 +1346,9 @@ BackgroundImageGeometry RenderBoxModelOb > spaceSize.setHeight(space); > phase.setHeight(actualHeight ? actualHeight - fmodf((computedYPosition + top), actualHeight) : 0); > } else >- backgroundRepeatY = NoRepeatFill; >+ backgroundRepeatY = FillRepeat::NoRepeat; > } >- if (backgroundRepeatY == NoRepeatFill) { >+ if (backgroundRepeatY == FillRepeat::NoRepeat) { > LayoutUnit yOffset = top + computedYPosition; > if (yOffset > 0) > destinationRect.move(0, yOffset); >@@ -1443,32 +1443,32 @@ static bool borderWillArcInnerEdge(const > return !firstRadius.isZero() || !secondRadius.isZero(); > } > >-inline bool styleRequiresClipPolygon(EBorderStyle style) >+inline bool styleRequiresClipPolygon(BorderStyle style) > { >- return style == DOTTED || style == DASHED; // These are drawn with a stroke, so we have to clip to get corner miters. >+ return style == BorderStyle::Dotted || style == BorderStyle::Dashed; // These are drawn with a stroke, so we have to clip to get corner miters. > } > >-static bool borderStyleFillsBorderArea(EBorderStyle style) >+static bool borderStyleFillsBorderArea(BorderStyle style) > { >- return !(style == DOTTED || style == DASHED || style == DOUBLE); >+ return !(style == BorderStyle::Dotted || style == BorderStyle::Dashed || style == BorderStyle::Double); > } > >-static bool borderStyleHasInnerDetail(EBorderStyle style) >+static bool borderStyleHasInnerDetail(BorderStyle style) > { >- return style == GROOVE || style == RIDGE || style == DOUBLE; >+ return style == BorderStyle::Groove || style == BorderStyle::Ridge || style == BorderStyle::Double; > } > >-static bool borderStyleIsDottedOrDashed(EBorderStyle style) >+static bool borderStyleIsDottedOrDashed(BorderStyle style) > { >- return style == DOTTED || style == DASHED; >+ return style == BorderStyle::Dotted || style == BorderStyle::Dashed; > } > >-// OUTSET darkens the bottom and right (and maybe lightens the top and left) >-// INSET darkens the top and left (and maybe lightens the bottom and right) >-static inline bool borderStyleHasUnmatchedColorsAtCorner(EBorderStyle style, BoxSide side, BoxSide adjacentSide) >+// BorderStyle::Outset darkens the bottom and right (and maybe lightens the top and left) >+// BorderStyle::Inset darkens the top and left (and maybe lightens the bottom and right) >+static inline bool borderStyleHasUnmatchedColorsAtCorner(BorderStyle style, BoxSide side, BoxSide adjacentSide) > { > // These styles match at the top/left and bottom/right. >- if (style == INSET || style == GROOVE || style == RIDGE || style == OUTSET) { >+ if (style == BorderStyle::Inset || style == BorderStyle::Groove || style == BorderStyle::Ridge || style == BorderStyle::Outset) { > const BorderEdgeFlags topRightFlags = edgeFlagForSide(BSTop) | edgeFlagForSide(BSRight); > const BorderEdgeFlags bottomLeftFlags = edgeFlagForSide(BSBottom) | edgeFlagForSide(BSLeft); > >@@ -1529,9 +1529,9 @@ static inline bool willBeOverdrawn(BoxSi > return false; > } > >-static inline bool borderStylesRequireMitre(BoxSide side, BoxSide adjacentSide, EBorderStyle style, EBorderStyle adjacentStyle) >+static inline bool borderStylesRequireMitre(BoxSide side, BoxSide adjacentSide, BorderStyle style, BorderStyle adjacentStyle) > { >- if (style == DOUBLE || adjacentStyle == DOUBLE || adjacentStyle == GROOVE || adjacentStyle == RIDGE) >+ if (style == BorderStyle::Double || adjacentStyle == BorderStyle::Double || adjacentStyle == BorderStyle::Groove || adjacentStyle == BorderStyle::Ridge) > return true; > > if (borderStyleIsDottedOrDashed(style) != borderStyleIsDottedOrDashed(adjacentStyle)) >@@ -1858,10 +1858,10 @@ void RenderBoxModelObject::paintBorder(c > if (!currEdge.color().isOpaque()) > haveAlphaColor = true; > >- if (currEdge.style() != SOLID) >+ if (currEdge.style() != BorderStyle::Solid) > haveAllSolidEdges = false; > >- if (currEdge.style() != DOUBLE) >+ if (currEdge.style() != BorderStyle::Double) > haveAllDoubleEdges = false; > } > >@@ -1976,21 +1976,21 @@ void RenderBoxModelObject::paintBorder(c > } > > void RenderBoxModelObject::drawBoxSideFromPath(GraphicsContext& graphicsContext, const LayoutRect& borderRect, const Path& borderPath, const BorderEdge edges[], >- float thickness, float drawThickness, BoxSide side, const RenderStyle& style, Color color, EBorderStyle borderStyle, BackgroundBleedAvoidance bleedAvoidance, >+ float thickness, float drawThickness, BoxSide side, const RenderStyle& style, Color color, BorderStyle borderStyle, BackgroundBleedAvoidance bleedAvoidance, > bool includeLogicalLeftEdge, bool includeLogicalRightEdge) > { > if (thickness <= 0) > return; > >- if (borderStyle == DOUBLE && thickness < 3) >- borderStyle = SOLID; >+ if (borderStyle == BorderStyle::Double && thickness < 3) >+ borderStyle = BorderStyle::Solid; > > switch (borderStyle) { >- case BNONE: >- case BHIDDEN: >+ case BorderStyle::None: >+ case BorderStyle::Hidden: > return; >- case DOTTED: >- case DASHED: { >+ case BorderStyle::Dotted: >+ case BorderStyle::Dashed: { > graphicsContext.setStrokeColor(color); > > // The stroke is doubled here because the provided path is the >@@ -1998,14 +1998,14 @@ void RenderBoxModelObject::drawBoxSideFr > // The extra multiplier is so that the clipping mask can antialias > // the edges to prevent jaggies. > graphicsContext.setStrokeThickness(drawThickness * 2 * 1.1f); >- graphicsContext.setStrokeStyle(borderStyle == DASHED ? DashedStroke : DottedStroke); >+ graphicsContext.setStrokeStyle(borderStyle == BorderStyle::Dashed ? DashedStroke : DottedStroke); > > // If the number of dashes that fit in the path is odd and non-integral then we > // will have an awkwardly-sized dash at the end of the path. To try to avoid that > // here, we simply make the whitespace dashes ever so slightly bigger. > // FIXME: This could be even better if we tried to manipulate the dash offset > // and possibly the gapLength to get the corners dash-symmetrical. >- float dashLength = thickness * ((borderStyle == DASHED) ? 3.0f : 1.0f); >+ float dashLength = thickness * ((borderStyle == BorderStyle::Dashed) ? 3.0f : 1.0f); > float gapLength = dashLength; > float numberOfDashes = borderPath.length() / dashLength; > // Don't try to show dashes if we have less than 2 dashes + 2 gaps. >@@ -2030,7 +2030,7 @@ void RenderBoxModelObject::drawBoxSideFr > graphicsContext.strokePath(borderPath); > return; > } >- case DOUBLE: { >+ case BorderStyle::Double: { > // Get the inner border rects for both the outer border line and the inner border line > LayoutUnit outerBorderTopWidth; > LayoutUnit innerBorderTopWidth; >@@ -2056,7 +2056,7 @@ void RenderBoxModelObject::drawBoxSideFr > includeLogicalLeftEdge, includeLogicalRightEdge); > > graphicsContext.clipRoundedRect(FloatRoundedRect(innerClip)); >- drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); >+ drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, BorderStyle::Solid, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); > } > > // Draw outer border line >@@ -2075,21 +2075,21 @@ void RenderBoxModelObject::drawBoxSideFr > outerBorderTopWidth, outerBorderBottomWidth, outerBorderLeftWidth, outerBorderRightWidth, > includeLogicalLeftEdge, includeLogicalRightEdge); > graphicsContext.clipOutRoundedRect(FloatRoundedRect(outerClip)); >- drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, SOLID, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); >+ drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, BorderStyle::Solid, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); > } > return; > } >- case RIDGE: >- case GROOVE: >+ case BorderStyle::Ridge: >+ case BorderStyle::Groove: > { >- EBorderStyle s1; >- EBorderStyle s2; >- if (borderStyle == GROOVE) { >- s1 = INSET; >- s2 = OUTSET; >+ BorderStyle s1; >+ BorderStyle s2; >+ if (borderStyle == BorderStyle::Groove) { >+ s1 = BorderStyle::Inset; >+ s2 = BorderStyle::Outset; > } else { >- s1 = OUTSET; >- s2 = INSET; >+ s1 = BorderStyle::Outset; >+ s2 = BorderStyle::Inset; > } > > // Paint full border >@@ -2110,8 +2110,8 @@ void RenderBoxModelObject::drawBoxSideFr > drawBoxSideFromPath(graphicsContext, borderRect, borderPath, edges, thickness, drawThickness, side, style, color, s2, bleedAvoidance, includeLogicalLeftEdge, includeLogicalRightEdge); > return; > } >- case INSET: >- case OUTSET: >+ case BorderStyle::Inset: >+ case BorderStyle::Outset: > calculateBorderStyleColor(borderStyle, side, color); > break; > default: >@@ -2305,7 +2305,7 @@ bool RenderBoxModelObject::boxShadowShou > while (auto* next = lastBackgroundLayer->next()) > lastBackgroundLayer = next; > >- if (lastBackgroundLayer->clip() != BorderFillBox) >+ if (lastBackgroundLayer->clip() != FillBox::Border) > return false; > > if (lastBackgroundLayer->image() && style().hasBorderRadius()) >@@ -2314,7 +2314,7 @@ bool RenderBoxModelObject::boxShadowShou > if (inlineFlowBox && !inlineFlowBox->boxShadowCanBeAppliedToBackground(*lastBackgroundLayer)) > return false; > >- if (hasOverflowClip() && lastBackgroundLayer->attachment() == LocalBackgroundAttachment) >+ if (hasOverflowClip() && lastBackgroundLayer->attachment() == FillAttachment::LocalBackground) > return false; > > return true; >Index: Source/WebCore/rendering/RenderBoxModelObject.h >=================================================================== >--- Source/WebCore/rendering/RenderBoxModelObject.h (revision 232008) >+++ Source/WebCore/rendering/RenderBoxModelObject.h (working copy) >@@ -323,7 +323,7 @@ private: > bool includeLogicalLeftEdge, bool includeLogicalRightEdge, bool antialias = false, const Color* overrideColor = nullptr); > void drawBoxSideFromPath(GraphicsContext&, const LayoutRect&, const Path&, const BorderEdge[], > float thickness, float drawThickness, BoxSide, const RenderStyle&, >- Color, EBorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); >+ Color, BorderStyle, BackgroundBleedAvoidance, bool includeLogicalLeftEdge, bool includeLogicalRightEdge); > void paintMaskForTextFillBox(ImageBuffer*, const IntRect&, InlineFlowBox*, const LayoutRect&); > }; > >Index: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (working copy) >@@ -43,10 +43,10 @@ public: > : m_box(parent) > , m_largestOrdinal(1) > { >- if (m_box->style().boxOrient() == HORIZONTAL && !m_box->style().isLeftToRightDirection()) >- m_forward = m_box->style().boxDirection() != BNORMAL; >+ if (m_box->style().boxOrient() == BoxOrient::Horizontal && !m_box->style().isLeftToRightDirection()) >+ m_forward = m_box->style().boxDirection() != BoxDirection::Normal; > else >- m_forward = m_box->style().boxDirection() == BNORMAL; >+ m_forward = m_box->style().boxDirection() == BoxDirection::Normal; > if (!m_forward) { > // No choice, since we're going backwards, we have to find out the highest ordinal up front. > RenderBox* child = m_box->firstChildBox(); >@@ -292,8 +292,8 @@ void RenderDeprecatedFlexibleBox::layout > updateLogicalHeight(); > > if (previousSize != size() >- || (parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == HORIZONTAL >- && parent()->style().boxAlign() == BSTRETCH)) >+ || (parent()->isDeprecatedFlexibleBox() && parent()->style().boxOrient() == BoxOrient::Horizontal >+ && parent()->style().boxAlign() == BoxAlignment::Stretch)) > relayoutChildren = true; > > setHeight(0); >@@ -434,7 +434,7 @@ void RenderDeprecatedFlexibleBox::layout > layoutChildIfNeededApplyingDelta(child, childLayoutDelta); > > // Update our height and overflow height. >- if (style().boxAlign() == BBASELINE) { >+ if (style().boxAlign() == BoxAlignment::Baseline) { > LayoutUnit ascent = child->firstLineBaseline().value_or(child->height() + child->marginBottom()); > ascent += child->marginTop(); > LayoutUnit descent = (child->height() + child->verticalMarginExtent()) - ascent; >@@ -467,7 +467,7 @@ void RenderDeprecatedFlexibleBox::layout > > // Now that our height is actually known, we can place our boxes. > childIndex = 0; >- m_stretchingChildren = (style().boxAlign() == BSTRETCH); >+ m_stretchingChildren = (style().boxAlign() == BoxAlignment::Stretch); > for (RenderBox* child = iterator.first(); child; child = iterator.next()) { > if (child->isOutOfFlowPositioned()) { > child->containingBlock()->insertPositionedObject(*child); >@@ -506,19 +506,19 @@ void RenderDeprecatedFlexibleBox::layout > xPos += child->marginLeft(); > LayoutUnit childY = yPos; > switch (style().boxAlign()) { >- case BCENTER: >+ case BoxAlignment::Center: > childY += child->marginTop() + std::max<LayoutUnit>(0, (contentHeight() - (child->height() + child->verticalMarginExtent())) / 2); > break; >- case BBASELINE: { >+ case BoxAlignment::Baseline: { > LayoutUnit ascent = child->firstLineBaseline().value_or(child->height() + child->marginBottom()); > ascent += child->marginTop(); > childY += child->marginTop() + (maxAscent - ascent); > break; > } >- case BEND: >+ case BoxAlignment::End: > childY += contentHeight() - child->marginBottom() - child->height(); > break; >- default: // BSTART >+ default: // BoxAlignment::Start > childY += child->marginTop(); > break; > } >@@ -619,11 +619,11 @@ void RenderDeprecatedFlexibleBox::layout > > endAndCommitUpdateScrollInfoAfterLayoutTransaction(); > >- if (remainingSpace > 0 && ((style().isLeftToRightDirection() && style().boxPack() != Start) >- || (!style().isLeftToRightDirection() && style().boxPack() != End))) { >+ if (remainingSpace > 0 && ((style().isLeftToRightDirection() && style().boxPack() != BoxPack::Start) >+ || (!style().isLeftToRightDirection() && style().boxPack() != BoxPack::End))) { > // Children must be repositioned. > LayoutUnit offset = 0; >- if (style().boxPack() == Justify) { >+ if (style().boxPack() == BoxPack::Justify) { > // Determine the total number of children. > int totalChildren = 0; > for (RenderBox* child = iterator.first(); child; child = iterator.next()) { >@@ -654,9 +654,9 @@ void RenderDeprecatedFlexibleBox::layout > } > } > } else { >- if (style().boxPack() == Center) >+ if (style().boxPack() == BoxPack::Center) > offset += remainingSpace / 2; >- else // END for LTR, START for RTL >+ else // BoxPack::End for LTR, BoxPack::Start for RTL > offset += remainingSpace; > for (RenderBox* child = iterator.first(); child; child = iterator.next()) { > if (childDoesNotAffectWidthOrFlexing(child)) >@@ -748,17 +748,17 @@ void RenderDeprecatedFlexibleBox::layout > // We can place the child now, using our value of box-align. > LayoutUnit childX = borderLeft() + paddingLeft(); > switch (style().boxAlign()) { >- case BCENTER: >- case BBASELINE: // Baseline just maps to center for vertical boxes >+ case BoxAlignment::Center: >+ case BoxAlignment::Baseline: // Baseline just maps to center for vertical boxes > childX += child->marginLeft() + std::max<LayoutUnit>(0, (contentWidth() - (child->width() + child->horizontalMarginExtent())) / 2); > break; >- case BEND: >+ case BoxAlignment::End: > if (!style().isLeftToRightDirection()) > childX += child->marginLeft(); > else > childX += contentWidth() - child->marginRight() - child->width(); > break; >- default: // BSTART/BSTRETCH >+ default: // BoxAlignment::Start/BoxAlignment::Stretch > if (style().isLeftToRightDirection()) > childX += child->marginLeft(); > else >@@ -876,10 +876,10 @@ void RenderDeprecatedFlexibleBox::layout > > endAndCommitUpdateScrollInfoAfterLayoutTransaction(); > >- if (style().boxPack() != Start && remainingSpace > 0) { >+ if (style().boxPack() != BoxPack::Start && remainingSpace > 0) { > // Children must be repositioned. > LayoutUnit offset = 0; >- if (style().boxPack() == Justify) { >+ if (style().boxPack() == BoxPack::Justify) { > // Determine the total number of children. > int totalChildren = 0; > for (RenderBox* child = iterator.first(); child; child = iterator.next()) { >@@ -910,9 +910,9 @@ void RenderDeprecatedFlexibleBox::layout > } > } > } else { >- if (style().boxPack() == Center) >+ if (style().boxPack() == BoxPack::Center) > offset += remainingSpace / 2; >- else // END >+ else // BoxPack::End > offset += remainingSpace; > for (RenderBox* child = iterator.first(); child; child = iterator.next()) { > if (childDoesNotAffectWidthOrFlexing(child)) >Index: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h >=================================================================== >--- Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h (revision 232008) >+++ Source/WebCore/rendering/RenderDeprecatedFlexibleBox.h (working copy) >@@ -58,9 +58,9 @@ private: > > LayoutUnit allowedChildFlex(RenderBox* child, bool expanding, unsigned group); > >- bool hasMultipleLines() const { return style().boxLines() == MULTIPLE; } >- bool isVertical() const { return style().boxOrient() == VERTICAL; } >- bool isHorizontal() const { return style().boxOrient() == HORIZONTAL; } >+ bool hasMultipleLines() const { return style().boxLines() == BoxLines::Multiple; } >+ bool isVertical() const { return style().boxOrient() == BoxOrient::Vertical; } >+ bool isHorizontal() const { return style().boxOrient() == BoxOrient::Horizontal; } > > void applyLineClamp(FlexBoxIterator&, bool relayoutChildren); > void clearLineClamp(); >Index: Source/WebCore/rendering/RenderElement.cpp >=================================================================== >--- Source/WebCore/rendering/RenderElement.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderElement.cpp (working copy) >@@ -263,65 +263,65 @@ const RenderStyle& RenderElement::firstL > return (hasRareData() && rareData().cachedFirstLineStyle) ? *rareData().cachedFirstLineStyle : style(); > } > >-StyleDifference RenderElement::adjustStyleDifference(StyleDifference diff, unsigned contextSensitiveProperties) const >+StyleDifference RenderElement::adjustStyleDifference(StyleDifference diff, OptionSet<StyleDifferenceContextSensitiveProperty> contextSensitiveProperties) const > { > // If transform changed, and we are not composited, need to do a layout. >- if (contextSensitiveProperties & ContextSensitivePropertyTransform) { >+ if (contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::Transform) { > // FIXME: when transforms are taken into account for overflow, we will need to do a layout. > if (!hasLayer() || !downcast<RenderLayerModelObject>(*this).layer()->isComposited()) { > if (!hasLayer()) >- diff = std::max(diff, StyleDifferenceLayout); >+ diff = std::max(diff, StyleDifference::Layout); > else { > // We need to set at least SimplifiedLayout, but if PositionedMovementOnly is already set > // then we actually need SimplifiedLayoutAndPositionedMovement. >- diff = std::max(diff, (diff == StyleDifferenceLayoutPositionedMovementOnly) ? StyleDifferenceSimplifiedLayoutAndPositionedMovement : StyleDifferenceSimplifiedLayout); >+ diff = std::max(diff, (diff == StyleDifference::LayoutPositionedMovementOnly) ? StyleDifference::SimplifiedLayoutAndPositionedMovement : StyleDifference::SimplifiedLayout); > } > > } else >- diff = std::max(diff, StyleDifferenceRecompositeLayer); >+ diff = std::max(diff, StyleDifference::RecompositeLayer); > } > >- if (contextSensitiveProperties & ContextSensitivePropertyOpacity) { >+ if (contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::Opacity) { > if (!hasLayer() || !downcast<RenderLayerModelObject>(*this).layer()->isComposited()) >- diff = std::max(diff, StyleDifferenceRepaintLayer); >+ diff = std::max(diff, StyleDifference::RepaintLayer); > else >- diff = std::max(diff, StyleDifferenceRecompositeLayer); >+ diff = std::max(diff, StyleDifference::RecompositeLayer); > } > >- if (contextSensitiveProperties & ContextSensitivePropertyClipPath) { >+ if (contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::ClipPath) { > if (hasLayer() > && downcast<RenderLayerModelObject>(*this).layer()->isComposited() > && hasClipPath() > && RenderLayerCompositor::canCompositeClipPath(*downcast<RenderLayerModelObject>(*this).layer())) >- diff = std::max(diff, StyleDifferenceRecompositeLayer); >+ diff = std::max(diff, StyleDifference::RecompositeLayer); > else >- diff = std::max(diff, StyleDifferenceRepaint); >+ diff = std::max(diff, StyleDifference::Repaint); > } > >- if (contextSensitiveProperties & ContextSensitivePropertyWillChange) { >+ if (contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::WillChange) { > if (style().willChange() && style().willChange()->canTriggerCompositing()) >- diff = std::max(diff, StyleDifferenceRecompositeLayer); >+ diff = std::max(diff, StyleDifference::RecompositeLayer); > } > >- if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLayer()) { >+ if ((contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::Filter) && hasLayer()) { > auto& layer = *downcast<RenderLayerModelObject>(*this).layer(); > if (!layer.isComposited() || layer.paintsWithFilters()) >- diff = std::max(diff, StyleDifferenceRepaintLayer); >+ diff = std::max(diff, StyleDifference::RepaintLayer); > else >- diff = std::max(diff, StyleDifferenceRecompositeLayer); >+ diff = std::max(diff, StyleDifference::RecompositeLayer); > } > > // The answer to requiresLayer() for plugins, iframes, and canvas can change without the actual > // style changing, since it depends on whether we decide to composite these elements. When the > // layer status of one of these elements changes, we need to force a layout. >- if (diff < StyleDifferenceLayout && isRenderLayerModelObject()) { >+ if (diff < StyleDifference::Layout && isRenderLayerModelObject()) { > if (hasLayer() != downcast<RenderLayerModelObject>(*this).requiresLayer()) >- diff = StyleDifferenceLayout; >+ diff = StyleDifference::Layout; > } > > // If we have no layer(), just treat a RepaintLayer hint as a normal Repaint. >- if (diff == StyleDifferenceRepaintLayer && !hasLayer()) >- diff = StyleDifferenceRepaint; >+ if (diff == StyleDifference::RepaintLayer && !hasLayer()) >+ diff = StyleDifference::Repaint; > > return diff; > } >@@ -339,7 +339,7 @@ inline bool RenderElement::hasImmediateN > > inline bool RenderElement::shouldRepaintForStyleDifference(StyleDifference diff) const > { >- return diff == StyleDifferenceRepaint || (diff == StyleDifferenceRepaintIfTextOrBorderOrOutline && hasImmediateNonWhitespaceTextChildOrBorderOrOutline()); >+ return diff == StyleDifference::Repaint || (diff == StyleDifference::RepaintIfTextOrBorderOrOutline && hasImmediateNonWhitespaceTextChildOrBorderOrOutline()); > } > > void RenderElement::updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers) >@@ -379,9 +379,9 @@ void RenderElement::initializeStyle() > { > Style::loadPendingResources(m_style, document(), element()); > >- styleWillChange(StyleDifferenceNewStyle, style()); >+ styleWillChange(StyleDifference::NewStyle, style()); > m_hasInitializedStyle = true; >- styleDidChange(StyleDifferenceNewStyle, nullptr); >+ styleDidChange(StyleDifference::NewStyle, nullptr); > > // We shouldn't have any text children that would need styleDidChange at this point. > ASSERT(!childrenOfType<RenderText>(*this).first()); >@@ -397,8 +397,8 @@ void RenderElement::setStyle(RenderStyle > // and remove the check of m_hasInitializedStyle below too. > ASSERT(m_hasInitializedStyle || isRenderView()); > >- StyleDifference diff = StyleDifferenceEqual; >- unsigned contextSensitiveProperties = ContextSensitivePropertyNone; >+ StyleDifference diff = StyleDifference::Equal; >+ OptionSet<StyleDifferenceContextSensitiveProperty> contextSensitiveProperties; > if (m_hasInitializedStyle) > diff = m_style.diff(style, contextSensitiveProperties); > >@@ -434,19 +434,19 @@ void RenderElement::setStyle(RenderStyle > // check whether we should layout now, and decide if we need to repaint. > StyleDifference updatedDiff = adjustStyleDifference(diff, contextSensitiveProperties); > >- if (diff <= StyleDifferenceLayoutPositionedMovementOnly) { >- if (updatedDiff == StyleDifferenceLayout) >+ if (diff <= StyleDifference::LayoutPositionedMovementOnly) { >+ if (updatedDiff == StyleDifference::Layout) > setNeedsLayoutAndPrefWidthsRecalc(); >- else if (updatedDiff == StyleDifferenceLayoutPositionedMovementOnly) >+ else if (updatedDiff == StyleDifference::LayoutPositionedMovementOnly) > setNeedsPositionedMovementLayout(&oldStyle); >- else if (updatedDiff == StyleDifferenceSimplifiedLayoutAndPositionedMovement) { >+ else if (updatedDiff == StyleDifference::SimplifiedLayoutAndPositionedMovement) { > setNeedsPositionedMovementLayout(&oldStyle); > setNeedsSimplifiedNormalFlowLayout(); >- } else if (updatedDiff == StyleDifferenceSimplifiedLayout) >+ } else if (updatedDiff == StyleDifference::SimplifiedLayout) > setNeedsSimplifiedNormalFlowLayout(); > } > >- if (updatedDiff == StyleDifferenceRepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) { >+ if (updatedDiff == StyleDifference::RepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) { > // Do a repaint with the new style now, e.g., for example if we go from > // not having an outline to having an outline. > repaint(); >@@ -456,7 +456,7 @@ void RenderElement::setStyle(RenderStyle > void RenderElement::didAttachChild(RenderObject& child, RenderObject*) > { > if (is<RenderText>(child)) >- downcast<RenderText>(child).styleDidChange(StyleDifferenceEqual, nullptr); >+ downcast<RenderText>(child).styleDidChange(StyleDifference::Equal, nullptr); > // SVG creates renderers for <g display="none">, as SVG requires children of hidden > // <g>s to have renderers - at least that's how our implementation works. Consider: > // <g display="none"><foreignObject><body style="position: relative">FOO... >@@ -669,8 +669,8 @@ void RenderElement::propagateStyleToAnon > if (style().specifiesColumns()) { > if (elementChild.style().specifiesColumns()) > newStyle.inheritColumnPropertiesFrom(style()); >- if (elementChild.style().columnSpan()) >- newStyle.setColumnSpan(ColumnSpanAll); >+ if (elementChild.style().columnSpan() == ColumnSpan::All) >+ newStyle.setColumnSpan(ColumnSpan::All); > } > > // Preserve the position style of anonymous block continuations as they can have relative or sticky position when >@@ -728,7 +728,7 @@ void RenderElement::styleWillChange(Styl > layer->setHasVisibleContent(); > else if (layer->hasVisibleContent() && (this == &layer->renderer() || layer->renderer().style().visibility() != VISIBLE)) { > layer->dirtyVisibleContentStatus(); >- if (diff > StyleDifferenceRepaintLayer) >+ if (diff > StyleDifference::RepaintLayer) > repaint(); > } > } >@@ -747,7 +747,7 @@ void RenderElement::styleWillChange(Styl > } > > // reset style flags >- if (diff == StyleDifferenceLayout || diff == StyleDifferenceLayoutPositionedMovementOnly) { >+ if (diff == StyleDifference::Layout || diff == StyleDifference::LayoutPositionedMovementOnly) { > setFloating(false); > clearPositionedState(); > } >@@ -805,7 +805,7 @@ void RenderElement::styleDidChange(Style > if (!m_parent) > return; > >- if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { >+ if (diff == StyleDifference::Layout || diff == StyleDifference::SimplifiedLayout) { > RenderCounter::rendererStyleChanged(*this, oldStyle, &m_style); > > // If the object already needs layout, then setNeedsLayout won't do >@@ -816,14 +816,14 @@ void RenderElement::styleDidChange(Style > if (needsLayout() && oldStyle->position() != m_style.position()) > markContainingBlocksForLayout(); > >- if (diff == StyleDifferenceLayout) >+ if (diff == StyleDifference::Layout) > setNeedsLayoutAndPrefWidthsRecalc(); > else > setNeedsSimplifiedNormalFlowLayout(); >- } else if (diff == StyleDifferenceSimplifiedLayoutAndPositionedMovement) { >+ } else if (diff == StyleDifference::SimplifiedLayoutAndPositionedMovement) { > setNeedsPositionedMovementLayout(oldStyle); > setNeedsSimplifiedNormalFlowLayout(); >- } else if (diff == StyleDifferenceLayoutPositionedMovementOnly) >+ } else if (diff == StyleDifference::LayoutPositionedMovementOnly) > setNeedsPositionedMovementLayout(oldStyle); > > // Don't check for repaint here; we need to wait until the layer has been >@@ -833,8 +833,8 @@ void RenderElement::styleDidChange(Style > if (oldStyle && !areCursorsEqual(oldStyle, &style())) > frame().eventHandler().scheduleCursorUpdate(); > #endif >- bool hadOutlineAuto = oldStyle && oldStyle->outlineStyleIsAuto(); >- bool hasOutlineAuto = outlineStyleForRepaint().outlineStyleIsAuto(); >+ bool hadOutlineAuto = oldStyle && oldStyle->outlineStyleIsAuto() == OutlineIsAuto::On; >+ bool hasOutlineAuto = outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On; > if (hasOutlineAuto != hadOutlineAuto) { > updateOutlineAutoAncestor(hasOutlineAuto); > issueRepaintForOutlineAuto(hasOutlineAuto ? outlineStyleForRepaint().outlineSize() : oldStyle->outlineSize()); >@@ -1032,10 +1032,10 @@ static bool mustRepaintFillLayers(const > > auto sizeType = layer.sizeType(); > >- if (sizeType == Contain || sizeType == Cover) >+ if (sizeType == FillSizeType::Contain || sizeType == FillSizeType::Cover) > return true; > >- if (sizeType == SizeLength) { >+ if (sizeType == FillSizeType::Size) { > auto size = layer.sizeLength(); > if (size.width.isPercentOrCalculated() || size.height.isPercentOrCalculated()) > return true; >@@ -1360,7 +1360,7 @@ Color RenderElement::selectionColor(CSSP > { > // If the element is unselectable, or we are only painting the selection, > // don't override the foreground color with the selection foreground color. >- if (style().userSelect() == SELECT_NONE >+ if (style().userSelect() == UserSelect::None > || (view().frameView().paintBehavior() & (PaintBehaviorSelectionOnly | PaintBehaviorSelectionAndBackgroundsOnly))) > return Color(); > >@@ -1403,7 +1403,7 @@ Color RenderElement::selectionEmphasisMa > > Color RenderElement::selectionBackgroundColor() const > { >- if (style().userSelect() == SELECT_NONE) >+ if (style().userSelect() == UserSelect::None) > return Color(); > > if (frame().selection().shouldShowBlockCursor() && frame().selection().isCaret()) >@@ -1557,7 +1557,7 @@ const RenderElement* RenderElement::encl > return current; > } > >-void RenderElement::drawLineForBoxSide(GraphicsContext& graphicsContext, const FloatRect& rect, BoxSide side, Color color, EBorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const >+void RenderElement::drawLineForBoxSide(GraphicsContext& graphicsContext, const FloatRect& rect, BoxSide side, Color color, BorderStyle borderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias) const > { > auto drawBorderRect = [&graphicsContext] (const FloatRect& rect) > { >@@ -1566,7 +1566,7 @@ void RenderElement::drawLineForBoxSide(G > graphicsContext.drawRect(rect); > }; > >- auto drawLineFor = [this, &graphicsContext, color, antialias] (const FloatRect& rect, BoxSide side, EBorderStyle borderStyle, const FloatSize& adjacent) >+ auto drawLineFor = [this, &graphicsContext, color, antialias] (const FloatRect& rect, BoxSide side, BorderStyle borderStyle, const FloatSize& adjacent) > { > if (rect.isEmpty()) > return; >@@ -1592,27 +1592,27 @@ void RenderElement::drawLineForBoxSide(G > return; > > float deviceScaleFactor = document().deviceScaleFactor(); >- if (borderStyle == DOUBLE && (thickness * deviceScaleFactor) < 3) >- borderStyle = SOLID; >+ if (borderStyle == BorderStyle::Double && (thickness * deviceScaleFactor) < 3) >+ borderStyle = BorderStyle::Solid; > > switch (borderStyle) { >- case BNONE: >- case BHIDDEN: >+ case BorderStyle::None: >+ case BorderStyle::Hidden: > return; >- case DOTTED: >- case DASHED: { >+ case BorderStyle::Dotted: >+ case BorderStyle::Dashed: { > bool wasAntialiased = graphicsContext.shouldAntialias(); > StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle(); > graphicsContext.setShouldAntialias(antialias); > graphicsContext.setStrokeColor(color); > graphicsContext.setStrokeThickness(thickness); >- graphicsContext.setStrokeStyle(borderStyle == DASHED ? DashedStroke : DottedStroke); >+ graphicsContext.setStrokeStyle(borderStyle == BorderStyle::Dashed ? DashedStroke : DottedStroke); > graphicsContext.drawLine(roundPointToDevicePixels(LayoutPoint(x1, y1), deviceScaleFactor), roundPointToDevicePixels(LayoutPoint(x2, y2), deviceScaleFactor)); > graphicsContext.setShouldAntialias(wasAntialiased); > graphicsContext.setStrokeStyle(oldStrokeStyle); > break; > } >- case DOUBLE: { >+ case BorderStyle::Double: { > float thirdOfThickness = ceilToDevicePixel(thickness / 3, deviceScaleFactor); > ASSERT(thirdOfThickness); > >@@ -1655,31 +1655,31 @@ void RenderElement::drawLineForBoxSide(G > switch (side) { > case BSTop: > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y1, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y2 - thirdOfThickness, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > break; > case BSLeft: > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > > paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > break; > case BSBottom: > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset2, y1, (x2 - mitreOffset4) - (x1 + mitreOffset2), thirdOfThickness), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1 + mitreOffset1, y2 - thirdOfThickness, (x2 - mitreOffset3) - (x1 + mitreOffset1), thirdOfThickness), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > break; > case BSRight: > paintBorderRect = snapRectToDevicePixels(LayoutRect(x1, y1 + mitreOffset2, thirdOfThickness, (y2 - mitreOffset4) - (y1 + mitreOffset2)), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > > paintBorderRect = snapRectToDevicePixels(LayoutRect(x2 - thirdOfThickness, y1 + mitreOffset1, thirdOfThickness, (y2 - mitreOffset3) - (y1 + mitreOffset1)), deviceScaleFactor); >- drawLineFor(paintBorderRect, side, SOLID, FloatSize(adjacent1BigThird, adjacent2BigThird)); >+ drawLineFor(paintBorderRect, side, BorderStyle::Solid, FloatSize(adjacent1BigThird, adjacent2BigThird)); > break; > default: > break; >@@ -1687,16 +1687,16 @@ void RenderElement::drawLineForBoxSide(G > } > break; > } >- case RIDGE: >- case GROOVE: { >- EBorderStyle s1; >- EBorderStyle s2; >- if (borderStyle == GROOVE) { >- s1 = INSET; >- s2 = OUTSET; >+ case BorderStyle::Ridge: >+ case BorderStyle::Groove: { >+ BorderStyle s1; >+ BorderStyle s2; >+ if (borderStyle == BorderStyle::Groove) { >+ s1 = BorderStyle::Inset; >+ s2 = BorderStyle::Outset; > } else { >- s1 = OUTSET; >- s2 = INSET; >+ s1 = BorderStyle::Outset; >+ s2 = BorderStyle::Inset; > } > > float adjacent1BigHalf = ceilToDevicePixel(adjacentWidth1 / 2, deviceScaleFactor); >@@ -1750,11 +1750,11 @@ void RenderElement::drawLineForBoxSide(G > } > break; > } >- case INSET: >- case OUTSET: >+ case BorderStyle::Inset: >+ case BorderStyle::Outset: > calculateBorderStyleColor(borderStyle, side, color); > FALLTHROUGH; >- case SOLID: { >+ case BorderStyle::Solid: { > StrokeStyle oldStrokeStyle = graphicsContext.strokeStyle(); > ASSERT(x2 >= x1); > ASSERT(y2 >= y1); >@@ -1819,7 +1819,7 @@ void RenderElement::drawLineForBoxSide(G > > void RenderElement::paintFocusRing(PaintInfo& paintInfo, const RenderStyle& style, const Vector<LayoutRect>& focusRingRects) > { >- ASSERT(style.outlineStyleIsAuto()); >+ ASSERT(style.outlineStyleIsAuto() == OutlineIsAuto::On); > float outlineOffset = style.outlineOffset(); > Vector<FloatRect> pixelSnappedFocusRingRects; > float deviceScaleFactor = document().deviceScaleFactor(); >@@ -1860,16 +1860,16 @@ void RenderElement::paintOutline(PaintIn > float outlineOffset = floorToDevicePixel(styleToUse.outlineOffset(), document().deviceScaleFactor()); > > // Only paint the focus ring by hand if the theme isn't able to draw it. >- if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse)) { >+ if (styleToUse.outlineStyleIsAuto() == OutlineIsAuto::On && !theme().supportsFocusRing(styleToUse)) { > Vector<LayoutRect> focusRingRects; > addFocusRingRects(focusRingRects, paintRect.location(), paintInfo.paintContainer); > paintFocusRing(paintInfo, styleToUse, focusRingRects); > } > >- if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse)) >+ if (hasOutlineAnnotation() && styleToUse.outlineStyleIsAuto() == OutlineIsAuto::Off && !theme().supportsFocusRing(styleToUse)) > addPDFURLRect(paintInfo, paintRect.location()); > >- if (styleToUse.outlineStyleIsAuto() || styleToUse.outlineStyle() == BNONE) >+ if (styleToUse.outlineStyleIsAuto() == OutlineIsAuto::On || styleToUse.outlineStyle() == BorderStyle::None) > return; > > FloatRect outer = paintRect; >@@ -1881,12 +1881,12 @@ void RenderElement::paintOutline(PaintIn > if (outer.isEmpty()) > return; > >- EBorderStyle outlineStyle = styleToUse.outlineStyle(); >+ BorderStyle outlineStyle = styleToUse.outlineStyle(); > Color outlineColor = styleToUse.visitedDependentColorWithColorFilter(CSSPropertyOutlineColor); > > bool useTransparencyLayer = !outlineColor.isOpaque(); > if (useTransparencyLayer) { >- if (outlineStyle == SOLID) { >+ if (outlineStyle == BorderStyle::Solid) { > Path path; > path.addRect(outer); > path.addRect(inner); >@@ -1935,7 +1935,7 @@ void RenderElement::updateOutlineAutoAnc > if (hasOutlineAuto == child.hasOutlineAutoAncestor()) > continue; > child.setHasOutlineAutoAncestor(hasOutlineAuto); >- bool childHasOutlineAuto = child.outlineStyleForRepaint().outlineStyleIsAuto(); >+ bool childHasOutlineAuto = child.outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On; > if (childHasOutlineAuto) > continue; > if (!is<RenderElement>(child)) >@@ -2057,7 +2057,7 @@ static RenderObject::BlockContentHeightT > if (is<RenderBlock>(renderer)) { > // For fixed height styles, if the overflow size of the element spills out of the specified > // height, assume we can apply text auto-sizing. >- if (style.overflowY() == OVISIBLE >+ if (style.overflowY() == Overflow::Visible > && style.height().value() < downcast<RenderBlock>(renderer).layoutOverflowRect().maxY()) > return RenderObject::OverflowHeight; > } >Index: Source/WebCore/rendering/RenderElement.h >=================================================================== >--- Source/WebCore/rendering/RenderElement.h (revision 232008) >+++ Source/WebCore/rendering/RenderElement.h (working copy) >@@ -49,10 +49,10 @@ public: > > void initializeStyle(); > >- // Calling with minimalStyleDifference > StyleDifferenceEqual indicates that >+ // Calling with minimalStyleDifference > StyleDifference::Equal indicates that > // out-of-band state (e.g. animations) requires that styleDidChange processing > // continue even if the style isn't different from the current style. >- void setStyle(RenderStyle&&, StyleDifference minimalStyleDifference = StyleDifferenceEqual); >+ void setStyle(RenderStyle&&, StyleDifference minimalStyleDifference = StyleDifference::Equal); > > // The pseudo element style can be cached or uncached. Use the cached method if the pseudo element doesn't respect > // any pseudo classes (and therefore has no concept of changing state). >@@ -147,7 +147,7 @@ public: > bool hasClip() const { return isOutOfFlowPositioned() && style().hasClip(); } > bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip(); } > bool hasClipPath() const { return style().clipPath(); } >- bool hasHiddenBackface() const { return style().backfaceVisibility() == BackfaceVisibilityHidden; } >+ bool hasHiddenBackface() const { return style().backfaceVisibility() == BackfaceVisibility::Hidden; } > bool hasOutlineAnnotation() const; > bool hasOutline() const { return style().hasOutline() || hasOutlineAnnotation(); } > bool hasSelfPaintingLayer() const; >@@ -196,7 +196,7 @@ public: > void setHasCounterNodeMap(bool f) { m_hasCounterNodeMap = f; } > > const RenderElement* enclosingRendererWithTextDecoration(TextDecoration, bool firstLine) const; >- void drawLineForBoxSide(GraphicsContext&, const FloatRect&, BoxSide, Color, EBorderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias = false) const; >+ void drawLineForBoxSide(GraphicsContext&, const FloatRect&, BoxSide, Color, BorderStyle, float adjacentWidth1, float adjacentWidth2, bool antialias = false) const; > > #if ENABLE(TEXT_AUTOSIZING) > void adjustComputedFontSizesOnBlocks(float size, float visibleWidth); >@@ -305,7 +305,7 @@ private: > void updateImage(StyleImage*, StyleImage*); > void updateShapeImage(const ShapeValue*, const ShapeValue*); > >- StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensitiveProperties) const; >+ StyleDifference adjustStyleDifference(StyleDifference, OptionSet<StyleDifferenceContextSensitiveProperty>) const; > std::unique_ptr<RenderStyle> computeFirstLineStyle() const; > void invalidateCachedFirstLineStyle(); > >@@ -421,7 +421,7 @@ inline bool RenderElement::canContainFix > > inline bool RenderElement::canContainAbsolutelyPositionedObjects() const > { >- return style().position() != StaticPosition >+ return style().position() != PositionType::Static > || (isRenderBlock() && hasTransformRelatedProperty()) > || isSVGForeignObject() > || isRenderView(); >Index: Source/WebCore/rendering/RenderFlexibleBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderFlexibleBox.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderFlexibleBox.cpp (working copy) >@@ -187,7 +187,7 @@ std::optional<int> RenderFlexibleBox::fi > for (RenderBox* child = m_orderIterator.first(); child; child = m_orderIterator.next()) { > if (m_orderIterator.shouldSkipChild(*child)) > continue; >- if (alignmentForChild(*child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(*child)) { >+ if (alignmentForChild(*child) == ItemPosition::Baseline && !hasAutoMarginsInCrossAxis(*child)) { > baselineChild = child; > break; > } >@@ -233,24 +233,24 @@ static const StyleContentAlignmentData& > // flexing in the main axis is controlled by flex, stretch behaves as > // flex-start (ignoring the specified fallback alignment, if any). > // https://drafts.csswg.org/css-align/#distribution-flex >- static const StyleContentAlignmentData normalBehavior = { ContentPositionNormal, ContentDistributionStretch}; >+ static const StyleContentAlignmentData normalBehavior = { ContentPosition::Normal, ContentDistribution::Stretch}; > return normalBehavior; > } > > void RenderFlexibleBox::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { > RenderBlock::styleDidChange(diff, oldStyle); >- if (!oldStyle || diff != StyleDifferenceLayout) >+ if (!oldStyle || diff != StyleDifference::Layout) > return; > >- if (oldStyle->resolvedAlignItems(selfAlignmentNormalBehavior()).position() == ItemPositionStretch) { >+ if (oldStyle->resolvedAlignItems(selfAlignmentNormalBehavior()).position() == ItemPosition::Stretch) { > // Flex items that were previously stretching need to be relayed out so we > // can compute new available cross axis space. This is only necessary for > // stretching since other alignment values don't change the size of the > // box. > for (auto& child : childrenOfType<RenderBox>(*this)) { > ItemPosition previousAlignment = child.style().resolvedAlignSelf(oldStyle, selfAlignmentNormalBehavior()).position(); >- if (previousAlignment == ItemPositionStretch && previousAlignment != child.style().resolvedAlignSelf(&style(), selfAlignmentNormalBehavior()).position()) >+ if (previousAlignment == ItemPosition::Stretch && previousAlignment != child.style().resolvedAlignSelf(&style(), selfAlignmentNormalBehavior()).position()) > child.setChildNeedsLayout(MarkOnlyThis); > } > } >@@ -364,7 +364,7 @@ void RenderFlexibleBox::repositionLogica > > alignChildren(lineContexts); > >- if (style().flexWrap() == FlexWrapReverse) >+ if (style().flexWrap() == FlexWrap::Reverse) > flipForWrapReverse(lineContexts, crossAxisStartEdge); > > // direction:rtl + flex-direction:column means the cross-axis direction is >@@ -405,12 +405,12 @@ bool RenderFlexibleBox::isLeftToRightFlo > { > if (isColumnFlow()) > return style().writingMode() == TopToBottomWritingMode || style().writingMode() == LeftToRightWritingMode; >- return style().isLeftToRightDirection() ^ (style().flexDirection() == FlowRowReverse); >+ return style().isLeftToRightDirection() ^ (style().flexDirection() == FlexDirection::RowReverse); > } > > bool RenderFlexibleBox::isMultiline() const > { >- return style().flexWrap() != FlexNoWrap; >+ return style().flexWrap() != FlexWrap::NoWrap; > } > > Length RenderFlexibleBox::flexBasisForChild(const RenderBox& child) const >@@ -1081,7 +1081,7 @@ LayoutUnit RenderFlexibleBox::adjustChil > if (min.isSpecifiedOrIntrinsic()) > return std::max(childSize, std::max(LayoutUnit(), computeMainAxisExtentForChild(child, MinSize, min).value_or(childSize))); > >- if (!isFlexibleBoxImpl() && min.isAuto() && mainAxisOverflowForChild(child) == OVISIBLE && !(isColumnFlow() && is<RenderFlexibleBox>(child))) { >+ if (!isFlexibleBoxImpl() && min.isAuto() && mainAxisOverflowForChild(child) == Overflow::Visible && !(isColumnFlow() && is<RenderFlexibleBox>(child))) { > // FIXME: For now, we do not handle min-height: auto for nested > // column flexboxes. We need to implement > // https://drafts.csswg.org/css-flexbox/#intrinsic-sizes before that >@@ -1118,7 +1118,7 @@ LayoutUnit RenderFlexibleBox::adjustChil > > std::optional<LayoutUnit> RenderFlexibleBox::crossSizeForPercentageResolution(const RenderBox& child) > { >- if (alignmentForChild(child) != ItemPositionStretch) >+ if (alignmentForChild(child) != ItemPosition::Stretch) > return std::nullopt; > > // Here we implement https://drafts.csswg.org/css-flexbox/#algo-stretch >@@ -1298,19 +1298,19 @@ bool RenderFlexibleBox::resolveFlexibleL > return !totalViolation; > } > >-static LayoutUnit initialJustifyContentOffset(LayoutUnit availableFreeSpace, ContentPosition justifyContent, ContentDistributionType justifyContentDistribution, unsigned numberOfChildren) >+static LayoutUnit initialJustifyContentOffset(LayoutUnit availableFreeSpace, ContentPosition justifyContent, ContentDistribution justifyContentDistribution, unsigned numberOfChildren) > { >- if (justifyContent == ContentPositionFlexEnd) >+ if (justifyContent == ContentPosition::FlexEnd) > return availableFreeSpace; >- if (justifyContent == ContentPositionCenter) >+ if (justifyContent == ContentPosition::Center) > return availableFreeSpace / 2; >- if (justifyContentDistribution == ContentDistributionSpaceAround) { >+ if (justifyContentDistribution == ContentDistribution::SpaceAround) { > if (availableFreeSpace > 0 && numberOfChildren) > return availableFreeSpace / (2 * numberOfChildren); > else > return availableFreeSpace / 2; > } >- if (justifyContentDistribution == ContentDistributionSpaceEvenly) { >+ if (justifyContentDistribution == ContentDistribution::SpaceEvenly) { > if (availableFreeSpace > 0 && numberOfChildren) > return availableFreeSpace / (numberOfChildren + 1); > // Fallback to 'center' >@@ -1319,14 +1319,14 @@ static LayoutUnit initialJustifyContentO > return 0; > } > >-static LayoutUnit justifyContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistributionType justifyContentDistribution, unsigned numberOfChildren) >+static LayoutUnit justifyContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistribution justifyContentDistribution, unsigned numberOfChildren) > { > if (availableFreeSpace > 0 && numberOfChildren > 1) { >- if (justifyContentDistribution == ContentDistributionSpaceBetween) >+ if (justifyContentDistribution == ContentDistribution::SpaceBetween) > return availableFreeSpace / (numberOfChildren - 1); >- if (justifyContentDistribution == ContentDistributionSpaceAround) >+ if (justifyContentDistribution == ContentDistribution::SpaceAround) > return availableFreeSpace / numberOfChildren; >- if (justifyContentDistribution == ContentDistributionSpaceEvenly) >+ if (justifyContentDistribution == ContentDistribution::SpaceEvenly) > return availableFreeSpace / (numberOfChildren + 1); > } > return 0; >@@ -1336,12 +1336,12 @@ static LayoutUnit justifyContentSpaceBet > static LayoutUnit alignmentOffset(LayoutUnit availableFreeSpace, ItemPosition position, LayoutUnit ascent, LayoutUnit maxAscent, bool isWrapReverse) > { > switch (position) { >- case ItemPositionLegacy: >- case ItemPositionAuto: >- case ItemPositionNormal: >+ case ItemPosition::Legacy: >+ case ItemPosition::Auto: >+ case ItemPosition::Normal: > ASSERT_NOT_REACHED(); > break; >- case ItemPositionStretch: >+ case ItemPosition::Stretch: > // Actual stretching must be handled by the caller. Since wrap-reverse > // flips cross start and cross end, stretch children should be aligned > // with the cross end. This matters because applyStretchAlignment >@@ -1351,24 +1351,24 @@ static LayoutUnit alignmentOffset(Layout > if (isWrapReverse) > return availableFreeSpace; > break; >- case ItemPositionFlexStart: >+ case ItemPosition::FlexStart: > break; >- case ItemPositionFlexEnd: >+ case ItemPosition::FlexEnd: > return availableFreeSpace; >- case ItemPositionCenter: >+ case ItemPosition::Center: > return availableFreeSpace / 2; >- case ItemPositionBaseline: >+ case ItemPosition::Baseline: > // FIXME: If we get here in columns, we want the use the descent, except > // we currently can't get the ascent/descent of orthogonal children. > // https://bugs.webkit.org/show_bug.cgi?id=98076 > return maxAscent - ascent; >- case ItemPositionLastBaseline: >- case ItemPositionSelfStart: >- case ItemPositionSelfEnd: >- case ItemPositionStart: >- case ItemPositionEnd: >- case ItemPositionLeft: >- case ItemPositionRight: >+ case ItemPosition::LastBaseline: >+ case ItemPosition::SelfStart: >+ case ItemPosition::SelfEnd: >+ case ItemPosition::Start: >+ case ItemPosition::End: >+ case ItemPosition::Left: >+ case ItemPosition::Right: > // FIXME: Implement the extended grammar, enabled when the Grid Layout > // feature was enabled by default. > break; >@@ -1389,9 +1389,9 @@ LayoutUnit RenderFlexibleBox::staticMain > const LayoutUnit availableSpace = mainAxisContentExtent(contentLogicalHeight()) - mainAxisExtentForChild(child); > > ContentPosition position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehavior()); >- ContentDistributionType distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); >+ ContentDistribution distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); > LayoutUnit offset = initialJustifyContentOffset(availableSpace, position, distribution, 1); >- if (style().flexDirection() == FlowRowReverse || style().flexDirection() == FlowColumnReverse) >+ if (style().flexDirection() == FlexDirection::RowReverse || style().flexDirection() == FlexDirection::ColumnReverse) > offset = availableSpace - offset; > return offset; > } >@@ -1399,7 +1399,7 @@ LayoutUnit RenderFlexibleBox::staticMain > LayoutUnit RenderFlexibleBox::staticCrossAxisPositionForPositionedChild(const RenderBox& child) > { > LayoutUnit availableSpace = crossAxisContentExtent() - crossAxisExtentForChild(child); >- return alignmentOffset(availableSpace, alignmentForChild(child), LayoutUnit(), LayoutUnit(), style().flexWrap() == FlexWrapReverse); >+ return alignmentOffset(availableSpace, alignmentForChild(child), LayoutUnit(), LayoutUnit(), style().flexWrap() == FlexWrap::Reverse); > } > > LayoutUnit RenderFlexibleBox::staticInlinePositionForPositionedChild(const RenderBox& child) >@@ -1456,16 +1456,16 @@ void RenderFlexibleBox::prepareChildForP > ItemPosition RenderFlexibleBox::alignmentForChild(const RenderBox& child) const > { > ItemPosition align = child.style().resolvedAlignSelf(&style(), selfAlignmentNormalBehavior()).position(); >- ASSERT(align != ItemPositionAuto && align != ItemPositionNormal); >+ ASSERT(align != ItemPosition::Auto && align != ItemPosition::Normal); > >- if (align == ItemPositionBaseline && hasOrthogonalFlow(child)) >- align = ItemPositionFlexStart; >+ if (align == ItemPosition::Baseline && hasOrthogonalFlow(child)) >+ align = ItemPosition::FlexStart; > >- if (style().flexWrap() == FlexWrapReverse) { >- if (align == ItemPositionFlexStart) >- align = ItemPositionFlexEnd; >- else if (align == ItemPositionFlexEnd) >- align = ItemPositionFlexStart; >+ if (style().flexWrap() == FlexWrap::Reverse) { >+ if (align == ItemPosition::FlexStart) >+ align = ItemPosition::FlexEnd; >+ else if (align == ItemPosition::FlexEnd) >+ align = ItemPosition::FlexStart; > } > > return align; >@@ -1498,7 +1498,7 @@ bool RenderFlexibleBox::needToStretchChi > // - We are horizontal and the child is in vertical writing mode > // - We are vertical and the child is in horizontal writing mode > // Otherwise, we need to stretch if the cross axis size is auto. >- if (alignmentForChild(child) != ItemPositionStretch) >+ if (alignmentForChild(child) != ItemPosition::Stretch) > return false; > > if (isHorizontalFlow() != child.style().isHorizontalWritingMode()) >@@ -1520,14 +1520,14 @@ bool RenderFlexibleBox::childHasIntrinsi > return result; > } > >-EOverflow RenderFlexibleBox::mainAxisOverflowForChild(const RenderBox& child) const >+Overflow RenderFlexibleBox::mainAxisOverflowForChild(const RenderBox& child) const > { > if (isHorizontalFlow()) > return child.style().overflowX(); > return child.style().overflowY(); > } > >-EOverflow RenderFlexibleBox::crossAxisOverflowForChild(const RenderBox& child) const >+Overflow RenderFlexibleBox::crossAxisOverflowForChild(const RenderBox& child) const > { > if (isHorizontalFlow()) > return child.style().overflowY(); >@@ -1537,12 +1537,12 @@ EOverflow RenderFlexibleBox::crossAxisOv > void RenderFlexibleBox::layoutAndPlaceChildren(LayoutUnit& crossAxisOffset, Vector<FlexItem>& children, LayoutUnit availableFreeSpace, bool relayoutChildren, Vector<LineContext>& lineContexts) > { > ContentPosition position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehavior()); >- ContentDistributionType distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); >+ ContentDistribution distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); > > LayoutUnit autoMarginOffset = autoMarginOffsetInMainAxis(children, availableFreeSpace); > LayoutUnit mainAxisOffset = flowAwareBorderStart() + flowAwarePaddingStart(); > mainAxisOffset += initialJustifyContentOffset(availableFreeSpace, position, distribution, children.size()); >- if (style().flexDirection() == FlowRowReverse) >+ if (style().flexDirection() == FlexDirection::RowReverse) > mainAxisOffset += isHorizontalFlow() ? verticalScrollbarWidth() : horizontalScrollbarHeight(); > > LayoutUnit totalMainExtent = mainAxisExtent(); >@@ -1591,7 +1591,7 @@ void RenderFlexibleBox::layoutAndPlaceCh > updateAutoMarginsInMainAxis(child, autoMarginOffset); > > LayoutUnit childCrossAxisMarginBoxExtent; >- if (alignmentForChild(child) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(child)) { >+ if (alignmentForChild(child) == ItemPosition::Baseline && !hasAutoMarginsInCrossAxis(child)) { > LayoutUnit ascent = marginBoxAscentForChild(child); > LayoutUnit descent = (crossAxisMarginExtentForChild(child) + crossAxisExtentForChild(child)) - ascent; > >@@ -1627,7 +1627,7 @@ void RenderFlexibleBox::layoutAndPlaceCh > if (isColumnFlow()) > setLogicalHeight(std::max(logicalHeight(), mainAxisOffset + flowAwareBorderEnd() + flowAwarePaddingEnd() + scrollbarLogicalHeight())); > >- if (style().flexDirection() == FlowColumnReverse) { >+ if (style().flexDirection() == FlexDirection::ColumnReverse) { > // We have to do an extra pass for column-reverse to reposition the flex > // items since the start depends on the height of the flexbox, which we > // only know after we've positioned all the flex items. >@@ -1644,7 +1644,7 @@ void RenderFlexibleBox::layoutAndPlaceCh > void RenderFlexibleBox::layoutColumnReverse(const Vector<FlexItem>& children, LayoutUnit crossAxisOffset, LayoutUnit availableFreeSpace) > { > ContentPosition position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehavior()); >- ContentDistributionType distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); >+ ContentDistribution distribution = style().resolvedJustifyContentDistribution(contentAlignmentNormalBehavior()); > > // This is similar to the logic in layoutAndPlaceChildren, except we place > // the children starting from the end of the flexbox. We also don't need to >@@ -1663,21 +1663,21 @@ void RenderFlexibleBox::layoutColumnReve > } > } > >-static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, ContentPosition alignContent, ContentDistributionType alignContentDistribution, unsigned numberOfLines) >+static LayoutUnit initialAlignContentOffset(LayoutUnit availableFreeSpace, ContentPosition alignContent, ContentDistribution alignContentDistribution, unsigned numberOfLines) > { > if (numberOfLines <= 1) > return LayoutUnit(); >- if (alignContent == ContentPositionFlexEnd) >+ if (alignContent == ContentPosition::FlexEnd) > return availableFreeSpace; >- if (alignContent == ContentPositionCenter) >+ if (alignContent == ContentPosition::Center) > return availableFreeSpace / 2; >- if (alignContentDistribution == ContentDistributionSpaceAround) { >+ if (alignContentDistribution == ContentDistribution::SpaceAround) { > if (availableFreeSpace > 0 && numberOfLines) > return availableFreeSpace / (2 * numberOfLines); > if (availableFreeSpace < 0) > return availableFreeSpace / 2; > } >- if (alignContentDistribution == ContentDistributionSpaceEvenly) { >+ if (alignContentDistribution == ContentDistribution::SpaceEvenly) { > if (availableFreeSpace > 0) > return availableFreeSpace / (numberOfLines + 1); > // Fallback to 'center' >@@ -1686,14 +1686,14 @@ static LayoutUnit initialAlignContentOff > return LayoutUnit(); > } > >-static LayoutUnit alignContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistributionType alignContentDistribution, unsigned numberOfLines) >+static LayoutUnit alignContentSpaceBetweenChildren(LayoutUnit availableFreeSpace, ContentDistribution alignContentDistribution, unsigned numberOfLines) > { > if (availableFreeSpace > 0 && numberOfLines > 1) { >- if (alignContentDistribution == ContentDistributionSpaceBetween) >+ if (alignContentDistribution == ContentDistribution::SpaceBetween) > return availableFreeSpace / (numberOfLines - 1); >- if (alignContentDistribution == ContentDistributionSpaceAround || alignContentDistribution == ContentDistributionStretch) >+ if (alignContentDistribution == ContentDistribution::SpaceAround || alignContentDistribution == ContentDistribution::Stretch) > return availableFreeSpace / numberOfLines; >- if (alignContentDistribution == ContentDistributionSpaceEvenly) >+ if (alignContentDistribution == ContentDistribution::SpaceEvenly) > return availableFreeSpace / (numberOfLines + 1); > } > return LayoutUnit(); >@@ -1702,7 +1702,7 @@ static LayoutUnit alignContentSpaceBetwe > void RenderFlexibleBox::alignFlexLines(Vector<LineContext>& lineContexts) > { > ContentPosition position = style().resolvedAlignContentPosition(contentAlignmentNormalBehavior()); >- ContentDistributionType distribution = style().resolvedAlignContentDistribution(contentAlignmentNormalBehavior()); >+ ContentDistribution distribution = style().resolvedAlignContentDistribution(contentAlignmentNormalBehavior()); > > // If we have a single line flexbox or a multiline line flexbox with only one > // flex line, the line height is all the available space. For >@@ -1713,7 +1713,7 @@ void RenderFlexibleBox::alignFlexLines(V > return; > } > >- if (position == ContentPositionFlexStart) >+ if (position == ContentPosition::FlexStart) > return; > > LayoutUnit availableCrossAxisSpace = crossAxisContentExtent(); >@@ -1729,7 +1729,7 @@ void RenderFlexibleBox::alignFlexLines(V > adjustAlignmentForChild(flexItem.box, lineOffset); > } > >- if (distribution == ContentDistributionStretch && availableCrossAxisSpace > 0) >+ if (distribution == ContentDistribution::Stretch && availableCrossAxisSpace > 0) > lineContexts[lineNumber].crossAxisExtent += availableCrossAxisSpace / static_cast<unsigned>(lineContexts.size()); > > lineOffset += alignContentSpaceBetweenChildren(availableCrossAxisSpace, distribution, lineContexts.size()); >@@ -1763,20 +1763,20 @@ void RenderFlexibleBox::alignChildren(co > continue; > > ItemPosition position = alignmentForChild(flexItem.box); >- if (position == ItemPositionStretch) >+ if (position == ItemPosition::Stretch) > applyStretchAlignmentToChild(flexItem.box, lineCrossAxisExtent); > LayoutUnit availableSpace = > availableAlignmentSpaceForChild(lineCrossAxisExtent, flexItem.box); >- LayoutUnit offset = alignmentOffset(availableSpace, position, marginBoxAscentForChild(flexItem.box), maxAscent, style().flexWrap() == FlexWrapReverse); >+ LayoutUnit offset = alignmentOffset(availableSpace, position, marginBoxAscentForChild(flexItem.box), maxAscent, style().flexWrap() == FlexWrap::Reverse); > adjustAlignmentForChild(flexItem.box, offset); >- if (position == ItemPositionBaseline && style().flexWrap() == FlexWrapReverse) >+ if (position == ItemPosition::Baseline && style().flexWrap() == FlexWrap::Reverse) > minMarginAfterBaseline = std::min(minMarginAfterBaseline, availableAlignmentSpaceForChild(lineCrossAxisExtent, flexItem.box) - offset); > } > > minMarginAfterBaselines.append(minMarginAfterBaseline); > } > >- if (style().flexWrap() != FlexWrapReverse) >+ if (style().flexWrap() != FlexWrap::Reverse) > return; > > // wrap-reverse flips the cross axis start and end. For baseline alignment, >@@ -1787,7 +1787,7 @@ void RenderFlexibleBox::alignChildren(co > LayoutUnit minMarginAfterBaseline = minMarginAfterBaselines[lineNumber]; > for (size_t childNumber = 0; childNumber < lineContext.flexItems.size(); ++childNumber) { > const auto& flexItem = lineContext.flexItems[childNumber]; >- if (alignmentForChild(flexItem.box) == ItemPositionBaseline && !hasAutoMarginsInCrossAxis(flexItem.box) && minMarginAfterBaseline) >+ if (alignmentForChild(flexItem.box) == ItemPosition::Baseline && !hasAutoMarginsInCrossAxis(flexItem.box) && minMarginAfterBaseline) > adjustAlignmentForChild(flexItem.box, minMarginAfterBaseline); > } > } >Index: Source/WebCore/rendering/RenderFlexibleBox.h >=================================================================== >--- Source/WebCore/rendering/RenderFlexibleBox.h (revision 232008) >+++ Source/WebCore/rendering/RenderFlexibleBox.h (working copy) >@@ -149,8 +149,8 @@ private: > bool crossAxisLengthIsDefinite(const RenderBox& child, const Length& flexBasis) const; > bool needToStretchChildLogicalHeight(const RenderBox& child) const; > bool childHasIntrinsicMainAxisSize(const RenderBox& child) const; >- EOverflow mainAxisOverflowForChild(const RenderBox& child) const; >- EOverflow crossAxisOverflowForChild(const RenderBox& child) const; >+ Overflow mainAxisOverflowForChild(const RenderBox& child) const; >+ Overflow crossAxisOverflowForChild(const RenderBox& child) const; > void cacheChildMainSize(const RenderBox& child); > > void layoutFlexItems(bool relayoutChildren); >Index: Source/WebCore/rendering/RenderFragmentContainer.cpp >=================================================================== >--- Source/WebCore/rendering/RenderFragmentContainer.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderFragmentContainer.cpp (working copy) >@@ -158,14 +158,14 @@ LayoutRect RenderFragmentContainer::over > if (m_fragmentedFlow->isHorizontalWritingMode()) { > LayoutUnit minY = isFirstPortion ? fragmentedFlowOverflow.y() : fragmentedFlowPortionRect.y(); > LayoutUnit maxY = isLastPortion ? std::max(fragmentedFlowPortionRect.maxY(), fragmentedFlowOverflow.maxY()) : fragmentedFlowPortionRect.maxY(); >- bool clipX = style().overflowX() != OVISIBLE; >+ bool clipX = style().overflowX() != Overflow::Visible; > LayoutUnit minX = clipX ? fragmentedFlowPortionRect.x() : std::min(fragmentedFlowPortionRect.x(), fragmentedFlowOverflow.x()); > LayoutUnit maxX = clipX ? fragmentedFlowPortionRect.maxX() : std::max(fragmentedFlowPortionRect.maxX(), fragmentedFlowOverflow.maxX()); > clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); > } else { > LayoutUnit minX = isFirstPortion ? fragmentedFlowOverflow.x() : fragmentedFlowPortionRect.x(); > LayoutUnit maxX = isLastPortion ? std::max(fragmentedFlowPortionRect.maxX(), fragmentedFlowOverflow.maxX()) : fragmentedFlowPortionRect.maxX(); >- bool clipY = style().overflowY() != OVISIBLE; >+ bool clipY = style().overflowY() != Overflow::Visible; > LayoutUnit minY = clipY ? fragmentedFlowPortionRect.y() : std::min(fragmentedFlowPortionRect.y(), fragmentedFlowOverflow.y()); > LayoutUnit maxY = clipY ? fragmentedFlowPortionRect.maxY() : std::max(fragmentedFlowPortionRect.y(), fragmentedFlowOverflow.maxY()); > clipRect = LayoutRect(minX, minY, maxX - minX, maxY - minY); >Index: Source/WebCore/rendering/RenderFullScreen.cpp >=================================================================== >--- Source/WebCore/rendering/RenderFullScreen.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderFullScreen.cpp (working copy) >@@ -72,11 +72,11 @@ static RenderStyle createFullScreenStyle > fullscreenStyle.fontCascade().update(nullptr); > > fullscreenStyle.setDisplay(FLEX); >- fullscreenStyle.setJustifyContentPosition(ContentPositionCenter); >- fullscreenStyle.setAlignItemsPosition(ItemPositionCenter); >- fullscreenStyle.setFlexDirection(FlowColumn); >+ fullscreenStyle.setJustifyContentPosition(ContentPosition::Center); >+ fullscreenStyle.setAlignItemsPosition(ItemPosition::Center); >+ fullscreenStyle.setFlexDirection(FlexDirection::Column); > >- fullscreenStyle.setPosition(FixedPosition); >+ fullscreenStyle.setPosition(PositionType::Fixed); > fullscreenStyle.setWidth(Length(100.0, Percent)); > fullscreenStyle.setHeight(Length(100.0, Percent)); > fullscreenStyle.setLeft(Length(0, WebCore::Fixed)); >Index: Source/WebCore/rendering/RenderFullScreen.h >=================================================================== >--- Source/WebCore/rendering/RenderFullScreen.h (revision 232008) >+++ Source/WebCore/rendering/RenderFullScreen.h (working copy) >@@ -46,7 +46,7 @@ public: > static void wrapExistingRenderer(RenderElement&, Document&); > void unwrapRenderer(bool& requiresRenderTreeRebuild); > >- ItemPosition selfAlignmentNormalBehavior(const RenderBox* = nullptr) const override { return ItemPositionCenter; } >+ ItemPosition selfAlignmentNormalBehavior(const RenderBox* = nullptr) const override { return ItemPosition::Center; } > > private: > bool isRenderFullScreen() const override { return true; } >Index: Source/WebCore/rendering/RenderGrid.cpp >=================================================================== >--- Source/WebCore/rendering/RenderGrid.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderGrid.cpp (working copy) >@@ -77,24 +77,24 @@ StyleSelfAlignmentData RenderGrid::selfA > > bool RenderGrid::selfAlignmentChangedToStretch(GridAxis axis, const RenderStyle& oldStyle, const RenderStyle& newStyle, const RenderBox& child) const > { >- return selfAlignmentForChild(axis, child, &oldStyle).position() != ItemPositionStretch >- && selfAlignmentForChild(axis, child, &newStyle).position() == ItemPositionStretch; >+ return selfAlignmentForChild(axis, child, &oldStyle).position() != ItemPosition::Stretch >+ && selfAlignmentForChild(axis, child, &newStyle).position() == ItemPosition::Stretch; > } > > bool RenderGrid::selfAlignmentChangedFromStretch(GridAxis axis, const RenderStyle& oldStyle, const RenderStyle& newStyle, const RenderBox& child) const > { >- return selfAlignmentForChild(axis, child, &oldStyle).position() == ItemPositionStretch >- && selfAlignmentForChild(axis, child, &newStyle).position() != ItemPositionStretch; >+ return selfAlignmentForChild(axis, child, &oldStyle).position() == ItemPosition::Stretch >+ && selfAlignmentForChild(axis, child, &newStyle).position() != ItemPosition::Stretch; > } > > void RenderGrid::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { > RenderBlock::styleDidChange(diff, oldStyle); >- if (!oldStyle || diff != StyleDifferenceLayout) >+ if (!oldStyle || diff != StyleDifference::Layout) > return; > > const RenderStyle& newStyle = this->style(); >- if (oldStyle->resolvedAlignItems(selfAlignmentNormalBehavior(this)).position() == ItemPositionStretch) { >+ if (oldStyle->resolvedAlignItems(selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch) { > // Style changes on the grid container implying stretching (to-stretch) or > // shrinking (from-stretch) require the affected items to be laid out again. > // These logic only applies to 'stretch' since the rest of the alignment >@@ -855,7 +855,7 @@ Vector<LayoutUnit> RenderGrid::trackSize > > static const StyleContentAlignmentData& contentAlignmentNormalBehaviorGrid() > { >- static const StyleContentAlignmentData normalBehavior = {ContentPositionNormal, ContentDistributionStretch}; >+ static const StyleContentAlignmentData normalBehavior = {ContentPosition::Normal, ContentDistribution::Stretch}; > return normalBehavior; > } > >@@ -1019,12 +1019,12 @@ static LayoutUnit computeOverflowAlignme > { > LayoutUnit offset = trackSize - childSize; > switch (overflow) { >- case OverflowAlignmentSafe: >+ case OverflowAlignment::Safe: > // If overflow is 'safe', we have to make sure we don't overflow the 'start' > // edge (potentially cause some data loss as the overflow is unreachable). > return std::max<LayoutUnit>(0, offset); >- case OverflowAlignmentUnsafe: >- case OverflowAlignmentDefault: >+ case OverflowAlignment::Unsafe: >+ case OverflowAlignment::Default: > // If we overflow our alignment container and overflow is 'true' (default), we > // ignore the overflow and just return the value regardless (which may cause data > // loss as we overflow the 'start' edge). >@@ -1150,7 +1150,7 @@ static int synthesizedBaselineFromBorder > > bool RenderGrid::isInlineBaselineAlignedChild(const RenderBox& child) const > { >- return alignSelfForChild(child).position() == ItemPositionBaseline && !GridLayoutFunctions::isOrthogonalChild(*this, child) && !hasAutoMarginsInColumnAxis(child); >+ return alignSelfForChild(child).position() == ItemPosition::Baseline && !GridLayoutFunctions::isOrthogonalChild(*this, child) && !hasAutoMarginsInColumnAxis(child); > } > > // FIXME: This logic is shared by RenderFlexibleBox, so it might be refactored somehow. >@@ -1220,7 +1220,7 @@ GridAxisPosition RenderGrid::columnAxisP > return GridAxisStart; > > switch (alignSelfForChild(child).position()) { >- case ItemPositionSelfStart: >+ case ItemPosition::SelfStart: > // FIXME: Should we implement this logic in a generic utility function ? > // Aligns the alignment subject to be flush with the edge of the alignment container > // corresponding to the alignment subject's 'start' side in the column axis. >@@ -1233,7 +1233,7 @@ GridAxisPosition RenderGrid::columnAxisP > } > // self-start is based on the child's block-flow direction. That's why we need to check against the grid container's block-flow direction. > return hasSameWritingMode ? GridAxisStart : GridAxisEnd; >- case ItemPositionSelfEnd: >+ case ItemPosition::SelfEnd: > // FIXME: Should we implement this logic in a generic utility function ? > // Aligns the alignment subject to be flush with the edge of the alignment container > // corresponding to the alignment subject's 'end' side in the column axis. >@@ -1246,33 +1246,33 @@ GridAxisPosition RenderGrid::columnAxisP > } > // self-end is based on the child's block-flow direction. That's why we need to check against the grid container's block-flow direction. > return hasSameWritingMode ? GridAxisEnd : GridAxisStart; >- case ItemPositionLeft: >+ case ItemPosition::Left: > // Aligns the alignment subject to be flush with the alignment container's 'line-left' edge. > // The alignment axis (column axis) is always orthogonal to the inline axis, hence this value behaves as 'start'. > return GridAxisStart; >- case ItemPositionRight: >+ case ItemPosition::Right: > // Aligns the alignment subject to be flush with the alignment container's 'line-right' edge. > // The alignment axis (column axis) is always orthogonal to the inline axis, hence this value behaves as 'start'. > return GridAxisStart; >- case ItemPositionCenter: >+ case ItemPosition::Center: > return GridAxisCenter; >- case ItemPositionFlexStart: // Only used in flex layout, otherwise equivalent to 'start'. >+ case ItemPosition::FlexStart: // Only used in flex layout, otherwise equivalent to 'start'. > // Aligns the alignment subject to be flush with the alignment container's 'start' edge (block-start) in the column axis. >- case ItemPositionStart: >+ case ItemPosition::Start: > return GridAxisStart; >- case ItemPositionFlexEnd: // Only used in flex layout, otherwise equivalent to 'end'. >+ case ItemPosition::FlexEnd: // Only used in flex layout, otherwise equivalent to 'end'. > // Aligns the alignment subject to be flush with the alignment container's 'end' edge (block-end) in the column axis. >- case ItemPositionEnd: >+ case ItemPosition::End: > return GridAxisEnd; >- case ItemPositionStretch: >+ case ItemPosition::Stretch: > return GridAxisStart; >- case ItemPositionBaseline: >- case ItemPositionLastBaseline: >+ case ItemPosition::Baseline: >+ case ItemPosition::LastBaseline: > // FIXME: Implement the previous values. For now, we always 'start' align the child. > return GridAxisStart; >- case ItemPositionLegacy: >- case ItemPositionAuto: >- case ItemPositionNormal: >+ case ItemPosition::Legacy: >+ case ItemPosition::Auto: >+ case ItemPosition::Normal: > break; > } > >@@ -1288,7 +1288,7 @@ GridAxisPosition RenderGrid::rowAxisPosi > return GridAxisStart; > > switch (justifySelfForChild(child).position()) { >- case ItemPositionSelfStart: >+ case ItemPosition::SelfStart: > // FIXME: Should we implement this logic in a generic utility function ? > // Aligns the alignment subject to be flush with the edge of the alignment container > // corresponding to the alignment subject's 'start' side in the row axis. >@@ -1301,7 +1301,7 @@ GridAxisPosition RenderGrid::rowAxisPosi > } > // self-start is based on the child's inline-flow direction. That's why we need to check against the grid container's direction. > return hasSameDirection ? GridAxisStart : GridAxisEnd; >- case ItemPositionSelfEnd: >+ case ItemPosition::SelfEnd: > // FIXME: Should we implement this logic in a generic utility function ? > // Aligns the alignment subject to be flush with the edge of the alignment container > // corresponding to the alignment subject's 'end' side in the row axis. >@@ -1314,33 +1314,33 @@ GridAxisPosition RenderGrid::rowAxisPosi > } > // self-end is based on the child's inline-flow direction. That's why we need to check against the grid container's direction. > return hasSameDirection ? GridAxisEnd : GridAxisStart; >- case ItemPositionLeft: >+ case ItemPosition::Left: > // Aligns the alignment subject to be flush with the alignment container's 'line-left' edge. > // We want the physical 'left' side, so we have to take account, container's inline-flow direction. > return gridIsLTR ? GridAxisStart : GridAxisEnd; >- case ItemPositionRight: >+ case ItemPosition::Right: > // Aligns the alignment subject to be flush with the alignment container's 'line-right' edge. > // We want the physical 'right' side, so we have to take account, container's inline-flow direction. > return gridIsLTR ? GridAxisEnd : GridAxisStart; >- case ItemPositionCenter: >+ case ItemPosition::Center: > return GridAxisCenter; >- case ItemPositionFlexStart: // Only used in flex layout, otherwise equivalent to 'start'. >+ case ItemPosition::FlexStart: // Only used in flex layout, otherwise equivalent to 'start'. > // Aligns the alignment subject to be flush with the alignment container's 'start' edge (inline-start) in the row axis. >- case ItemPositionStart: >+ case ItemPosition::Start: > return GridAxisStart; >- case ItemPositionFlexEnd: // Only used in flex layout, otherwise equivalent to 'end'. >+ case ItemPosition::FlexEnd: // Only used in flex layout, otherwise equivalent to 'end'. > // Aligns the alignment subject to be flush with the alignment container's 'end' edge (inline-end) in the row axis. >- case ItemPositionEnd: >+ case ItemPosition::End: > return GridAxisEnd; >- case ItemPositionStretch: >+ case ItemPosition::Stretch: > return GridAxisStart; >- case ItemPositionBaseline: >- case ItemPositionLastBaseline: >+ case ItemPosition::Baseline: >+ case ItemPosition::LastBaseline: > // FIXME: Implement the previous values. For now, we always 'start' align the child. > return GridAxisStart; >- case ItemPositionLegacy: >- case ItemPositionAuto: >- case ItemPositionNormal: >+ case ItemPosition::Legacy: >+ case ItemPosition::Auto: >+ case ItemPosition::Normal: > break; > } > >@@ -1410,9 +1410,9 @@ LayoutUnit RenderGrid::resolveAutoStartG > > int lastLine = numTracks(ForColumns, m_grid); > ContentPosition position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehaviorGrid()); >- if (position == ContentPositionEnd) >+ if (position == ContentPosition::End) > return m_columnPositions[lastLine] - clientLogicalWidth(); >- if (position == ContentPositionStart || style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) == ContentDistributionStretch) >+ if (position == ContentPosition::Start || style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) == ContentDistribution::Stretch) > return m_columnPositions[0] - borderAndPaddingLogicalLeft(); > return LayoutUnit(); > } >@@ -1426,9 +1426,9 @@ LayoutUnit RenderGrid::resolveAutoEndGri > > int lastLine = numTracks(ForColumns, m_grid); > ContentPosition position = style().resolvedJustifyContentPosition(contentAlignmentNormalBehaviorGrid()); >- if (position == ContentPositionEnd) >+ if (position == ContentPosition::End) > return m_columnPositions[lastLine]; >- if (position == ContentPositionStart || style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) == ContentDistributionStretch) >+ if (position == ContentPosition::Start || style().resolvedJustifyContentDistribution(contentAlignmentNormalBehaviorGrid()) == ContentDistribution::Stretch) > return m_columnPositions[0] - borderAndPaddingLogicalLeft() + clientLogicalWidth(); > return clientLogicalWidth(); > } >@@ -1539,28 +1539,28 @@ void RenderGrid::gridAreaPositionForChil > gridAreaPositionForInFlowChild(child, direction, start, end); > } > >-ContentPosition static resolveContentDistributionFallback(ContentDistributionType distribution) >+ContentPosition static resolveContentDistributionFallback(ContentDistribution distribution) > { > switch (distribution) { >- case ContentDistributionSpaceBetween: >- return ContentPositionStart; >- case ContentDistributionSpaceAround: >- return ContentPositionCenter; >- case ContentDistributionSpaceEvenly: >- return ContentPositionCenter; >- case ContentDistributionStretch: >- return ContentPositionStart; >- case ContentDistributionDefault: >- return ContentPositionNormal; >+ case ContentDistribution::SpaceBetween: >+ return ContentPosition::Start; >+ case ContentDistribution::SpaceAround: >+ return ContentPosition::Center; >+ case ContentDistribution::SpaceEvenly: >+ return ContentPosition::Center; >+ case ContentDistribution::Stretch: >+ return ContentPosition::Start; >+ case ContentDistribution::Default: >+ return ContentPosition::Normal; > } > > ASSERT_NOT_REACHED(); >- return ContentPositionNormal; >+ return ContentPosition::Normal; > } > >-static ContentAlignmentData contentDistributionOffset(const LayoutUnit& availableFreeSpace, ContentPosition& fallbackPosition, ContentDistributionType distribution, unsigned numberOfGridTracks) >+static ContentAlignmentData contentDistributionOffset(const LayoutUnit& availableFreeSpace, ContentPosition& fallbackPosition, ContentDistribution distribution, unsigned numberOfGridTracks) > { >- if (distribution != ContentDistributionDefault && fallbackPosition == ContentPositionNormal) >+ if (distribution != ContentDistribution::Default && fallbackPosition == ContentPosition::Normal) > fallbackPosition = resolveContentDistributionFallback(distribution); > > if (availableFreeSpace <= 0) >@@ -1568,20 +1568,20 @@ static ContentAlignmentData contentDistr > > LayoutUnit distributionOffset; > switch (distribution) { >- case ContentDistributionSpaceBetween: >+ case ContentDistribution::SpaceBetween: > if (numberOfGridTracks < 2) > return ContentAlignmentData::defaultOffsets(); > return {0, availableFreeSpace / (numberOfGridTracks - 1)}; >- case ContentDistributionSpaceAround: >+ case ContentDistribution::SpaceAround: > if (numberOfGridTracks < 1) > return ContentAlignmentData::defaultOffsets(); > distributionOffset = availableFreeSpace / numberOfGridTracks; > return {distributionOffset / 2, distributionOffset}; >- case ContentDistributionSpaceEvenly: >+ case ContentDistribution::SpaceEvenly: > distributionOffset = availableFreeSpace / (numberOfGridTracks + 1); > return {distributionOffset, distributionOffset}; >- case ContentDistributionStretch: >- case ContentDistributionDefault: >+ case ContentDistribution::Stretch: >+ case ContentDistribution::Default: > return ContentAlignmentData::defaultOffsets(); > } > >@@ -1605,38 +1605,38 @@ ContentAlignmentData RenderGrid::compute > if (contentAlignment.isValid()) > return contentAlignment; > >- if (availableFreeSpace <= 0 && contentAlignmentData.overflow() == OverflowAlignmentSafe) >+ if (availableFreeSpace <= 0 && contentAlignmentData.overflow() == OverflowAlignment::Safe) > return {0, 0}; > > switch (position) { >- case ContentPositionLeft: >+ case ContentPosition::Left: > // The align-content's axis is always orthogonal to the inline-axis. > return {0, 0}; >- case ContentPositionRight: >+ case ContentPosition::Right: > if (isRowAxis) > return {availableFreeSpace, 0}; > // The align-content's axis is always orthogonal to the inline-axis. > return {0, 0}; >- case ContentPositionCenter: >+ case ContentPosition::Center: > return {availableFreeSpace / 2, 0}; >- case ContentPositionFlexEnd: // Only used in flex layout, for other layout, it's equivalent to 'end'. >- case ContentPositionEnd: >+ case ContentPosition::FlexEnd: // Only used in flex layout, for other layout, it's equivalent to 'end'. >+ case ContentPosition::End: > if (isRowAxis) > return {style().isLeftToRightDirection() ? availableFreeSpace : LayoutUnit(), LayoutUnit()}; > return {availableFreeSpace, 0}; >- case ContentPositionFlexStart: // Only used in flex layout, for other layout, it's equivalent to 'start'. >- case ContentPositionStart: >+ case ContentPosition::FlexStart: // Only used in flex layout, for other layout, it's equivalent to 'start'. >+ case ContentPosition::Start: > if (isRowAxis) > return {style().isLeftToRightDirection() ? LayoutUnit() : availableFreeSpace, LayoutUnit()}; > return {0, 0}; >- case ContentPositionBaseline: >- case ContentPositionLastBaseline: >+ case ContentPosition::Baseline: >+ case ContentPosition::LastBaseline: > // FIXME: Implement the previous values. For now, we always 'start' align. > // http://webkit.org/b/145566 > if (isRowAxis) > return {style().isLeftToRightDirection() ? LayoutUnit() : availableFreeSpace, LayoutUnit()}; > return {0, 0}; >- case ContentPositionNormal: >+ case ContentPosition::Normal: > break; > } > >Index: Source/WebCore/rendering/RenderGrid.h >=================================================================== >--- Source/WebCore/rendering/RenderGrid.h (revision 232008) >+++ Source/WebCore/rendering/RenderGrid.h (working copy) >@@ -71,7 +71,7 @@ protected: > ItemPosition selfAlignmentNormalBehavior(const RenderBox* child = nullptr) const override > { > ASSERT(child); >- return child->isRenderReplaced() ? ItemPositionStart : ItemPositionStretch; >+ return child->isRenderReplaced() ? ItemPosition::Start : ItemPosition::Stretch; > } > > private: >@@ -147,8 +147,8 @@ private: > void applyStretchAlignmentToChildIfNeeded(RenderBox&); > bool hasAutoSizeInColumnAxis(const RenderBox& child) const { return isHorizontalWritingMode() ? child.style().height().isAuto() : child.style().width().isAuto(); } > bool hasAutoSizeInRowAxis(const RenderBox& child) const { return isHorizontalWritingMode() ? child.style().width().isAuto() : child.style().height().isAuto(); } >- bool allowedToStretchChildAlongColumnAxis(const RenderBox& child) const { return alignSelfForChild(child).position() == ItemPositionStretch && hasAutoSizeInColumnAxis(child) && !hasAutoMarginsInColumnAxis(child); } >- bool allowedToStretchChildAlongRowAxis(const RenderBox& child) const { return justifySelfForChild(child).position() == ItemPositionStretch && hasAutoSizeInRowAxis(child) && !hasAutoMarginsInRowAxis(child); } >+ bool allowedToStretchChildAlongColumnAxis(const RenderBox& child) const { return alignSelfForChild(child).position() == ItemPosition::Stretch && hasAutoSizeInColumnAxis(child) && !hasAutoMarginsInColumnAxis(child); } >+ bool allowedToStretchChildAlongRowAxis(const RenderBox& child) const { return justifySelfForChild(child).position() == ItemPosition::Stretch && hasAutoSizeInRowAxis(child) && !hasAutoMarginsInRowAxis(child); } > bool hasAutoMarginsInColumnAxis(const RenderBox&) const; > bool hasAutoMarginsInRowAxis(const RenderBox&) const; > void resetAutoMarginsAndLogicalTopInColumnAxis(RenderBox& child); >Index: Source/WebCore/rendering/RenderIFrame.cpp >=================================================================== >--- Source/WebCore/rendering/RenderIFrame.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderIFrame.cpp (working copy) >@@ -62,7 +62,7 @@ bool RenderIFrame::isInlineBlockOrInline > > bool RenderIFrame::requiresLayer() const > { >- return RenderFrameBase::requiresLayer() || style().resize() != RESIZE_NONE; >+ return RenderFrameBase::requiresLayer() || style().resize() != Resize::None; > } > > RenderView* RenderIFrame::contentRootRenderer() const >Index: Source/WebCore/rendering/RenderImage.cpp >=================================================================== >--- Source/WebCore/rendering/RenderImage.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderImage.cpp (working copy) >@@ -225,12 +225,12 @@ void RenderImage::styleDidChange(StyleDi > m_needsToSetSizeForAltText = false; > } > #if ENABLE(CSS_IMAGE_ORIENTATION) >- if (diff == StyleDifferenceLayout && oldStyle->imageOrientation() != style().imageOrientation()) >+ if (diff == StyleDifference::Layout && oldStyle->imageOrientation() != style().imageOrientation()) > return repaintOrMarkForLayout(ImageSizeChangeNone); > #endif > > #if ENABLE(CSS_IMAGE_RESOLUTION) >- if (diff == StyleDifferenceLayout >+ if (diff == StyleDifference::Layout > && (oldStyle->imageResolution() != style().imageResolution() > || oldStyle->imageResolutionSnap() != style().imageResolutionSnap() > || oldStyle->imageResolutionSource() != style().imageResolutionSource())) >@@ -618,16 +618,16 @@ bool RenderImage::foregroundIsKnownToBeO > return false; > if (!contentBoxRect().contains(localRect)) > return false; >- EFillBox backgroundClip = style().backgroundClip(); >+ FillBox backgroundClip = style().backgroundClip(); > // Background paints under borders. >- if (backgroundClip == BorderFillBox && style().hasBorder() && !borderObscuresBackground()) >+ if (backgroundClip == FillBox::Border && style().hasBorder() && !borderObscuresBackground()) > return false; > // Background shows in padding area. >- if ((backgroundClip == BorderFillBox || backgroundClip == PaddingFillBox) && style().hasPadding()) >+ if ((backgroundClip == FillBox::Border || backgroundClip == FillBox::Padding) && style().hasPadding()) > return false; > // Object-fit may leave parts of the content box empty. > ObjectFit objectFit = style().objectFit(); >- if (objectFit != ObjectFitFill && objectFit != ObjectFitCover) >+ if (objectFit != ObjectFit::Fill && objectFit != ObjectFit::Cover) > return false; > > LengthPoint objectPosition = style().objectPosition(); >Index: Source/WebCore/rendering/RenderInline.cpp >=================================================================== >--- Source/WebCore/rendering/RenderInline.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderInline.cpp (working copy) >@@ -159,7 +159,7 @@ void RenderInline::styleWillChange(Style > RenderBoxModelObject::styleWillChange(diff, newStyle); > // RenderInlines forward their absolute positioned descendants to their (non-anonymous) containing block. > // Check if this non-anonymous containing block can hold the absolute positioned elements when the inline is no longer positioned. >- if (canContainAbsolutelyPositionedObjects() && newStyle.position() == StaticPosition) { >+ if (canContainAbsolutelyPositionedObjects() && newStyle.position() == PositionType::Static) { > auto* container = containingBlockForAbsolutePosition(); > if (container && !container->canContainAbsolutelyPositionedObjects()) > container->removePositionedObjects(nullptr, NewContainingBlock); >@@ -209,8 +209,8 @@ void RenderInline::updateAlwaysCreateLin > RenderInline* parentRenderInline = is<RenderInline>(*parent()) ? downcast<RenderInline>(parent()) : nullptr; > bool checkFonts = document().inNoQuirksMode(); > bool alwaysCreateLineBoxes = (parentRenderInline && parentRenderInline->alwaysCreateLineBoxes()) >- || (parentRenderInline && parentStyle->verticalAlign() != BASELINE) >- || style().verticalAlign() != BASELINE >+ || (parentRenderInline && parentStyle->verticalAlign() != VerticalAlign::Baseline) >+ || style().verticalAlign() != VerticalAlign::Baseline > || style().textEmphasisMark() != TextEmphasisMarkNone > || (checkFonts && (!parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(style().fontCascade().fontMetrics()) > || parentStyle->lineHeight() != style().lineHeight())); >@@ -220,7 +220,7 @@ void RenderInline::updateAlwaysCreateLin > parentStyle = &parent()->firstLineStyle(); > auto& childStyle = firstLineStyle(); > alwaysCreateLineBoxes = !parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics()) >- || childStyle.verticalAlign() != BASELINE >+ || childStyle.verticalAlign() != VerticalAlign::Baseline > || parentStyle->lineHeight() != childStyle.lineHeight(); > } > >@@ -1204,20 +1204,20 @@ void RenderInline::paintOutline(PaintInf > > auto& styleToUse = style(); > // Only paint the focus ring by hand if the theme isn't able to draw it. >- if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse)) { >+ if (styleToUse.outlineStyleIsAuto() == OutlineIsAuto::On && !theme().supportsFocusRing(styleToUse)) { > Vector<LayoutRect> focusRingRects; > addFocusRingRects(focusRingRects, paintOffset, paintInfo.paintContainer); > paintFocusRing(paintInfo, styleToUse, focusRingRects); > } > >- if (hasOutlineAnnotation() && !styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse)) >+ if (hasOutlineAnnotation() && styleToUse.outlineStyleIsAuto() == OutlineIsAuto::Off && !theme().supportsFocusRing(styleToUse)) > addPDFURLRect(paintInfo, paintOffset); > > GraphicsContext& graphicsContext = paintInfo.context(); > if (graphicsContext.paintingDisabled()) > return; > >- if (styleToUse.outlineStyleIsAuto() || !styleToUse.hasOutline()) >+ if (styleToUse.outlineStyleIsAuto() == OutlineIsAuto::On || !styleToUse.hasOutline()) > return; > > Vector<LayoutRect> rects; >@@ -1256,7 +1256,7 @@ void RenderInline::paintOutlineForLine(G > return; > > float outlineWidth = styleToUse.outlineWidth(); >- EBorderStyle outlineStyle = styleToUse.outlineStyle(); >+ BorderStyle outlineStyle = styleToUse.outlineStyle(); > bool antialias = shouldAntialiasLines(graphicsContext); > > auto adjustedPreviousLine = previousLine; >Index: Source/WebCore/rendering/RenderLayer.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayer.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderLayer.cpp (working copy) >@@ -1462,13 +1462,13 @@ RenderLayer* RenderLayer::stackingContai > return layer; > } > >-static inline bool isContainerForPositioned(RenderLayer& layer, EPosition position) >+static inline bool isContainerForPositioned(RenderLayer& layer, PositionType position) > { > switch (position) { >- case FixedPosition: >+ case PositionType::Fixed: > return layer.renderer().canContainFixedPositionObjects(); > >- case AbsolutePosition: >+ case PositionType::Absolute: > return layer.renderer().canContainAbsolutelyPositionedObjects(); > > default: >@@ -1477,7 +1477,7 @@ static inline bool isContainerForPositio > } > } > >-RenderLayer* RenderLayer::enclosingAncestorForPosition(EPosition position) const >+RenderLayer* RenderLayer::enclosingAncestorForPosition(PositionType position) const > { > RenderLayer* curr = parent(); > while (curr && !isContainerForPositioned(*curr, position)) >@@ -2006,10 +2006,10 @@ static inline const RenderLayer* accumul > ASSERT(ancestorLayer != layer); > > const RenderLayerModelObject& renderer = layer->renderer(); >- EPosition position = renderer.style().position(); >+ auto position = renderer.style().position(); > > // FIXME: Special casing RenderFragmentedFlow so much for fixed positioning here is not great. >- RenderFragmentedFlow* fixedFragmentedFlowContainer = position == FixedPosition ? renderer.enclosingFragmentedFlow() : nullptr; >+ RenderFragmentedFlow* fixedFragmentedFlowContainer = position == PositionType::Fixed ? renderer.enclosingFragmentedFlow() : nullptr; > if (fixedFragmentedFlowContainer && !fixedFragmentedFlowContainer->isOutOfFlowPositioned()) > fixedFragmentedFlowContainer = nullptr; > >@@ -2018,7 +2018,7 @@ static inline const RenderLayer* accumul > // If the fixed renderer is inside a RenderFragmentedFlow, we should not compute location using localToAbsolute, > // since localToAbsolute maps the coordinates from named flow to regions coordinates and regions can be > // positioned in a completely different place in the viewport (RenderView). >- if (position == FixedPosition && !fixedFragmentedFlowContainer && (!ancestorLayer || ancestorLayer == renderer.view().layer())) { >+ if (position == PositionType::Fixed && !fixedFragmentedFlowContainer && (!ancestorLayer || ancestorLayer == renderer.view().layer())) { > // If the fixed layer's container is the root, just add in the offset of the view. We can obtain this by calling > // localToAbsolute() on the RenderView. > FloatPoint absPos = renderer.localToAbsolute(FloatPoint(), IsFixed); >@@ -2029,7 +2029,7 @@ static inline const RenderLayer* accumul > // For the fixed positioned elements inside a render flow thread, we should also skip the code path below > // Otherwise, for the case of ancestorLayer == rootLayer and fixed positioned element child of a transformed > // element in render flow thread, we will hit the fixed positioned container before hitting the ancestor layer. >- if (position == FixedPosition && !fixedFragmentedFlowContainer) { >+ if (position == PositionType::Fixed && !fixedFragmentedFlowContainer) { > // For a fixed layers, we need to walk up to the root to see if there's a fixed position container > // (e.g. a transformed layer). It's an error to call offsetFromAncestor() across a layer with a transform, > // so we should always find the ancestor at or before we find the fixed position container. >@@ -2039,7 +2039,7 @@ static inline const RenderLayer* accumul > if (currLayer == ancestorLayer) > foundAncestor = true; > >- if (isContainerForPositioned(*currLayer, FixedPosition)) { >+ if (isContainerForPositioned(*currLayer, PositionType::Fixed)) { > fixedPositionContainerLayer = currLayer; > ASSERT_UNUSED(foundAncestor, foundAncestor); > break; >@@ -2056,7 +2056,7 @@ static inline const RenderLayer* accumul > } > } > >- if (position == FixedPosition && fixedFragmentedFlowContainer) { >+ if (position == PositionType::Fixed && fixedFragmentedFlowContainer) { > ASSERT(ancestorLayer); > if (ancestorLayer->isOutOfFlowRenderFragmentedFlow()) { > location += toLayoutSize(layer->location()); >@@ -2075,7 +2075,7 @@ static inline const RenderLayer* accumul > } > > RenderLayer* parentLayer; >- if (position == AbsolutePosition || position == FixedPosition) { >+ if (position == PositionType::Absolute || position == PositionType::Fixed) { > // Do what enclosingAncestorForPosition() does, but check for ancestorLayer along the way. > parentLayer = layer->parent(); > bool foundAncestorFirst = false; >@@ -2722,7 +2722,7 @@ bool RenderLayer::canResize() const > // We need a special case for <iframe> because they never have > // hasOverflowClip(). However, they do "implicitly" clip their contents, so > // we want to allow resizing them also. >- return (renderer().hasOverflowClip() || renderer().isRenderIFrame()) && renderer().style().resize() != RESIZE_NONE; >+ return (renderer().hasOverflowClip() || renderer().isRenderIFrame()) && renderer().style().resize() != Resize::None; > } > > void RenderLayer::resize(const PlatformMouseEvent& evt, const LayoutSize& oldOffset) >@@ -2759,10 +2759,10 @@ void RenderLayer::resize(const PlatformM > LayoutSize difference = (currentSize + newOffset - adjustedOldOffset).expandedTo(minimumSize) - currentSize; > > StyledElement* styledElement = downcast<StyledElement>(element); >- bool isBoxSizingBorder = renderer->style().boxSizing() == BORDER_BOX; >+ bool isBoxSizingBorder = renderer->style().boxSizing() == BoxSizing::BorderBox; > >- EResize resize = renderer->style().resize(); >- if (resize != RESIZE_VERTICAL && difference.width()) { >+ Resize resize = renderer->style().resize(); >+ if (resize != Resize::Vertical && difference.width()) { > if (is<HTMLFormControlElement>(*element)) { > // Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>). > styledElement->setInlineStyleProperty(CSSPropertyMarginLeft, renderer->marginLeft() / zoomFactor, CSSPrimitiveValue::CSS_PX); >@@ -2773,7 +2773,7 @@ void RenderLayer::resize(const PlatformM > styledElement->setInlineStyleProperty(CSSPropertyWidth, roundToInt(baseWidth + difference.width()), CSSPrimitiveValue::CSS_PX); > } > >- if (resize != RESIZE_HORIZONTAL && difference.height()) { >+ if (resize != Resize::Horizontal && difference.height()) { > if (is<HTMLFormControlElement>(*element)) { > // Make implicit margins from the theme explicit (see <http://bugs.webkit.org/show_bug.cgi?id=9547>). > styledElement->setInlineStyleProperty(CSSPropertyMarginTop, renderer->marginTop() / zoomFactor, CSSPrimitiveValue::CSS_PX); >@@ -2892,7 +2892,7 @@ IntRect RenderLayer::scrollCornerRect() > // Overlay scrollbars always fill the entire length of the box so we never have scroll corner in that case. > bool hasHorizontalBar = m_hBar && !m_hBar->isOverlayScrollbar(); > bool hasVerticalBar = m_vBar && !m_vBar->isOverlayScrollbar(); >- bool hasResizer = renderer().style().resize() != RESIZE_NONE; >+ bool hasResizer = renderer().style().resize() != Resize::None; > if ((hasHorizontalBar && hasVerticalBar) || (hasResizer && (hasHorizontalBar || hasVerticalBar))) > return snappedIntRect(cornerRect(*this, renderBox()->borderBoxRect())); > return IntRect(); >@@ -2901,7 +2901,7 @@ IntRect RenderLayer::scrollCornerRect() > static LayoutRect resizerCornerRect(const RenderLayer& layer, const LayoutRect& bounds) > { > ASSERT(layer.renderer().isBox()); >- if (layer.renderer().style().resize() == RESIZE_NONE) >+ if (layer.renderer().style().resize() == Resize::None) > return LayoutRect(); > return cornerRect(layer, bounds); > } >@@ -3336,7 +3336,7 @@ IntSize RenderLayer::offsetFromResizeCor > > bool RenderLayer::hasOverflowControls() const > { >- return m_hBar || m_vBar || m_scrollCorner || renderer().style().resize() != RESIZE_NONE; >+ return m_hBar || m_vBar || m_scrollCorner || renderer().style().resize() != Resize::None; > } > > void RenderLayer::positionOverflowControls(const IntSize& offsetFromRoot) >@@ -3465,16 +3465,16 @@ bool RenderLayer::hasVerticalOverflow() > > static bool styleRequiresScrollbar(const RenderStyle& style, ScrollbarOrientation axis) > { >- EOverflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >- bool overflowScrollActsLikeAuto = overflow == OSCROLL && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >- return overflow == OSCROLL && !overflowScrollActsLikeAuto; >+ Overflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >+ bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ return overflow == Overflow::Scroll && !overflowScrollActsLikeAuto; > } > > static bool styleDefinesAutomaticScrollbar(const RenderStyle& style, ScrollbarOrientation axis) > { >- EOverflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >- bool overflowScrollActsLikeAuto = overflow == OSCROLL && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >- return overflow == OAUTO || overflow == OOVERLAY || overflowScrollActsLikeAuto; >+ Overflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >+ bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ return overflow == Overflow::Auto || overflow == Overflow::Overlay || overflowScrollActsLikeAuto; > } > > void RenderLayer::updateScrollbarsAfterLayout() >@@ -3515,7 +3515,7 @@ void RenderLayer::updateScrollbarsAfterL > > renderer().repaint(); > >- if (renderer().style().overflowX() == OAUTO || renderer().style().overflowY() == OAUTO) { >+ if (renderer().style().overflowX() == Overflow::Auto || renderer().style().overflowY() == Overflow::Auto) { > if (!m_inOverflowRelayout) { > // Our proprietary overflow: overlay value doesn't trigger a layout. > m_inOverflowRelayout = true; >@@ -3749,7 +3749,7 @@ void RenderLayer::drawPlatformResizerIma > > void RenderLayer::paintResizer(GraphicsContext& context, const LayoutPoint& paintOffset, const LayoutRect& damageRect) > { >- if (renderer().style().resize() == RESIZE_NONE) >+ if (renderer().style().resize() == Resize::None) > return; > > RenderBox* box = renderBox(); >@@ -3809,7 +3809,7 @@ bool RenderLayer::hitTestOverflowControl > ASSERT(box); > > IntRect resizeControlRect; >- if (renderer().style().resize() != RESIZE_NONE) { >+ if (renderer().style().resize() != Resize::None) { > resizeControlRect = snappedIntRect(resizerCornerRect(*this, box->borderBoxRect())); > if (resizeControlRect.contains(localPoint)) > return true; >@@ -5065,7 +5065,7 @@ RenderLayer* RenderLayer::hitTestLayer(R > } > > // Check for hit test on backface if backface-visibility is 'hidden' >- if (localTransformState && renderer().style().backfaceVisibility() == BackfaceVisibilityHidden) { >+ if (localTransformState && renderer().style().backfaceVisibility() == BackfaceVisibility::Hidden) { > std::optional<TransformationMatrix> invertedMatrix = localTransformState->m_accumulatedTransform.inverse(); > // If the z-vector of the matrix is negative, the back is facing towards the viewer. > if (invertedMatrix && invertedMatrix.value().m33() < 0) >@@ -5492,12 +5492,12 @@ Ref<ClipRects> RenderLayer::parentClipRe > return parent()->updateClipRects(clipRectsContext); > } > >-static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRects, EPosition position) >+static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRects, PositionType position) > { >- if (position == FixedPosition) >+ if (position == PositionType::Fixed) > return parentRects.fixedClipRect(); > >- if (position == AbsolutePosition) >+ if (position == PositionType::Absolute) > return parentRects.posClipRect(); > > return parentRects.overflowClipRect(); >@@ -6419,7 +6419,7 @@ static void determineNonLayerDescendants > if (renderText.linesBoundingBox().isEmpty()) > continue; > >- if (renderer.style().userSelect() != SELECT_NONE) >+ if (renderer.style().userSelect() != UserSelect::None) > request.setHasPaintedContent(); > > if (!renderText.text().isAllSpecialCharacters<isHTMLSpace>()) { >@@ -6569,8 +6569,8 @@ void RenderLayer::updateScrollbarsAfterS > if (box->style().appearance() == ListboxPart) > return; > >- EOverflow overflowX = box->style().overflowX(); >- EOverflow overflowY = box->style().overflowY(); >+ Overflow overflowX = box->style().overflowX(); >+ Overflow overflowY = box->style().overflowY(); > > // To avoid doing a relayout in updateScrollbarsAfterLayout, we try to keep any automatic scrollbar that was already present. > bool needsHorizontalScrollbar = box->hasOverflowClip() && ((hasHorizontalScrollbar() && styleDefinesAutomaticScrollbar(box->style(), HorizontalScrollbar)) || styleRequiresScrollbar(box->style(), HorizontalScrollbar)); >@@ -6580,10 +6580,10 @@ void RenderLayer::updateScrollbarsAfterS > > // With non-overlay overflow:scroll, scrollbars are always visible but may be disabled. > // When switching to another value, we need to re-enable them (see bug 11985). >- if (m_hBar && needsHorizontalScrollbar && oldStyle && oldStyle->overflowX() == OSCROLL && overflowX != OSCROLL) >+ if (m_hBar && needsHorizontalScrollbar && oldStyle && oldStyle->overflowX() == Overflow::Scroll && overflowX != Overflow::Scroll) > m_hBar->setEnabled(true); > >- if (m_vBar && needsVerticalScrollbar && oldStyle && oldStyle->overflowY() == OSCROLL && overflowY != OSCROLL) >+ if (m_vBar && needsVerticalScrollbar && oldStyle && oldStyle->overflowY() == Overflow::Scroll && overflowY != Overflow::Scroll) > m_vBar->setEnabled(true); > > if (!m_scrollDimensionsDirty) >@@ -6614,7 +6614,7 @@ void RenderLayer::dirtyAncestorChainHasO > > void RenderLayer::updateOutOfFlowPositioned(const RenderStyle* oldStyle) > { >- bool wasOutOfFlowPositioned = oldStyle && (oldStyle->position() == AbsolutePosition || oldStyle->position() == FixedPosition); >+ bool wasOutOfFlowPositioned = oldStyle && (oldStyle->position() == PositionType::Absolute || oldStyle->position() == PositionType::Fixed); > if (parent() && (renderer().isOutOfFlowPositioned() != wasOutOfFlowPositioned)) { > parent()->dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus(); > if (!renderer().renderTreeBeingDestroyed() && acceleratedCompositingForOverflowScrollEnabled()) >@@ -6681,7 +6681,7 @@ void RenderLayer::styleChanged(StyleDiff > updateOrRemoveFilterEffectRenderer(); > > #if PLATFORM(IOS) && ENABLE(TOUCH_EVENTS) >- if (diff == StyleDifferenceRecompositeLayer || diff >= StyleDifferenceLayoutPositionedMovementOnly) >+ if (diff == StyleDifference::RecompositeLayer || diff >= StyleDifference::LayoutPositionedMovementOnly) > renderer().document().setTouchEventRegionsNeedUpdate(); > #else > UNUSED_PARAM(diff); >Index: Source/WebCore/rendering/RenderLayer.h >=================================================================== >--- Source/WebCore/rendering/RenderLayer.h (revision 232008) >+++ Source/WebCore/rendering/RenderLayer.h (working copy) >@@ -443,7 +443,7 @@ public: > > // Gets the nearest enclosing positioned ancestor layer (also includes > // the <html> layer and the root layer). >- RenderLayer* enclosingAncestorForPosition(EPosition) const; >+ RenderLayer* enclosingAncestorForPosition(PositionType) const; > > // Returns the nearest enclosing layer that is scrollable. > RenderLayer* enclosingScrollableLayer() const; >@@ -611,7 +611,7 @@ public: > // Note that this transform has the perspective-origin baked in. > TransformationMatrix perspectiveTransform() const; > FloatPoint perspectiveOrigin() const; >- bool preserves3D() const { return renderer().style().transformStyle3D() == TransformStyle3DPreserve3D; } >+ bool preserves3D() const { return renderer().style().transformStyle3D() == TransformStyle3D::Preserve3D; } > bool has3DTransform() const { return m_transform && !m_transform->isAffine(); } > > void filterNeedsRepaint(); >Index: Source/WebCore/rendering/RenderLayerBacking.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy) >@@ -981,9 +981,9 @@ void RenderLayerBacking::updateGeometry( > m_owningLayer.updateDescendantDependentFlags(); > > // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 >- bool preserves3D = style.transformStyle3D() == TransformStyle3DPreserve3D && !renderer().hasReflection(); >+ bool preserves3D = style.transformStyle3D() == TransformStyle3D::Preserve3D && !renderer().hasReflection(); > m_graphicsLayer->setPreserves3D(preserves3D); >- m_graphicsLayer->setBackfaceVisibility(style.backfaceVisibility() == BackfaceVisibilityVisible); >+ m_graphicsLayer->setBackfaceVisibility(style.backfaceVisibility() == BackfaceVisibility::Visible); > > auto* compositedAncestor = m_owningLayer.ancestorCompositingLayer(); > LayoutSize ancestorClippingLayerOffset; >@@ -1840,7 +1840,7 @@ static bool canDirectlyCompositeBackgrou > if (!fillLayer.imagesAreLoaded()) > return false; > >- if (fillLayer.attachment() != ScrollBackgroundAttachment) >+ if (fillLayer.attachment() != FillAttachment::ScrollBackground) > return false; > > // FIXME: Allow color+image compositing when it makes sense. >@@ -2047,7 +2047,7 @@ bool RenderLayerBacking::isSimpleContain > if (contentsInfo.paintsBoxDecorations() || contentsInfo.paintsContent()) > return false; > >- if (renderer().style().backgroundClip() == TextFillBox) >+ if (renderer().style().backgroundClip() == FillBox::Text) > return false; > > if (renderer().isDocumentElementRenderer() && m_owningLayer.isolatesCompositedBlending()) >@@ -2324,11 +2324,11 @@ LayoutRect RenderLayerBacking::contentsB > static LayoutRect backgroundRectForBox(const RenderBox& box) > { > switch (box.style().backgroundClip()) { >- case BorderFillBox: >+ case FillBox::Border: > return box.borderBoxRect(); >- case PaddingFillBox: >+ case FillBox::Padding: > return box.paddingBoxRect(); >- case ContentFillBox: >+ case FillBox::Content: > return box.contentBoxRect(); > default: > break; >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -881,9 +881,9 @@ static bool checkIfDescendantClippingCon > } > > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >-static bool isScrollableOverflow(EOverflow overflow) >+static bool isScrollableOverflow(Overflow overflow) > { >- return overflow == OSCROLL || overflow == OAUTO || overflow == OOVERLAY; >+ return overflow == Overflow::Scroll || overflow == Overflow::Auto || overflow == Overflow::Overlay; > } > > static bool styleHasTouchScrolling(const RenderStyle& style) >@@ -919,8 +919,8 @@ static bool styleChangeRequiresLayerRebu > > // Compositing layers keep track of whether they are clipped by any of the ancestors. > // When the current layer's clipping behaviour changes, we need to propagate it to the descendants. >- bool wasClipping = oldStyle.hasClip() || oldStyle.overflowX() != OVISIBLE || oldStyle.overflowY() != OVISIBLE; >- bool isClipping = newStyle.hasClip() || newStyle.overflowX() != OVISIBLE || newStyle.overflowY() != OVISIBLE; >+ bool wasClipping = oldStyle.hasClip() || oldStyle.overflowX() != Overflow::Visible || oldStyle.overflowY() != Overflow::Visible; >+ bool isClipping = newStyle.hasClip() || newStyle.overflowX() != Overflow::Visible || newStyle.overflowY() != Overflow::Visible; > if (isClipping != wasClipping) { > if (checkIfDescendantClippingContextNeedsUpdate(layer, isClipping)) > return true; >@@ -931,7 +931,7 @@ static bool styleChangeRequiresLayerRebu > > void RenderLayerCompositor::layerStyleChanged(StyleDifference diff, RenderLayer& layer, const RenderStyle* oldStyle) > { >- if (diff == StyleDifferenceEqual) >+ if (diff == StyleDifference::Equal) > return; > > const RenderStyle& newStyle = layer.renderer().style(); >@@ -2129,7 +2129,7 @@ OptionSet<CompositingReason> RenderLayer > else if (requiresCompositingForFrame(renderer)) > reasons |= CompositingReason::IFrame; > >- if ((canRender3DTransforms() && renderer.style().backfaceVisibility() == BackfaceVisibilityHidden)) >+ if ((canRender3DTransforms() && renderer.style().backfaceVisibility() == BackfaceVisibility::Hidden)) > reasons |= CompositingReason::BackfaceVisibilityHidden; > > if (clipsCompositingDescendants(*renderer.layer())) >@@ -2371,7 +2371,7 @@ bool RenderLayerCompositor::requiresComp > if (!(m_compositingTriggers & ChromeClient::ThreeDTransformTrigger)) > return false; > >- if (renderer.style().backfaceVisibility() != BackfaceVisibilityHidden) >+ if (renderer.style().backfaceVisibility() != BackfaceVisibility::Hidden) > return false; > > if (renderer.layer()->has3DTransformedAncestor()) >@@ -2379,7 +2379,7 @@ bool RenderLayerCompositor::requiresComp > > // FIXME: workaround for webkit.org/b/132801 > auto* stackingContext = renderer.layer()->stackingContainer(); >- if (stackingContext && stackingContext->renderer().style().transformStyle3D() == TransformStyle3DPreserve3D) >+ if (stackingContext && stackingContext->renderer().style().transformStyle3D() == TransformStyle3D::Preserve3D) > return true; > > return false; >@@ -2506,7 +2506,7 @@ bool RenderLayerCompositor::requiresComp > // A layer with preserve-3d or perspective only needs to be composited if there are descendant layers that > // will be affected by the preserve-3d or perspective. > if (has3DTransformedDescendants) { >- if (renderer.style().transformStyle3D() == TransformStyle3DPreserve3D) { >+ if (renderer.style().transformStyle3D() == TransformStyle3D::Preserve3D) { > reason = RenderLayer::IndirectCompositingReason::Preserve3D; > return true; > } >@@ -2600,7 +2600,7 @@ bool RenderLayerCompositor::isViewportCo > if (layer.renderer().isStickilyPositioned()) > return isAsyncScrollableStickyLayer(layer); > >- if (layer.renderer().style().position() != FixedPosition) >+ if (layer.renderer().style().position() != PositionType::Fixed) > return false; > > // FIXME: Handle fixed inside of a transform, which should not behave as fixed. >@@ -2628,12 +2628,12 @@ bool RenderLayerCompositor::requiresComp > if (!renderer.isPositioned()) > return false; > >- EPosition position = renderer.style().position(); >- bool isFixed = renderer.isOutOfFlowPositioned() && position == FixedPosition; >+ auto position = renderer.style().position(); >+ bool isFixed = renderer.isOutOfFlowPositioned() && position == PositionType::Fixed; > if (isFixed && !layer.isStackingContainer()) > return false; > >- bool isSticky = renderer.isInFlowPositioned() && position == StickyPosition; >+ bool isSticky = renderer.isInFlowPositioned() && position == PositionType::Sticky; > if (!isFixed && !isSticky) > return false; > >@@ -3491,7 +3491,7 @@ bool RenderLayerCompositor::layerHas3DCo > { > const RenderStyle& style = layer.renderer().style(); > >- if (style.transformStyle3D() == TransformStyle3DPreserve3D || style.hasPerspective() || style.transform().has3DOperation()) >+ if (style.transformStyle3D() == TransformStyle3D::Preserve3D || style.hasPerspective() || style.transform().has3DOperation()) > return true; > > const_cast<RenderLayer&>(layer).updateLayerListsIfNeeded(); >@@ -3787,7 +3787,7 @@ void RenderLayerCompositor::updateScroll > ScrollingNodeType nodeType = MainFrameScrollingNode; > if (layer.renderer().isFixedPositioned()) > nodeType = FixedNode; >- else if (layer.renderer().style().position() == StickyPosition) >+ else if (layer.renderer().style().position() == PositionType::Sticky) > nodeType = StickyNode; > else > ASSERT_NOT_REACHED(); >Index: Source/WebCore/rendering/RenderLayerModelObject.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerModelObject.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderLayerModelObject.cpp (working copy) >@@ -119,15 +119,15 @@ void RenderLayerModelObject::styleWillCh > if (parent()) { > // Do a repaint with the old style first, e.g., for example if we go from > // having an outline to not having an outline. >- if (diff == StyleDifferenceRepaintLayer) { >+ if (diff == StyleDifference::RepaintLayer) { > layer()->repaintIncludingDescendants(); > if (!(oldStyle->clip() == newStyle.clip())) > layer()->clearClipRectsIncludingDescendants(); >- } else if (diff == StyleDifferenceRepaint || newStyle.outlineSize() < oldStyle->outlineSize()) >+ } else if (diff == StyleDifference::Repaint || newStyle.outlineSize() < oldStyle->outlineSize()) > repaint(); > } > >- if (diff == StyleDifferenceLayout || diff == StyleDifferenceSimplifiedLayout) { >+ if (diff == StyleDifference::Layout || diff == StyleDifference::SimplifiedLayout) { > // When a layout hint happens, we do a repaint of the layer, since the layer could end up being destroyed. > if (hasLayer()) { > if (oldStyle->position() != newStyle.position() >Index: Source/WebCore/rendering/RenderMenuList.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMenuList.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderMenuList.cpp (working copy) >@@ -116,10 +116,10 @@ void RenderMenuList::adjustInnerStyle() > // Use margin:auto instead of align-items:center to get safe centering, i.e. > // when the content overflows, treat it the same as align-items: flex-start. > // But we only do that for the cases where html.css would otherwise use center. >- if (style().alignItems().position() == ItemPositionCenter) { >+ if (style().alignItems().position() == ItemPosition::Center) { > innerStyle.setMarginTop(Length()); > innerStyle.setMarginBottom(Length()); >- innerStyle.setAlignSelfPosition(ItemPositionFlexStart); >+ innerStyle.setAlignSelfPosition(ItemPosition::FlexStart); > } > > innerStyle.setPaddingBox(theme().popupInternalPaddingBox(style())); >Index: Source/WebCore/rendering/RenderMultiColumnFlow.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMultiColumnFlow.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderMultiColumnFlow.cpp (working copy) >@@ -135,7 +135,7 @@ void RenderMultiColumnFlow::layout() > > bool RenderMultiColumnFlow::isColumnSpanningDescendant(const RenderBox& descendantBox) const > { >- return descendantBox.style().columnSpan() == ColumnSpanAll; >+ return descendantBox.style().columnSpan() == ColumnSpan::All; > } > > void RenderMultiColumnFlow::addFragmentToThread(RenderFragmentContainer* RenderFragmentContainer) >Index: Source/WebCore/rendering/RenderMultiColumnSet.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMultiColumnSet.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderMultiColumnSet.cpp (working copy) >@@ -332,7 +332,7 @@ bool RenderMultiColumnSet::requiresBalan > } > } > RenderBlockFlow* container = multiColumnBlockFlow(); >- if (container->style().columnFill() == ColumnFillBalance) >+ if (container->style().columnFill() == ColumnFill::Balance) > return true; > return !multiColumnFlow()->columnHeightAvailable(); > } >@@ -583,10 +583,10 @@ void RenderMultiColumnSet::paintColumnRu > const RenderStyle& blockStyle = parent()->style(); > const Color& ruleColor = blockStyle.visitedDependentColorWithColorFilter(CSSPropertyColumnRuleColor); > bool ruleTransparent = blockStyle.columnRuleIsTransparent(); >- EBorderStyle ruleStyle = collapsedBorderStyle(blockStyle.columnRuleStyle()); >+ BorderStyle ruleStyle = collapsedBorderStyle(blockStyle.columnRuleStyle()); > LayoutUnit ruleThickness = blockStyle.columnRuleWidth(); > LayoutUnit colGap = columnGap(); >- bool renderRule = ruleStyle > BHIDDEN && !ruleTransparent; >+ bool renderRule = ruleStyle > BorderStyle::Hidden && !ruleTransparent; > if (!renderRule) > return; > >Index: Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp (working copy) >@@ -40,7 +40,7 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(RenderMultiC > RenderPtr<RenderMultiColumnSpannerPlaceholder> RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlow& fragmentedFlow, RenderBox& spanner, const RenderStyle& parentStyle) > { > auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK); >- newStyle.setClear(CBOTH); // We don't want floats in the row preceding the spanner to continue on the other side. >+ newStyle.setClear(Clear::Both); // We don't want floats in the row preceding the spanner to continue on the other side. > auto placeholder = createRenderer<RenderMultiColumnSpannerPlaceholder>(fragmentedFlow, spanner, WTFMove(newStyle)); > placeholder->initializeStyle(); > return placeholder; >Index: Source/WebCore/rendering/RenderObject.cpp >=================================================================== >--- Source/WebCore/rendering/RenderObject.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderObject.cpp (working copy) >@@ -825,7 +825,7 @@ void RenderObject::propagateRepaintToPar > for (const auto* renderer = this; renderer; renderer = renderer->parent()) { > bool rendererHasOutlineAutoAncestor = renderer->hasOutlineAutoAncestor(); > ASSERT(rendererHasOutlineAutoAncestor >- || renderer->outlineStyleForRepaint().outlineStyleIsAuto() >+ || renderer->outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On > || (is<RenderBoxModelObject>(*renderer) && downcast<RenderBoxModelObject>(*renderer).isContinuation())); > if (renderer == &repaintContainer && rendererHasOutlineAutoAncestor) > repaintRectNeedsConverting = true; >@@ -1396,11 +1396,11 @@ static inline RenderElement* containerFo > // (2) For absolute positioned elements, it will return a relative positioned inline, while > // containingBlock() skips to the non-anonymous containing block. > // This does mean that computePositionedLogicalWidth and computePositionedLogicalHeight have to use container(). >- EPosition pos = renderer.style().position(); >+ auto pos = renderer.style().position(); > auto* parent = renderer.parent(); >- if (is<RenderText>(renderer) || (pos != FixedPosition && pos != AbsolutePosition)) >+ if (is<RenderText>(renderer) || (pos != PositionType::Fixed && pos != PositionType::Absolute)) > return parent; >- for (; parent && (pos == AbsolutePosition ? !parent->canContainAbsolutelyPositionedObjects() : !parent->canContainFixedPositionObjects()); parent = parent->parent()) { >+ for (; parent && (pos == PositionType::Absolute ? !parent->canContainAbsolutelyPositionedObjects() : !parent->canContainFixedPositionObjects()); parent = parent->parent()) { > if (repaintContainerSkipped && repaintContainer == parent) > *repaintContainerSkipped = true; > } >@@ -1843,15 +1843,15 @@ RenderFragmentedFlow* RenderObject::loca > return containingBlock ? containingBlock->enclosingFragmentedFlow() : nullptr; > } > >-void RenderObject::calculateBorderStyleColor(const EBorderStyle& style, const BoxSide& side, Color& color) >+void RenderObject::calculateBorderStyleColor(const BorderStyle& style, const BoxSide& side, Color& color) > { >- ASSERT(style == INSET || style == OUTSET); >+ ASSERT(style == BorderStyle::Inset || style == BorderStyle::Outset); > // This values were derived empirically. > const RGBA32 baseDarkColor = 0xFF202020; > const RGBA32 baseLightColor = 0xFFEBEBEB; > enum Operation { Darken, Lighten }; > >- Operation operation = (side == BSTop || side == BSLeft) == (style == INSET) ? Darken : Lighten; >+ Operation operation = (side == BSTop || side == BSLeft) == (style == BorderStyle::Inset) ? Darken : Lighten; > > // Here we will darken the border decoration color when needed. This will yield a similar behavior as in FF. > if (operation == Darken) { >Index: Source/WebCore/rendering/RenderObject.h >=================================================================== >--- Source/WebCore/rendering/RenderObject.h (revision 232008) >+++ Source/WebCore/rendering/RenderObject.h (working copy) >@@ -423,8 +423,8 @@ public: > bool isPositioned() const { return m_bitfields.isPositioned(); } > bool isInFlowPositioned() const { return m_bitfields.isRelativelyPositioned() || m_bitfields.isStickilyPositioned(); } > bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositioned(); } // absolute or fixed positioning >- bool isFixedPositioned() const { return isOutOfFlowPositioned() && style().position() == FixedPosition; } >- bool isAbsolutelyPositioned() const { return isOutOfFlowPositioned() && style().position() == AbsolutePosition; } >+ bool isFixedPositioned() const { return isOutOfFlowPositioned() && style().position() == PositionType::Fixed; } >+ bool isAbsolutelyPositioned() const { return isOutOfFlowPositioned() && style().position() == PositionType::Absolute; } > bool isRelativelyPositioned() const { return m_bitfields.isRelativelyPositioned(); } > bool isStickilyPositioned() const { return m_bitfields.isStickilyPositioned(); } > >@@ -528,10 +528,10 @@ public: > setPreferredLogicalWidthsDirty(true); > } > >- void setPositionState(EPosition position) >+ void setPositionState(PositionType position) > { >- ASSERT((position != AbsolutePosition && position != FixedPosition) || isBox()); >- m_bitfields.setPositionedState(position); >+ ASSERT((position != PositionType::Absolute && position != PositionType::Fixed) || isBox()); >+ m_bitfields.setPositionedState(static_cast<int>(position)); > } > void clearPositionedState() { m_bitfields.clearPositionedState(); } > >@@ -801,7 +801,7 @@ protected: > void setNeedsSimplifiedNormalFlowLayoutBit(bool b) { m_bitfields.setNeedsSimplifiedNormalFlowLayout(b); } > > virtual RenderFragmentedFlow* locateEnclosingFragmentedFlow() const; >- static void calculateBorderStyleColor(const EBorderStyle&, const BoxSide&, Color&); >+ static void calculateBorderStyleColor(const BorderStyle&, const BoxSide&, Color&); > > static FragmentedFlowState computedFragmentedFlowState(const RenderObject&); > >@@ -941,10 +941,10 @@ private: > > void setPositionedState(int positionState) > { >- // This mask maps FixedPosition and AbsolutePosition to IsOutOfFlowPositioned, saving one bit. >+ // This mask maps PositionType::Fixed and PositionType::Absolute to IsOutOfFlowPositioned, saving one bit. > m_positionedState = static_cast<PositionedState>(positionState & 0x3); > } >- void clearPositionedState() { m_positionedState = StaticPosition; } >+ void clearPositionedState() { m_positionedState = static_cast<unsigned>(PositionType::Static); } > > ALWAYS_INLINE SelectionState selectionState() const { return static_cast<SelectionState>(m_selectionState); } > ALWAYS_INLINE void setSelectionState(SelectionState selectionState) { m_selectionState = selectionState; } >Index: Source/WebCore/rendering/RenderQuote.cpp >=================================================================== >--- Source/WebCore/rendering/RenderQuote.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderQuote.cpp (working copy) >@@ -62,7 +62,7 @@ void RenderQuote::willBeRemovedFromTree( > void RenderQuote::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { > RenderInline::styleDidChange(diff, oldStyle); >- if (diff >= StyleDifferenceLayout) { >+ if (diff >= StyleDifference::Layout) { > m_needsTextUpdate = true; > view().setHasQuotesNeedingUpdate(true); > } >@@ -371,13 +371,13 @@ String RenderQuote::computeText() const > return emptyString(); > bool isOpenQuote = false; > switch (m_type) { >- case NO_OPEN_QUOTE: >- case NO_CLOSE_QUOTE: >+ case QuoteType::NoOpenQuote: >+ case QuoteType::NoCloseQuote: > return emptyString(); >- case OPEN_QUOTE: >+ case QuoteType::OpenQuote: > isOpenQuote = true; > FALLTHROUGH; >- case CLOSE_QUOTE: >+ case QuoteType::CloseQuote: > if (const QuotesData* quotes = style().quotes()) > return isOpenQuote ? quotes->openQuote(m_depth).impl() : quotes->closeQuote(m_depth).impl(); > if (const QuotesForLanguage* quotes = quotesForLanguage(style().locale())) >@@ -392,11 +392,11 @@ String RenderQuote::computeText() const > bool RenderQuote::isOpen() const > { > switch (m_type) { >- case OPEN_QUOTE: >- case NO_OPEN_QUOTE: >+ case QuoteType::OpenQuote: >+ case QuoteType::NoOpenQuote: > return true; >- case CLOSE_QUOTE: >- case NO_CLOSE_QUOTE: >+ case QuoteType::CloseQuote: >+ case QuoteType::NoCloseQuote: > return false; > } > ASSERT_NOT_REACHED(); >Index: Source/WebCore/rendering/RenderReplaced.cpp >=================================================================== >--- Source/WebCore/rendering/RenderReplaced.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderReplaced.cpp (working copy) >@@ -104,7 +104,7 @@ void RenderReplaced::layout() > > // Now that we've calculated our preferred layout, we check to see > // if we should further constrain sizing to the intrinsic aspect ratio. >- if (style().aspectRatioType() == AspectRatioFromIntrinsic && !m_intrinsicSize.isEmpty()) { >+ if (style().aspectRatioType() == AspectRatioType::FromIntrinsic && !m_intrinsicSize.isEmpty()) { > float aspectRatio = m_intrinsicSize.aspectRatio(); > LayoutSize frameSize = size(); > float frameAspectRatio = frameSize.aspectRatio(); >@@ -328,7 +328,7 @@ bool RenderReplaced::setNeedsLayoutIfNee > || style().logicalMaxWidth().isPercentOrCalculated() > || style().logicalMinWidth().isPercentOrCalculated(); > >- bool layoutSizeDependsOnIntrinsicSize = style().aspectRatioType() == AspectRatioFromIntrinsic; >+ bool layoutSizeDependsOnIntrinsicSize = style().aspectRatioType() == AspectRatioType::FromIntrinsic; > > if (!imageSizeIsConstrained || containingBlockNeedsToRecomputePreferredSize || layoutSizeDependsOnIntrinsicSize) { > setNeedsLayout(); >@@ -392,17 +392,17 @@ LayoutRect RenderReplaced::replacedConte > > LayoutRect finalRect = contentRect; > switch (objectFit) { >- case ObjectFitContain: >- case ObjectFitScaleDown: >- case ObjectFitCover: >- finalRect.setSize(finalRect.size().fitToAspectRatio(intrinsicSize, objectFit == ObjectFitCover ? AspectRatioFitGrow : AspectRatioFitShrink)); >- if (objectFit != ObjectFitScaleDown || finalRect.width() <= intrinsicSize.width()) >+ case ObjectFit::Contain: >+ case ObjectFit::ScaleDown: >+ case ObjectFit::Cover: >+ finalRect.setSize(finalRect.size().fitToAspectRatio(intrinsicSize, objectFit == ObjectFit::Cover ? AspectRatioFitGrow : AspectRatioFitShrink)); >+ if (objectFit != ObjectFit::ScaleDown || finalRect.width() <= intrinsicSize.width()) > break; > FALLTHROUGH; >- case ObjectFitNone: >+ case ObjectFit::None: > finalRect.setSize(intrinsicSize); > break; >- case ObjectFitFill: >+ case ObjectFit::Fill: > break; > } > >Index: Source/WebCore/rendering/RenderScrollbarPart.cpp >=================================================================== >--- Source/WebCore/rendering/RenderScrollbarPart.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderScrollbarPart.cpp (working copy) >@@ -138,7 +138,7 @@ void RenderScrollbarPart::styleDidChange > clearPositionedState(); > setFloating(false); > setHasOverflowClip(false); >- if (oldStyle && m_scrollbar && m_part != NoPart && diff >= StyleDifferenceRepaint) >+ if (oldStyle && m_scrollbar && m_part != NoPart && diff >= StyleDifference::Repaint) > m_scrollbar->theme().invalidatePart(*m_scrollbar, m_part); > } > >Index: Source/WebCore/rendering/RenderTable.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTable.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTable.cpp (working copy) >@@ -101,7 +101,7 @@ void RenderTable::styleDidChange(StyleDi > RenderBlock::styleDidChange(diff, oldStyle); > propagateStyleToAnonymousChildren(PropagateToAllChildren); > >- ETableLayout oldTableLayout = oldStyle ? oldStyle->tableLayout() : TAUTO; >+ auto oldTableLayout = oldStyle ? oldStyle->tableLayout() : TableLayoutType::Auto; > > // In the collapsed border model, there is no cell spacing. > m_hSpacing = collapseBorders() ? 0 : style().horizontalBorderSpacing(); >@@ -111,7 +111,7 @@ void RenderTable::styleDidChange(StyleDi > if (!m_tableLayout || style().tableLayout() != oldTableLayout) { > // According to the CSS2 spec, you only use fixed table layout if an > // explicit width is specified on the table. Auto width implies auto table layout. >- if (style().tableLayout() == TFIXED && !style().logicalWidth().isAuto()) >+ if (style().tableLayout() == TableLayoutType::Fixed && !style().logicalWidth().isAuto()) > m_tableLayout = std::make_unique<FixedTableLayout>(this); > else > m_tableLayout = std::make_unique<AutoTableLayout>(this); >@@ -302,7 +302,7 @@ LayoutUnit RenderTable::convertStyleLogi > // HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not. > LayoutUnit borders = 0; > bool isCSSTable = !is<HTMLTableElement>(element()); >- if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style().boxSizing() == CONTENT_BOX) >+ if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style().boxSizing() == BoxSizing::ContentBox) > borders = borderStart() + borderEnd() + (collapseBorders() ? LayoutUnit() : paddingStart() + paddingEnd()); > > return minimumValueForLength(styleLogicalWidth, availableWidth) + borders; >@@ -317,7 +317,7 @@ LayoutUnit RenderTable::convertStyleLogi > // HTML tables size as though CSS height includes border/padding, CSS tables do not. > LayoutUnit borders = LayoutUnit(); > // FIXME: We cannot apply box-sizing: content-box on <table> which other browsers allow. >- if (is<HTMLTableElement>(element()) || style().boxSizing() == BORDER_BOX) { >+ if (is<HTMLTableElement>(element()) || style().boxSizing() == BoxSizing::BorderBox) { > borders = borderAndPadding; > } > return styleLogicalHeight.value() - borders; >@@ -1082,42 +1082,42 @@ LayoutUnit RenderTable::calcBorderStart( > float borderWidth = 0; > > const BorderValue& tableStartBorder = style().borderStart(); >- if (tableStartBorder.style() == BHIDDEN) >+ if (tableStartBorder.style() == BorderStyle::Hidden) > return 0; >- if (tableStartBorder.style() > BHIDDEN) >+ if (tableStartBorder.style() > BorderStyle::Hidden) > borderWidth = tableStartBorder.width(); > > if (RenderTableCol* column = colElement(0)) { > // FIXME: We don't account for direction on columns and column groups. > const BorderValue& columnAdjoiningBorder = column->style().borderStart(); >- if (columnAdjoiningBorder.style() == BHIDDEN) >+ if (columnAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; >- if (columnAdjoiningBorder.style() > BHIDDEN) >+ if (columnAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, columnAdjoiningBorder.width()); > // FIXME: This logic doesn't properly account for the first column in the first column-group case. > } > > if (const RenderTableSection* topNonEmptySection = this->topNonEmptySection()) { > const BorderValue& sectionAdjoiningBorder = topNonEmptySection->borderAdjoiningTableStart(); >- if (sectionAdjoiningBorder.style() == BHIDDEN) >+ if (sectionAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > >- if (sectionAdjoiningBorder.style() > BHIDDEN) >+ if (sectionAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, sectionAdjoiningBorder.width()); > > if (const RenderTableCell* adjoiningStartCell = topNonEmptySection->firstRowCellAdjoiningTableStart()) { > // FIXME: Make this work with perpendicular and flipped cells. > const BorderValue& startCellAdjoiningBorder = adjoiningStartCell->borderAdjoiningTableStart(); >- if (startCellAdjoiningBorder.style() == BHIDDEN) >+ if (startCellAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > > const BorderValue& firstRowAdjoiningBorder = adjoiningStartCell->row()->borderAdjoiningTableStart(); >- if (firstRowAdjoiningBorder.style() == BHIDDEN) >+ if (firstRowAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > >- if (startCellAdjoiningBorder.style() > BHIDDEN) >+ if (startCellAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, startCellAdjoiningBorder.width()); >- if (firstRowAdjoiningBorder.style() > BHIDDEN) >+ if (firstRowAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, firstRowAdjoiningBorder.width()); > } > } >@@ -1136,43 +1136,43 @@ LayoutUnit RenderTable::calcBorderEnd() > float borderWidth = 0; > > const BorderValue& tableEndBorder = style().borderEnd(); >- if (tableEndBorder.style() == BHIDDEN) >+ if (tableEndBorder.style() == BorderStyle::Hidden) > return 0; >- if (tableEndBorder.style() > BHIDDEN) >+ if (tableEndBorder.style() > BorderStyle::Hidden) > borderWidth = tableEndBorder.width(); > > unsigned endColumn = numEffCols() - 1; > if (RenderTableCol* column = colElement(endColumn)) { > // FIXME: We don't account for direction on columns and column groups. > const BorderValue& columnAdjoiningBorder = column->style().borderEnd(); >- if (columnAdjoiningBorder.style() == BHIDDEN) >+ if (columnAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; >- if (columnAdjoiningBorder.style() > BHIDDEN) >+ if (columnAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, columnAdjoiningBorder.width()); > // FIXME: This logic doesn't properly account for the last column in the last column-group case. > } > > if (const RenderTableSection* topNonEmptySection = this->topNonEmptySection()) { > const BorderValue& sectionAdjoiningBorder = topNonEmptySection->borderAdjoiningTableEnd(); >- if (sectionAdjoiningBorder.style() == BHIDDEN) >+ if (sectionAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > >- if (sectionAdjoiningBorder.style() > BHIDDEN) >+ if (sectionAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, sectionAdjoiningBorder.width()); > > if (const RenderTableCell* adjoiningEndCell = topNonEmptySection->firstRowCellAdjoiningTableEnd()) { > // FIXME: Make this work with perpendicular and flipped cells. > const BorderValue& endCellAdjoiningBorder = adjoiningEndCell->borderAdjoiningTableEnd(); >- if (endCellAdjoiningBorder.style() == BHIDDEN) >+ if (endCellAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > > const BorderValue& firstRowAdjoiningBorder = adjoiningEndCell->row()->borderAdjoiningTableEnd(); >- if (firstRowAdjoiningBorder.style() == BHIDDEN) >+ if (firstRowAdjoiningBorder.style() == BorderStyle::Hidden) > return 0; > >- if (endCellAdjoiningBorder.style() > BHIDDEN) >+ if (endCellAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, endCellAdjoiningBorder.width()); >- if (firstRowAdjoiningBorder.style() > BHIDDEN) >+ if (firstRowAdjoiningBorder.style() > BorderStyle::Hidden) > borderWidth = std::max(borderWidth, firstRowAdjoiningBorder.width()); > } > } >@@ -1215,9 +1215,9 @@ LayoutUnit RenderTable::outerBorderBefor > return 0; // Overridden by hidden > } > const BorderValue& tb = style().borderBefore(); >- if (tb.style() == BHIDDEN) >+ if (tb.style() == BorderStyle::Hidden) > return 0; >- if (tb.style() > BHIDDEN) { >+ if (tb.style() > BorderStyle::Hidden) { > LayoutUnit collapsedBorderWidth = std::max<LayoutUnit>(borderWidth, tb.width() / 2); > borderWidth = floorToDevicePixel(collapsedBorderWidth, document().deviceScaleFactor()); > } >@@ -1236,9 +1236,9 @@ LayoutUnit RenderTable::outerBorderAfter > return 0; // Overridden by hidden > } > const BorderValue& tb = style().borderAfter(); >- if (tb.style() == BHIDDEN) >+ if (tb.style() == BorderStyle::Hidden) > return 0; >- if (tb.style() > BHIDDEN) { >+ if (tb.style() > BorderStyle::Hidden) { > float deviceScaleFactor = document().deviceScaleFactor(); > LayoutUnit collapsedBorderWidth = std::max<LayoutUnit>(borderWidth, (tb.width() + (1 / deviceScaleFactor)) / 2); > borderWidth = floorToDevicePixel(collapsedBorderWidth, deviceScaleFactor); >@@ -1254,9 +1254,9 @@ LayoutUnit RenderTable::outerBorderStart > LayoutUnit borderWidth = 0; > > const BorderValue& tb = style().borderStart(); >- if (tb.style() == BHIDDEN) >+ if (tb.style() == BorderStyle::Hidden) > return 0; >- if (tb.style() > BHIDDEN) >+ if (tb.style() > BorderStyle::Hidden) > return CollapsedBorderValue::adjustedCollapsedBorderWidth(tb.width(), document().deviceScaleFactor(), !style().isLeftToRightDirection()); > > bool allHidden = true; >@@ -1281,9 +1281,9 @@ LayoutUnit RenderTable::outerBorderEnd() > LayoutUnit borderWidth = 0; > > const BorderValue& tb = style().borderEnd(); >- if (tb.style() == BHIDDEN) >+ if (tb.style() == BorderStyle::Hidden) > return 0; >- if (tb.style() > BHIDDEN) >+ if (tb.style() > BorderStyle::Hidden) > return CollapsedBorderValue::adjustedCollapsedBorderWidth(tb.width(), document().deviceScaleFactor(), style().isLeftToRightDirection()); > > bool allHidden = true; >Index: Source/WebCore/rendering/RenderTable.h >=================================================================== >--- Source/WebCore/rendering/RenderTable.h (revision 232008) >+++ Source/WebCore/rendering/RenderTable.h (working copy) >@@ -53,7 +53,7 @@ public: > LayoutUnit hBorderSpacing() const { return m_hSpacing; } > LayoutUnit vBorderSpacing() const { return m_vSpacing; } > >- bool collapseBorders() const { return style().borderCollapse(); } >+ bool collapseBorders() const { return style().borderCollapse() == BorderCollapse::Collapse; } > > LayoutUnit borderStart() const override { return m_borderStart; } > LayoutUnit borderEnd() const override { return m_borderEnd; } >Index: Source/WebCore/rendering/RenderTableCell.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableCell.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTableCell.cpp (working copy) >@@ -208,26 +208,26 @@ void RenderTableCell::computeIntrinsicPa > > LayoutUnit intrinsicPaddingBefore = 0; > switch (style().verticalAlign()) { >- case SUB: >- case SUPER: >- case TEXT_TOP: >- case TEXT_BOTTOM: >- case LENGTH: >- case BASELINE: { >+ case VerticalAlign::Sub: >+ case VerticalAlign::Super: >+ case VerticalAlign::TextTop: >+ case VerticalAlign::TextBottom: >+ case VerticalAlign::Length: >+ case VerticalAlign::Baseline: { > LayoutUnit baseline = cellBaselinePosition(); > if (baseline > borderAndPaddingBefore()) > intrinsicPaddingBefore = section()->rowBaseline(rowIndex()) - (baseline - oldIntrinsicPaddingBefore); > break; > } >- case TOP: >+ case VerticalAlign::Top: > break; >- case MIDDLE: >+ case VerticalAlign::Middle: > intrinsicPaddingBefore = (rowHeight - logicalHeightWithoutIntrinsicPadding) / 2; > break; >- case BOTTOM: >+ case VerticalAlign::Bottom: > intrinsicPaddingBefore = rowHeight - logicalHeightWithoutIntrinsicPadding; > break; >- case BASELINE_MIDDLE: >+ case VerticalAlign::BaselineMiddle: > break; > } > >@@ -438,7 +438,7 @@ void RenderTableCell::styleDidChange(Sty > RenderTable* table = this->table(); > if (table && oldStyle && oldStyle->border() != style().border()) { > table->invalidateCollapsedBorders(this); >- if (table->collapseBorders() && diff == StyleDifferenceLayout) { >+ if (table->collapseBorders() && diff == StyleDifference::Layout) { > markCellDirtyWhenCollapsedBorderChanges(table->cellBelow(this)); > markCellDirtyWhenCollapsedBorderChanges(table->cellAbove(this)); > markCellDirtyWhenCollapsedBorderChanges(table->cellBefore(this)); >@@ -472,21 +472,21 @@ static int compareBorders(const Collapse > return -1; > > // Rule #1 above. >- if (border2.style() == BHIDDEN) { >- if (border1.style() == BHIDDEN) >+ if (border2.style() == BorderStyle::Hidden) { >+ if (border1.style() == BorderStyle::Hidden) > return 0; > return -1; > } >- if (border1.style() == BHIDDEN) >+ if (border1.style() == BorderStyle::Hidden) > return 1; > > // Rule #2 above. A style of 'none' has lowest priority and always loses to any other border. >- if (border2.style() == BNONE) { >- if (border1.style() == BNONE) >+ if (border2.style() == BorderStyle::None) { >+ if (border1.style() == BorderStyle::None) > return 0; > return 1; > } >- if (border1.style() == BNONE) >+ if (border1.style() == BorderStyle::None) > return -1; > > // The first part of rule #3 above. Wider borders win. >@@ -506,7 +506,7 @@ static int compareBorders(const Collapse > static CollapsedBorderValue chooseBorder(const CollapsedBorderValue& border1, const CollapsedBorderValue& border2) > { > const CollapsedBorderValue& border = compareBorders(border1, border2) < 0 ? border2 : border1; >- return border.style() == BHIDDEN ? CollapsedBorderValue() : border; >+ return border.style() == BorderStyle::Hidden ? CollapsedBorderValue() : border; > } > > bool RenderTableCell::hasStartBorderAdjoiningTable() const >@@ -533,7 +533,7 @@ bool RenderTableCell::hasEndBorderAdjoin > > static CollapsedBorderValue emptyBorder() > { >- return CollapsedBorderValue(BorderValue(), Color(), BCELL); >+ return CollapsedBorderValue(BorderValue(), Color(), BorderPrecedence::Cell); > } > > CollapsedBorderValue RenderTableCell::collapsedStartBorder(IncludeBorderColorOrNot includeColor) const >@@ -560,7 +560,7 @@ CollapsedBorderValue RenderTableCell::co > // (1) Our start border. > CSSPropertyID startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; > CSSPropertyID endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; >- CollapsedBorderValue result(style().borderStart(), includeColor ? style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCELL); >+ CollapsedBorderValue result(style().borderStart(), includeColor ? style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Cell); > > RenderTable* table = this->table(); > if (!table) >@@ -568,7 +568,7 @@ CollapsedBorderValue RenderTableCell::co > // (2) The end border of the preceding cell. > RenderTableCell* cellBefore = table->cellBefore(this); > if (cellBefore) { >- CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(cellBefore->borderAdjoiningCellAfter(*this), includeColor ? cellBefore->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCELL); >+ CollapsedBorderValue cellBeforeAdjoiningBorder = CollapsedBorderValue(cellBefore->borderAdjoiningCellAfter(*this), includeColor ? cellBefore->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Cell); > // |result| should be the 2nd argument as |cellBefore| should win in case of equality per CSS 2.1 (Border conflict resolution, point 4). > result = chooseBorder(cellBeforeAdjoiningBorder, result); > if (!result.exists()) >@@ -578,12 +578,12 @@ CollapsedBorderValue RenderTableCell::co > bool startBorderAdjoinsTable = hasStartBorderAdjoiningTable(); > if (startBorderAdjoinsTable) { > // (3) Our row's start border. >- result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningStartCell(*this), includeColor ? parent()->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BROW)); >+ result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningStartCell(*this), includeColor ? parent()->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Row)); > if (!result.exists()) > return result; > > // (4) Our row group's start border. >- result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningStartCell(*this), includeColor ? section()->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BROWGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningStartCell(*this), includeColor ? section()->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::RowGroup)); > if (!result.exists()) > return result; > } >@@ -594,19 +594,19 @@ CollapsedBorderValue RenderTableCell::co > if (RenderTableCol* colElt = table->colElement(col(), &startColEdge, &endColEdge)) { > if (colElt->isTableColumnGroup() && startColEdge) { > // The |colElt| is a column group and is also the first colgroup (in case of spanned colgroups). >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } else if (!colElt->isTableColumnGroup()) { > // We first consider the |colElt| and irrespective of whether it is a spanned col or not, we apply > // its start border. This is as per HTML5 which states that: "For the purposes of the CSS table model, > // the col element is expected to be treated as if it was present as many times as its span attribute specifies". >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOL)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellStartBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Column)); > if (!result.exists()) > return result; > // Next, apply the start border of the enclosing colgroup but only if it is adjacent to the cell's edge. > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) { >- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } >@@ -618,18 +618,18 @@ CollapsedBorderValue RenderTableCell::co > if (RenderTableCol* colElt = table->colElement(col() - 1, &startColEdge, &endColEdge)) { > if (colElt->isTableColumnGroup() && endColEdge) { > // The element is a colgroup and is also the last colgroup (in case of spanned colgroups). >- result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOLGROUP), result); >+ result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::ColumnGroup), result); > if (!result.exists()) > return result; > } else if (colElt->isTableColumn()) { > // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5. >- result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOL), result); >+ result = chooseBorder(CollapsedBorderValue(colElt->borderAdjoiningCellAfter(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Column), result); > if (!result.exists()) > return result; > // Next, if the previous col has a parent colgroup then its end border should be applied > // but only if it is adjacent to the cell's edge. > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) { >- result = chooseBorder(CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOLGROUP), result); >+ result = chooseBorder(CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::ColumnGroup), result); > if (!result.exists()) > return result; > } >@@ -639,7 +639,7 @@ CollapsedBorderValue RenderTableCell::co > > if (startBorderAdjoinsTable) { > // (7) The table's start border. >- result = chooseBorder(result, CollapsedBorderValue(table->tableStartBorderAdjoiningCell(*this), includeColor ? table->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BTABLE)); >+ result = chooseBorder(result, CollapsedBorderValue(table->tableStartBorderAdjoiningCell(*this), includeColor ? table->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Table)); > if (!result.exists()) > return result; > } >@@ -671,7 +671,7 @@ CollapsedBorderValue RenderTableCell::co > // (1) Our end border. > CSSPropertyID startColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderStartColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; > CSSPropertyID endColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderEndColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; >- CollapsedBorderValue result = CollapsedBorderValue(style().borderEnd(), includeColor ? style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCELL); >+ CollapsedBorderValue result = CollapsedBorderValue(style().borderEnd(), includeColor ? style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Cell); > > RenderTable* table = this->table(); > if (!table) >@@ -682,7 +682,7 @@ CollapsedBorderValue RenderTableCell::co > // (2) The start border of the following cell. > if (!isEndColumn) { > if (RenderTableCell* cellAfter = table->cellAfter(this)) { >- CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue(cellAfter->borderAdjoiningCellBefore(*this), includeColor ? cellAfter->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCELL); >+ CollapsedBorderValue cellAfterAdjoiningBorder = CollapsedBorderValue(cellAfter->borderAdjoiningCellBefore(*this), includeColor ? cellAfter->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Cell); > result = chooseBorder(result, cellAfterAdjoiningBorder); > if (!result.exists()) > return result; >@@ -692,12 +692,12 @@ CollapsedBorderValue RenderTableCell::co > bool endBorderAdjoinsTable = hasEndBorderAdjoiningTable(); > if (endBorderAdjoinsTable) { > // (3) Our row's end border. >- result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningEndCell(*this), includeColor ? parent()->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BROW)); >+ result = chooseBorder(result, CollapsedBorderValue(row()->borderAdjoiningEndCell(*this), includeColor ? parent()->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Row)); > if (!result.exists()) > return result; > > // (4) Our row group's end border. >- result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningEndCell(*this), includeColor ? section()->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BROWGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(section()->borderAdjoiningEndCell(*this), includeColor ? section()->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::RowGroup)); > if (!result.exists()) > return result; > } >@@ -708,19 +708,19 @@ CollapsedBorderValue RenderTableCell::co > if (RenderTableCol* colElt = table->colElement(col() + colSpan() - 1, &startColEdge, &endColEdge)) { > if (colElt->isTableColumnGroup() && endColEdge) { > // The element is a colgroup and is also the last colgroup (in case of spanned colgroups). >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } else if (!colElt->isTableColumnGroup()) { > // First apply the end border of the column irrespective of whether it is spanned or not. This is as per > // HTML5 which states that: "For the purposes of the CSS table model, the col element is expected to be > // treated as if it was present as many times as its span attribute specifies". >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOL)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellEndBorder(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Column)); > if (!result.exists()) > return result; > // Next, if it has a parent colgroup then we apply its end border but only if it is adjacent to the cell. > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentAfter()) { >- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellEndBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } >@@ -732,17 +732,17 @@ CollapsedBorderValue RenderTableCell::co > if (RenderTableCol* colElt = table->colElement(col() + colSpan(), &startColEdge, &endColEdge)) { > if (colElt->isTableColumnGroup() && startColEdge) { > // This case is a colgroup without any col, we only compute it if it is adjacent to the cell's edge. >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } else if (colElt->isTableColumn()) { > // Resolve the collapsing border against the col's border ignoring any 'span' as per HTML5. >- result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOL)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->borderAdjoiningCellBefore(*this), includeColor ? colElt->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::Column)); > if (!result.exists()) > return result; > // If we have a parent colgroup, resolve the border only if it is adjacent to the cell. > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroupIfAdjacentBefore()) { >- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->borderAdjoiningCellStartBorder(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(startColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } >@@ -752,7 +752,7 @@ CollapsedBorderValue RenderTableCell::co > > if (endBorderAdjoinsTable) { > // (7) The table's end border. >- result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorderAdjoiningCell(*this), includeColor ? table->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BTABLE)); >+ result = chooseBorder(result, CollapsedBorderValue(table->tableEndBorderAdjoiningCell(*this), includeColor ? table->style().visitedDependentColorWithColorFilter(endColorProperty) : Color(), BorderPrecedence::Table)); > if (!result.exists()) > return result; > } >@@ -784,7 +784,7 @@ CollapsedBorderValue RenderTableCell::co > // (1) Our before border. > CSSPropertyID beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; > CSSPropertyID afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; >- CollapsedBorderValue result = CollapsedBorderValue(style().borderBefore(), includeColor ? style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BCELL); >+ CollapsedBorderValue result = CollapsedBorderValue(style().borderBefore(), includeColor ? style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Cell); > > RenderTable* table = this->table(); > if (!table) >@@ -792,13 +792,13 @@ CollapsedBorderValue RenderTableCell::co > RenderTableCell* prevCell = table->cellAbove(this); > if (prevCell) { > // (2) A before cell's after border. >- result = chooseBorder(CollapsedBorderValue(prevCell->style().borderAfter(), includeColor ? prevCell->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BCELL), result); >+ result = chooseBorder(CollapsedBorderValue(prevCell->style().borderAfter(), includeColor ? prevCell->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Cell), result); > if (!result.exists()) > return result; > } > > // (3) Our row's before border. >- result = chooseBorder(result, CollapsedBorderValue(parent()->style().borderBefore(), includeColor ? parent()->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BROW)); >+ result = chooseBorder(result, CollapsedBorderValue(parent()->style().borderBefore(), includeColor ? parent()->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Row)); > if (!result.exists()) > return result; > >@@ -811,7 +811,7 @@ CollapsedBorderValue RenderTableCell::co > prevRow = prevCell->section()->lastRow(); > > if (prevRow) { >- result = chooseBorder(CollapsedBorderValue(prevRow->style().borderAfter(), includeColor ? prevRow->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BROW), result); >+ result = chooseBorder(CollapsedBorderValue(prevRow->style().borderAfter(), includeColor ? prevRow->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Row), result); > if (!result.exists()) > return result; > } >@@ -821,14 +821,14 @@ CollapsedBorderValue RenderTableCell::co > RenderTableSection* currSection = section(); > if (!rowIndex()) { > // (5) Our row group's before border. >- result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderBefore(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BROWGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderBefore(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::RowGroup)); > if (!result.exists()) > return result; > > // (6) Previous row group's after border. > currSection = table->sectionAbove(currSection, SkipEmptySections); > if (currSection) { >- result = chooseBorder(CollapsedBorderValue(currSection->style().borderAfter(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BROWGROUP), result); >+ result = chooseBorder(CollapsedBorderValue(currSection->style().borderAfter(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::RowGroup), result); > if (!result.exists()) > return result; > } >@@ -838,18 +838,18 @@ CollapsedBorderValue RenderTableCell::co > // (8) Our column and column group's before borders. > RenderTableCol* colElt = table->colElement(col()); > if (colElt) { >- result = chooseBorder(result, CollapsedBorderValue(colElt->style().borderBefore(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BCOL)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->style().borderBefore(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Column)); > if (!result.exists()) > return result; > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroup()) { >- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style().borderBefore(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style().borderBefore(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } > } > > // (9) The table's before border. >- result = chooseBorder(result, CollapsedBorderValue(table->style().borderBefore(), includeColor ? table->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BTABLE)); >+ result = chooseBorder(result, CollapsedBorderValue(table->style().borderBefore(), includeColor ? table->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Table)); > if (!result.exists()) > return result; > } >@@ -881,7 +881,7 @@ CollapsedBorderValue RenderTableCell::co > // (1) Our after border. > CSSPropertyID beforeColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderBeforeColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; > CSSPropertyID afterColorProperty = includeColor ? CSSProperty::resolveDirectionAwareProperty(CSSPropertyWebkitBorderAfterColor, styleForCellFlow().direction(), styleForCellFlow().writingMode()) : CSSPropertyInvalid; >- CollapsedBorderValue result = CollapsedBorderValue(style().borderAfter(), includeColor ? style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BCELL); >+ CollapsedBorderValue result = CollapsedBorderValue(style().borderAfter(), includeColor ? style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Cell); > > RenderTable* table = this->table(); > if (!table) >@@ -889,19 +889,19 @@ CollapsedBorderValue RenderTableCell::co > RenderTableCell* nextCell = table->cellBelow(this); > if (nextCell) { > // (2) An after cell's before border. >- result = chooseBorder(result, CollapsedBorderValue(nextCell->style().borderBefore(), includeColor ? nextCell->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BCELL)); >+ result = chooseBorder(result, CollapsedBorderValue(nextCell->style().borderBefore(), includeColor ? nextCell->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Cell)); > if (!result.exists()) > return result; > } > > // (3) Our row's after border. (FIXME: Deal with rowspan!) >- result = chooseBorder(result, CollapsedBorderValue(parent()->style().borderAfter(), includeColor ? parent()->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BROW)); >+ result = chooseBorder(result, CollapsedBorderValue(parent()->style().borderAfter(), includeColor ? parent()->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Row)); > if (!result.exists()) > return result; > > // (4) The next row's before border. > if (nextCell) { >- result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style().borderBefore(), includeColor ? nextCell->parent()->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BROW)); >+ result = chooseBorder(result, CollapsedBorderValue(nextCell->parent()->style().borderBefore(), includeColor ? nextCell->parent()->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::Row)); > if (!result.exists()) > return result; > } >@@ -910,14 +910,14 @@ CollapsedBorderValue RenderTableCell::co > RenderTableSection* currSection = section(); > if (rowIndex() + rowSpan() >= currSection->numRows()) { > // (5) Our row group's after border. >- result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderAfter(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BROWGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderAfter(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::RowGroup)); > if (!result.exists()) > return result; > > // (6) Following row group's before border. > currSection = table->sectionBelow(currSection, SkipEmptySections); > if (currSection) { >- result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderBefore(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BROWGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(currSection->style().borderBefore(), includeColor ? currSection->style().visitedDependentColorWithColorFilter(beforeColorProperty) : Color(), BorderPrecedence::RowGroup)); > if (!result.exists()) > return result; > } >@@ -927,17 +927,17 @@ CollapsedBorderValue RenderTableCell::co > // (8) Our column and column group's after borders. > RenderTableCol* colElt = table->colElement(col()); > if (colElt) { >- result = chooseBorder(result, CollapsedBorderValue(colElt->style().borderAfter(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BCOL)); >+ result = chooseBorder(result, CollapsedBorderValue(colElt->style().borderAfter(), includeColor ? colElt->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Column)); > if (!result.exists()) return result; > if (RenderTableCol* enclosingColumnGroup = colElt->enclosingColumnGroup()) { >- result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style().borderAfter(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BCOLGROUP)); >+ result = chooseBorder(result, CollapsedBorderValue(enclosingColumnGroup->style().borderAfter(), includeColor ? enclosingColumnGroup->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::ColumnGroup)); > if (!result.exists()) > return result; > } > } > > // (9) The table's after border. >- result = chooseBorder(result, CollapsedBorderValue(table->style().borderAfter(), includeColor ? table->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BTABLE)); >+ result = chooseBorder(result, CollapsedBorderValue(table->style().borderAfter(), includeColor ? table->style().visitedDependentColorWithColorFilter(afterColorProperty) : Color(), BorderPrecedence::Table)); > if (!result.exists()) > return result; > } >@@ -1117,7 +1117,7 @@ struct CollapsedBorder { > LayoutUnit y1; > LayoutUnit x2; > LayoutUnit y2; >- EBorderStyle style; >+ BorderStyle style; > }; > > class CollapsedBorders { >@@ -1128,7 +1128,7 @@ public: > } > > void addBorder(const CollapsedBorderValue& borderValue, BoxSide borderSide, bool shouldPaint, >- LayoutUnit x1, LayoutUnit y1, LayoutUnit x2, LayoutUnit y2, EBorderStyle borderStyle) >+ LayoutUnit x1, LayoutUnit y1, LayoutUnit x2, LayoutUnit y2, BorderStyle borderStyle) > { > if (borderValue.exists() && shouldPaint) { > m_borders[m_count].borderValue = borderValue; >@@ -1236,15 +1236,15 @@ void RenderTableCell::paintCollapsedBord > paintRect.width() + leftHalfCollapsedBorder + righHalftCollapsedBorder, > paintRect.height() + topHalfCollapsedBorder + bottomHalfCollapsedBorder); > >- EBorderStyle topStyle = collapsedBorderStyle(topVal.style()); >- EBorderStyle bottomStyle = collapsedBorderStyle(bottomVal.style()); >- EBorderStyle leftStyle = collapsedBorderStyle(leftVal.style()); >- EBorderStyle rightStyle = collapsedBorderStyle(rightVal.style()); >- >- bool renderTop = topStyle > BHIDDEN && !topVal.isTransparent() && floorToDevicePixel(topWidth, deviceScaleFactor); >- bool renderBottom = bottomStyle > BHIDDEN && !bottomVal.isTransparent() && floorToDevicePixel(bottomWidth, deviceScaleFactor); >- bool renderLeft = leftStyle > BHIDDEN && !leftVal.isTransparent() && floorToDevicePixel(leftWidth, deviceScaleFactor); >- bool renderRight = rightStyle > BHIDDEN && !rightVal.isTransparent() && floorToDevicePixel(rightWidth, deviceScaleFactor); >+ BorderStyle topStyle = collapsedBorderStyle(topVal.style()); >+ BorderStyle bottomStyle = collapsedBorderStyle(bottomVal.style()); >+ BorderStyle leftStyle = collapsedBorderStyle(leftVal.style()); >+ BorderStyle rightStyle = collapsedBorderStyle(rightVal.style()); >+ >+ bool renderTop = topStyle > BorderStyle::Hidden && !topVal.isTransparent() && floorToDevicePixel(topWidth, deviceScaleFactor); >+ bool renderBottom = bottomStyle > BorderStyle::Hidden && !bottomVal.isTransparent() && floorToDevicePixel(bottomWidth, deviceScaleFactor); >+ bool renderLeft = leftStyle > BorderStyle::Hidden && !leftVal.isTransparent() && floorToDevicePixel(leftWidth, deviceScaleFactor); >+ bool renderRight = rightStyle > BorderStyle::Hidden && !rightVal.isTransparent() && floorToDevicePixel(rightWidth, deviceScaleFactor); > > // We never paint diagonals at the joins. We simply let the border with the highest > // precedence paint on top of borders with lower precedence. >@@ -1356,7 +1356,7 @@ void RenderTableCell::scrollbarsChanged( > return; > > // Shrink our intrinsic padding as much as possible to accommodate the scrollbar. >- if (style().verticalAlign() == MIDDLE) { >+ if (style().verticalAlign() == VerticalAlign::Middle) { > LayoutUnit totalHeight = logicalHeight(); > LayoutUnit heightWithoutIntrinsicPadding = totalHeight - intrinsicPaddingBefore() - intrinsicPaddingAfter(); > totalHeight -= scrollbarHeight; >Index: Source/WebCore/rendering/RenderTableCell.h >=================================================================== >--- Source/WebCore/rendering/RenderTableCell.h (revision 232008) >+++ Source/WebCore/rendering/RenderTableCell.h (working copy) >@@ -293,15 +293,15 @@ inline LayoutUnit RenderTableCell::logic > LayoutUnit styleLogicalHeight = valueForLength(style().logicalHeight(), 0); > // In strict mode, box-sizing: content-box do the right thing and actually add in the border and padding. > // Call computedCSSPadding* directly to avoid including implicitPadding. >- if (!document().inQuirksMode() && style().boxSizing() != BORDER_BOX) >+ if (!document().inQuirksMode() && style().boxSizing() != BoxSizing::BorderBox) > styleLogicalHeight += computedCSSPaddingBefore() + computedCSSPaddingAfter() + borderBefore() + borderAfter(); > return std::max(styleLogicalHeight, adjustedLogicalHeight); > } > > inline bool RenderTableCell::isBaselineAligned() const > { >- EVerticalAlign va = style().verticalAlign(); >- return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SUPER || va == SUB || va == LENGTH; >+ VerticalAlign va = style().verticalAlign(); >+ return va == VerticalAlign::Baseline || va == VerticalAlign::TextBottom || va == VerticalAlign::TextTop || va == VerticalAlign::Super || va == VerticalAlign::Sub || va == VerticalAlign::Length; > } > > inline const BorderValue& RenderTableCell::borderAdjoiningTableStart() const >Index: Source/WebCore/rendering/RenderTableRow.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableRow.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTableRow.cpp (working copy) >@@ -87,7 +87,7 @@ void RenderTableRow::styleDidChange(Styl > if (oldStyle && oldStyle->border() != style().border()) > table->invalidateCollapsedBorders(); > >- if (oldStyle && diff == StyleDifferenceLayout && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, &style())) { >+ if (oldStyle && diff == StyleDifference::Layout && needsLayout() && table->collapseBorders() && borderWidthChanged(oldStyle, &style())) { > // If the border width changes on a row, we need to make sure the cells in the row know to lay out again. > // This only happens when borders are collapsed, since they end up affecting the border sides of the cell > // itself. >Index: Source/WebCore/rendering/RenderTableSection.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableSection.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTableSection.cpp (working copy) >@@ -686,15 +686,15 @@ LayoutUnit RenderTableSection::calcOuter > LayoutUnit borderWidth = 0; > > const BorderValue& sb = style().borderBefore(); >- if (sb.style() == BHIDDEN) >+ if (sb.style() == BorderStyle::Hidden) > return -1; >- if (sb.style() > BHIDDEN) >+ if (sb.style() > BorderStyle::Hidden) > borderWidth = sb.width(); > > const BorderValue& rb = firstRow()->style().borderBefore(); >- if (rb.style() == BHIDDEN) >+ if (rb.style() == BorderStyle::Hidden) > return -1; >- if (rb.style() > BHIDDEN && rb.width() > borderWidth) >+ if (rb.style() > BorderStyle::Hidden && rb.width() > borderWidth) > borderWidth = rb.width(); > > bool allHidden = true; >@@ -707,18 +707,18 @@ LayoutUnit RenderTableSection::calcOuter > RenderTableCol* colGroup = table()->colElement(c); > if (colGroup) { > const BorderValue& gb = colGroup->style().borderBefore(); >- if (gb.style() == BHIDDEN || cb.style() == BHIDDEN) >+ if (gb.style() == BorderStyle::Hidden || cb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (gb.style() > BHIDDEN && gb.width() > borderWidth) >+ if (gb.style() > BorderStyle::Hidden && gb.width() > borderWidth) > borderWidth = gb.width(); >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); > } else { >- if (cb.style() == BHIDDEN) >+ if (cb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); > } > } >@@ -736,15 +736,15 @@ LayoutUnit RenderTableSection::calcOuter > LayoutUnit borderWidth = 0; > > const BorderValue& sb = style().borderAfter(); >- if (sb.style() == BHIDDEN) >+ if (sb.style() == BorderStyle::Hidden) > return -1; >- if (sb.style() > BHIDDEN) >+ if (sb.style() > BorderStyle::Hidden) > borderWidth = sb.width(); > > const BorderValue& rb = lastRow()->style().borderAfter(); >- if (rb.style() == BHIDDEN) >+ if (rb.style() == BorderStyle::Hidden) > return -1; >- if (rb.style() > BHIDDEN && rb.width() > borderWidth) >+ if (rb.style() > BorderStyle::Hidden && rb.width() > borderWidth) > borderWidth = rb.width(); > > bool allHidden = true; >@@ -757,18 +757,18 @@ LayoutUnit RenderTableSection::calcOuter > RenderTableCol* colGroup = table()->colElement(c); > if (colGroup) { > const BorderValue& gb = colGroup->style().borderAfter(); >- if (gb.style() == BHIDDEN || cb.style() == BHIDDEN) >+ if (gb.style() == BorderStyle::Hidden || cb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (gb.style() > BHIDDEN && gb.width() > borderWidth) >+ if (gb.style() > BorderStyle::Hidden && gb.width() > borderWidth) > borderWidth = gb.width(); >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); > } else { >- if (cb.style() == BHIDDEN) >+ if (cb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); > } > } >@@ -786,16 +786,16 @@ LayoutUnit RenderTableSection::calcOuter > LayoutUnit borderWidth = 0; > > const BorderValue& sb = style().borderStart(); >- if (sb.style() == BHIDDEN) >+ if (sb.style() == BorderStyle::Hidden) > return -1; >- if (sb.style() > BHIDDEN) >+ if (sb.style() > BorderStyle::Hidden) > borderWidth = sb.width(); > > if (RenderTableCol* colGroup = table()->colElement(0)) { > const BorderValue& gb = colGroup->style().borderStart(); >- if (gb.style() == BHIDDEN) >+ if (gb.style() == BorderStyle::Hidden) > return -1; >- if (gb.style() > BHIDDEN && gb.width() > borderWidth) >+ if (gb.style() > BorderStyle::Hidden && gb.width() > borderWidth) > borderWidth = gb.width(); > } > >@@ -807,12 +807,12 @@ LayoutUnit RenderTableSection::calcOuter > // FIXME: Don't repeat for the same cell > const BorderValue& cb = current.primaryCell()->style().borderStart(); // FIXME: Make this work with perpendicular and flipped cells. > const BorderValue& rb = current.primaryCell()->parent()->style().borderStart(); >- if (cb.style() == BHIDDEN || rb.style() == BHIDDEN) >+ if (cb.style() == BorderStyle::Hidden || rb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); >- if (rb.style() > BHIDDEN && rb.width() > borderWidth) >+ if (rb.style() > BorderStyle::Hidden && rb.width() > borderWidth) > borderWidth = rb.width(); > } > if (allHidden) >@@ -829,16 +829,16 @@ LayoutUnit RenderTableSection::calcOuter > LayoutUnit borderWidth = 0; > > const BorderValue& sb = style().borderEnd(); >- if (sb.style() == BHIDDEN) >+ if (sb.style() == BorderStyle::Hidden) > return -1; >- if (sb.style() > BHIDDEN) >+ if (sb.style() > BorderStyle::Hidden) > borderWidth = sb.width(); > > if (RenderTableCol* colGroup = table()->colElement(totalCols - 1)) { > const BorderValue& gb = colGroup->style().borderEnd(); >- if (gb.style() == BHIDDEN) >+ if (gb.style() == BorderStyle::Hidden) > return -1; >- if (gb.style() > BHIDDEN && gb.width() > borderWidth) >+ if (gb.style() > BorderStyle::Hidden && gb.width() > borderWidth) > borderWidth = gb.width(); > } > >@@ -850,12 +850,12 @@ LayoutUnit RenderTableSection::calcOuter > // FIXME: Don't repeat for the same cell > const BorderValue& cb = current.primaryCell()->style().borderEnd(); // FIXME: Make this work with perpendicular and flipped cells. > const BorderValue& rb = current.primaryCell()->parent()->style().borderEnd(); >- if (cb.style() == BHIDDEN || rb.style() == BHIDDEN) >+ if (cb.style() == BorderStyle::Hidden || rb.style() == BorderStyle::Hidden) > continue; > allHidden = false; >- if (cb.style() > BHIDDEN && cb.width() > borderWidth) >+ if (cb.style() > BorderStyle::Hidden && cb.width() > borderWidth) > borderWidth = cb.width(); >- if (rb.style() > BHIDDEN && rb.width() > borderWidth) >+ if (rb.style() > BorderStyle::Hidden && rb.width() > borderWidth) > borderWidth = rb.width(); > } > if (allHidden) >@@ -1075,9 +1075,9 @@ CellSpan RenderTableSection::spannedColu > return CellSpan(startColumn, endColumn); > } > >-void RenderTableSection::paintRowGroupBorder(const PaintInfo& paintInfo, bool antialias, LayoutRect rect, BoxSide side, CSSPropertyID borderColor, EBorderStyle borderStyle, EBorderStyle tableBorderStyle) >+void RenderTableSection::paintRowGroupBorder(const PaintInfo& paintInfo, bool antialias, LayoutRect rect, BoxSide side, CSSPropertyID borderColor, BorderStyle borderStyle, BorderStyle tableBorderStyle) > { >- if (tableBorderStyle == BHIDDEN) >+ if (tableBorderStyle == BorderStyle::Hidden) > return; > rect.intersect(paintInfo.rect); > if (rect.isEmpty()) >@@ -1129,7 +1129,7 @@ LayoutUnit RenderTableSection::horizonta > > void RenderTableSection::paintRowGroupBorderIfRequired(const PaintInfo& paintInfo, const LayoutPoint& paintOffset, unsigned row, unsigned column, BoxSide borderSide, RenderTableCell* cell) > { >- if (table()->currentBorderValue()->precedence() > BROWGROUP) >+ if (table()->currentBorderValue()->precedence() > BorderPrecedence::RowGroup) > return; > if (paintInfo.context().paintingDisabled()) > return; >@@ -1545,7 +1545,7 @@ CollapsedBorderValue RenderTableSection: > auto it = m_cellsCollapsedBorders.find(std::make_pair(&cell, side)); > // Only non-empty collapsed borders are in the hashmap. > if (it == m_cellsCollapsedBorders.end()) >- return CollapsedBorderValue(BorderValue(), Color(), BCELL); >+ return CollapsedBorderValue(BorderValue(), Color(), BorderPrecedence::Cell); > return it->value; > } > >Index: Source/WebCore/rendering/RenderTableSection.h >=================================================================== >--- Source/WebCore/rendering/RenderTableSection.h (revision 232008) >+++ Source/WebCore/rendering/RenderTableSection.h (working copy) >@@ -172,7 +172,7 @@ private: > > void paintCell(RenderTableCell*, PaintInfo&, const LayoutPoint&); > void paintObject(PaintInfo&, const LayoutPoint&) override; >- void paintRowGroupBorder(const PaintInfo&, bool antialias, LayoutRect, BoxSide, CSSPropertyID borderColor, EBorderStyle, EBorderStyle tableBorderStyle); >+ void paintRowGroupBorder(const PaintInfo&, bool antialias, LayoutRect, BoxSide, CSSPropertyID borderColor, BorderStyle, BorderStyle tableBorderStyle); > void paintRowGroupBorderIfRequired(const PaintInfo&, const LayoutPoint& paintOffset, unsigned row, unsigned col, BoxSide, RenderTableCell* = 0); > LayoutUnit offsetLeftForRowGroupBorder(RenderTableCell*, const LayoutRect& rowGroupRect, unsigned row); > >Index: Source/WebCore/rendering/RenderText.cpp >=================================================================== >--- Source/WebCore/rendering/RenderText.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderText.cpp (working copy) >@@ -253,7 +253,7 @@ void RenderText::styleDidChange(StyleDif > // we already did this for the parent of the text run. > // We do have to schedule layouts, though, since a style change can force us to > // need to relayout. >- if (diff == StyleDifferenceLayout) { >+ if (diff == StyleDifference::Layout) { > setNeedsLayoutAndPrefWidthsRecalc(); > m_knownToHaveNoOverflowAndNoFallbackFonts = false; > } >@@ -272,7 +272,7 @@ void RenderText::styleDidChange(StyleDif > m_canUseSimplifiedTextMeasuring = computeCanUseSimplifiedTextMeasuring(); > > ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; >- ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; >+ TextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TextSecurity::None; > if (needsResetText || oldTransform != newStyle.textTransform() || oldSecurity != newStyle.textSecurity()) > RenderText::setText(originalText(), true); > } >@@ -418,7 +418,7 @@ void RenderText::collectSelectionRects(V > Vector<FloatQuad> RenderText::absoluteQuadsClippedToEllipsis() const > { > if (auto* layout = simpleLineLayout()) { >- ASSERT(style().textOverflow() != TextOverflowEllipsis); >+ ASSERT(style().textOverflow() != TextOverflow::Ellipsis); > return SimpleLineLayout::collectAbsoluteQuads(*this, *layout, nullptr); > } > return m_lineBoxes.absoluteQuads(*this, nullptr, RenderTextLineBoxes::ClipToEllipsis); >@@ -678,7 +678,7 @@ RenderText::Widths RenderText::trimmedPr > > static inline bool isSpaceAccordingToStyle(UChar c, const RenderStyle& style) > { >- return c == ' ' || (c == noBreakSpace && style.nbspMode() == SPACE); >+ return c == ' ' || (c == noBreakSpace && style.nbspMode() == NBSPMode::Space); > } > > float RenderText::minLogicalWidth() const >@@ -700,14 +700,14 @@ float RenderText::maxLogicalWidth() cons > LineBreakIteratorMode mapLineBreakToIteratorMode(LineBreak lineBreak) > { > switch (lineBreak) { >- case LineBreakAuto: >- case LineBreakAfterWhiteSpace: >+ case LineBreak::Auto: >+ case LineBreak::AfterWhiteSpace: > return LineBreakIteratorMode::Default; >- case LineBreakLoose: >+ case LineBreak::Loose: > return LineBreakIteratorMode::Loose; >- case LineBreakNormal: >+ case LineBreak::Normal: > return LineBreakIteratorMode::Normal; >- case LineBreakStrict: >+ case LineBreak::Strict: > return LineBreakIteratorMode::Strict; > } > ASSERT_NOT_REACHED(); >@@ -821,13 +821,13 @@ void RenderText::computePreferredLogical > > std::optional<int> firstGlyphLeftOverflow; > >- bool breakNBSP = style.autoWrap() && style.nbspMode() == SPACE; >+ bool breakNBSP = style.autoWrap() && style.nbspMode() == NBSPMode::Space; > > // Note the deliberate omission of word-wrap and overflow-wrap from this breakAll check. Those > // do not affect minimum preferred sizes. Note that break-word is a non-standard value for > // word-break, but we support it as though it means break-all. >- bool breakAll = (style.wordBreak() == BreakAllWordBreak || style.wordBreak() == BreakWordBreak) && style.autoWrap(); >- bool keepAllWords = style.wordBreak() == KeepAllWordBreak; >+ bool breakAll = (style.wordBreak() == WordBreak::BreakAll || style.wordBreak() == WordBreak::Break) && style.autoWrap(); >+ bool keepAllWords = style.wordBreak() == WordBreak::KeepAll; > bool canUseLineBreakShortcut = iteratorMode == LineBreakIteratorMode::Default; > > for (unsigned i = 0; i < length; i++) { >@@ -1164,25 +1164,25 @@ void RenderText::setRenderedText(const S > m_text = applyTextTransform(style(), m_text, previousCharacter()); > > switch (style().textSecurity()) { >- case TSNONE: >+ case TextSecurity::None: > break; > #if !PLATFORM(IOS) > // We use the same characters here as for list markers. > // See the listMarkerText function in RenderListMarker.cpp. >- case TSCIRCLE: >+ case TextSecurity::Circle: > secureText(whiteBullet); > break; >- case TSDISC: >+ case TextSecurity::Disc: > secureText(bullet); > break; >- case TSSQUARE: >+ case TextSecurity::Square: > secureText(blackSquare); > break; > #else > // FIXME: Why this quirk on iOS? >- case TSCIRCLE: >- case TSDISC: >- case TSSQUARE: >+ case TextSecurity::Circle: >+ case TextSecurity::Disc: >+ case TextSecurity::Square: > secureText(blackCircle); > break; > #endif >@@ -1283,7 +1283,7 @@ void RenderText::setText(const String& t > > String RenderText::textWithoutConvertingBackslashToYenSymbol() const > { >- if (!m_useBackslashAsYenSymbol || style().textSecurity() != TSNONE) >+ if (!m_useBackslashAsYenSymbol || style().textSecurity() != TextSecurity::None) > return text(); > return applyTextTransform(style(), originalText(), previousCharacter()); > } >@@ -1528,7 +1528,7 @@ bool RenderText::computeCanUseSimpleFont > > void RenderText::momentarilyRevealLastTypedCharacter(unsigned offsetAfterLastTypedCharacter) > { >- if (style().textSecurity() == TSNONE) >+ if (style().textSecurity() == TextSecurity::None) > return; > auto& secureTextTimer = secureTextTimers().add(this, nullptr).iterator->value; > if (!secureTextTimer) >Index: Source/WebCore/rendering/RenderTextControl.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTextControl.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTextControl.cpp (working copy) >@@ -106,8 +106,8 @@ RenderBox::LogicalExtentComputedValues R > logicalHeight = computeControlLogicalHeight(innerTextBox->lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes), nonContentHeight); > > // We are able to have a horizontal scrollbar if the overflow style is scroll, or if its auto and there's no word wrap. >- if ((isHorizontalWritingMode() && (style().overflowX() == OSCROLL || (style().overflowX() == OAUTO && innerText->renderer()->style().overflowWrap() == NormalOverflowWrap))) >- || (!isHorizontalWritingMode() && (style().overflowY() == OSCROLL || (style().overflowY() == OAUTO && innerText->renderer()->style().overflowWrap() == NormalOverflowWrap)))) >+ if ((isHorizontalWritingMode() && (style().overflowX() == Overflow::Scroll || (style().overflowX() == Overflow::Auto && innerText->renderer()->style().overflowWrap() == OverflowWrap::Normal))) >+ || (!isHorizontalWritingMode() && (style().overflowY() == Overflow::Scroll || (style().overflowY() == Overflow::Auto && innerText->renderer()->style().overflowWrap() == OverflowWrap::Normal)))) > logicalHeight += scrollbarThickness(); > > // FIXME: The logical height of the inner text box should have been added >Index: Source/WebCore/rendering/RenderTextControlSingleLine.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTextControlSingleLine.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTextControlSingleLine.cpp (working copy) >@@ -241,7 +241,7 @@ void RenderTextControlSingleLine::styleD > containerRenderer->mutableStyle().setHeight(Length()); > containerRenderer->mutableStyle().setWidth(Length()); > } >- if (diff == StyleDifferenceLayout) { >+ if (diff == StyleDifference::Layout) { > if (auto innerTextRenderer = innerTextElement()->renderer()) > innerTextRenderer->setNeedsLayout(MarkContainingBlockChain); > if (auto* placeholder = inputElement().placeholderElement()) { >Index: Source/WebCore/rendering/RenderTheme.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTheme.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTheme.cpp (working copy) >@@ -775,7 +775,7 @@ ControlStates::States RenderTheme::extra > if (isSpinUpButtonPartPressed(o)) > states |= ControlStates::SpinUpState; > } >- if (isFocused(o) && o.style().outlineStyleIsAuto()) >+ if (isFocused(o) && o.style().outlineStyleIsAuto() == OutlineIsAuto::On) > states |= ControlStates::FocusState; > if (isEnabled(o)) > states |= ControlStates::EnabledState; >Index: Source/WebCore/rendering/RenderThemeIOS.mm >=================================================================== >--- Source/WebCore/rendering/RenderThemeIOS.mm (revision 232008) >+++ Source/WebCore/rendering/RenderThemeIOS.mm (working copy) >@@ -603,7 +603,7 @@ static void adjustInputElementButtonStyl > if (maximumWidth > 0) { > int width = static_cast<int>(maximumWidth + MenuListButtonPaddingAfter); > style.setWidth(Length(width, Fixed)); >- style.setBoxSizing(CONTENT_BOX); >+ style.setBoxSizing(BoxSizing::ContentBox); > } > } > >Index: Source/WebCore/rendering/RenderThemeMac.mm >=================================================================== >--- Source/WebCore/rendering/RenderThemeMac.mm (revision 232008) >+++ Source/WebCore/rendering/RenderThemeMac.mm (working copy) >@@ -689,7 +689,7 @@ void RenderThemeMac::updateEnabledState( > void RenderThemeMac::updateFocusedState(NSCell* cell, const RenderObject& o) > { > bool oldFocused = [cell showsFirstResponder]; >- bool focused = isFocused(o) && o.style().outlineStyleIsAuto(); >+ bool focused = isFocused(o) && o.style().outlineStyleIsAuto() == OutlineIsAuto::On; > if (focused != oldFocused) > [cell setShowsFirstResponder:focused]; > } >@@ -1417,7 +1417,7 @@ void RenderThemeMac::setPopupButtonCellS > void RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary(NSCell* cell, const RenderObject& renderer, const PaintInfo& paintInfo, const FloatRect& rect) > { > LocalDefaultSystemAppearance localAppearance(renderer.page().useSystemAppearance(), renderer.page().defaultAppearance()); >- bool shouldDrawFocusRing = isFocused(renderer) && renderer.style().outlineStyleIsAuto(); >+ bool shouldDrawFocusRing = isFocused(renderer) && renderer.style().outlineStyleIsAuto() == OutlineIsAuto::On; > bool shouldUseImageBuffer = renderer.style().effectiveZoom() != 1 || renderer.page().pageScaleFactor() != 1; > bool shouldDrawCell = true; > if (ThemeMac::drawCellOrFocusRingWithViewIntoContext(cell, paintInfo.context(), rect, documentViewFor(renderer), shouldDrawCell, shouldDrawFocusRing, shouldUseImageBuffer, renderer.page().deviceScaleFactor())) >@@ -1620,13 +1620,13 @@ void RenderThemeMac::adjustSearchFieldSt > style.resetBorder(); > const short borderWidth = 2 * style.effectiveZoom(); > style.setBorderLeftWidth(borderWidth); >- style.setBorderLeftStyle(INSET); >+ style.setBorderLeftStyle(BorderStyle::Inset); > style.setBorderRightWidth(borderWidth); >- style.setBorderRightStyle(INSET); >+ style.setBorderRightStyle(BorderStyle::Inset); > style.setBorderBottomWidth(borderWidth); >- style.setBorderBottomStyle(INSET); >+ style.setBorderBottomStyle(BorderStyle::Inset); > style.setBorderTopWidth(borderWidth); >- style.setBorderTopStyle(INSET); >+ style.setBorderTopStyle(BorderStyle::Inset); > > // Override height. > style.setHeight(Length(Auto)); >Index: Source/WebCore/rendering/RenderTreeAsText.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTreeAsText.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderTreeAsText.cpp (working copy) >@@ -80,37 +80,37 @@ using namespace HTMLNames; > > static void writeLayers(TextStream&, const RenderLayer& rootLayer, RenderLayer&, const LayoutRect& paintDirtyRect, RenderAsTextBehavior = RenderAsTextBehaviorNormal); > >-static void printBorderStyle(TextStream& ts, const EBorderStyle borderStyle) >+static void printBorderStyle(TextStream& ts, const BorderStyle borderStyle) > { > switch (borderStyle) { >- case BNONE: >+ case BorderStyle::None: > ts << "none"; > break; >- case BHIDDEN: >+ case BorderStyle::Hidden: > ts << "hidden"; > break; >- case INSET: >+ case BorderStyle::Inset: > ts << "inset"; > break; >- case GROOVE: >+ case BorderStyle::Groove: > ts << "groove"; > break; >- case RIDGE: >+ case BorderStyle::Ridge: > ts << "ridge"; > break; >- case OUTSET: >+ case BorderStyle::Outset: > ts << "outset"; > break; >- case DOTTED: >+ case BorderStyle::Dotted: > ts << "dotted"; > break; >- case DASHED: >+ case BorderStyle::Dashed: > ts << "dashed"; > break; >- case SOLID: >+ case BorderStyle::Solid: > ts << "solid"; > break; >- case DOUBLE: >+ case BorderStyle::Double: > ts << "double"; > break; > } >Index: Source/WebCore/rendering/RenderVideo.cpp >=================================================================== >--- Source/WebCore/rendering/RenderVideo.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderVideo.cpp (working copy) >@@ -253,7 +253,7 @@ void RenderVideo::updatePlayer() > IntRect videoBounds = videoBox(); > mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height())); > mediaPlayer->setVisible(!videoElement().elementIsHidden()); >- mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFitFill); >+ mediaPlayer->setShouldMaintainAspectRatio(style().objectFit() != ObjectFit::Fill); > } > > LayoutUnit RenderVideo::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const >Index: Source/WebCore/rendering/RenderView.cpp >=================================================================== >--- Source/WebCore/rendering/RenderView.cpp (revision 232008) >+++ Source/WebCore/rendering/RenderView.cpp (working copy) >@@ -100,7 +100,7 @@ RenderView::RenderView(Document& documen > > setPreferredLogicalWidthsDirty(true, MarkOnlyThis); > >- setPositionState(AbsolutePosition); // to 0,0 :) >+ setPositionState(PositionType::Absolute); // to 0,0 :) > } > > RenderView::~RenderView() >@@ -407,7 +407,7 @@ static inline bool rendererObscuresBackg > if (!rendererForBackground) > return false; > >- if (rendererForBackground->style().backgroundClip() == TextFillBox) >+ if (rendererForBackground->style().backgroundClip() == FillBox::Text) > return false; > > return true; >Index: Source/WebCore/rendering/RootInlineBox.cpp >=================================================================== >--- Source/WebCore/rendering/RootInlineBox.cpp (revision 232008) >+++ Source/WebCore/rendering/RootInlineBox.cpp (working copy) >@@ -1016,15 +1016,15 @@ LayoutUnit RootInlineBox::verticalPositi > } > > LayoutUnit verticalPosition = 0; >- EVerticalAlign verticalAlign = renderer->style().verticalAlign(); >- if (verticalAlign == TOP || verticalAlign == BOTTOM) >+ VerticalAlign verticalAlign = renderer->style().verticalAlign(); >+ if (verticalAlign == VerticalAlign::Top || verticalAlign == VerticalAlign::Bottom) > return 0; > > RenderElement* parent = renderer->parent(); >- if (parent->isRenderInline() && parent->style().verticalAlign() != TOP && parent->style().verticalAlign() != BOTTOM) >+ if (parent->isRenderInline() && parent->style().verticalAlign() != VerticalAlign::Top && parent->style().verticalAlign() != VerticalAlign::Bottom) > verticalPosition = box->parent()->logicalTop(); > >- if (verticalAlign != BASELINE) { >+ if (verticalAlign != VerticalAlign::Baseline) { > const RenderStyle& parentLineStyle = firstLine ? parent->firstLineStyle() : parent->style(); > const FontCascade& font = parentLineStyle.fontCascade(); > const FontMetrics& fontMetrics = font.fontMetrics(); >@@ -1032,22 +1032,22 @@ LayoutUnit RootInlineBox::verticalPositi > > LineDirectionMode lineDirection = parent->isHorizontalWritingMode() ? HorizontalLine : VerticalLine; > >- if (verticalAlign == SUB) >+ if (verticalAlign == VerticalAlign::Sub) > verticalPosition += fontSize / 5 + 1; >- else if (verticalAlign == SUPER) >+ else if (verticalAlign == VerticalAlign::Super) > verticalPosition -= fontSize / 3 + 1; >- else if (verticalAlign == TEXT_TOP) >+ else if (verticalAlign == VerticalAlign::TextTop) > verticalPosition += renderer->baselinePosition(baselineType(), firstLine, lineDirection) - fontMetrics.ascent(baselineType()); >- else if (verticalAlign == MIDDLE) >+ else if (verticalAlign == VerticalAlign::Middle) > verticalPosition = (verticalPosition - LayoutUnit(fontMetrics.xHeight() / 2) - renderer->lineHeight(firstLine, lineDirection) / 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection)).round(); >- else if (verticalAlign == TEXT_BOTTOM) { >+ else if (verticalAlign == VerticalAlign::TextBottom) { > verticalPosition += fontMetrics.descent(baselineType()); > // lineHeight - baselinePosition is always 0 for replaced elements (except inline blocks), so don't bother wasting time in that case. > if (!renderer->isReplaced() || renderer->isInlineBlockOrInlineTable()) > verticalPosition -= (renderer->lineHeight(firstLine, lineDirection) - renderer->baselinePosition(baselineType(), firstLine, lineDirection)); >- } else if (verticalAlign == BASELINE_MIDDLE) >+ } else if (verticalAlign == VerticalAlign::BaselineMiddle) > verticalPosition += -renderer->lineHeight(firstLine, lineDirection) / 2 + renderer->baselinePosition(baselineType(), firstLine, lineDirection); >- else if (verticalAlign == LENGTH) { >+ else if (verticalAlign == VerticalAlign::Length) { > LayoutUnit lineHeight; > //Per http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align: 'Percentages: refer to the 'line-height' of the element itself'. > if (renderer->style().verticalAlignLength().isPercentOrCalculated()) >Index: Source/WebCore/rendering/SimpleLineLayout.cpp >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayout.cpp (revision 232008) >+++ Source/WebCore/rendering/SimpleLineLayout.cpp (working copy) >@@ -198,12 +198,12 @@ static AvoidanceReasonFlags canUseForFon > static AvoidanceReasonFlags canUseForStyle(const RenderStyle& style, IncludeReasons includeReasons) > { > AvoidanceReasonFlags reasons = { }; >- if (style.textOverflow()) >+ if (style.textOverflow() == TextOverflow::Ellipsis) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons); > if ((style.textDecorationsInEffect() & TextDecorationUnderline) && style.textUnderlinePosition() == TextUnderlinePositionUnder) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedUnderlineDecoration, reasons, includeReasons); > // Non-visible overflow should be pretty easy to support. >- if (style.overflowX() != OVISIBLE || style.overflowY() != OVISIBLE) >+ if (style.overflowX() != Overflow::Visible || style.overflowY() != Overflow::Visible) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasOverflowNotVisible, reasons, includeReasons); > if (!style.isLeftToRightDirection()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowIsNotLTR, reasons, includeReasons); >@@ -211,7 +211,7 @@ static AvoidanceReasonFlags canUseForSty > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineBoxContainProperty, reasons, includeReasons); > if (style.writingMode() != TopToBottomWritingMode) > SET_REASON_AND_RETURN_IF_NEEDED(FlowIsNotTopToBottom, reasons, includeReasons); >- if (style.lineBreak() != LineBreakAuto) >+ if (style.lineBreak() != LineBreak::Auto) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineBreak, reasons, includeReasons); > if (style.unicodeBidi() != UBNormal) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonNormalUnicodeBiDi, reasons, includeReasons); >@@ -231,13 +231,13 @@ static AvoidanceReasonFlags canUseForSty > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLetter, reasons, includeReasons); > if (style.hasTextCombine()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextCombine, reasons, includeReasons); >- if (style.backgroundClip() == TextFillBox) >+ if (style.backgroundClip() == FillBox::Text) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextFillBox, reasons, includeReasons); > if (style.borderFit() == BorderFitLines) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasBorderFitLines, reasons, includeReasons); >- if (style.lineBreak() != LineBreakAuto) >+ if (style.lineBreak() != LineBreak::Auto) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoLineBreak, reasons, includeReasons); >- if (style.nbspMode() != NBNORMAL) >+ if (style.nbspMode() != NBSPMode::Normal) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasWebKitNBSPMode, reasons, includeReasons); > #if ENABLE(CSS_TRAILING_WORD) > if (style.trailingWord() != TrailingWord::Auto) >@@ -278,7 +278,7 @@ AvoidanceReasonFlags canUseForWithReason > if (columnThread.hasColumnSpanner()) > SET_REASON_AND_RETURN_IF_NEEDED(MultiColumnFlowHasColumnSpanner, reasons, includeReasons); > auto& style = flow.style(); >- if (style.verticalAlign() != BASELINE) >+ if (style.verticalAlign() != VerticalAlign::Baseline) > SET_REASON_AND_RETURN_IF_NEEDED(MultiColumnFlowVerticalAlign, reasons, includeReasons); > if (style.isFloating()) > SET_REASON_AND_RETURN_IF_NEEDED(MultiColumnFlowIsFloating, reasons, includeReasons); >@@ -297,7 +297,7 @@ AvoidanceReasonFlags canUseForWithReason > SET_REASON_AND_RETURN_IF_NEEDED(FlowIsPaginated, reasons, includeReasons); > if (flow.firstLineBlock()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLine, reasons, includeReasons); >- if (flow.isAnonymousBlock() && flow.parent()->style().textOverflow()) >+ if (flow.isAnonymousBlock() && flow.parent()->style().textOverflow() == TextOverflow::Ellipsis) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextOverflow, reasons, includeReasons); > if (flow.parent()->isDeprecatedFlexibleBox()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowIsDepricatedFlexBox, reasons, includeReasons); >@@ -316,7 +316,7 @@ AvoidanceReasonFlags canUseForWithReason > child = child->nextSibling(); > continue; > } >- if (is<RenderLineBreak>(child) && !downcast<RenderLineBreak>(*child).isWBR() && child->style().clear() == CNONE) { >+ if (is<RenderLineBreak>(child) && !downcast<RenderLineBreak>(*child).isWBR() && child->style().clear() == Clear::None) { > child = child->nextSibling(); > continue; > } >Index: Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp (revision 232008) >+++ Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp (working copy) >@@ -42,10 +42,10 @@ TextFragmentIterator::Style::Style(const > , collapseWhitespace(style.collapseWhiteSpace()) > , preserveNewline(style.preserveNewline()) > , wrapLines(style.autoWrap()) >- , breakAnyWordOnOverflow(style.wordBreak() == BreakAllWordBreak && wrapLines) >+ , breakAnyWordOnOverflow(style.wordBreak() == WordBreak::BreakAll && wrapLines) > , breakFirstWordOnOverflow(breakAnyWordOnOverflow || (style.breakWords() && (wrapLines || preserveNewline))) >- , breakNBSP(wrapLines && style.nbspMode() == SPACE) >- , keepAllWordsForCJK(style.wordBreak() == KeepAllWordBreak) >+ , breakNBSP(wrapLines && style.nbspMode() == NBSPMode::Space) >+ , keepAllWordsForCJK(style.wordBreak() == WordBreak::KeepAll) > , wordSpacing(font.wordSpacing()) > , tabWidth(collapseWhitespace ? 0 : style.tabSize()) > , shouldHyphenate(style.hyphens() == HyphensAuto && canHyphenate(style.locale())) >Index: Source/WebCore/rendering/TextPaintStyle.cpp >=================================================================== >--- Source/WebCore/rendering/TextPaintStyle.cpp (revision 232008) >+++ Source/WebCore/rendering/TextPaintStyle.cpp (working copy) >@@ -110,7 +110,7 @@ TextPaintStyle computeTextPaintStyle(con > > bool forceBackgroundToWhite = false; > if (frame.document() && frame.document()->printing()) { >- if (lineStyle.printColorAdjust() == PrintColorAdjustEconomy) >+ if (lineStyle.printColorAdjust() == PrintColorAdjust::Economy) > forceBackgroundToWhite = true; > if (frame.settings().shouldPrintBackgrounds()) > forceBackgroundToWhite = false; >Index: Source/WebCore/rendering/line/BreakingContext.h >=================================================================== >--- Source/WebCore/rendering/line/BreakingContext.h (revision 232008) >+++ Source/WebCore/rendering/line/BreakingContext.h (working copy) >@@ -144,7 +144,7 @@ public: > > void increment(); > >- void handleBR(EClear&); >+ void handleBR(Clear&); > void handleOutOfFlowPositioned(Vector<RenderBox*>& positionedObjects); > void handleFloat(); > void handleEmptyInline(); >@@ -338,7 +338,7 @@ inline void BreakingContext::increment() > m_atStart = false; > } > >-inline void BreakingContext::handleBR(EClear& clear) >+inline void BreakingContext::handleBR(Clear& clear) > { > if (fitsOnLineOrHangsAtEnd()) { > RenderObject& br = *m_current.renderer(); >@@ -360,7 +360,7 @@ inline void BreakingContext::handleBR(EC > // A <br> with clearance always needs a linebox in case the lines below it get dirtied later and > // need to check for floats to clear - so if we're ignoring spaces, stop ignoring them and add a > // run for this object. >- if (m_ignoringSpaces && m_currentStyle->clear() != CNONE) >+ if (m_ignoringSpaces && m_currentStyle->clear() != Clear::None) > m_lineWhitespaceCollapsingState.ensureLineBoxInsideIgnoredSpaces(br); > // If we were preceded by collapsing space and are in a right-aligned container we need to ensure the space gets > // collapsed away so that it doesn't push the text out from the container's right-hand edge. >@@ -392,7 +392,7 @@ inline bool shouldAddBorderPaddingMargin > if (is<RenderText>(*child) && !downcast<RenderText>(*child).text().length()) > return true; > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- if (is<RenderLineBreak>(*child) && child->parent()->style().boxDecorationBreak() == DCLONE) >+ if (is<RenderLineBreak>(*child) && child->parent()->style().boxDecorationBreak() == BoxDecorationBreak::Clone) > return true; > #endif > return false; >@@ -775,13 +775,13 @@ inline bool BreakingContext::handleText( > float wrapWidthOffset = m_width.uncommittedWidth() + inlineLogicalWidth(m_current.renderer(), !m_appliedStartWidth, true); > float wrapW = wrapWidthOffset; > float charWidth = 0; >- bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == SPACE; >+ bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == NBSPMode::Space; > // Auto-wrapping text should wrap in the middle of a word only if it could not wrap before the word, > // which is only possible if the word is the first thing on the line. > bool breakWords = m_currentStyle->breakWords() && ((m_autoWrap && (!m_width.committedWidth() && !m_width.hasCommittedReplaced())) || m_currWS == PRE); > bool midWordBreak = false; >- bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWrap; >- bool keepAllWords = m_currentStyle->wordBreak() == KeepAllWordBreak; >+ bool breakAll = m_currentStyle->wordBreak() == WordBreak::BreakAll && m_autoWrap; >+ bool keepAllWords = m_currentStyle->wordBreak() == WordBreak::KeepAll; > float hyphenWidth = 0; > auto iteratorMode = mapLineBreakToIteratorMode(m_blockStyle.lineBreak()); > bool canUseLineBreakShortcut = iteratorMode == LineBreakIteratorMode::Default; >@@ -1317,9 +1317,9 @@ inline InlineIterator BreakingContext::o > if (renderText.text().length() == lineBreak.offset() || renderText.text().length() - lineBreak.offset() > longTrailingWordLength) > return lineBreak; > bool canUseLineBreakShortcut = m_renderTextInfo.lineBreakIterator.mode() == LineBreakIteratorMode::Default; >- bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == SPACE; >+ bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == NBSPMode::Space; > std::optional<unsigned> nextBreakablePosition = lineBreak.nextBreakablePosition(); >- isBreakable(m_renderTextInfo.lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, m_currentStyle->wordBreak() == KeepAllWordBreak); >+ isBreakable(m_renderTextInfo.lineBreakIterator, lineBreak.offset() + 1, nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, m_currentStyle->wordBreak() == WordBreak::KeepAll); > if (!nextBreakablePosition || nextBreakablePosition.value() != renderText.text().length()) > return lineBreak; > const RenderStyle& style = lineStyle(renderText, m_lineInfo); >Index: Source/WebCore/rendering/line/LineBreaker.cpp >=================================================================== >--- Source/WebCore/rendering/line/LineBreaker.cpp (revision 232008) >+++ Source/WebCore/rendering/line/LineBreaker.cpp (working copy) >@@ -34,7 +34,7 @@ void LineBreaker::reset() > { > m_positionedObjects.clear(); > m_hyphenated = false; >- m_clear = CNONE; >+ m_clear = Clear::None; > } > > // FIXME: The entire concept of the skipTrailingWhitespace function is flawed, since we really need to be building >Index: Source/WebCore/rendering/line/LineBreaker.h >=================================================================== >--- Source/WebCore/rendering/line/LineBreaker.h (revision 232008) >+++ Source/WebCore/rendering/line/LineBreaker.h (working copy) >@@ -55,7 +55,7 @@ public: > > bool lineWasHyphenated() { return m_hyphenated; } > const Vector<RenderBox*>& positionedObjects() { return m_positionedObjects; } >- EClear clear() { return m_clear; } >+ Clear clear() { return m_clear; } > > private: > void reset(); >@@ -71,7 +71,7 @@ private: > > RenderBlockFlow& m_block; > bool m_hyphenated; >- EClear m_clear; >+ Clear m_clear; > Vector<RenderBox*> m_positionedObjects; > }; > >Index: Source/WebCore/rendering/line/LineInlineHeaders.h >=================================================================== >--- Source/WebCore/rendering/line/LineInlineHeaders.h (revision 232008) >+++ Source/WebCore/rendering/line/LineInlineHeaders.h (working copy) >@@ -73,7 +73,7 @@ inline bool shouldCollapseWhiteSpace(con > > inline bool skipNonBreakingSpace(const InlineIterator& it, const LineInfo& lineInfo) > { >- if (it.renderer()->style().nbspMode() != SPACE || it.current() != noBreakSpace) >+ if (it.renderer()->style().nbspMode() != NBSPMode::Space || it.current() != noBreakSpace) > return false; > > // FIXME: This is bad. It makes nbsp inconsistent with space and won't work correctly >Index: Source/WebCore/rendering/line/LineWidth.cpp >=================================================================== >--- Source/WebCore/rendering/line/LineWidth.cpp (revision 232008) >+++ Source/WebCore/rendering/line/LineWidth.cpp (working copy) >@@ -237,10 +237,10 @@ IndentTextOrNot requiresIndent(bool isFi > if (isFirstLine) > shouldIndentText = IndentText; > #if ENABLE(CSS3_TEXT) >- else if (isAfterHardLineBreak && style.textIndentLine() == TextIndentEachLine) >+ else if (isAfterHardLineBreak && style.textIndentLine() == TextIndentLine::EachLine) > shouldIndentText = IndentText; > >- if (style.textIndentType() == TextIndentHanging) >+ if (style.textIndentType() == TextIndentType::Hanging) > shouldIndentText = shouldIndentText == IndentText ? DoNotIndentText : IndentText; > #else > UNUSED_PARAM(isAfterHardLineBreak); >Index: Source/WebCore/rendering/style/BorderData.h >=================================================================== >--- Source/WebCore/rendering/style/BorderData.h (revision 232008) >+++ Source/WebCore/rendering/style/BorderData.h (working copy) >@@ -67,28 +67,28 @@ public: > > float borderLeftWidth() const > { >- if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN)) >+ if (!m_image.hasImage() && (m_left.style() == BorderStyle::None || m_left.style() == BorderStyle::Hidden)) > return 0; > return m_left.width(); > } > > float borderRightWidth() const > { >- if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN)) >+ if (!m_image.hasImage() && (m_right.style() == BorderStyle::None || m_right.style() == BorderStyle::Hidden)) > return 0; > return m_right.width(); > } > > float borderTopWidth() const > { >- if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == BHIDDEN)) >+ if (!m_image.hasImage() && (m_top.style() == BorderStyle::None || m_top.style() == BorderStyle::Hidden)) > return 0; > return m_top.width(); > } > > float borderBottomWidth() const > { >- if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style() == BHIDDEN)) >+ if (!m_image.hasImage() && (m_bottom.style() == BorderStyle::None || m_bottom.style() == BorderStyle::Hidden)) > return 0; > return m_bottom.width(); > } >Index: Source/WebCore/rendering/style/BorderValue.h >=================================================================== >--- Source/WebCore/rendering/style/BorderValue.h (revision 232008) >+++ Source/WebCore/rendering/style/BorderValue.h (working copy) >@@ -33,14 +33,14 @@ class BorderValue { > friend class RenderStyle; > public: > BorderValue() >- : m_style(BNONE) >- , m_isAuto(AUTO_OFF) >+ : m_style(static_cast<unsigned>(BorderStyle::None)) >+ , m_isAuto(static_cast<unsigned>(OutlineIsAuto::Off)) > { > } > > bool nonZero(bool checkStyle = true) const > { >- return width() && (!checkStyle || m_style != BNONE); >+ return width() && (!checkStyle || style() != BorderStyle::None); > } > > bool isTransparent() const >@@ -50,7 +50,7 @@ public: > > bool isVisible(bool checkStyle = true) const > { >- return nonZero(checkStyle) && !isTransparent() && (!checkStyle || m_style != BHIDDEN); >+ return nonZero(checkStyle) && !isTransparent() && (!checkStyle || style() != BorderStyle::Hidden); > } > > bool operator==(const BorderValue& o) const >@@ -71,13 +71,13 @@ public: > const Color& color() const { return m_color; } > > float width() const { return m_width; } >- EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); } >+ BorderStyle style() const { return static_cast<BorderStyle>(m_style); } > > protected: > float m_width { 3 }; > Color m_color; > >- unsigned m_style : 4; // EBorderStyle >+ unsigned m_style : 4; // BorderStyle > > // This is only used by OutlineValue but moved here to keep the bits packed. > unsigned m_isAuto : 1; // OutlineIsAuto >Index: Source/WebCore/rendering/style/CollapsedBorderValue.h >=================================================================== >--- Source/WebCore/rendering/style/CollapsedBorderValue.h (revision 232008) >+++ Source/WebCore/rendering/style/CollapsedBorderValue.h (working copy) >@@ -32,27 +32,27 @@ namespace WebCore { > class CollapsedBorderValue { > public: > CollapsedBorderValue() >- : m_style(BNONE) >- , m_precedence(BOFF) >+ : m_style(static_cast<unsigned>(BorderStyle::None)) >+ , m_precedence(static_cast<unsigned>(BorderPrecedence::Off)) > , m_transparent(false) > { > } > >- CollapsedBorderValue(const BorderValue& border, const Color& color, EBorderPrecedence precedence) >+ CollapsedBorderValue(const BorderValue& border, const Color& color, BorderPrecedence precedence) > : m_width(LayoutUnit(border.nonZero() ? border.width() : 0)) > , m_color(color) >- , m_style(border.style()) >- , m_precedence(precedence) >+ , m_style(static_cast<unsigned>(border.style())) >+ , m_precedence(static_cast<unsigned>(precedence)) > , m_transparent(border.isTransparent()) > { > } > >- LayoutUnit width() const { return m_style > BHIDDEN ? m_width : LayoutUnit::fromPixel(0); } >- EBorderStyle style() const { return static_cast<EBorderStyle>(m_style); } >- bool exists() const { return m_precedence != BOFF; } >+ LayoutUnit width() const { return style() > BorderStyle::Hidden ? m_width : LayoutUnit::fromPixel(0); } >+ BorderStyle style() const { return static_cast<BorderStyle>(m_style); } >+ bool exists() const { return precedence() != BorderPrecedence::Off; } > const Color& color() const { return m_color; } > bool isTransparent() const { return m_transparent; } >- EBorderPrecedence precedence() const { return static_cast<EBorderPrecedence>(m_precedence); } >+ BorderPrecedence precedence() const { return static_cast<BorderPrecedence>(m_precedence); } > > bool isSameIgnoringColor(const CollapsedBorderValue& o) const > { >@@ -64,8 +64,8 @@ public: > private: > LayoutUnit m_width; > Color m_color; >- unsigned m_style : 4; // EBorderStyle >- unsigned m_precedence : 3; // EBorderPrecedence >+ unsigned m_style : 4; // BorderStyle >+ unsigned m_precedence : 3; // BorderPrecedence > unsigned m_transparent : 1; > }; > >Index: Source/WebCore/rendering/style/FillLayer.cpp >=================================================================== >--- Source/WebCore/rendering/style/FillLayer.cpp (revision 232008) >+++ Source/WebCore/rendering/style/FillLayer.cpp (working copy) >@@ -43,19 +43,19 @@ struct SameSizeAsFillLayer { > > COMPILE_ASSERT(sizeof(FillLayer) == sizeof(SameSizeAsFillLayer), FillLayer_should_stay_small); > >-FillLayer::FillLayer(EFillLayerType type) >+FillLayer::FillLayer(FillLayerType type) > : m_image(FillLayer::initialFillImage(type)) > , m_xPosition(FillLayer::initialFillXPosition(type)) > , m_yPosition(FillLayer::initialFillYPosition(type)) >- , m_attachment(FillLayer::initialFillAttachment(type)) >- , m_clip(FillLayer::initialFillClip(type)) >- , m_origin(FillLayer::initialFillOrigin(type)) >- , m_repeatX(FillLayer::initialFillRepeatX(type)) >- , m_repeatY(FillLayer::initialFillRepeatY(type)) >+ , m_attachment(static_cast<unsigned>(FillLayer::initialFillAttachment(type))) >+ , m_clip(static_cast<unsigned>(FillLayer::initialFillClip(type))) >+ , m_origin(static_cast<unsigned>(FillLayer::initialFillOrigin(type))) >+ , m_repeatX(static_cast<unsigned>(FillLayer::initialFillRepeatX(type))) >+ , m_repeatY(static_cast<unsigned>(FillLayer::initialFillRepeatY(type))) > , m_composite(FillLayer::initialFillComposite(type)) >- , m_sizeType(SizeNone) >+ , m_sizeType(static_cast<unsigned>(FillSizeType::None)) > , m_blendMode(FillLayer::initialFillBlendMode(type)) >- , m_maskSourceType(FillLayer::initialFillMaskSourceType(type)) >+ , m_maskSourceType(static_cast<unsigned>(FillLayer::initialFillMaskSourceType(type))) > , m_imageSet(false) > , m_attachmentSet(false) > , m_clipSet(false) >@@ -68,10 +68,10 @@ FillLayer::FillLayer(EFillLayerType type > , m_backgroundYOriginSet(false) > , m_backgroundXOrigin(static_cast<unsigned>(Edge::Left)) > , m_backgroundYOrigin(static_cast<unsigned>(Edge::Top)) >- , m_compositeSet(type == MaskFillLayer) >+ , m_compositeSet(type == FillLayerType::Mask) > , m_blendModeSet(false) > , m_maskSourceTypeSet(false) >- , m_type(type) >+ , m_type(static_cast<unsigned>(type)) > { > } > >@@ -300,15 +300,15 @@ void FillLayer::cullEmptyLayers() > } > } > >-static inline EFillBox clipMax(EFillBox clipA, EFillBox clipB) >+static inline FillBox clipMax(FillBox clipA, FillBox clipB) > { >- if (clipA == BorderFillBox || clipB == BorderFillBox) >- return BorderFillBox; >- if (clipA == PaddingFillBox || clipB == PaddingFillBox) >- return PaddingFillBox; >- if (clipA == ContentFillBox || clipB == ContentFillBox) >- return ContentFillBox; >- return TextFillBox; >+ if (clipA == FillBox::Border || clipB == FillBox::Border) >+ return FillBox::Border; >+ if (clipA == FillBox::Padding || clipB == FillBox::Padding) >+ return FillBox::Padding; >+ if (clipA == FillBox::Content || clipB == FillBox::Content) >+ return FillBox::Content; >+ return FillBox::Text; > } > > void FillLayer::computeClipMax() const >@@ -316,11 +316,11 @@ void FillLayer::computeClipMax() const > Vector<const FillLayer*, 4> layers; > for (auto* layer = this; layer; layer = layer->m_next.get()) > layers.append(layer); >- EFillBox computedClipMax = TextFillBox; >+ FillBox computedClipMax = FillBox::Text; > for (unsigned i = layers.size(); i; --i) { > auto& layer = *layers[i - 1]; > computedClipMax = clipMax(computedClipMax, layer.clip()); >- layer.m_clipMax = computedClipMax; >+ layer.m_clipMax = static_cast<unsigned>(computedClipMax); > } > } > >@@ -362,7 +362,7 @@ bool FillLayer::hasOpaqueImage(const Ren > > bool FillLayer::hasRepeatXY() const > { >- return m_repeatX == RepeatFill && m_repeatY == RepeatFill; >+ return repeatX() == FillRepeat::Repeat && repeatY() == FillRepeat::Repeat; > } > > bool FillLayer::hasImage() const >@@ -377,7 +377,7 @@ bool FillLayer::hasImage() const > bool FillLayer::hasFixedImage() const > { > for (auto* layer = this; layer; layer = layer->m_next.get()) { >- if (layer->m_image && layer->m_attachment == FixedBackgroundAttachment) >+ if (layer->m_image && layer->attachment() == FillAttachment::FixedBackground) > return true; > } > return false; >Index: Source/WebCore/rendering/style/FillLayer.h >=================================================================== >--- Source/WebCore/rendering/style/FillLayer.h (revision 232008) >+++ Source/WebCore/rendering/style/FillLayer.h (working copy) >@@ -36,17 +36,17 @@ class RenderElement; > > struct FillSize { > FillSize() >- : type(SizeLength) >+ : type(FillSizeType::Size) > { > } > >- FillSize(EFillSizeType type, const LengthSize& size) >+ FillSize(FillSizeType type, const LengthSize& size) > : type(type) > , size(size) > { > } > >- EFillSizeType type; >+ FillSizeType type; > LengthSize size; > }; > >@@ -63,7 +63,7 @@ inline bool operator!=(const FillSize& a > class FillLayer { > WTF_MAKE_FAST_ALLOCATED; > public: >- explicit FillLayer(EFillLayerType); >+ explicit FillLayer(FillLayerType); > ~FillLayer(); > > StyleImage* image() const { return m_image.get(); } >@@ -71,17 +71,17 @@ public: > const Length& yPosition() const { return m_yPosition; } > Edge backgroundXOrigin() const { return static_cast<Edge>(m_backgroundXOrigin); } > Edge backgroundYOrigin() const { return static_cast<Edge>(m_backgroundYOrigin); } >- EFillAttachment attachment() const { return static_cast<EFillAttachment>(m_attachment); } >- EFillBox clip() const { return static_cast<EFillBox>(m_clip); } >- EFillBox origin() const { return static_cast<EFillBox>(m_origin); } >- EFillRepeat repeatX() const { return static_cast<EFillRepeat>(m_repeatX); } >- EFillRepeat repeatY() const { return static_cast<EFillRepeat>(m_repeatY); } >+ FillAttachment attachment() const { return static_cast<FillAttachment>(m_attachment); } >+ FillBox clip() const { return static_cast<FillBox>(m_clip); } >+ FillBox origin() const { return static_cast<FillBox>(m_origin); } >+ FillRepeat repeatX() const { return static_cast<FillRepeat>(m_repeatX); } >+ FillRepeat repeatY() const { return static_cast<FillRepeat>(m_repeatY); } > CompositeOperator composite() const { return static_cast<CompositeOperator>(m_composite); } > BlendMode blendMode() const { return static_cast<BlendMode>(m_blendMode); } > const LengthSize& sizeLength() const { return m_sizeLength; } >- EFillSizeType sizeType() const { return static_cast<EFillSizeType>(m_sizeType); } >- FillSize size() const { return FillSize(static_cast<EFillSizeType>(m_sizeType), m_sizeLength); } >- EMaskSourceType maskSourceType() const { return static_cast<EMaskSourceType>(m_maskSourceType); } >+ FillSizeType sizeType() const { return static_cast<FillSizeType>(m_sizeType); } >+ FillSize size() const { return FillSize(static_cast<FillSizeType>(m_sizeType), m_sizeLength); } >+ MaskSourceType maskSourceType() const { return static_cast<MaskSourceType>(m_maskSourceType); } > > const FillLayer* next() const { return m_next.get(); } > FillLayer* next() { return m_next.get(); } >@@ -98,7 +98,7 @@ public: > bool isRepeatYSet() const { return m_repeatYSet; } > bool isCompositeSet() const { return m_compositeSet; } > bool isBlendModeSet() const { return m_blendModeSet; } >- bool isSizeSet() const { return m_sizeType != SizeNone; } >+ bool isSizeSet() const { return static_cast<FillSizeType>(m_sizeType) != FillSizeType::None; } > bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; } > > void setImage(RefPtr<StyleImage>&& image) { m_image = WTFMove(image); m_imageSet = true; } >@@ -106,17 +106,17 @@ public: > void setYPosition(Length length) { m_yPosition = WTFMove(length); m_yPosSet = true; } > void setBackgroundXOrigin(Edge o) { m_backgroundXOrigin = static_cast<unsigned>(o); m_backgroundXOriginSet = true; } > void setBackgroundYOrigin(Edge o) { m_backgroundYOrigin = static_cast<unsigned>(o); m_backgroundYOriginSet = true; } >- void setAttachment(EFillAttachment attachment) { m_attachment = attachment; m_attachmentSet = true; } >- void setClip(EFillBox b) { m_clip = b; m_clipSet = true; } >- void setOrigin(EFillBox b) { m_origin = b; m_originSet = true; } >- void setRepeatX(EFillRepeat r) { m_repeatX = r; m_repeatXSet = true; } >- void setRepeatY(EFillRepeat r) { m_repeatY = r; m_repeatYSet = true; } >- void setComposite(CompositeOperator c) { m_composite = c; m_compositeSet = true; } >- void setBlendMode(BlendMode b) { m_blendMode = b; m_blendModeSet = true; } >- void setSizeType(EFillSizeType b) { m_sizeType = b; } >+ void setAttachment(FillAttachment attachment) { m_attachment = static_cast<unsigned>(attachment); m_attachmentSet = true; } >+ void setClip(FillBox b) { m_clip = static_cast<unsigned>(b); m_clipSet = true; } >+ void setOrigin(FillBox b) { m_origin = static_cast<unsigned>(b); m_originSet = true; } >+ void setRepeatX(FillRepeat r) { m_repeatX = static_cast<unsigned>(r); m_repeatXSet = true; } >+ void setRepeatY(FillRepeat r) { m_repeatY = static_cast<unsigned>(r); m_repeatYSet = true; } >+ void setComposite(CompositeOperator c) { m_composite = static_cast<unsigned>(c); m_compositeSet = true; } >+ void setBlendMode(BlendMode b) { m_blendMode = static_cast<unsigned>(b); m_blendModeSet = true; } >+ void setSizeType(FillSizeType b) { m_sizeType = static_cast<unsigned>(b); } > void setSizeLength(LengthSize l) { m_sizeLength = l; } >- void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; } >- void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSourceTypeSet = true; } >+ void setSize(FillSize f) { m_sizeType = static_cast<unsigned>(f.type); m_sizeLength = f.size; } >+ void setMaskSourceType(MaskSourceType m) { m_maskSourceType = static_cast<unsigned>(m); m_maskSourceTypeSet = true; } > > void clearImage() { m_image = nullptr; m_imageSet = false; } > >@@ -130,7 +130,7 @@ public: > void clearRepeatY() { m_repeatYSet = false; } > void clearComposite() { m_compositeSet = false; } > void clearBlendMode() { m_blendModeSet = false; } >- void clearSize() { m_sizeType = SizeNone; } >+ void clearSize() { m_sizeType = static_cast<unsigned>(FillSizeType::None); } > void clearMaskSourceType() { m_maskSourceTypeSet = false; } > > void setNext(std::unique_ptr<FillLayer> next) { m_next = WTFMove(next); } >@@ -149,25 +149,25 @@ public: > bool hasRepeatXY() const; > bool clipOccludesNextLayers(bool firstLayer) const; > >- EFillLayerType type() const { return static_cast<EFillLayerType>(m_type); } >+ FillLayerType type() const { return static_cast<FillLayerType>(m_type); } > > void fillUnsetProperties(); > void cullEmptyLayers(); > > static bool imagesIdentical(const FillLayer*, const FillLayer*); > >- static EFillAttachment initialFillAttachment(EFillLayerType) { return ScrollBackgroundAttachment; } >- static EFillBox initialFillClip(EFillLayerType) { return BorderFillBox; } >- static EFillBox initialFillOrigin(EFillLayerType type) { return type == BackgroundFillLayer ? PaddingFillBox : BorderFillBox; } >- static EFillRepeat initialFillRepeatX(EFillLayerType) { return RepeatFill; } >- static EFillRepeat initialFillRepeatY(EFillLayerType) { return RepeatFill; } >- static CompositeOperator initialFillComposite(EFillLayerType) { return CompositeSourceOver; } >- static BlendMode initialFillBlendMode(EFillLayerType) { return BlendModeNormal; } >- static FillSize initialFillSize(EFillLayerType) { return FillSize(); } >- static Length initialFillXPosition(EFillLayerType) { return Length(0.0f, Percent); } >- static Length initialFillYPosition(EFillLayerType) { return Length(0.0f, Percent); } >- static StyleImage* initialFillImage(EFillLayerType) { return nullptr; } >- static EMaskSourceType initialFillMaskSourceType(EFillLayerType) { return MaskAlpha; } >+ static FillAttachment initialFillAttachment(FillLayerType) { return FillAttachment::ScrollBackground; } >+ static FillBox initialFillClip(FillLayerType) { return FillBox::Border; } >+ static FillBox initialFillOrigin(FillLayerType type) { return type == FillLayerType::Background ? FillBox::Padding : FillBox::Border; } >+ static FillRepeat initialFillRepeatX(FillLayerType) { return FillRepeat::Repeat; } >+ static FillRepeat initialFillRepeatY(FillLayerType) { return FillRepeat::Repeat; } >+ static CompositeOperator initialFillComposite(FillLayerType) { return CompositeSourceOver; } >+ static BlendMode initialFillBlendMode(FillLayerType) { return BlendModeNormal; } >+ static FillSize initialFillSize(FillLayerType) { return { }; } >+ static Length initialFillXPosition(FillLayerType) { return Length(0.0f, Percent); } >+ static Length initialFillYPosition(FillLayerType) { return Length(0.0f, Percent); } >+ static StyleImage* initialFillImage(FillLayerType) { return nullptr; } >+ static MaskSourceType initialFillMaskSourceType(FillLayerType) { return MaskSourceType::Alpha; } > > private: > friend class RenderStyle; >@@ -183,15 +183,15 @@ private: > > LengthSize m_sizeLength; > >- unsigned m_attachment : 2; // EFillAttachment >- unsigned m_clip : 2; // EFillBox >- unsigned m_origin : 2; // EFillBox >- unsigned m_repeatX : 3; // EFillRepeat >- unsigned m_repeatY : 3; // EFillRepeat >+ unsigned m_attachment : 2; // FillAttachment >+ unsigned m_clip : 2; // FillBox >+ unsigned m_origin : 2; // FillBox >+ unsigned m_repeatX : 3; // FillRepeat >+ unsigned m_repeatY : 3; // FillRepeat > unsigned m_composite : 4; // CompositeOperator >- unsigned m_sizeType : 2; // EFillSizeType >+ unsigned m_sizeType : 2; // FillSizeType > unsigned m_blendMode : 5; // BlendMode >- unsigned m_maskSourceType : 1; // EMaskSourceType >+ unsigned m_maskSourceType : 1; // MaskSourceType > > unsigned m_imageSet : 1; > unsigned m_attachmentSet : 1; >@@ -209,9 +209,9 @@ private: > unsigned m_blendModeSet : 1; > unsigned m_maskSourceTypeSet : 1; > >- unsigned m_type : 1; // EFillLayerType >+ unsigned m_type : 1; // FillLayerType > >- mutable unsigned m_clipMax : 2; // EFillBox, maximum m_clip value from this to bottom layer >+ mutable unsigned m_clipMax : 2; // FillBox, maximum m_clip value from this to bottom layer > }; > > WTF::TextStream& operator<<(WTF::TextStream&, FillSize); >Index: Source/WebCore/rendering/style/LineClampValue.h >=================================================================== >--- Source/WebCore/rendering/style/LineClampValue.h (revision 232008) >+++ Source/WebCore/rendering/style/LineClampValue.h (working copy) >@@ -32,12 +32,12 @@ namespace WebCore { > class LineClampValue { > public: > LineClampValue() >- : m_type(LineClampLineCount) >+ : m_type(LineClamp::LineCount) > , m_value(-1) > { > } > >- LineClampValue(int value, ELineClampType type) >+ LineClampValue(int value, LineClamp type) > : m_type(type) > , m_value(value) > { >@@ -45,7 +45,7 @@ public: > > int value() const { return m_value; } > >- bool isPercentage() const { return m_type == LineClampPercentage; } >+ bool isPercentage() const { return m_type == LineClamp::Percentage; } > > bool isNone() const { return m_value == -1; } > >@@ -60,7 +60,7 @@ public: > } > > private: >- ELineClampType m_type; >+ LineClamp m_type; > int m_value; > }; > >Index: Source/WebCore/rendering/style/RenderStyle.cpp >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.cpp (revision 232008) >+++ Source/WebCore/rendering/style/RenderStyle.cpp (working copy) >@@ -154,10 +154,10 @@ RenderStyle::RenderStyle(CreateDefaultSt > #endif > m_inheritedFlags.direction = initialDirection(); > m_inheritedFlags.whiteSpace = initialWhiteSpace(); >- m_inheritedFlags.borderCollapse = initialBorderCollapse(); >+ m_inheritedFlags.borderCollapse = static_cast<unsigned>(initialBorderCollapse()); > m_inheritedFlags.rtlOrdering = initialRTLOrdering(); >- m_inheritedFlags.boxDirection = initialBoxDirection(); >- m_inheritedFlags.printColorAdjust = initialPrintColorAdjust(); >+ m_inheritedFlags.boxDirection = static_cast<unsigned>(initialBoxDirection()); >+ m_inheritedFlags.printColorAdjust = static_cast<unsigned>(initialPrintColorAdjust()); > m_inheritedFlags.pointerEvents = initialPointerEvents(); > m_inheritedFlags.insideLink = NotInsideLink; > m_inheritedFlags.insideDefaultButton = false; >@@ -165,14 +165,14 @@ RenderStyle::RenderStyle(CreateDefaultSt > > m_nonInheritedFlags.effectiveDisplay = initialDisplay(); > m_nonInheritedFlags.originalDisplay = initialDisplay(); >- m_nonInheritedFlags.overflowX = initialOverflowX(); >- m_nonInheritedFlags.overflowY = initialOverflowY(); >- m_nonInheritedFlags.verticalAlign = initialVerticalAlign(); >- m_nonInheritedFlags.clear = initialClear(); >- m_nonInheritedFlags.position = initialPosition(); >+ m_nonInheritedFlags.overflowX = static_cast<unsigned>(initialOverflowX()); >+ m_nonInheritedFlags.overflowY = static_cast<unsigned>(initialOverflowY()); >+ m_nonInheritedFlags.verticalAlign = static_cast<unsigned>(initialVerticalAlign()); >+ m_nonInheritedFlags.clear = static_cast<unsigned>(initialClear()); >+ m_nonInheritedFlags.position = static_cast<unsigned>(initialPosition()); > m_nonInheritedFlags.unicodeBidi = initialUnicodeBidi(); >- m_nonInheritedFlags.floating = initialFloating(); >- m_nonInheritedFlags.tableLayout = initialTableLayout(); >+ m_nonInheritedFlags.floating = static_cast<unsigned>(initialFloating()); >+ m_nonInheritedFlags.tableLayout = static_cast<unsigned>(initialTableLayout()); > m_nonInheritedFlags.hasExplicitlySetDirection = false; > m_nonInheritedFlags.hasExplicitlySetWritingMode = false; > m_nonInheritedFlags.hasExplicitlySetTextAlign = false; >@@ -237,8 +237,8 @@ RenderStyle RenderStyle::replace(RenderS > > static StyleSelfAlignmentData resolvedSelfAlignment(const StyleSelfAlignmentData& value, ItemPosition normalValueBehavior) > { >- if (value.position() == ItemPositionLegacy || value.position() == ItemPositionNormal || value.position() == ItemPositionAuto) >- return { normalValueBehavior, OverflowAlignmentDefault }; >+ if (value.position() == ItemPosition::Legacy || value.position() == ItemPosition::Normal || value.position() == ItemPosition::Auto) >+ return { normalValueBehavior, OverflowAlignment::Default }; > return value; > } > >@@ -251,7 +251,7 @@ StyleSelfAlignmentData RenderStyle::reso > { > // The auto keyword computes to the parent's align-items computed value. > // We will return the behaviour of 'normal' value if needed, which is specific of each layout model. >- if (!parentStyle || alignSelf().position() != ItemPositionAuto) >+ if (!parentStyle || alignSelf().position() != ItemPosition::Auto) > return resolvedSelfAlignment(alignSelf(), normalValueBehaviour); > return parentStyle->resolvedAlignItems(normalValueBehaviour); > } >@@ -265,14 +265,14 @@ StyleSelfAlignmentData RenderStyle::reso > { > // The auto keyword computes to the parent's justify-items computed value. > // We will return the behaviour of 'normal' value if needed, which is specific of each layout model. >- if (!parentStyle || justifySelf().position() != ItemPositionAuto) >+ if (!parentStyle || justifySelf().position() != ItemPosition::Auto) > return resolvedSelfAlignment(justifySelf(), normalValueBehaviour); > return parentStyle->resolvedJustifyItems(normalValueBehaviour); > } > > static inline StyleContentAlignmentData resolvedContentAlignment(const StyleContentAlignmentData& value, const StyleContentAlignmentData& normalValueBehavior) > { >- return (value.position() == ContentPositionNormal && value.distribution() == ContentDistributionDefault) ? normalValueBehavior : value; >+ return (value.position() == ContentPosition::Normal && value.distribution() == ContentDistribution::Default) ? normalValueBehavior : value; > } > > StyleContentAlignmentData RenderStyle::resolvedAlignContent(const StyleContentAlignmentData& normalValueBehavior) const >@@ -289,12 +289,12 @@ StyleContentAlignmentData RenderStyle::r > > static inline ContentPosition resolvedContentAlignmentPosition(const StyleContentAlignmentData& value, const StyleContentAlignmentData& normalValueBehavior) > { >- return (value.position() == ContentPositionNormal && value.distribution() == ContentDistributionDefault) ? normalValueBehavior.position() : value.position(); >+ return (value.position() == ContentPosition::Normal && value.distribution() == ContentDistribution::Default) ? normalValueBehavior.position() : value.position(); > } > >-static inline ContentDistributionType resolvedContentAlignmentDistribution(const StyleContentAlignmentData& value, const StyleContentAlignmentData& normalValueBehavior) >+static inline ContentDistribution resolvedContentAlignmentDistribution(const StyleContentAlignmentData& value, const StyleContentAlignmentData& normalValueBehavior) > { >- return (value.position() == ContentPositionNormal && value.distribution() == ContentDistributionDefault) ? normalValueBehavior.distribution() : value.distribution(); >+ return (value.position() == ContentPosition::Normal && value.distribution() == ContentDistribution::Default) ? normalValueBehavior.distribution() : value.distribution(); > } > > ContentPosition RenderStyle::resolvedJustifyContentPosition(const StyleContentAlignmentData& normalValueBehavior) const >@@ -302,7 +302,7 @@ ContentPosition RenderStyle::resolvedJus > return resolvedContentAlignmentPosition(justifyContent(), normalValueBehavior); > } > >-ContentDistributionType RenderStyle::resolvedJustifyContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const >+ContentDistribution RenderStyle::resolvedJustifyContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const > { > return resolvedContentAlignmentDistribution(justifyContent(), normalValueBehavior); > } >@@ -312,7 +312,7 @@ ContentPosition RenderStyle::resolvedAli > return resolvedContentAlignmentPosition(alignContent(), normalValueBehavior); > } > >-ContentDistributionType RenderStyle::resolvedAlignContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const >+ContentDistribution RenderStyle::resolvedAlignContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const > { > return resolvedContentAlignmentDistribution(alignContent(), normalValueBehavior); > } >@@ -550,7 +550,7 @@ inline bool RenderStyle::changeAffectsVi > return false; > } > >-bool RenderStyle::changeRequiresLayout(const RenderStyle& other, unsigned& changedContextSensitiveProperties) const >+bool RenderStyle::changeRequiresLayout(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const > { > if (m_boxData->width() != other.m_boxData->width() > || m_boxData->minWidth() != other.m_boxData->minWidth() >@@ -613,7 +613,7 @@ bool RenderStyle::changeRequiresLayout(c > if (m_rareNonInheritedData->transform->hasTransform() != other.m_rareNonInheritedData->transform->hasTransform()) > return true; > if (*m_rareNonInheritedData->transform != *other.m_rareNonInheritedData->transform) { >- changedContextSensitiveProperties |= ContextSensitivePropertyTransform; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Transform; > // Don't return; keep looking for another change > } > } >@@ -629,7 +629,7 @@ bool RenderStyle::changeRequiresLayout(c > #endif > > if (!arePointingToEqualData(m_rareNonInheritedData->willChange, other.m_rareNonInheritedData->willChange)) { >- changedContextSensitiveProperties |= ContextSensitivePropertyWillChange; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::WillChange; > // Don't return; keep looking for another change > } > } >@@ -716,14 +716,14 @@ bool RenderStyle::changeRequiresLayout(c > // In the collapsing border model, 'hidden' suppresses other borders, while 'none' > // does not, so these style differences can be width differences. > if (m_inheritedFlags.borderCollapse >- && ((borderTopStyle() == BHIDDEN && other.borderTopStyle() == BNONE) >- || (borderTopStyle() == BNONE && other.borderTopStyle() == BHIDDEN) >- || (borderBottomStyle() == BHIDDEN && other.borderBottomStyle() == BNONE) >- || (borderBottomStyle() == BNONE && other.borderBottomStyle() == BHIDDEN) >- || (borderLeftStyle() == BHIDDEN && other.borderLeftStyle() == BNONE) >- || (borderLeftStyle() == BNONE && other.borderLeftStyle() == BHIDDEN) >- || (borderRightStyle() == BHIDDEN && other.borderRightStyle() == BNONE) >- || (borderRightStyle() == BNONE && other.borderRightStyle() == BHIDDEN))) >+ && ((borderTopStyle() == BorderStyle::Hidden && other.borderTopStyle() == BorderStyle::None) >+ || (borderTopStyle() == BorderStyle::None && other.borderTopStyle() == BorderStyle::Hidden) >+ || (borderBottomStyle() == BorderStyle::Hidden && other.borderBottomStyle() == BorderStyle::None) >+ || (borderBottomStyle() == BorderStyle::None && other.borderBottomStyle() == BorderStyle::Hidden) >+ || (borderLeftStyle() == BorderStyle::Hidden && other.borderLeftStyle() == BorderStyle::None) >+ || (borderLeftStyle() == BorderStyle::None && other.borderLeftStyle() == BorderStyle::Hidden) >+ || (borderRightStyle() == BorderStyle::Hidden && other.borderRightStyle() == BorderStyle::None) >+ || (borderRightStyle() == BorderStyle::None && other.borderRightStyle() == BorderStyle::Hidden))) > return true; > } > >@@ -795,12 +795,12 @@ bool RenderStyle::changeRequiresLayout(c > if (!arePointingToEqualData(m_rareInheritedData->quotes, other.m_rareInheritedData->quotes)) > return true; > >- if (position() != StaticPosition) { >+ if (position() != PositionType::Static) { > if (m_surroundData->offset != other.m_surroundData->offset) { > // FIXME: We would like to use SimplifiedLayout for relative positioning, but we can't quite do that yet. > // We need to make sure SimplifiedLayout can operate correctly on RenderInlines (we will need > // to add a selfNeedsSimplifiedLayout bit in order to not get confused and taint every line). >- if (position() != AbsolutePosition) >+ if (position() != PositionType::Absolute) > return true; > > // Optimize for the case where a positioned layer is moving but not changing size. >@@ -827,29 +827,29 @@ bool RenderStyle::changeRequiresLayout(c > return false; > } > >-bool RenderStyle::changeRequiresPositionedLayoutOnly(const RenderStyle& other, unsigned&) const >+bool RenderStyle::changeRequiresPositionedLayoutOnly(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>&) const > { >- if (position() == StaticPosition) >+ if (position() == PositionType::Static) > return false; > > if (m_surroundData->offset != other.m_surroundData->offset) { > // Optimize for the case where a positioned layer is moving but not changing size. >- if (position() == AbsolutePosition && positionChangeIsMovementOnly(m_surroundData->offset, other.m_surroundData->offset, m_boxData->width())) >+ if (position() == PositionType::Absolute && positionChangeIsMovementOnly(m_surroundData->offset, other.m_surroundData->offset, m_boxData->width())) > return true; > } > > return false; > } > >-bool RenderStyle::changeRequiresLayerRepaint(const RenderStyle& other, unsigned& changedContextSensitiveProperties) const >+bool RenderStyle::changeRequiresLayerRepaint(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const > { > // StyleResolver has ensured that zIndex is non-auto only if it's applicable. > if (m_boxData->zIndex() != other.m_boxData->zIndex() || m_boxData->hasAutoZIndex() != other.m_boxData->hasAutoZIndex()) > return true; > >- if (position() != StaticPosition) { >+ if (position() != PositionType::Static) { > if (m_visualData->clip != other.m_visualData->clip || m_visualData->hasClip != other.m_visualData->hasClip) { >- changedContextSensitiveProperties |= ContextSensitivePropertyClipRect; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::ClipRect; > return true; > } > } >@@ -860,18 +860,18 @@ bool RenderStyle::changeRequiresLayerRep > #endif > > if (m_rareNonInheritedData->opacity != other.m_rareNonInheritedData->opacity) { >- changedContextSensitiveProperties |= ContextSensitivePropertyOpacity; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Opacity; > // Don't return; keep looking for another change. > } > > if (m_rareNonInheritedData->filter != other.m_rareNonInheritedData->filter) { >- changedContextSensitiveProperties |= ContextSensitivePropertyFilter; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Filter; > // Don't return; keep looking for another change. > } > > #if ENABLE(FILTERS_LEVEL_2) > if (m_rareNonInheritedData->backdropFilter != other.m_rareNonInheritedData->backdropFilter) { >- changedContextSensitiveProperties |= ContextSensitivePropertyFilter; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::Filter; > // Don't return; keep looking for another change. > } > #endif >@@ -892,7 +892,7 @@ static bool requiresPainting(const Rende > return true; > } > >-bool RenderStyle::changeRequiresRepaint(const RenderStyle& other, unsigned& changedContextSensitiveProperties) const >+bool RenderStyle::changeRequiresRepaint(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const > { > if (!requiresPainting(*this) && !requiresPainting(other)) > return false; >@@ -921,14 +921,14 @@ bool RenderStyle::changeRequiresRepaint( > > // FIXME: this should probably be moved to changeRequiresLayerRepaint(). > if (m_rareNonInheritedData->clipPath != other.m_rareNonInheritedData->clipPath) { >- changedContextSensitiveProperties |= ContextSensitivePropertyClipPath; >+ changedContextSensitiveProperties |= StyleDifferenceContextSensitiveProperty::ClipPath; > // Don't return; keep looking for another change. > } > > return false; > } > >-bool RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle& other, unsigned&) const >+bool RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>&) const > { > if (m_inheritedData->color != other.m_inheritedData->color > || m_inheritedFlags.textDecorations != other.m_inheritedFlags.textDecorations >@@ -947,7 +947,7 @@ bool RenderStyle::changeRequiresRepaintI > return false; > } > >-bool RenderStyle::changeRequiresRecompositeLayer(const RenderStyle& other, unsigned&) const >+bool RenderStyle::changeRequiresRecompositeLayer(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>&) const > { > if (m_rareNonInheritedData.ptr() != other.m_rareNonInheritedData.ptr()) { > if (m_rareNonInheritedData->transformStyle3D != other.m_rareNonInheritedData->transformStyle3D >@@ -961,59 +961,59 @@ bool RenderStyle::changeRequiresRecompos > return false; > } > >-StyleDifference RenderStyle::diff(const RenderStyle& other, unsigned& changedContextSensitiveProperties) const >+StyleDifference RenderStyle::diff(const RenderStyle& other, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const > { >- changedContextSensitiveProperties = ContextSensitivePropertyNone; >+ changedContextSensitiveProperties = StyleDifferenceContextSensitiveProperty::None; > >- StyleDifference svgChange = StyleDifferenceEqual; >+ StyleDifference svgChange = StyleDifference::Equal; > if (m_svgStyle != other.m_svgStyle) { > svgChange = m_svgStyle->diff(other.m_svgStyle.get()); >- if (svgChange == StyleDifferenceLayout) >+ if (svgChange == StyleDifference::Layout) > return svgChange; > } > > if (changeRequiresLayout(other, changedContextSensitiveProperties)) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > >- // SVGRenderStyle::diff() might have returned StyleDifferenceRepaint, eg. if fill changes. >- // If eg. the font-size changed at the same time, we're not allowed to return StyleDifferenceRepaint, >- // but have to return StyleDifferenceLayout, that's why this if branch comes after all branches >- // that are relevant for SVG and might return StyleDifferenceLayout. >- if (svgChange != StyleDifferenceEqual) >+ // SVGRenderStyle::diff() might have returned StyleDifference::Repaint, eg. if fill changes. >+ // If eg. the font-size changed at the same time, we're not allowed to return StyleDifference::Repaint, >+ // but have to return StyleDifference::Layout, that's why this if branch comes after all branches >+ // that are relevant for SVG and might return StyleDifference::Layout. >+ if (svgChange != StyleDifference::Equal) > return svgChange; > > if (changeRequiresPositionedLayoutOnly(other, changedContextSensitiveProperties)) >- return StyleDifferenceLayoutPositionedMovementOnly; >+ return StyleDifference::LayoutPositionedMovementOnly; > > if (changeRequiresLayerRepaint(other, changedContextSensitiveProperties)) >- return StyleDifferenceRepaintLayer; >+ return StyleDifference::RepaintLayer; > > if (changeRequiresRepaint(other, changedContextSensitiveProperties)) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > > if (changeRequiresRecompositeLayer(other, changedContextSensitiveProperties)) >- return StyleDifferenceRecompositeLayer; >+ return StyleDifference::RecompositeLayer; > > if (changeRequiresRepaintIfTextOrBorderOrOutline(other, changedContextSensitiveProperties)) >- return StyleDifferenceRepaintIfTextOrBorderOrOutline; >+ return StyleDifference::RepaintIfTextOrBorderOrOutline; > > // Cursors are not checked, since they will be set appropriately in response to mouse events, > // so they don't need to cause any repaint or layout. > > // Animations don't need to be checked either. We always set the new style on the RenderObject, so we will get a chance to fire off > // the resulting transition properly. >- return StyleDifferenceEqual; >+ return StyleDifference::Equal; > } > > bool RenderStyle::diffRequiresLayerRepaint(const RenderStyle& style, bool isComposited) const > { >- unsigned changedContextSensitiveProperties = 0; >+ OptionSet<StyleDifferenceContextSensitiveProperty> changedContextSensitiveProperties; > > if (changeRequiresRepaint(style, changedContextSensitiveProperties)) > return true; > > if (isComposited && changeRequiresLayerRepaint(style, changedContextSensitiveProperties)) >- return changedContextSensitiveProperties & ContextSensitivePropertyClipRect; >+ return changedContextSensitiveProperties.contains(StyleDifferenceContextSensitiveProperty::ClipRect); > > return false; > } >@@ -1323,7 +1323,7 @@ RoundedRect RenderStyle::getRoundedInner > static bool allLayersAreFixed(const FillLayer& layers) > { > for (auto* layer = &layers; layer; layer = layer->next()) { >- if (!(layer->image() && layer->attachment() == FixedBackgroundAttachment)) >+ if (!(layer->image() && layer->attachment() == FillAttachment::FixedBackground)) > return false; > } > return true; >@@ -1761,7 +1761,7 @@ void RenderStyle::getShadowVerticalExten > Color RenderStyle::colorIncludingFallback(CSSPropertyID colorProperty, bool visitedLink) const > { > Color result; >- EBorderStyle borderStyle = BNONE; >+ BorderStyle borderStyle = BorderStyle::None; > switch (colorProperty) { > case CSSPropertyBackgroundColor: > return visitedLink ? visitedLinkBackgroundColor() : backgroundColor(); // Background color doesn't fall back. >@@ -1814,7 +1814,7 @@ Color RenderStyle::colorIncludingFallbac > } > > if (!result.isValid()) { >- if (!visitedLink && (borderStyle == INSET || borderStyle == OUTSET || borderStyle == RIDGE || borderStyle == GROOVE)) >+ if (!visitedLink && (borderStyle == BorderStyle::Inset || borderStyle == BorderStyle::Outset || borderStyle == BorderStyle::Ridge || borderStyle == BorderStyle::Groove)) > result = Color(238, 238, 238); > else > result = visitedLink ? visitedLinkColor() : color(); >@@ -2063,7 +2063,7 @@ void RenderStyle::setColumnStylesFromPag > if (paginationMode == Pagination::Unpaginated) > return; > >- setColumnFill(ColumnFillAuto); >+ setColumnFill(ColumnFill::Auto); > > switch (paginationMode) { > case Pagination::LeftToRightPaginated: >@@ -2286,18 +2286,18 @@ void RenderStyle::checkVariablesInCustom > > float RenderStyle::outlineWidth() const > { >- if (m_backgroundData->outline.style() == BNONE) >+ if (m_backgroundData->outline.style() == BorderStyle::None) > return 0; >- if (outlineStyleIsAuto()) >+ if (outlineStyleIsAuto() == OutlineIsAuto::On) > return std::max(m_backgroundData->outline.width(), RenderTheme::platformFocusRingWidth()); > return m_backgroundData->outline.width(); > } > > float RenderStyle::outlineOffset() const > { >- if (m_backgroundData->outline.style() == BNONE) >+ if (m_backgroundData->outline.style() == BorderStyle::None) > return 0; >- if (outlineStyleIsAuto()) >+ if (outlineStyleIsAuto() == OutlineIsAuto::On) > return (m_backgroundData->outline.offset() + RenderTheme::platformFocusRingOffset(outlineWidth())); > return m_backgroundData->outline.offset(); > } >Index: Source/WebCore/rendering/style/RenderStyle.h >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.h (revision 232008) >+++ Source/WebCore/rendering/style/RenderStyle.h (working copy) >@@ -163,9 +163,9 @@ public: > void copyContentFrom(const RenderStyle&); > > ContentPosition resolvedJustifyContentPosition(const StyleContentAlignmentData& normalValueBehavior) const; >- ContentDistributionType resolvedJustifyContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const; >+ ContentDistribution resolvedJustifyContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const; > ContentPosition resolvedAlignContentPosition(const StyleContentAlignmentData& normalValueBehavior) const; >- ContentDistributionType resolvedAlignContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const; >+ ContentDistribution resolvedAlignContentDistribution(const StyleContentAlignmentData& normalValueBehavior) const; > StyleSelfAlignmentData resolvedAlignItems(ItemPosition normalValueBehaviour) const; > StyleSelfAlignmentData resolvedAlignSelf(const RenderStyle* parentStyle, ItemPosition normalValueBehaviour) const; > StyleContentAlignmentData resolvedAlignContent(const StyleContentAlignmentData& normalValueBehaviour) const; >@@ -198,7 +198,7 @@ public: > > void setColumnStylesFromPaginationMode(const Pagination::Mode&); > >- bool isFloating() const { return m_nonInheritedFlags.floating != NoFloat; } >+ bool isFloating() const { return static_cast<Float>(m_nonInheritedFlags.floating) != Float::No; } > bool hasMargin() const { return !m_surroundData->margin.isZero(); } > bool hasBorder() const { return m_surroundData->border.hasBorder(); } > bool hasBorderFill() const { return m_surroundData->border.hasFill(); } >@@ -257,11 +257,11 @@ public: > bool hasStaticInlinePosition(bool horizontal) const { return horizontal ? hasAutoLeftAndRight() : hasAutoTopAndBottom(); } > bool hasStaticBlockPosition(bool horizontal) const { return horizontal ? hasAutoTopAndBottom() : hasAutoLeftAndRight(); } > >- EPosition position() const { return static_cast<EPosition>(m_nonInheritedFlags.position); } >- bool hasOutOfFlowPosition() const { return position() == AbsolutePosition || position() == FixedPosition; } >- bool hasInFlowPosition() const { return position() == RelativePosition || position() == StickyPosition; } >- bool hasViewportConstrainedPosition() const { return position() == FixedPosition || position() == StickyPosition; } >- EFloat floating() const { return static_cast<EFloat>(m_nonInheritedFlags.floating); } >+ PositionType position() const { return static_cast<PositionType>(m_nonInheritedFlags.position); } >+ bool hasOutOfFlowPosition() const { return position() == PositionType::Absolute || position() == PositionType::Fixed; } >+ bool hasInFlowPosition() const { return position() == PositionType::Relative || position() == PositionType::Sticky; } >+ bool hasViewportConstrainedPosition() const { return position() == PositionType::Fixed || position() == PositionType::Sticky; } >+ Float floating() const { return static_cast<Float>(m_nonInheritedFlags.floating); } > > const Length& width() const { return m_boxData->width(); } > const Length& height() const { return m_boxData->height(); } >@@ -301,16 +301,16 @@ public: > bool hasBorderRadius() const { return m_surroundData->border.hasBorderRadius(); } > > float borderLeftWidth() const { return m_surroundData->border.borderLeftWidth(); } >- EBorderStyle borderLeftStyle() const { return m_surroundData->border.left().style(); } >+ BorderStyle borderLeftStyle() const { return m_surroundData->border.left().style(); } > bool borderLeftIsTransparent() const { return m_surroundData->border.left().isTransparent(); } > float borderRightWidth() const { return m_surroundData->border.borderRightWidth(); } >- EBorderStyle borderRightStyle() const { return m_surroundData->border.right().style(); } >+ BorderStyle borderRightStyle() const { return m_surroundData->border.right().style(); } > bool borderRightIsTransparent() const { return m_surroundData->border.right().isTransparent(); } > float borderTopWidth() const { return m_surroundData->border.borderTopWidth(); } >- EBorderStyle borderTopStyle() const { return m_surroundData->border.top().style(); } >+ BorderStyle borderTopStyle() const { return m_surroundData->border.top().style(); } > bool borderTopIsTransparent() const { return m_surroundData->border.top().isTransparent(); } > float borderBottomWidth() const { return m_surroundData->border.borderBottomWidth(); } >- EBorderStyle borderBottomStyle() const { return m_surroundData->border.bottom().style(); } >+ BorderStyle borderBottomStyle() const { return m_surroundData->border.bottom().style(); } > bool borderBottomIsTransparent() const { return m_surroundData->border.bottom().isTransparent(); } > FloatBoxExtent borderWidth() const { return m_surroundData->border.borderWidth(); } > >@@ -321,18 +321,18 @@ public: > > float outlineSize() const { return std::max<float>(0, outlineWidth() + outlineOffset()); } > float outlineWidth() const; >- bool hasOutline() const { return outlineStyle() > BHIDDEN && outlineWidth() > 0; } >- EBorderStyle outlineStyle() const { return m_backgroundData->outline.style(); } >+ bool hasOutline() const { return outlineStyle() > BorderStyle::Hidden && outlineWidth() > 0; } >+ BorderStyle outlineStyle() const { return m_backgroundData->outline.style(); } > OutlineIsAuto outlineStyleIsAuto() const { return static_cast<OutlineIsAuto>(m_backgroundData->outline.isAuto()); } > bool hasOutlineInVisualOverflow() const { return hasOutline() && outlineSize() > 0; } > >- EOverflow overflowX() const { return static_cast<EOverflow>(m_nonInheritedFlags.overflowX); } >- EOverflow overflowY() const { return static_cast<EOverflow>(m_nonInheritedFlags.overflowY); } >- EOverflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); } >- EOverflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); } >+ Overflow overflowX() const { return static_cast<Overflow>(m_nonInheritedFlags.overflowX); } >+ Overflow overflowY() const { return static_cast<Overflow>(m_nonInheritedFlags.overflowY); } >+ Overflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); } >+ Overflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); } > > EVisibility visibility() const { return static_cast<EVisibility>(m_inheritedFlags.visibility); } >- EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(m_nonInheritedFlags.verticalAlign); } >+ VerticalAlign verticalAlign() const { return static_cast<VerticalAlign>(m_nonInheritedFlags.verticalAlign); } > const Length& verticalAlignLength() const { return m_boxData->verticalAlign(); } > > const Length& clipLeft() const { return m_visualData->clip.left(); } >@@ -344,8 +344,8 @@ public: > > EUnicodeBidi unicodeBidi() const { return static_cast<EUnicodeBidi>(m_nonInheritedFlags.unicodeBidi); } > >- EClear clear() const { return static_cast<EClear>(m_nonInheritedFlags.clear); } >- ETableLayout tableLayout() const { return static_cast<ETableLayout>(m_nonInheritedFlags.tableLayout); } >+ Clear clear() const { return static_cast<Clear>(m_nonInheritedFlags.clear); } >+ TableLayoutType tableLayout() const { return static_cast<TableLayoutType>(m_nonInheritedFlags.tableLayout); } > > WEBCORE_EXPORT const FontCascade& fontCascade() const; > WEBCORE_EXPORT const FontMetrics& fontMetrics() const; >@@ -405,35 +405,35 @@ public: > bool breakOnlyAfterWhiteSpace() const; > bool breakWords() const; > >- EFillRepeat backgroundRepeatX() const { return static_cast<EFillRepeat>(m_backgroundData->background.repeatX()); } >- EFillRepeat backgroundRepeatY() const { return static_cast<EFillRepeat>(m_backgroundData->background.repeatY()); } >+ FillRepeat backgroundRepeatX() const { return static_cast<FillRepeat>(m_backgroundData->background.repeatX()); } >+ FillRepeat backgroundRepeatY() const { return static_cast<FillRepeat>(m_backgroundData->background.repeatY()); } > CompositeOperator backgroundComposite() const { return static_cast<CompositeOperator>(m_backgroundData->background.composite()); } >- EFillAttachment backgroundAttachment() const { return static_cast<EFillAttachment>(m_backgroundData->background.attachment()); } >- EFillBox backgroundClip() const { return static_cast<EFillBox>(m_backgroundData->background.clip()); } >- EFillBox backgroundOrigin() const { return static_cast<EFillBox>(m_backgroundData->background.origin()); } >+ FillAttachment backgroundAttachment() const { return static_cast<FillAttachment>(m_backgroundData->background.attachment()); } >+ FillBox backgroundClip() const { return static_cast<FillBox>(m_backgroundData->background.clip()); } >+ FillBox backgroundOrigin() const { return static_cast<FillBox>(m_backgroundData->background.origin()); } > const Length& backgroundXPosition() const { return m_backgroundData->background.xPosition(); } > const Length& backgroundYPosition() const { return m_backgroundData->background.yPosition(); } >- EFillSizeType backgroundSizeType() const { return m_backgroundData->background.sizeType(); } >+ FillSizeType backgroundSizeType() const { return m_backgroundData->background.sizeType(); } > const LengthSize& backgroundSizeLength() const { return m_backgroundData->background.sizeLength(); } > FillLayer& ensureBackgroundLayers() { return m_backgroundData.access().background; } > const FillLayer& backgroundLayers() const { return m_backgroundData->background; } > > StyleImage* maskImage() const { return m_rareNonInheritedData->mask.image(); } >- EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(m_rareNonInheritedData->mask.repeatX()); } >- EFillRepeat maskRepeatY() const { return static_cast<EFillRepeat>(m_rareNonInheritedData->mask.repeatY()); } >+ FillRepeat maskRepeatX() const { return static_cast<FillRepeat>(m_rareNonInheritedData->mask.repeatX()); } >+ FillRepeat maskRepeatY() const { return static_cast<FillRepeat>(m_rareNonInheritedData->mask.repeatY()); } > CompositeOperator maskComposite() const { return static_cast<CompositeOperator>(m_rareNonInheritedData->mask.composite()); } >- EFillBox maskClip() const { return static_cast<EFillBox>(m_rareNonInheritedData->mask.clip()); } >- EFillBox maskOrigin() const { return static_cast<EFillBox>(m_rareNonInheritedData->mask.origin()); } >+ FillBox maskClip() const { return static_cast<FillBox>(m_rareNonInheritedData->mask.clip()); } >+ FillBox maskOrigin() const { return static_cast<FillBox>(m_rareNonInheritedData->mask.origin()); } > const Length& maskXPosition() const { return m_rareNonInheritedData->mask.xPosition(); } > const Length& maskYPosition() const { return m_rareNonInheritedData->mask.yPosition(); } >- EFillSizeType maskSizeType() const { return m_rareNonInheritedData->mask.sizeType(); } >+ FillSizeType maskSizeType() const { return m_rareNonInheritedData->mask.sizeType(); } > const LengthSize& maskSizeLength() const { return m_rareNonInheritedData->mask.sizeLength(); } > FillLayer& ensureMaskLayers() { return m_rareNonInheritedData.access().mask; } > const FillLayer& maskLayers() const { return m_rareNonInheritedData->mask; } > const NinePieceImage& maskBoxImage() const { return m_rareNonInheritedData->maskBoxImage; } > StyleImage* maskBoxImageSource() const { return m_rareNonInheritedData->maskBoxImage.image(); } > >- EBorderCollapse borderCollapse() const { return static_cast<EBorderCollapse>(m_inheritedFlags.borderCollapse); } >+ BorderCollapse borderCollapse() const { return static_cast<BorderCollapse>(m_inheritedFlags.borderCollapse); } > float horizontalBorderSpacing() const; > float verticalBorderSpacing() const; > EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(m_inheritedFlags.emptyCells); } >@@ -501,14 +501,14 @@ public: > AspectRatioType aspectRatioType() const { return static_cast<AspectRatioType>(m_rareNonInheritedData->aspectRatioType); } > float aspectRatioDenominator() const { return m_rareNonInheritedData->aspectRatioDenominator; } > float aspectRatioNumerator() const { return m_rareNonInheritedData->aspectRatioNumerator; } >- EBoxAlignment boxAlign() const { return static_cast<EBoxAlignment>(m_rareNonInheritedData->deprecatedFlexibleBox->align); } >- EBoxDirection boxDirection() const { return static_cast<EBoxDirection>(m_inheritedFlags.boxDirection); } >+ BoxAlignment boxAlign() const { return static_cast<BoxAlignment>(m_rareNonInheritedData->deprecatedFlexibleBox->align); } >+ BoxDirection boxDirection() const { return static_cast<BoxDirection>(m_inheritedFlags.boxDirection); } > float boxFlex() const { return m_rareNonInheritedData->deprecatedFlexibleBox->flex; } > unsigned boxFlexGroup() const { return m_rareNonInheritedData->deprecatedFlexibleBox->flexGroup; } >- EBoxLines boxLines() const { return static_cast<EBoxLines>(m_rareNonInheritedData->deprecatedFlexibleBox->lines); } >+ BoxLines boxLines() const { return static_cast<BoxLines>(m_rareNonInheritedData->deprecatedFlexibleBox->lines); } > unsigned boxOrdinalGroup() const { return m_rareNonInheritedData->deprecatedFlexibleBox->ordinalGroup; } >- EBoxOrient boxOrient() const { return static_cast<EBoxOrient>(m_rareNonInheritedData->deprecatedFlexibleBox->orient); } >- EBoxPack boxPack() const { return static_cast<EBoxPack>(m_rareNonInheritedData->deprecatedFlexibleBox->pack); } >+ BoxOrient boxOrient() const { return static_cast<BoxOrient>(m_rareNonInheritedData->deprecatedFlexibleBox->orient); } >+ BoxPack boxPack() const { return static_cast<BoxPack>(m_rareNonInheritedData->deprecatedFlexibleBox->pack); } > > int order() const { return m_rareNonInheritedData->order; } > float flexGrow() const { return m_rareNonInheritedData->flexibleBox->flexGrow; } >@@ -517,10 +517,10 @@ public: > const StyleContentAlignmentData& alignContent() const { return m_rareNonInheritedData->alignContent; } > const StyleSelfAlignmentData& alignItems() const { return m_rareNonInheritedData->alignItems; } > const StyleSelfAlignmentData& alignSelf() const { return m_rareNonInheritedData->alignSelf; } >- EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(m_rareNonInheritedData->flexibleBox->flexDirection); } >- bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } >- bool isReverseFlexDirection() const { return flexDirection() == FlowRowReverse || flexDirection() == FlowColumnReverse; } >- EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(m_rareNonInheritedData->flexibleBox->flexWrap); } >+ FlexDirection flexDirection() const { return static_cast<FlexDirection>(m_rareNonInheritedData->flexibleBox->flexDirection); } >+ bool isColumnFlexDirection() const { return flexDirection() == FlexDirection::Column || flexDirection() == FlexDirection::ColumnReverse; } >+ bool isReverseFlexDirection() const { return flexDirection() == FlexDirection::RowReverse || flexDirection() == FlexDirection::ColumnReverse; } >+ FlexWrap flexWrap() const { return static_cast<FlexWrap>(m_rareNonInheritedData->flexibleBox->flexWrap); } > const StyleContentAlignmentData& justifyContent() const { return m_rareNonInheritedData->justifyContent; } > const StyleSelfAlignmentData& justifyItems() const { return m_rareNonInheritedData->justifyItems; } > const StyleSelfAlignmentData& justifySelf() const { return m_rareNonInheritedData->justifySelf; } >@@ -566,25 +566,25 @@ public: > void getBoxShadowBlockDirectionExtent(LayoutUnit& logicalTop, LayoutUnit& logicalBottom) const { getShadowBlockDirectionExtent(boxShadow(), logicalTop, logicalBottom); } > > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- EBoxDecorationBreak boxDecorationBreak() const { return m_boxData->boxDecorationBreak(); } >+ BoxDecorationBreak boxDecorationBreak() const { return m_boxData->boxDecorationBreak(); } > #endif > > StyleReflection* boxReflect() const { return m_rareNonInheritedData->boxReflect.get(); } >- EBoxSizing boxSizing() const { return m_boxData->boxSizing(); } >+ BoxSizing boxSizing() const { return m_boxData->boxSizing(); } > const Length& marqueeIncrement() const { return m_rareNonInheritedData->marquee->increment; } > int marqueeSpeed() const { return m_rareNonInheritedData->marquee->speed; } > int marqueeLoopCount() const { return m_rareNonInheritedData->marquee->loops; } > MarqueeBehavior marqueeBehavior() const { return static_cast<MarqueeBehavior>(m_rareNonInheritedData->marquee->behavior); } > MarqueeDirection marqueeDirection() const { return static_cast<MarqueeDirection>(m_rareNonInheritedData->marquee->direction); } >- EUserModify userModify() const { return static_cast<EUserModify>(m_rareInheritedData->userModify); } >- EUserDrag userDrag() const { return static_cast<EUserDrag>(m_rareNonInheritedData->userDrag); } >- EUserSelect userSelect() const { return static_cast<EUserSelect>(m_rareInheritedData->userSelect); } >+ UserModify userModify() const { return static_cast<UserModify>(m_rareInheritedData->userModify); } >+ UserDrag userDrag() const { return static_cast<UserDrag>(m_rareNonInheritedData->userDrag); } >+ UserSelect userSelect() const { return static_cast<UserSelect>(m_rareInheritedData->userSelect); } > TextOverflow textOverflow() const { return static_cast<TextOverflow>(m_rareNonInheritedData->textOverflow); } >- EMarginCollapse marginBeforeCollapse() const { return static_cast<EMarginCollapse>(m_rareNonInheritedData->marginBeforeCollapse); } >- EMarginCollapse marginAfterCollapse() const { return static_cast<EMarginCollapse>(m_rareNonInheritedData->marginAfterCollapse); } >- EWordBreak wordBreak() const { return static_cast<EWordBreak>(m_rareInheritedData->wordBreak); } >- EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(m_rareInheritedData->overflowWrap); } >- ENBSPMode nbspMode() const { return static_cast<ENBSPMode>(m_rareInheritedData->nbspMode); } >+ MarginCollapse marginBeforeCollapse() const { return static_cast<MarginCollapse>(m_rareNonInheritedData->marginBeforeCollapse); } >+ MarginCollapse marginAfterCollapse() const { return static_cast<MarginCollapse>(m_rareNonInheritedData->marginAfterCollapse); } >+ WordBreak wordBreak() const { return static_cast<WordBreak>(m_rareInheritedData->wordBreak); } >+ OverflowWrap overflowWrap() const { return static_cast<OverflowWrap>(m_rareInheritedData->overflowWrap); } >+ NBSPMode nbspMode() const { return static_cast<NBSPMode>(m_rareInheritedData->nbspMode); } > LineBreak lineBreak() const { return static_cast<LineBreak>(m_rareInheritedData->lineBreak); } > Hyphens hyphens() const { return static_cast<Hyphens>(m_rareInheritedData->hyphens); } > short hyphenationLimitBefore() const { return m_rareInheritedData->hyphenationLimitBefore; } >@@ -593,7 +593,7 @@ public: > const AtomicString& hyphenationString() const { return m_rareInheritedData->hyphenationString; } > const AtomicString& locale() const { return fontDescription().locale(); } > EBorderFit borderFit() const { return static_cast<EBorderFit>(m_rareNonInheritedData->borderFit); } >- EResize resize() const { return static_cast<EResize>(m_rareNonInheritedData->resize); } >+ Resize resize() const { return static_cast<Resize>(m_rareNonInheritedData->resize); } > ColumnAxis columnAxis() const { return static_cast<ColumnAxis>(m_rareNonInheritedData->multiCol->axis); } > bool hasInlineColumnAxis() const; > ColumnProgression columnProgression() const { return static_cast<ColumnProgression>(m_rareNonInheritedData->multiCol->progression); } >@@ -605,7 +605,7 @@ public: > ColumnFill columnFill() const { return static_cast<ColumnFill>(m_rareNonInheritedData->multiCol->fill); } > const GapLength& columnGap() const { return m_rareNonInheritedData->columnGap; } > const GapLength& rowGap() const { return m_rareNonInheritedData->rowGap; } >- EBorderStyle columnRuleStyle() const { return m_rareNonInheritedData->multiCol->rule.style(); } >+ BorderStyle columnRuleStyle() const { return m_rareNonInheritedData->multiCol->rule.style(); } > unsigned short columnRuleWidth() const { return m_rareNonInheritedData->multiCol->ruleWidth(); } > bool columnRuleIsTransparent() const { return m_rareNonInheritedData->multiCol->rule.isTransparent(); } > ColumnSpan columnSpan() const { return static_cast<ColumnSpan>(m_rareNonInheritedData->multiCol->columnSpan); } >@@ -641,7 +641,7 @@ public: > bool hasMask() const { return m_rareNonInheritedData->mask.hasImage() || m_rareNonInheritedData->maskBoxImage.hasImage(); } > > TextCombine textCombine() const { return static_cast<TextCombine>(m_rareNonInheritedData->textCombine); } >- bool hasTextCombine() const { return textCombine() != TextCombineNone; } >+ bool hasTextCombine() const { return textCombine() != TextCombine::None; } > > unsigned tabSize() const { return m_rareInheritedData->tabSize; } > >@@ -669,10 +669,10 @@ public: > // Return the first found Animation (including 'all' transitions). > const Animation* transitionForProperty(CSSPropertyID) const; > >- ETransformStyle3D transformStyle3D() const { return static_cast<ETransformStyle3D>(m_rareNonInheritedData->transformStyle3D); } >- bool preserves3D() const { return m_rareNonInheritedData->transformStyle3D == TransformStyle3DPreserve3D; } >+ TransformStyle3D transformStyle3D() const { return static_cast<TransformStyle3D>(m_rareNonInheritedData->transformStyle3D); } >+ bool preserves3D() const { return transformStyle3D() == TransformStyle3D::Preserve3D; } > >- EBackfaceVisibility backfaceVisibility() const { return static_cast<EBackfaceVisibility>(m_rareNonInheritedData->backfaceVisibility); } >+ BackfaceVisibility backfaceVisibility() const { return static_cast<BackfaceVisibility>(m_rareNonInheritedData->backfaceVisibility); } > float perspective() const { return m_rareNonInheritedData->perspective; } > bool hasPerspective() const { return m_rareNonInheritedData->perspective > 0; } > const Length& perspectiveOriginX() const { return m_rareNonInheritedData->perspectiveOriginX; } >@@ -728,7 +728,7 @@ public: > TextSizeAdjustment textSizeAdjust() const { return m_rareInheritedData->textSizeAdjust; } > #endif > >- ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(m_rareInheritedData->textSecurity); } >+ TextSecurity textSecurity() const { return static_cast<TextSecurity>(m_rareInheritedData->textSecurity); } > > WritingMode writingMode() const { return static_cast<WritingMode>(m_inheritedFlags.writingMode); } > bool isHorizontalWritingMode() const { return WebCore::isHorizontalWritingMode(writingMode()); } >@@ -738,7 +738,7 @@ public: > > ImageOrientationEnum imageOrientation() const; > >- EImageRendering imageRendering() const { return static_cast<EImageRendering>(m_rareInheritedData->imageRendering); } >+ ImageRendering imageRendering() const { return static_cast<ImageRendering>(m_rareInheritedData->imageRendering); } > > #if ENABLE(CSS_IMAGE_RESOLUTION) > ImageResolutionSource imageResolutionSource() const { return static_cast<ImageResolutionSource>(m_rareInheritedData->imageResolutionSource); } >@@ -771,13 +771,13 @@ public: > bool hasBlendMode() const { return static_cast<BlendMode>(m_rareNonInheritedData->effectiveBlendMode) != BlendModeNormal; } > > Isolation isolation() const { return static_cast<Isolation>(m_rareNonInheritedData->isolation); } >- void setIsolation(Isolation isolation) { SET_VAR(m_rareNonInheritedData, isolation, isolation); } >- bool hasIsolation() const { return m_rareNonInheritedData->isolation != IsolationAuto; } >+ void setIsolation(Isolation isolation) { SET_VAR(m_rareNonInheritedData, isolation, static_cast<unsigned>(isolation)); } >+ bool hasIsolation() const { return isolation() != Isolation::Auto; } > #else > BlendMode blendMode() const { return BlendModeNormal; } > bool hasBlendMode() const { return false; } > >- Isolation isolation() const { return IsolationAuto; } >+ Isolation isolation() const { return Isolation::Auto; } > bool hasIsolation() const { return false; } > #endif > >@@ -798,8 +798,8 @@ public: > > void setDisplay(EDisplay v) { m_nonInheritedFlags.effectiveDisplay = v; } > void setOriginalDisplay(EDisplay v) { m_nonInheritedFlags.originalDisplay = v; } >- void setPosition(EPosition v) { m_nonInheritedFlags.position = v; } >- void setFloating(EFloat v) { m_nonInheritedFlags.floating = v; } >+ void setPosition(PositionType v) { m_nonInheritedFlags.position = static_cast<unsigned>(v); } >+ void setFloating(Float v) { m_nonInheritedFlags.floating = static_cast<unsigned>(v); } > > void setLeft(Length&& length) { SET_VAR(m_surroundData, offset.left(), WTFMove(length)); } > void setRight(Length&& length) { SET_VAR(m_surroundData, offset.right(), WTFMove(length)); } >@@ -839,7 +839,7 @@ public: > > void setBackgroundXPosition(Length&& length) { SET_VAR(m_backgroundData, background.m_xPosition, WTFMove(length)); } > void setBackgroundYPosition(Length&& length) { SET_VAR(m_backgroundData, background.m_yPosition, WTFMove(length)); } >- void setBackgroundSize(EFillSizeType b) { SET_VAR(m_backgroundData, background.m_sizeType, b); } >+ void setBackgroundSize(FillSizeType b) { SET_VAR(m_backgroundData, background.m_sizeType, static_cast<unsigned>(b)); } > void setBackgroundSizeLength(LengthSize&& size) { SET_VAR(m_backgroundData, background.m_sizeLength, WTFMove(size)); } > > void setBorderImage(const NinePieceImage& b) { SET_VAR(m_surroundData, border.m_image, b); } >@@ -863,28 +863,28 @@ public: > LayoutUnit leftWidth, LayoutUnit rightWidth, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const; > > void setBorderLeftWidth(float v) { SET_VAR(m_surroundData, border.m_left.m_width, v); } >- void setBorderLeftStyle(EBorderStyle v) { SET_VAR(m_surroundData, border.m_left.m_style, v); } >+ void setBorderLeftStyle(BorderStyle v) { SET_VAR(m_surroundData, border.m_left.m_style, static_cast<unsigned>(v)); } > void setBorderLeftColor(const Color& v) { SET_BORDERVALUE_COLOR(m_surroundData, border.m_left, v); } > void setBorderRightWidth(float v) { SET_VAR(m_surroundData, border.m_right.m_width, v); } >- void setBorderRightStyle(EBorderStyle v) { SET_VAR(m_surroundData, border.m_right.m_style, v); } >+ void setBorderRightStyle(BorderStyle v) { SET_VAR(m_surroundData, border.m_right.m_style, static_cast<unsigned>(v)); } > void setBorderRightColor(const Color& v) { SET_BORDERVALUE_COLOR(m_surroundData, border.m_right, v); } > void setBorderTopWidth(float v) { SET_VAR(m_surroundData, border.m_top.m_width, v); } >- void setBorderTopStyle(EBorderStyle v) { SET_VAR(m_surroundData, border.m_top.m_style, v); } >+ void setBorderTopStyle(BorderStyle v) { SET_VAR(m_surroundData, border.m_top.m_style, static_cast<unsigned>(v)); } > void setBorderTopColor(const Color& v) { SET_BORDERVALUE_COLOR(m_surroundData, border.m_top, v); } > void setBorderBottomWidth(float v) { SET_VAR(m_surroundData, border.m_bottom.m_width, v); } >- void setBorderBottomStyle(EBorderStyle v) { SET_VAR(m_surroundData, border.m_bottom.m_style, v); } >+ void setBorderBottomStyle(BorderStyle v) { SET_VAR(m_surroundData, border.m_bottom.m_style, static_cast<unsigned>(v)); } > void setBorderBottomColor(const Color& v) { SET_BORDERVALUE_COLOR(m_surroundData, border.m_bottom, v); } > > void setOutlineWidth(float v) { SET_VAR(m_backgroundData, outline.m_width, v); } >- void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_backgroundData, outline.m_isAuto, isAuto); } >- void setOutlineStyle(EBorderStyle v) { SET_VAR(m_backgroundData, outline.m_style, v); } >+ void setOutlineStyleIsAuto(OutlineIsAuto isAuto) { SET_VAR(m_backgroundData, outline.m_isAuto, static_cast<unsigned>(isAuto)); } >+ void setOutlineStyle(BorderStyle v) { SET_VAR(m_backgroundData, outline.m_style, static_cast<unsigned>(v)); } > void setOutlineColor(const Color& v) { SET_BORDERVALUE_COLOR(m_backgroundData, outline, v); } > >- void setOverflowX(EOverflow v) { m_nonInheritedFlags.overflowX = v; } >- void setOverflowY(EOverflow v) { m_nonInheritedFlags.overflowY = v; } >+ void setOverflowX(Overflow v) { m_nonInheritedFlags.overflowX = static_cast<unsigned>(v); } >+ void setOverflowY(Overflow v) { m_nonInheritedFlags.overflowY = static_cast<unsigned>(v); } > void setVisibility(EVisibility v) { m_inheritedFlags.visibility = v; } >- void setVerticalAlign(EVerticalAlign v) { m_nonInheritedFlags.verticalAlign = v; } >- void setVerticalAlignLength(Length&& length) { setVerticalAlign(LENGTH); SET_VAR(m_boxData, m_verticalAlign, WTFMove(length)); } >+ void setVerticalAlign(VerticalAlign v) { m_nonInheritedFlags.verticalAlign = static_cast<unsigned>(v); } >+ void setVerticalAlignLength(Length&& length) { setVerticalAlign(VerticalAlign::Length); SET_VAR(m_boxData, m_verticalAlign, WTFMove(length)); } > > void setHasClip(bool b = true) { SET_VAR(m_visualData, hasClip, b); } > void setClipLeft(Length&& length) { SET_VAR(m_visualData, clip.left(), WTFMove(length)); } >@@ -896,8 +896,8 @@ public: > > void setUnicodeBidi(EUnicodeBidi v) { m_nonInheritedFlags.unicodeBidi = v; } > >- void setClear(EClear v) { m_nonInheritedFlags.clear = v; } >- void setTableLayout(ETableLayout v) { m_nonInheritedFlags.tableLayout = v; } >+ void setClear(Clear v) { m_nonInheritedFlags.clear = static_cast<unsigned>(v); } >+ void setTableLayout(TableLayoutType v) { m_nonInheritedFlags.tableLayout = static_cast<unsigned>(v); } > > bool setFontDescription(const FontCascadeDescription&); > >@@ -944,7 +944,7 @@ public: > void setImageOrientation(ImageOrientationEnum v) { SET_VAR(m_rareInheritedData, imageOrientation, static_cast<int>(v)); } > #endif > >- void setImageRendering(EImageRendering v) { SET_VAR(m_rareInheritedData, imageRendering, v); } >+ void setImageRendering(ImageRendering v) { SET_VAR(m_rareInheritedData, imageRendering, static_cast<unsigned>(v)); } > > #if ENABLE(CSS_IMAGE_RESOLUTION) > void setImageResolutionSource(ImageResolutionSource v) { SET_VAR(m_rareInheritedData, imageResolutionSource, v); } >@@ -957,12 +957,12 @@ public: > void setWordSpacing(Length&&); > void setLetterSpacing(float); > >- void clearBackgroundLayers() { m_backgroundData.access().background = FillLayer(BackgroundFillLayer); } >+ void clearBackgroundLayers() { m_backgroundData.access().background = FillLayer(FillLayerType::Background); } > void inheritBackgroundLayers(const FillLayer& parent) { m_backgroundData.access().background = parent; } > > void adjustBackgroundLayers(); > >- void clearMaskLayers() { m_rareNonInheritedData.access().mask = FillLayer(MaskFillLayer); } >+ void clearMaskLayers() { m_rareNonInheritedData.access().mask = FillLayer(FillLayerType::Mask); } > void inheritMaskLayers(const FillLayer& parent) { m_rareNonInheritedData.access().mask = parent; } > > void adjustMaskLayers(); >@@ -975,13 +975,13 @@ public: > void setMaskYPosition(Length&& length) { SET_VAR(m_rareNonInheritedData, mask.m_yPosition, WTFMove(length)); } > void setMaskSize(LengthSize size) { SET_VAR(m_rareNonInheritedData, mask.m_sizeLength, WTFMove(size)); } > >- void setBorderCollapse(EBorderCollapse collapse) { m_inheritedFlags.borderCollapse = collapse; } >+ void setBorderCollapse(BorderCollapse collapse) { m_inheritedFlags.borderCollapse = static_cast<unsigned>(collapse); } > void setHorizontalBorderSpacing(float); > void setVerticalBorderSpacing(float); > void setEmptyCells(EEmptyCell v) { m_inheritedFlags.emptyCells = v; } > void setCaptionSide(ECaptionSide v) { m_inheritedFlags.captionSide = v; } > >- void setAspectRatioType(AspectRatioType aspectRatioType) { SET_VAR(m_rareNonInheritedData, aspectRatioType, aspectRatioType); } >+ void setAspectRatioType(AspectRatioType aspectRatioType) { SET_VAR(m_rareNonInheritedData, aspectRatioType, static_cast<unsigned>(aspectRatioType)); } > void setAspectRatioDenominator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioDenominator, v); } > void setAspectRatioNumerator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioNumerator, v); } > >@@ -1019,7 +1019,7 @@ public: > void setInsideDefaultButton(bool insideDefaultButton) { m_inheritedFlags.insideDefaultButton = insideDefaultButton; } > > PrintColorAdjust printColorAdjust() const { return static_cast<PrintColorAdjust>(m_inheritedFlags.printColorAdjust); } >- void setPrintColorAdjust(PrintColorAdjust value) { m_inheritedFlags.printColorAdjust = value; } >+ void setPrintColorAdjust(PrintColorAdjust value) { m_inheritedFlags.printColorAdjust = static_cast<unsigned>(value); } > > bool hasAutoZIndex() const { return m_boxData->hasAutoZIndex(); } > void setHasAutoZIndex() { SET_VAR(m_boxData, m_hasAutoZIndex, true); SET_VAR(m_boxData, m_zIndex, 0); } >@@ -1042,17 +1042,17 @@ public: > void setOpacity(float f) { float v = clampTo<float>(f, 0, 1); SET_VAR(m_rareNonInheritedData, opacity, v); } > void setAppearance(ControlPart a) { SET_VAR(m_rareNonInheritedData, appearance, a); } > // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment >- void setBoxAlign(EBoxAlignment a) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, align, a); } >- void setBoxDirection(EBoxDirection d) { m_inheritedFlags.boxDirection = d; } >+ void setBoxAlign(BoxAlignment a) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, align, static_cast<unsigned>(a)); } >+ void setBoxDirection(BoxDirection d) { m_inheritedFlags.boxDirection = static_cast<unsigned>(d); } > void setBoxFlex(float f) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, flex, f); } > void setBoxFlexGroup(unsigned group) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, flexGroup, group); } >- void setBoxLines(EBoxLines lines) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, lines, lines); } >+ void setBoxLines(BoxLines lines) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, lines, static_cast<unsigned>(lines)); } > void setBoxOrdinalGroup(unsigned group) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, ordinalGroup, group); } >- void setBoxOrient(EBoxOrient o) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, orient, o); } >- void setBoxPack(EBoxPack p) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, pack, p); } >+ void setBoxOrient(BoxOrient o) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, orient, static_cast<unsigned>(o)); } >+ void setBoxPack(BoxPack p) { SET_NESTED_VAR(m_rareNonInheritedData, deprecatedFlexibleBox, pack, static_cast<unsigned>(p)); } > void setBoxShadow(std::unique_ptr<ShadowData>, bool add = false); > void setBoxReflect(RefPtr<StyleReflection>&&); >- void setBoxSizing(EBoxSizing s) { SET_VAR(m_boxData, m_boxSizing, s); } >+ void setBoxSizing(BoxSizing s) { SET_VAR(m_boxData, m_boxSizing, static_cast<unsigned>(s)); } > void setFlexGrow(float f) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexGrow, f); } > void setFlexShrink(float f) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexShrink, f); } > void setFlexBasis(Length&& length) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexBasis, WTFMove(length)); } >@@ -1062,8 +1062,8 @@ public: > void setAlignItemsPosition(ItemPosition position) { m_rareNonInheritedData.access().alignItems.setPosition(position); } > void setAlignSelf(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonInheritedData, alignSelf, data); } > void setAlignSelfPosition(ItemPosition position) { m_rareNonInheritedData.access().alignSelf.setPosition(position); } >- void setFlexDirection(EFlexDirection direction) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexDirection, direction); } >- void setFlexWrap(EFlexWrap w) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexWrap, w); } >+ void setFlexDirection(FlexDirection direction) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexDirection, static_cast<unsigned>(direction)); } >+ void setFlexWrap(FlexWrap w) { SET_NESTED_VAR(m_rareNonInheritedData, flexibleBox, flexWrap, static_cast<unsigned>(w)); } > void setJustifyContent(const StyleContentAlignmentData& data) { SET_VAR(m_rareNonInheritedData, justifyContent, data); } > void setJustifyContentPosition(ContentPosition position) { m_rareNonInheritedData.access().justifyContent.setPosition(position); } > void setJustifyItems(const StyleSelfAlignmentData& data) { SET_VAR(m_rareNonInheritedData, justifyItems, data); } >@@ -1071,7 +1071,7 @@ public: > void setJustifySelfPosition(ItemPosition position) { m_rareNonInheritedData.access().justifySelf.setPosition(position); } > > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- void setBoxDecorationBreak(EBoxDecorationBreak b) { SET_VAR(m_boxData, m_boxDecorationBreak, b); } >+ void setBoxDecorationBreak(BoxDecorationBreak b) { SET_VAR(m_boxData, m_boxDecorationBreak, static_cast<unsigned>(b)); } > #endif > > void setGridAutoColumns(const Vector<GridTrackSize>& trackSizeList) { SET_NESTED_VAR(m_rareNonInheritedData, grid, gridAutoColumns, trackSizeList); } >@@ -1106,37 +1106,37 @@ public: > void setMarqueeDirection(MarqueeDirection d) { SET_NESTED_VAR(m_rareNonInheritedData, marquee, direction, static_cast<unsigned>(d)); } > void setMarqueeBehavior(MarqueeBehavior b) { SET_NESTED_VAR(m_rareNonInheritedData, marquee, behavior, static_cast<unsigned>(b)); } > void setMarqueeLoopCount(int i) { SET_NESTED_VAR(m_rareNonInheritedData, marquee, loops, i); } >- void setUserModify(EUserModify u) { SET_VAR(m_rareInheritedData, userModify, u); } >- void setUserDrag(EUserDrag d) { SET_VAR(m_rareNonInheritedData, userDrag, d); } >- void setUserSelect(EUserSelect s) { SET_VAR(m_rareInheritedData, userSelect, s); } >- void setTextOverflow(TextOverflow overflow) { SET_VAR(m_rareNonInheritedData, textOverflow, overflow); } >- void setMarginBeforeCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedData, marginBeforeCollapse, c); } >- void setMarginAfterCollapse(EMarginCollapse c) { SET_VAR(m_rareNonInheritedData, marginAfterCollapse, c); } >- void setWordBreak(EWordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, b); } >- void setOverflowWrap(EOverflowWrap b) { SET_VAR(m_rareInheritedData, overflowWrap, b); } >- void setNBSPMode(ENBSPMode b) { SET_VAR(m_rareInheritedData, nbspMode, b); } >- void setLineBreak(LineBreak b) { SET_VAR(m_rareInheritedData, lineBreak, b); } >+ void setUserModify(UserModify u) { SET_VAR(m_rareInheritedData, userModify, static_cast<unsigned>(u)); } >+ void setUserDrag(UserDrag d) { SET_VAR(m_rareNonInheritedData, userDrag, static_cast<unsigned>(d)); } >+ void setUserSelect(UserSelect s) { SET_VAR(m_rareInheritedData, userSelect, static_cast<unsigned>(s)); } >+ void setTextOverflow(TextOverflow overflow) { SET_VAR(m_rareNonInheritedData, textOverflow, static_cast<unsigned>(overflow)); } >+ void setMarginBeforeCollapse(MarginCollapse c) { SET_VAR(m_rareNonInheritedData, marginBeforeCollapse, static_cast<unsigned>(c)); } >+ void setMarginAfterCollapse(MarginCollapse c) { SET_VAR(m_rareNonInheritedData, marginAfterCollapse, static_cast<unsigned>(c)); } >+ void setWordBreak(WordBreak b) { SET_VAR(m_rareInheritedData, wordBreak, static_cast<unsigned>(b)); } >+ void setOverflowWrap(OverflowWrap b) { SET_VAR(m_rareInheritedData, overflowWrap, static_cast<unsigned>(b)); } >+ void setNBSPMode(NBSPMode b) { SET_VAR(m_rareInheritedData, nbspMode, static_cast<unsigned>(b)); } >+ void setLineBreak(LineBreak b) { SET_VAR(m_rareInheritedData, lineBreak, static_cast<unsigned>(b)); } > void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); } > void setHyphenationLimitBefore(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitBefore, limit); } > void setHyphenationLimitAfter(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitAfter, limit); } > void setHyphenationLimitLines(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitLines, limit); } > void setHyphenationString(const AtomicString& h) { SET_VAR(m_rareInheritedData, hyphenationString, h); } > void setBorderFit(EBorderFit b) { SET_VAR(m_rareNonInheritedData, borderFit, b); } >- void setResize(EResize r) { SET_VAR(m_rareNonInheritedData, resize, r); } >+ void setResize(Resize r) { SET_VAR(m_rareNonInheritedData, resize, static_cast<unsigned>(r)); } > void setColumnAxis(ColumnAxis axis) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, axis, axis); } > void setColumnProgression(ColumnProgression progression) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, progression, progression); } > void setColumnWidth(float f) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoWidth, false); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, width, f); } > void setHasAutoColumnWidth() { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoWidth, true); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, width, 0); } > void setColumnCount(unsigned short c) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoCount, false); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, count, c); } > void setHasAutoColumnCount() { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoCount, true); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, count, 0); } >- void setColumnFill(ColumnFill columnFill) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, fill, columnFill); } >+ void setColumnFill(ColumnFill columnFill) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, fill, static_cast<unsigned>(columnFill)); } > void setColumnGap(GapLength&& gapLength) { SET_VAR(m_rareNonInheritedData, columnGap, WTFMove(gapLength)); } > void setRowGap(GapLength&& gapLength) { SET_VAR(m_rareNonInheritedData, rowGap, WTFMove(gapLength)); } > void setColumnRuleColor(const Color& c) { SET_BORDERVALUE_COLOR(m_rareNonInheritedData.access().multiCol, rule, c); } >- void setColumnRuleStyle(EBorderStyle b) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, rule.m_style, b); } >+ void setColumnRuleStyle(BorderStyle b) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, rule.m_style, static_cast<unsigned>(b)); } > void setColumnRuleWidth(unsigned short w) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, rule.m_width, w); } > void resetColumnRule() { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, rule, BorderValue()); } >- void setColumnSpan(ColumnSpan columnSpan) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, columnSpan, columnSpan); } >+ void setColumnSpan(ColumnSpan columnSpan) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, columnSpan, static_cast<unsigned>(columnSpan)); } > void inheritColumnPropertiesFrom(const RenderStyle& parent) { m_rareNonInheritedData.access().multiCol = parent.m_rareNonInheritedData->multiCol; } > > void setTransform(const TransformOperations& ops) { SET_NESTED_VAR(m_rareNonInheritedData, transform, operations, ops); } >@@ -1146,7 +1146,7 @@ public: > void setTransformBox(TransformBox box) { SET_NESTED_VAR(m_rareNonInheritedData, transform, transformBox, box); } > > void setSpeakAs(ESpeakAs s) { SET_VAR(m_rareInheritedData, speakAs, s); } >- void setTextCombine(TextCombine v) { SET_VAR(m_rareNonInheritedData, textCombine, v); } >+ void setTextCombine(TextCombine v) { SET_VAR(m_rareNonInheritedData, textCombine, static_cast<unsigned>(v)); } > void setTextDecorationColor(const Color& c) { SET_VAR(m_rareNonInheritedData, textDecorationColor, c); } > void setTextEmphasisColor(const Color& c) { SET_VAR(m_rareInheritedData, textEmphasisColor, c); } > void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(m_rareInheritedData, textEmphasisFill, fill); } >@@ -1155,7 +1155,7 @@ public: > void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(m_rareInheritedData, textEmphasisPosition, position); } > bool setTextOrientation(TextOrientation); > >- void setObjectFit(ObjectFit fit) { SET_VAR(m_rareNonInheritedData, objectFit, fit); } >+ void setObjectFit(ObjectFit fit) { SET_VAR(m_rareNonInheritedData, objectFit, static_cast<unsigned>(fit)); } > void setObjectPosition(LengthPoint&& position) { SET_VAR(m_rareNonInheritedData, objectPosition, WTFMove(position)); } > > void setRubyPosition(RubyPosition position) { SET_VAR(m_rareInheritedData, rubyPosition, position); } >@@ -1189,8 +1189,8 @@ public: > void adjustAnimations(); > void adjustTransitions(); > >- void setTransformStyle3D(ETransformStyle3D b) { SET_VAR(m_rareNonInheritedData, transformStyle3D, b); } >- void setBackfaceVisibility(EBackfaceVisibility b) { SET_VAR(m_rareNonInheritedData, backfaceVisibility, b); } >+ void setTransformStyle3D(TransformStyle3D b) { SET_VAR(m_rareNonInheritedData, transformStyle3D, static_cast<unsigned>(b)); } >+ void setBackfaceVisibility(BackfaceVisibility b) { SET_VAR(m_rareNonInheritedData, backfaceVisibility, static_cast<unsigned>(b)); } > void setPerspective(float p) { SET_VAR(m_rareNonInheritedData, perspective, p); } > void setPerspectiveOriginX(Length&& length) { SET_VAR(m_rareNonInheritedData, perspectiveOriginX, WTFMove(length)); } > void setPerspectiveOriginY(Length&& length) { SET_VAR(m_rareNonInheritedData, perspectiveOriginY, WTFMove(length)); } >@@ -1238,7 +1238,7 @@ public: > void setTextSizeAdjust(TextSizeAdjustment adjustment) { SET_VAR(m_rareInheritedData, textSizeAdjust, adjustment); } > #endif > >- void setTextSecurity(ETextSecurity security) { SET_VAR(m_rareInheritedData, textSecurity, security); } >+ void setTextSecurity(TextSecurity security) { SET_VAR(m_rareInheritedData, textSecurity, static_cast<unsigned>(security)); } > > #if ENABLE(CSS_TRAILING_WORD) > void setTrailingWord(TrailingWord v) { SET_VAR(m_rareInheritedData, trailingWord, static_cast<unsigned>(v)); } >@@ -1386,7 +1386,7 @@ public: > bool equalForTextAutosizing(const RenderStyle&) const; > #endif > >- StyleDifference diff(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >+ StyleDifference diff(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; > bool diffRequiresLayerRepaint(const RenderStyle&, bool isComposited) const; > > bool isDisplayInlineType() const { return isDisplayInlineType(display()); } >@@ -1424,21 +1424,21 @@ public: > bool hasExplicitlyInheritedProperties() const { return m_nonInheritedFlags.hasExplicitlyInheritedProperties; } > > // Initial values for all the properties >- static EOverflow initialOverflowX() { return OVISIBLE; } >- static EOverflow initialOverflowY() { return OVISIBLE; } >- static EClear initialClear() { return CNONE; } >+ static Overflow initialOverflowX() { return Overflow::Visible; } >+ static Overflow initialOverflowY() { return Overflow::Visible; } >+ static Clear initialClear() { return Clear::None; } > static EDisplay initialDisplay() { return INLINE; } > static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } >- static EPosition initialPosition() { return StaticPosition; } >- static EVerticalAlign initialVerticalAlign() { return BASELINE; } >- static EFloat initialFloating() { return NoFloat; } >+ static PositionType initialPosition() { return PositionType::Static; } >+ static VerticalAlign initialVerticalAlign() { return VerticalAlign::Baseline; } >+ static Float initialFloating() { return Float::No; } > static BreakBetween initialBreakBetween() { return AutoBreakBetween; } > static BreakInside initialBreakInside() { return AutoBreakInside; } > static HangingPunctuation initialHangingPunctuation() { return NoHangingPunctuation; } >- static ETableLayout initialTableLayout() { return TAUTO; } >- static EBorderCollapse initialBorderCollapse() { return BSEPARATE; } >- static EBorderStyle initialBorderStyle() { return BNONE; } >- static OutlineIsAuto initialOutlineStyleIsAuto() { return AUTO_OFF; } >+ static TableLayoutType initialTableLayout() { return TableLayoutType::Auto; } >+ static BorderCollapse initialBorderCollapse() { return BorderCollapse::Separate; } >+ static BorderStyle initialBorderStyle() { return BorderStyle::None; } >+ static OutlineIsAuto initialOutlineStyleIsAuto() { return OutlineIsAuto::Off; } > static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } > static LengthSize initialBorderRadius() { return { { 0, Fixed }, { 0, Fixed } }; } > static ECaptionSide initialCaptionSide() { return CAPTOP; } >@@ -1446,9 +1446,9 @@ public: > static ColumnProgression initialColumnProgression() { return NormalColumnProgression; } > static TextDirection initialDirection() { return LTR; } > static WritingMode initialWritingMode() { return TopToBottomWritingMode; } >- static TextCombine initialTextCombine() { return TextCombineNone; } >+ static TextCombine initialTextCombine() { return TextCombine::None; } > static TextOrientation initialTextOrientation() { return TextOrientation::Mixed; } >- static ObjectFit initialObjectFit() { return ObjectFitFill; } >+ static ObjectFit initialObjectFit() { return ObjectFit::Fill; } > static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0f, Percent), Length(50.0f, Percent)); } > static EEmptyCell initialEmptyCells() { return SHOW; } > static EListStylePosition initialListStylePosition() { return OUTSIDE; } >@@ -1487,42 +1487,42 @@ public: > static TextZoom initialTextZoom() { return TextZoomNormal; } > static float initialOutlineOffset() { return 0; } > static float initialOpacity() { return 1.0f; } >- static EBoxAlignment initialBoxAlign() { return BSTRETCH; } >- static EBoxDecorationBreak initialBoxDecorationBreak() { return DSLICE; } >- static EBoxDirection initialBoxDirection() { return BNORMAL; } >- static EBoxLines initialBoxLines() { return SINGLE; } >- static EBoxOrient initialBoxOrient() { return HORIZONTAL; } >- static EBoxPack initialBoxPack() { return Start; } >+ static BoxAlignment initialBoxAlign() { return BoxAlignment::Stretch; } >+ static BoxDecorationBreak initialBoxDecorationBreak() { return BoxDecorationBreak::Slice; } >+ static BoxDirection initialBoxDirection() { return BoxDirection::Normal; } >+ static BoxLines initialBoxLines() { return BoxLines::Single; } >+ static BoxOrient initialBoxOrient() { return BoxOrient::Horizontal; } >+ static BoxPack initialBoxPack() { return BoxPack::Start; } > static float initialBoxFlex() { return 0.0f; } > static unsigned initialBoxFlexGroup() { return 1; } > static unsigned initialBoxOrdinalGroup() { return 1; } >- static EBoxSizing initialBoxSizing() { return CONTENT_BOX; } >+ static BoxSizing initialBoxSizing() { return BoxSizing::ContentBox; } > static StyleReflection* initialBoxReflect() { return 0; } > static float initialFlexGrow() { return 0; } > static float initialFlexShrink() { return 1; } > static Length initialFlexBasis() { return Length(Auto); } > static int initialOrder() { return 0; } >- static StyleSelfAlignmentData initialJustifyItems() { return StyleSelfAlignmentData(ItemPositionLegacy, OverflowAlignmentDefault); } >- static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); } >- static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(ItemPositionNormal, OverflowAlignmentDefault); } >- static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAlignmentDefault); } >- static EFlexDirection initialFlexDirection() { return FlowRow; } >- static EFlexWrap initialFlexWrap() { return FlexNoWrap; } >+ static StyleSelfAlignmentData initialJustifyItems() { return StyleSelfAlignmentData(ItemPosition::Legacy, OverflowAlignment::Default); } >+ static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPosition::Auto, OverflowAlignment::Default); } >+ static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(ItemPosition::Normal, OverflowAlignment::Default); } >+ static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPosition::Normal, ContentDistribution::Default, OverflowAlignment::Default); } >+ static FlexDirection initialFlexDirection() { return FlexDirection::Row; } >+ static FlexWrap initialFlexWrap() { return FlexWrap::NoWrap; } > static int initialMarqueeLoopCount() { return -1; } > static int initialMarqueeSpeed() { return 85; } > static Length initialMarqueeIncrement() { return Length(6, Fixed); } > static MarqueeBehavior initialMarqueeBehavior() { return MarqueeBehavior::Scroll; } > static MarqueeDirection initialMarqueeDirection() { return MarqueeDirection::Auto; } >- static EUserModify initialUserModify() { return READ_ONLY; } >- static EUserDrag initialUserDrag() { return DRAG_AUTO; } >- static EUserSelect initialUserSelect() { return SELECT_TEXT; } >- static TextOverflow initialTextOverflow() { return TextOverflowClip; } >- static EMarginCollapse initialMarginBeforeCollapse() { return MCOLLAPSE; } >- static EMarginCollapse initialMarginAfterCollapse() { return MCOLLAPSE; } >- static EWordBreak initialWordBreak() { return NormalWordBreak; } >- static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; } >- static ENBSPMode initialNBSPMode() { return NBNORMAL; } >- static LineBreak initialLineBreak() { return LineBreakAuto; } >+ static UserModify initialUserModify() { return UserModify::ReadOnly; } >+ static UserDrag initialUserDrag() { return UserDrag::Auto; } >+ static UserSelect initialUserSelect() { return UserSelect::Text; } >+ static TextOverflow initialTextOverflow() { return TextOverflow::Clip; } >+ static MarginCollapse initialMarginBeforeCollapse() { return MarginCollapse::Collapse; } >+ static MarginCollapse initialMarginAfterCollapse() { return MarginCollapse::Collapse; } >+ static WordBreak initialWordBreak() { return WordBreak::Normal; } >+ static OverflowWrap initialOverflowWrap() { return OverflowWrap::Normal; } >+ static NBSPMode initialNBSPMode() { return NBSPMode::Normal; } >+ static LineBreak initialLineBreak() { return LineBreak::Auto; } > static ESpeakAs initialSpeakAs() { return SpeakNormal; } > static Hyphens initialHyphens() { return HyphensManual; } > static short initialHyphenationLimitBefore() { return -1; } >@@ -1530,16 +1530,16 @@ public: > static short initialHyphenationLimitLines() { return -1; } > static const AtomicString& initialHyphenationString() { return nullAtom(); } > static EBorderFit initialBorderFit() { return BorderFitBorder; } >- static EResize initialResize() { return RESIZE_NONE; } >+ static Resize initialResize() { return Resize::None; } > static ControlPart initialAppearance() { return NoControlPart; } >- static AspectRatioType initialAspectRatioType() { return AspectRatioAuto; } >+ static AspectRatioType initialAspectRatioType() { return AspectRatioType::Auto; } > static float initialAspectRatioDenominator() { return 1; } > static float initialAspectRatioNumerator() { return 1; } > static Order initialRTLOrdering() { return LogicalOrder; } > static float initialTextStrokeWidth() { return 0; } > static unsigned short initialColumnCount() { return 1; } >- static ColumnFill initialColumnFill() { return ColumnFillBalance; } >- static ColumnSpan initialColumnSpan() { return ColumnSpanNone; } >+ static ColumnFill initialColumnFill() { return ColumnFill::Balance; } >+ static ColumnSpan initialColumnSpan() { return ColumnSpan::None; } > static GapLength initialColumnGap() { return GapLength(); } > static GapLength initialRowGap() { return GapLength(); } > static const TransformOperations& initialTransform() { static NeverDestroyed<TransformOperations> ops; return ops; } >@@ -1548,8 +1548,8 @@ public: > static TransformBox initialTransformBox() { return TransformBox::BorderBox; } > static EPointerEvents initialPointerEvents() { return PE_AUTO; } > static float initialTransformOriginZ() { return 0; } >- static ETransformStyle3D initialTransformStyle3D() { return TransformStyle3DFlat; } >- static EBackfaceVisibility initialBackfaceVisibility() { return BackfaceVisibilityVisible; } >+ static TransformStyle3D initialTransformStyle3D() { return TransformStyle3D::Flat; } >+ static BackfaceVisibility initialBackfaceVisibility() { return BackfaceVisibility::Visible; } > static float initialPerspective() { return 0; } > static Length initialPerspectiveOriginX() { return Length(50.0f, Percent); } > static Length initialPerspectiveOriginY() { return Length(50.0f, Percent); } >@@ -1562,19 +1562,19 @@ public: > static RubyPosition initialRubyPosition() { return RubyPositionBefore; } > static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; } > static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; } >- static EImageRendering initialImageRendering() { return ImageRenderingAuto; } >+ static ImageRendering initialImageRendering() { return ImageRendering::Auto; } > static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; } > static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionNoSnap; } > static float initialImageResolution() { return 1; } > static StyleImage* initialBorderImageSource() { return nullptr; } > static StyleImage* initialMaskBoxImageSource() { return nullptr; } >- static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; } >+ static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjust::Economy; } > static QuotesData* initialQuotes() { return nullptr; } > static const AtomicString& initialContentAltText() { return emptyAtom(); } > > #if ENABLE(CSS3_TEXT) >- static TextIndentLine initialTextIndentLine() { return TextIndentFirstLine; } >- static TextIndentType initialTextIndentType() { return TextIndentNormal; } >+ static TextIndentLine initialTextIndentLine() { return TextIndentLine::FirstLine; } >+ static TextIndentType initialTextIndentType() { return TextIndentType::Normal; } > static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } > static TextJustify initialTextJustify() { return TextJustifyAuto; } > #endif >@@ -1647,7 +1647,7 @@ public: > static IntSize initialInitialLetter() { return IntSize(); } > static LineClampValue initialLineClamp() { return LineClampValue(); } > static LinesClampValue initialLinesClamp() { return LinesClampValue(); } >- static ETextSecurity initialTextSecurity() { return TSNONE; } >+ static TextSecurity initialTextSecurity() { return TextSecurity::None; } > > #if PLATFORM(IOS) > static bool initialTouchCalloutEnabled() { return true; } >@@ -1675,7 +1675,7 @@ public: > > #if ENABLE(CSS_COMPOSITING) > static BlendMode initialBlendMode() { return BlendModeNormal; } >- static Isolation initialIsolation() { return IsolationAuto; } >+ static Isolation initialIsolation() { return Isolation::Auto; } > #endif > > // Indicates the style is likely to change due to a pending stylesheet load. >@@ -1749,14 +1749,14 @@ private: > > unsigned effectiveDisplay : 5; // EDisplay > unsigned originalDisplay : 5; // EDisplay >- unsigned overflowX : 3; // EOverflow >- unsigned overflowY : 3; // EOverflow >- unsigned verticalAlign : 4; // EVerticalAlign >- unsigned clear : 2; // EClear >- unsigned position : 3; // EPosition >+ unsigned overflowX : 3; // Overflow >+ unsigned overflowY : 3; // Overflow >+ unsigned verticalAlign : 4; // VerticalAlign >+ unsigned clear : 2; // Clear >+ unsigned position : 3; // PositionType > unsigned unicodeBidi : 3; // EUnicodeBidi >- unsigned floating : 2; // EFloat >- unsigned tableLayout : 1; // ETableLayout >+ unsigned floating : 2; // Float >+ unsigned tableLayout : 1; // TableLayoutType > > unsigned hasExplicitlySetDirection : 1; > unsigned hasExplicitlySetWritingMode : 1; >@@ -1797,12 +1797,12 @@ private: > unsigned direction : 1; // TextDirection > unsigned whiteSpace : 3; // EWhiteSpace > // 35 bits >- unsigned borderCollapse : 1; // EBorderCollapse >- unsigned boxDirection : 1; // EBoxDirection (CSS3 box_direction property, flexible box layout module) >+ unsigned borderCollapse : 1; // BorderCollapse >+ unsigned boxDirection : 1; // BoxDirection > > // non CSS2 inherited > unsigned rtlOrdering : 1; // Order >- unsigned printColorAdjust : PrintColorAdjustBits; >+ unsigned printColorAdjust : PrintColorAdjustBits; // PrintColorAdjust > unsigned pointerEvents : 4; // EPointerEvents > unsigned insideLink : 2; // EInsideLink > unsigned insideDefaultButton : 1; >@@ -1834,12 +1834,12 @@ private: > Color colorIncludingFallback(CSSPropertyID colorProperty, bool visitedLink) const; > > bool changeAffectsVisualOverflow(const RenderStyle&) const; >- bool changeRequiresLayout(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >- bool changeRequiresPositionedLayoutOnly(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >- bool changeRequiresLayerRepaint(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >- bool changeRequiresRepaint(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >- bool changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >- bool changeRequiresRecompositeLayer(const RenderStyle&, unsigned& changedContextSensitiveProperties) const; >+ bool changeRequiresLayout(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; >+ bool changeRequiresPositionedLayoutOnly(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; >+ bool changeRequiresLayerRepaint(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; >+ bool changeRequiresRepaint(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; >+ bool changeRequiresRepaintIfTextOrBorderOrOutline(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; >+ bool changeRequiresRecompositeLayer(const RenderStyle&, OptionSet<StyleDifferenceContextSensitiveProperty>& changedContextSensitiveProperties) const; > > // non-inherited attributes > DataRef<StyleBoxData> m_boxData; >@@ -1868,7 +1868,7 @@ int adjustForAbsoluteZoom(int, const Ren > float adjustFloatForAbsoluteZoom(float, const RenderStyle&); > LayoutUnit adjustLayoutUnitForAbsoluteZoom(LayoutUnit, const RenderStyle&); > >-EBorderStyle collapsedBorderStyle(EBorderStyle); >+BorderStyle collapsedBorderStyle(BorderStyle); > > bool pseudoElementRendererIsNeeded(const RenderStyle*); > >@@ -1991,12 +1991,12 @@ inline LayoutUnit adjustLayoutUnitForAbs > return value / style.effectiveZoom(); > } > >-inline EBorderStyle collapsedBorderStyle(EBorderStyle style) >+inline BorderStyle collapsedBorderStyle(BorderStyle style) > { >- if (style == OUTSET) >- return GROOVE; >- if (style == INSET) >- return RIDGE; >+ if (style == BorderStyle::Outset) >+ return BorderStyle::Groove; >+ if (style == BorderStyle::Inset) >+ return BorderStyle::Ridge; > return style; > } > >@@ -2038,12 +2038,12 @@ inline bool RenderStyle::isCollapsibleWh > > inline bool RenderStyle::breakOnlyAfterWhiteSpace() const > { >- return whiteSpace() == PRE_WRAP || lineBreak() == LineBreakAfterWhiteSpace; >+ return whiteSpace() == PRE_WRAP || lineBreak() == LineBreak::AfterWhiteSpace; > } > > inline bool RenderStyle::breakWords() const > { >- return wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowWrap; >+ return wordBreak() == WordBreak::Break || overflowWrap() == OverflowWrap::Break; > } > > inline bool RenderStyle::hasInlineColumnAxis() const >@@ -2112,7 +2112,7 @@ inline bool RenderStyle::setEffectiveZoo > > inline bool RenderStyle::setTextOrientation(TextOrientation textOrientation) > { >- if (compareEqual(m_rareInheritedData->textOrientation, static_cast<unsigned>(textOrientation))) >+ if (compareEqual(static_cast<TextOrientation>(m_rareInheritedData->textOrientation), textOrientation)) > return false; > m_rareInheritedData.access().textOrientation = static_cast<unsigned>(textOrientation); > return true; >Index: Source/WebCore/rendering/style/RenderStyleConstants.cpp >=================================================================== >--- Source/WebCore/rendering/style/RenderStyleConstants.cpp (revision 232008) >+++ Source/WebCore/rendering/style/RenderStyleConstants.cpp (working copy) >@@ -30,56 +30,69 @@ > > namespace WebCore { > >-TextStream& operator<<(TextStream& ts, EFillSizeType sizeType) >+TextStream& operator<<(TextStream& ts, ImageRendering imageRendering) >+{ >+ switch (imageRendering) { >+ case ImageRendering::Auto: ts << "auto"; break; >+ case ImageRendering::OptimizeSpeed: ts << "optimizeSpeed"; break; >+ case ImageRendering::OptimizeQuality: ts << "optimizeQuality"; break; >+ case ImageRendering::CrispEdges: ts << "crispEdges"; break; >+ case ImageRendering::Pixelated: ts << "pixelated"; break; >+ } >+ >+ return ts; >+} >+ >+TextStream& operator<<(TextStream& ts, FillSizeType sizeType) > { > switch (sizeType) { >- case Contain: ts << "contain"; break; >- case Cover: ts << "cover"; break; >- case SizeLength: ts << "size-length"; break; >- case SizeNone: ts << "size-none"; break; >+ case FillSizeType::Contain: ts << "contain"; break; >+ case FillSizeType::Cover: ts << "cover"; break; >+ case FillSizeType::Size: ts << "size-length"; break; >+ case FillSizeType::None: ts << "size-none"; break; > } > > return ts; > } > >-TextStream& operator<<(TextStream& ts, EFillAttachment attachment) >+TextStream& operator<<(TextStream& ts, FillAttachment attachment) > { > switch (attachment) { >- case ScrollBackgroundAttachment: ts << "scroll"; break; >- case LocalBackgroundAttachment: ts << "local"; break; >- case FixedBackgroundAttachment: ts << "fixed"; break; >+ case FillAttachment::ScrollBackground: ts << "scroll"; break; >+ case FillAttachment::LocalBackground: ts << "local"; break; >+ case FillAttachment::FixedBackground: ts << "fixed"; break; > } > return ts; > } > >-TextStream& operator<<(TextStream& ts, EFillBox fill) >+TextStream& operator<<(TextStream& ts, FillBox fill) > { > switch (fill) { >- case BorderFillBox: ts << "border"; break; >- case PaddingFillBox: ts << "padding"; break; >- case ContentFillBox: ts << "content"; break; >- case TextFillBox: ts << "text"; break; >+ case FillBox::Border: ts << "border"; break; >+ case FillBox::Padding: ts << "padding"; break; >+ case FillBox::Content: ts << "content"; break; >+ case FillBox::Text: ts << "text"; break; > } > return ts; > } > >-TextStream& operator<<(TextStream& ts, EFillRepeat repeat) >+TextStream& operator<<(TextStream& ts, FillRepeat repeat) > { > switch (repeat) { >- case RepeatFill: ts << "repeat"; break; >- case NoRepeatFill: ts << "no-repeat"; break; >- case RoundFill: ts << "round"; break; >- case SpaceFill: ts << "space"; break; >+ case FillRepeat::Repeat: ts << "repeat"; break; >+ case FillRepeat::NoRepeat: ts << "no-repeat"; break; >+ case FillRepeat::Round: ts << "round"; break; >+ case FillRepeat::Space: ts << "space"; break; > } > > return ts; > } > >-TextStream& operator<<(TextStream& ts, EMaskSourceType maskSource) >+TextStream& operator<<(TextStream& ts, MaskSourceType maskSource) > { > switch (maskSource) { >- case MaskAlpha: ts << "alpha"; break; >- case MaskLuminance: ts << "luminance"; break; >+ case MaskSourceType::Alpha: ts << "alpha"; break; >+ case MaskSourceType::Luminance: ts << "luminance"; break; > } > > return ts; >Index: Source/WebCore/rendering/style/RenderStyleConstants.h >=================================================================== >--- Source/WebCore/rendering/style/RenderStyleConstants.h (revision 232008) >+++ Source/WebCore/rendering/style/RenderStyleConstants.h (working copy) >@@ -34,55 +34,70 @@ class TextStream; > namespace WebCore { > > static const size_t PrintColorAdjustBits = 1; >-enum PrintColorAdjust { >- PrintColorAdjustEconomy, >- PrintColorAdjustExact >+enum class PrintColorAdjust { >+ Economy, >+ Exact > }; > > // The difference between two styles. The following values are used: >-// - StyleDifferenceEqual - The two styles are identical >-// - StyleDifferenceRecompositeLayer - The layer needs its position and transform updated, but no repaint >-// - StyleDifferenceRepaint - The object just needs to be repainted. >-// - StyleDifferenceRepaintIfTextOrBorderOrOutline - The object needs to be repainted if it contains text or a border or outline. >-// - StyleDifferenceRepaintLayer - The layer and its descendant layers needs to be repainted. >-// - StyleDifferenceLayoutPositionedMovementOnly - Only the position of this positioned object has been updated >-// - StyleDifferenceSimplifiedLayout - Only overflow needs to be recomputed >-// - StyleDifferenceSimplifiedLayoutAndPositionedMovement - Both positioned movement and simplified layout updates are required. >-// - StyleDifferenceLayout - A full layout is required. >-enum StyleDifference { >- StyleDifferenceEqual, >- StyleDifferenceRecompositeLayer, >- StyleDifferenceRepaint, >- StyleDifferenceRepaintIfTextOrBorderOrOutline, >- StyleDifferenceRepaintLayer, >- StyleDifferenceLayoutPositionedMovementOnly, >- StyleDifferenceSimplifiedLayout, >- StyleDifferenceSimplifiedLayoutAndPositionedMovement, >- StyleDifferenceLayout, >- StyleDifferenceNewStyle >+// - StyleDifference::Equal - The two styles are identical >+// - StyleDifference::RecompositeLayer - The layer needs its position and transform updated, but no repaint >+// - StyleDifference::Repaint - The object just needs to be repainted. >+// - StyleDifference::RepaintIfTextOrBorderOrOutline - The object needs to be repainted if it contains text or a border or outline. >+// - StyleDifference::RepaintLayer - The layer and its descendant layers needs to be repainted. >+// - StyleDifference::LayoutPositionedMovementOnly - Only the position of this positioned object has been updated >+// - StyleDifference::SimplifiedLayout - Only overflow needs to be recomputed >+// - StyleDifference::SimplifiedLayoutAndPositionedMovement - Both positioned movement and simplified layout updates are required. >+// - StyleDifference::Layout - A full layout is required. >+enum class StyleDifference { >+ Equal, >+ RecompositeLayer, >+ Repaint, >+ RepaintIfTextOrBorderOrOutline, >+ RepaintLayer, >+ LayoutPositionedMovementOnly, >+ SimplifiedLayout, >+ SimplifiedLayoutAndPositionedMovement, >+ Layout, >+ NewStyle > }; > > // When some style properties change, different amounts of work have to be done depending on > // context (e.g. whether the property is changing on an element which has a compositing layer). > // A simple StyleDifference does not provide enough information so we return a bit mask of > // StyleDifferenceContextSensitiveProperties from RenderStyle::diff() too. >-enum StyleDifferenceContextSensitiveProperty { >- ContextSensitivePropertyNone = 0, >- ContextSensitivePropertyTransform = 1 << 0, >- ContextSensitivePropertyOpacity = 1 << 1, >- ContextSensitivePropertyFilter = 1 << 2, >- ContextSensitivePropertyClipRect = 1 << 3, >- ContextSensitivePropertyClipPath = 1 << 4, >- ContextSensitivePropertyWillChange = 1 << 5, >+enum class StyleDifferenceContextSensitiveProperty { >+ None = 0, >+ Transform = 1 << 0, >+ Opacity = 1 << 1, >+ Filter = 1 << 2, >+ ClipRect = 1 << 3, >+ ClipPath = 1 << 4, >+ WillChange = 1 << 5, > }; > > // Static pseudo styles. Dynamic ones are produced on the fly. > enum PseudoId : unsigned char { > // The order must be NOP ID, public IDs, and then internal IDs. >- NOPSEUDO, FIRST_LINE, FIRST_LETTER, MARKER, BEFORE, AFTER, SELECTION, SCROLLBAR, >+ NOPSEUDO, >+ FIRST_LINE, >+ FIRST_LETTER, >+ MARKER, >+ BEFORE, >+ AFTER, >+ SELECTION, >+ SCROLLBAR, >+ > // Internal IDs follow: >- SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER, >+ SCROLLBAR_THUMB, >+ SCROLLBAR_BUTTON, >+ SCROLLBAR_TRACK, >+ SCROLLBAR_TRACK_PIECE, >+ SCROLLBAR_CORNER, >+ RESIZER, >+ > AFTER_LAST_INTERNAL_PSEUDOID, >+ > FIRST_PUBLIC_PSEUDOID = FIRST_LINE, > FIRST_INTERNAL_PSEUDOID = SCROLLBAR_THUMB, > PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1) >@@ -152,95 +167,183 @@ private: > unsigned m_data; > }; > >-enum ColumnFill { ColumnFillBalance, ColumnFillAuto }; >+enum class ColumnFill { >+ Balance, >+ Auto >+}; > >-enum ColumnSpan { ColumnSpanNone = 0, ColumnSpanAll }; >+enum class ColumnSpan { >+ None = 0, >+ All >+}; > >-enum EBorderCollapse { BSEPARATE = 0, BCOLLAPSE = 1 }; >+enum class BorderCollapse { >+ Separate = 0, >+ Collapse >+}; > > // These have been defined in the order of their precedence for border-collapsing. Do > // not change this order! This order also must match the order in CSSValueKeywords.in. >-enum EBorderStyle { BNONE, BHIDDEN, INSET, GROOVE, OUTSET, RIDGE, DOTTED, DASHED, SOLID, DOUBLE }; >- >-enum EBorderPrecedence { BOFF, BTABLE, BCOLGROUP, BCOL, BROWGROUP, BROW, BCELL }; >- >-enum OutlineIsAuto { AUTO_OFF = 0, AUTO_ON }; >- >-enum EPosition { >- StaticPosition = 0, >- RelativePosition = 1, >- AbsolutePosition = 2, >- StickyPosition = 3, >+enum class BorderStyle { >+ None, >+ Hidden, >+ Inset, >+ Groove, >+ Outset, >+ Ridge, >+ Dotted, >+ Dashed, >+ Solid, >+ Double >+}; >+ >+enum class BorderPrecedence { >+ Off, >+ Table, >+ ColumnGroup, >+ Column, >+ RowGroup, >+ Row, >+ Cell >+}; >+ >+enum class OutlineIsAuto { >+ Off = 0, >+ On >+}; >+ >+enum class PositionType { >+ Static = 0, >+ Relative = 1, >+ Absolute = 2, >+ Sticky = 3, > // This value is required to pack our bits efficiently in RenderObject. >- FixedPosition = 6 >+ Fixed = 6 > }; > >-enum EFloat { >- NoFloat, LeftFloat, RightFloat >+enum class Float { >+ No, >+ Left, >+ Right > }; > >-enum EMarginCollapse { MCOLLAPSE, MSEPARATE, MDISCARD }; >+enum class MarginCollapse { >+ Collapse, >+ Separate, >+ Discard >+}; > > // Box decoration attributes. Not inherited. > >-enum EBoxDecorationBreak { DSLICE, DCLONE }; >+enum class BoxDecorationBreak { >+ Slice, >+ Clone >+}; > > // Box attributes. Not inherited. > >-enum EBoxSizing { CONTENT_BOX, BORDER_BOX }; >- >-// Random visual rendering model attributes. Not inherited. >- >-enum EOverflow { >- OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OOVERLAY, OPAGEDX, OPAGEDY >+enum class BoxSizing { >+ ContentBox, >+ BorderBox > }; > >-enum EVerticalAlign { >- BASELINE, MIDDLE, SUB, SUPER, TEXT_TOP, >- TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH >-}; >+// Random visual rendering model attributes. Not inherited. > >-enum EClear { >- CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3 >+enum class Overflow { >+ Visible, >+ Hidden, >+ Scroll, >+ Auto, >+ Overlay, >+ PagedX, >+ PagedY >+}; >+ >+enum class VerticalAlign { >+ Baseline, >+ Middle, >+ Sub, >+ Super, >+ TextTop, >+ TextBottom, >+ Top, >+ Bottom, >+ BaselineMiddle, >+ Length >+}; >+ >+enum class Clear { >+ None = 0, >+ Left = 1, >+ Right = 2, >+ Both = 3 > }; > >-enum ETableLayout { >- TAUTO, TFIXED >+enum class TableLayoutType { >+ Auto, >+ Fixed > }; > >-enum TextCombine { >- TextCombineNone, TextCombineHorizontal >+enum class TextCombine { >+ None, >+ Horizontal > }; > >-enum EFillAttachment { >- ScrollBackgroundAttachment, LocalBackgroundAttachment, FixedBackgroundAttachment >+enum class FillAttachment { >+ ScrollBackground, >+ LocalBackground, >+ FixedBackground > }; > >-enum EFillBox { >- BorderFillBox, PaddingFillBox, ContentFillBox, TextFillBox >+enum class FillBox { >+ Border, >+ Padding, >+ Content, >+ Text > }; > >-enum EFillRepeat { >- RepeatFill, NoRepeatFill, RoundFill, SpaceFill >+enum class FillRepeat { >+ Repeat, >+ NoRepeat, >+ Round, >+ Space > }; > >-enum EFillLayerType { >- BackgroundFillLayer, MaskFillLayer >+enum class FillLayerType { >+ Background, >+ Mask > }; > > // CSS3 Background Values >-enum EFillSizeType { Contain, Cover, SizeLength, SizeNone }; >+enum class FillSizeType { >+ Contain, >+ Cover, >+ Size, >+ None >+}; > > // CSS3 <position> >-enum class Edge { Top, Right, Bottom, Left }; >+enum class Edge { >+ Top, >+ Right, >+ Bottom, >+ Left >+}; > > // CSS3 Mask Source Types >-enum EMaskSourceType { MaskAlpha, MaskLuminance }; >+ >+enum class MaskSourceType { >+ Alpha, >+ Luminance >+}; > > // CSS3 Marquee Properties > > enum class MarqueeBehavior { >- None, Scroll, Slide, Alternate >+ None, >+ Scroll, >+ Slide, >+ Alternate > }; > > enum class MarqueeDirection { >@@ -255,72 +358,188 @@ enum class MarqueeDirection { > > // Deprecated Flexible Box Properties > >-enum EBoxPack { Start, Center, End, Justify }; >-enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BBASELINE }; >-enum EBoxOrient { HORIZONTAL, VERTICAL }; >-enum EBoxLines { SINGLE, MULTIPLE }; >-enum EBoxDirection { BNORMAL, BREVERSE }; >+enum class BoxPack { >+ Start, >+ Center, >+ End, >+ Justify >+}; >+ >+enum class BoxAlignment { >+ Stretch, >+ Start, >+ Center, >+ End, >+ Baseline >+}; >+ >+enum class BoxOrient { >+ Horizontal, >+ Vertical >+}; >+ >+enum class BoxLines { >+ Single, >+ Multiple >+}; >+ >+enum class BoxDirection { >+ Normal, >+ Reverse >+}; > > // CSS3 Flexbox Properties > >-enum EAlignContent { AlignContentFlexStart, AlignContentFlexEnd, AlignContentCenter, AlignContentSpaceBetween, AlignContentSpaceAround, AlignContentStretch }; >-enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse }; >-enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse }; >-enum ItemPosition { ItemPositionLegacy, ItemPositionAuto, ItemPositionNormal, ItemPositionStretch, ItemPositionBaseline, ItemPositionLastBaseline, ItemPositionCenter, ItemPositionStart, ItemPositionEnd, ItemPositionSelfStart, ItemPositionSelfEnd, ItemPositionFlexStart, ItemPositionFlexEnd, ItemPositionLeft, ItemPositionRight }; >-enum OverflowAlignment { OverflowAlignmentDefault, OverflowAlignmentUnsafe, OverflowAlignmentSafe }; >-enum ItemPositionType { NonLegacyPosition, LegacyPosition }; >-enum ContentPosition { ContentPositionNormal, ContentPositionBaseline, ContentPositionLastBaseline, ContentPositionCenter, ContentPositionStart, ContentPositionEnd, ContentPositionFlexStart, ContentPositionFlexEnd, ContentPositionLeft, ContentPositionRight }; >-enum ContentDistributionType { ContentDistributionDefault, ContentDistributionSpaceBetween, ContentDistributionSpaceAround, ContentDistributionSpaceEvenly, ContentDistributionStretch }; >+enum class AlignContent { >+ FlexStart, >+ FlexEnd, >+ Center, >+ SpaceBetween, >+ SpaceAround, >+ Stretch >+}; >+ >+enum class FlexDirection { >+ Row, >+ RowReverse, >+ Column, >+ ColumnReverse >+}; >+ >+enum class FlexWrap { >+ NoWrap, >+ Wrap, >+ Reverse >+}; >+ >+enum class ItemPosition { >+ Legacy, >+ Auto, >+ Normal, >+ Stretch, >+ Baseline, >+ LastBaseline, >+ Center, >+ Start, >+ End, >+ SelfStart, >+ SelfEnd, >+ FlexStart, >+ FlexEnd, >+ Left, >+ Right >+}; >+ >+enum class OverflowAlignment { >+ Default, >+ Unsafe, >+ Safe >+}; >+ >+enum class ItemPositionType { >+ NonLegacy, >+ Legacy >+}; >+ >+enum class ContentPosition { >+ Normal, >+ Baseline, >+ LastBaseline, >+ Center, >+ Start, >+ End, >+ FlexStart, >+ FlexEnd, >+ Left, >+ Right >+}; >+ >+enum class ContentDistribution { >+ Default, >+ SpaceBetween, >+ SpaceAround, >+ SpaceEvenly, >+ Stretch >+}; >+ > >-enum ETextSecurity { >- TSNONE, TSDISC, TSCIRCLE, TSSQUARE >+enum class TextSecurity { >+ None, >+ Disc, >+ Circle, >+ Square > }; > > // CSS3 User Modify Properties > >-enum EUserModify { >- READ_ONLY, READ_WRITE, READ_WRITE_PLAINTEXT_ONLY >+enum class UserModify { >+ ReadOnly, >+ ReadWrite, >+ ReadWritePlaintextOnly > }; > > // CSS3 User Drag Values > >-enum EUserDrag { >- DRAG_AUTO, DRAG_NONE, DRAG_ELEMENT >+enum class UserDrag { >+ Auto, >+ None, >+ Element > }; > > // CSS3 User Select Values > >-enum EUserSelect { >- SELECT_NONE, SELECT_TEXT, SELECT_ALL >+enum class UserSelect { >+ None, >+ Text, >+ All > }; > > // CSS3 Image Values >-enum ObjectFit { >- ObjectFitFill, ObjectFitContain, ObjectFitCover, ObjectFitNone, ObjectFitScaleDown >+enum class ObjectFit { >+ Fill, >+ Contain, >+ Cover, >+ None, >+ ScaleDown > }; > >-enum AspectRatioType { >- AspectRatioAuto, AspectRatioFromIntrinsic, AspectRatioFromDimensions, AspectRatioSpecified >+enum class AspectRatioType { >+ Auto, >+ FromIntrinsic, >+ FromDimensions, >+ Specified > }; > >-enum EWordBreak { >- NormalWordBreak, BreakAllWordBreak, KeepAllWordBreak, BreakWordBreak >+enum class WordBreak { >+ Normal, >+ BreakAll, >+ KeepAll, >+ Break > }; > >-enum EOverflowWrap { >- NormalOverflowWrap, BreakOverflowWrap >+enum class OverflowWrap { >+ Normal, >+ Break > }; > >-enum ENBSPMode { >- NBNORMAL, SPACE >+enum class NBSPMode { >+ Normal, >+ Space > }; > >-enum LineBreak { >- LineBreakAuto, LineBreakLoose, LineBreakNormal, LineBreakStrict, LineBreakAfterWhiteSpace >+enum class LineBreak { >+ Auto, >+ Loose, >+ Normal, >+ Strict, >+ AfterWhiteSpace > }; > >-enum EResize { >- RESIZE_NONE, RESIZE_BOTH, RESIZE_HORIZONTAL, RESIZE_VERTICAL >+enum class Resize { >+ None, >+ Both, >+ Horizontal, >+ Vertical > }; > > // The order of this enum must match the order of the list style types in CSSValueKeywords.in. >@@ -408,30 +627,57 @@ enum EListStyleType { > NoneListStyle > }; > >-enum QuoteType { >- OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE >+enum class QuoteType { >+ OpenQuote, >+ CloseQuote, >+ NoOpenQuote, >+ NoCloseQuote >+}; >+ >+enum EBorderFit { >+ BorderFitBorder, >+ BorderFitLines >+}; >+ >+enum EAnimationFillMode { >+ AnimationFillModeNone, >+ AnimationFillModeForwards, >+ AnimationFillModeBackwards, >+ AnimationFillModeBoth > }; > >-enum EBorderFit { BorderFitBorder, BorderFitLines }; >- >-enum EAnimationFillMode { AnimationFillModeNone, AnimationFillModeForwards, AnimationFillModeBackwards, AnimationFillModeBoth }; >- > enum EAnimPlayState { > AnimPlayStatePlaying = 0x0, > AnimPlayStatePaused = 0x1 > }; > > enum EWhiteSpace { >- NORMAL, PRE, PRE_WRAP, PRE_LINE, NOWRAP, KHTML_NOWRAP >+ NORMAL, >+ PRE, >+ PRE_WRAP, >+ PRE_LINE, >+ NOWRAP, >+ KHTML_NOWRAP > }; > > // The order of this enum must match the order of the text align values in CSSValueKeywords.in. > enum ETextAlign { >- LEFT, RIGHT, CENTER, JUSTIFY, WEBKIT_LEFT, WEBKIT_RIGHT, WEBKIT_CENTER, TASTART, TAEND, >+ LEFT, >+ RIGHT, >+ CENTER, >+ JUSTIFY, >+ WEBKIT_LEFT, >+ WEBKIT_RIGHT, >+ WEBKIT_CENTER, >+ TASTART, >+ TAEND, > }; > > enum ETextTransform { >- CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE >+ CAPITALIZE, >+ UPPERCASE, >+ LOWERCASE, >+ TTNONE > }; > > #if ENABLE(LETTERPRESS) >@@ -449,8 +695,8 @@ enum TextDecoration { > TextDecorationLetterpress = 0x10, > #endif > }; >-inline TextDecoration operator| (TextDecoration a, TextDecoration b) { return TextDecoration(int(a) | int(b)); } >-inline TextDecoration& operator|= (TextDecoration& a, TextDecoration b) { return a = a | b; } >+inline TextDecoration operator|(TextDecoration a, TextDecoration b) { return TextDecoration(int(a) | int(b)); } >+inline TextDecoration& operator|=(TextDecoration& a, TextDecoration b) { return a = a | b; } > > enum TextDecorationStyle { > TextDecorationStyleSolid, >@@ -462,11 +708,20 @@ enum TextDecorationStyle { > > #if ENABLE(CSS3_TEXT) > enum TextAlignLast { >- TextAlignLastAuto, TextAlignLastStart, TextAlignLastEnd, TextAlignLastLeft, TextAlignLastRight, TextAlignLastCenter, TextAlignLastJustify >+ TextAlignLastAuto, >+ TextAlignLastStart, >+ TextAlignLastEnd, >+ TextAlignLastLeft, >+ TextAlignLastRight, >+ TextAlignLastCenter, >+ TextAlignLastJustify > }; > > enum TextJustify { >- TextJustifyAuto, TextJustifyNone, TextJustifyInterWord, TextJustifyDistribute >+ TextJustifyAuto, >+ TextJustifyNone, >+ TextJustifyInterWord, >+ TextJustifyDistribute > }; > #endif // CSS3_TEXT > >@@ -480,20 +735,35 @@ typedef unsigned TextDecorationSkip; > > enum TextUnderlinePosition { > // FIXME: Implement support for 'under left' and 'under right' values. >- TextUnderlinePositionAuto = 0x1, TextUnderlinePositionAlphabetic = 0x2, TextUnderlinePositionUnder = 0x4 >+ TextUnderlinePositionAuto = 0x1, >+ TextUnderlinePositionAlphabetic = 0x2, >+ TextUnderlinePositionUnder = 0x4 > }; > > enum TextZoom { >- TextZoomNormal, TextZoomReset >+ TextZoomNormal, >+ TextZoomReset > }; > > enum BreakBetween { >- AutoBreakBetween, AvoidBreakBetween, AvoidColumnBreakBetween, AvoidPageBreakBetween, ColumnBreakBetween, PageBreakBetween, LeftPageBreakBetween, RightPageBreakBetween, RectoPageBreakBetween, VersoPageBreakBetween >+ AutoBreakBetween, >+ AvoidBreakBetween, >+ AvoidColumnBreakBetween, >+ AvoidPageBreakBetween, >+ ColumnBreakBetween, >+ PageBreakBetween, >+ LeftPageBreakBetween, >+ RightPageBreakBetween, >+ RectoPageBreakBetween, >+ VersoPageBreakBetween > }; > bool alwaysPageBreak(BreakBetween); > > enum BreakInside { >- AutoBreakInside, AvoidBreakInside, AvoidColumnBreakInside, AvoidPageBreakInside >+ AutoBreakInside, >+ AvoidBreakInside, >+ AvoidColumnBreakInside, >+ AvoidPageBreakInside > }; > > enum HangingPunctuation { >@@ -503,20 +773,31 @@ enum HangingPunctuation { > AllowEndHangingPunctuation = 1 << 2, > ForceEndHangingPunctuation = 1 << 3 > }; >-inline HangingPunctuation operator| (HangingPunctuation a, HangingPunctuation b) { return HangingPunctuation(int(a) | int(b)); } >-inline HangingPunctuation& operator|= (HangingPunctuation& a, HangingPunctuation b) { return a = a | b; } >+inline HangingPunctuation operator|(HangingPunctuation a, HangingPunctuation b) { return HangingPunctuation(int(a) | int(b)); } >+inline HangingPunctuation& operator|=(HangingPunctuation& a, HangingPunctuation b) { return a = a | b; } > > enum EEmptyCell { >- SHOW, HIDE >+ SHOW, >+ HIDE > }; > > enum ECaptionSide { >- CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT >+ CAPTOP, >+ CAPBOTTOM, >+ CAPLEFT, >+ CAPRIGHT > }; > >-enum EListStylePosition { OUTSIDE, INSIDE }; >+enum EListStylePosition { >+ OUTSIDE, >+ INSIDE >+}; > >-enum EVisibility { VISIBLE, HIDDEN, COLLAPSE }; >+enum EVisibility { >+ VISIBLE, >+ HIDDEN, >+ COLLAPSE >+}; > > enum ECursor { > // The following must match the order in CSSValueKeywords.in. >@@ -571,30 +852,60 @@ enum CursorVisibility { > > // The order of this enum must match the order of the display values in CSSValueKeywords.in. > enum EDisplay { >- INLINE, BLOCK, LIST_ITEM, COMPACT, INLINE_BLOCK, >- TABLE, INLINE_TABLE, TABLE_ROW_GROUP, >- TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW, >- TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL, >- TABLE_CAPTION, BOX, INLINE_BOX, >- FLEX, WEBKIT_FLEX, INLINE_FLEX, WEBKIT_INLINE_FLEX, >- CONTENTS, GRID, INLINE_GRID, NONE >+ INLINE, >+ BLOCK, >+ LIST_ITEM, >+ COMPACT, >+ INLINE_BLOCK, >+ TABLE, >+ INLINE_TABLE, >+ TABLE_ROW_GROUP, >+ TABLE_HEADER_GROUP, >+ TABLE_FOOTER_GROUP, >+ TABLE_ROW, >+ TABLE_COLUMN_GROUP, >+ TABLE_COLUMN, >+ TABLE_CELL, >+ TABLE_CAPTION, >+ BOX, >+ INLINE_BOX, >+ FLEX, >+ WEBKIT_FLEX, >+ INLINE_FLEX, >+ WEBKIT_INLINE_FLEX, >+ CONTENTS, >+ GRID, >+ INLINE_GRID, >+ NONE > }; > > enum EInsideLink { >- NotInsideLink, InsideUnvisitedLink, InsideVisitedLink >+ NotInsideLink, >+ InsideUnvisitedLink, >+ InsideVisitedLink > }; > > enum EPointerEvents { >- PE_NONE, PE_AUTO, PE_STROKE, PE_FILL, PE_PAINTED, PE_VISIBLE, >- PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED, PE_ALL >-}; >- >-enum ETransformStyle3D { >- TransformStyle3DFlat, TransformStyle3DPreserve3D >-}; >- >-enum EBackfaceVisibility { >- BackfaceVisibilityVisible, BackfaceVisibilityHidden >+ PE_NONE, >+ PE_AUTO, >+ PE_STROKE, >+ PE_FILL, >+ PE_PAINTED, >+ PE_VISIBLE, >+ PE_VISIBLE_STROKE, >+ PE_VISIBLE_FILL, >+ PE_VISIBLE_PAINTED, >+ PE_ALL >+}; >+ >+enum class TransformStyle3D { >+ Flat, >+ Preserve3D >+}; >+ >+enum class BackfaceVisibility { >+ Visible, >+ Hidden > }; > > enum class TransformBox { >@@ -603,9 +914,16 @@ enum class TransformBox { > ViewBox > }; > >-enum ELineClampType { LineClampLineCount, LineClampPercentage }; >+enum class LineClamp { >+ LineCount, >+ Percentage >+}; > >-enum Hyphens { HyphensNone, HyphensManual, HyphensAuto }; >+enum Hyphens { >+ HyphensNone, >+ HyphensManual, >+ HyphensAuto >+}; > > enum ESpeakAs { > SpeakNormal = 0, >@@ -614,12 +932,24 @@ enum ESpeakAs { > SpeakLiteralPunctuation = 1 << 2, > SpeakNoPunctuation = 1 << 3 > }; >-inline ESpeakAs operator| (ESpeakAs a, ESpeakAs b) { return ESpeakAs(int(a) | int(b)); } >-inline ESpeakAs& operator|= (ESpeakAs& a, ESpeakAs b) { return a = a | b; } >+inline ESpeakAs operator|(ESpeakAs a, ESpeakAs b) { return ESpeakAs(int(a) | int(b)); } >+inline ESpeakAs& operator|=(ESpeakAs& a, ESpeakAs b) { return a = a | b; } > >-enum TextEmphasisFill { TextEmphasisFillFilled, TextEmphasisFillOpen }; >- >-enum TextEmphasisMark { TextEmphasisMarkNone, TextEmphasisMarkAuto, TextEmphasisMarkDot, TextEmphasisMarkCircle, TextEmphasisMarkDoubleCircle, TextEmphasisMarkTriangle, TextEmphasisMarkSesame, TextEmphasisMarkCustom }; >+enum TextEmphasisFill { >+ TextEmphasisFillFilled, >+ TextEmphasisFillOpen >+}; >+ >+enum TextEmphasisMark { >+ TextEmphasisMarkNone, >+ TextEmphasisMarkAuto, >+ TextEmphasisMarkDot, >+ TextEmphasisMarkCircle, >+ TextEmphasisMarkDoubleCircle, >+ TextEmphasisMarkTriangle, >+ TextEmphasisMarkSesame, >+ TextEmphasisMarkCustom >+}; > > enum TextEmphasisPositions { > TextEmphasisPositionOver = 1 << 0, >@@ -629,33 +959,69 @@ enum TextEmphasisPositions { > }; > typedef unsigned TextEmphasisPosition; > >-enum class TextOrientation { Mixed, Upright, Sideways }; >+enum class TextOrientation { >+ Mixed, >+ Upright, >+ Sideways >+}; > >-enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis }; >+enum class TextOverflow { >+ Clip = 0, >+ Ellipsis >+}; > >-enum EImageRendering { >- ImageRenderingAuto = 0, >- ImageRenderingOptimizeSpeed, >- ImageRenderingOptimizeQuality, >- ImageRenderingCrispEdges, >- ImageRenderingPixelated >+enum class ImageRendering { >+ Auto = 0, >+ OptimizeSpeed, >+ OptimizeQuality, >+ CrispEdges, >+ Pixelated > }; > >-enum ImageResolutionSource { ImageResolutionSpecified = 0, ImageResolutionFromImage }; >+WTF::TextStream& operator<<(WTF::TextStream&, ImageRendering); > >-enum ImageResolutionSnap { ImageResolutionNoSnap = 0, ImageResolutionSnapPixels }; >+enum ImageResolutionSource { >+ ImageResolutionSpecified = 0, >+ ImageResolutionFromImage >+}; > >-enum Order { LogicalOrder = 0, VisualOrder }; >+enum ImageResolutionSnap { >+ ImageResolutionNoSnap = 0, >+ ImageResolutionSnapPixels >+}; > >-enum ColumnAxis { HorizontalColumnAxis, VerticalColumnAxis, AutoColumnAxis }; >+enum Order { >+ LogicalOrder = 0, >+ VisualOrder >+}; > >-enum ColumnProgression { NormalColumnProgression, ReverseColumnProgression }; >+enum ColumnAxis { >+ HorizontalColumnAxis, >+ VerticalColumnAxis, >+ AutoColumnAxis >+}; > >-enum LineSnap { LineSnapNone, LineSnapBaseline, LineSnapContain }; >+enum ColumnProgression { >+ NormalColumnProgression, >+ ReverseColumnProgression >+}; > >-enum LineAlign { LineAlignNone, LineAlignEdges }; >+enum LineSnap { >+ LineSnapNone, >+ LineSnapBaseline, >+ LineSnapContain >+}; > >-enum RubyPosition { RubyPositionBefore, RubyPositionAfter, RubyPositionInterCharacter }; >+enum LineAlign { >+ LineAlignNone, >+ LineAlignEdges >+}; >+ >+enum RubyPosition { >+ RubyPositionBefore, >+ RubyPositionAfter, >+ RubyPositionInterCharacter >+}; > > static const size_t GridAutoFlowBits = 4; > enum InternalGridAutoFlowAlgorithm { >@@ -685,14 +1051,35 @@ enum AutoRepeatType { > static const float maximumAllowedFontSize = 1000000.0f; > > #if ENABLE(CSS3_TEXT) >-enum TextIndentLine { TextIndentFirstLine, TextIndentEachLine }; >-enum TextIndentType { TextIndentNormal, TextIndentHanging }; >+ >+enum class TextIndentLine { >+ FirstLine, >+ EachLine >+}; >+ >+enum class TextIndentType { >+ Normal, >+ Hanging >+}; >+ > #endif > >-enum Isolation { IsolationAuto, IsolationIsolate }; >+enum class Isolation { >+ Auto, >+ Isolate >+}; > > // Fill, Stroke, ViewBox are just used for SVG. >-enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox }; >+enum CSSBoxType { >+ BoxMissing = 0, >+ MarginBox, >+ BorderBox, >+ PaddingBox, >+ ContentBox, >+ Fill, >+ Stroke, >+ ViewBox >+}; > > #if ENABLE(TOUCH_EVENTS) > enum class TouchAction { >@@ -746,11 +1133,11 @@ enum class ApplePayButtonType { > }; > #endif > >-WTF::TextStream& operator<<(WTF::TextStream&, EFillSizeType); >-WTF::TextStream& operator<<(WTF::TextStream&, EFillAttachment); >-WTF::TextStream& operator<<(WTF::TextStream&, EFillBox); >-WTF::TextStream& operator<<(WTF::TextStream&, EFillRepeat); >-WTF::TextStream& operator<<(WTF::TextStream&, EMaskSourceType); >+WTF::TextStream& operator<<(WTF::TextStream&, FillSizeType); >+WTF::TextStream& operator<<(WTF::TextStream&, FillAttachment); >+WTF::TextStream& operator<<(WTF::TextStream&, FillBox); >+WTF::TextStream& operator<<(WTF::TextStream&, FillRepeat); >+WTF::TextStream& operator<<(WTF::TextStream&, MaskSourceType); > WTF::TextStream& operator<<(WTF::TextStream&, Edge); > > // These are all minimized combinations of paint-order. >@@ -771,7 +1158,11 @@ enum class PaintType { > }; > > enum class FontLoadingBehavior { >- Auto, Block, Swap, Fallback, Optional >+ Auto, >+ Block, >+ Swap, >+ Fallback, >+ Optional > }; > > extern const float defaultMiterLimit; >Index: Source/WebCore/rendering/style/SVGRenderStyle.cpp >=================================================================== >--- Source/WebCore/rendering/style/SVGRenderStyle.cpp (revision 232008) >+++ Source/WebCore/rendering/style/SVGRenderStyle.cpp (working copy) >@@ -145,19 +145,19 @@ void SVGRenderStyle::copyNonInheritedFro > > StyleDifference SVGRenderStyle::diff(const SVGRenderStyle& other) const > { >- // NOTE: All comparisions that may return StyleDifferenceLayout have to go before those who return StyleDifferenceRepaint >+ // NOTE: All comparisions that may return StyleDifference::Layout have to go before those who return StyleDifference::Repaint > > // If kerning changes, we need a relayout, to force SVGCharacterData to be recalculated in the SVGRootInlineBox. > if (m_textData != other.m_textData) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // If resources change, we need a relayout, as the presence of resources influences the repaint rect. > if (m_nonInheritedResourceData != other.m_nonInheritedResourceData) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // If markers change, we need a relayout, as marker boundaries are cached in RenderSVGPath. > if (m_inheritedResourceData != other.m_inheritedResourceData) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // All text related properties influence layout. > if (m_inheritedFlags.textAnchor != other.m_inheritedFlags.textAnchor >@@ -166,20 +166,20 @@ StyleDifference SVGRenderStyle::diff(con > || m_nonInheritedFlags.flagBits.alignmentBaseline != other.m_nonInheritedFlags.flagBits.alignmentBaseline > || m_nonInheritedFlags.flagBits.dominantBaseline != other.m_nonInheritedFlags.flagBits.dominantBaseline > || m_nonInheritedFlags.flagBits.baselineShift != other.m_nonInheritedFlags.flagBits.baselineShift) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // Text related properties influence layout. > bool miscNotEqual = m_miscData != other.m_miscData; > if (miscNotEqual && m_miscData->baselineShiftValue != other.m_miscData->baselineShiftValue) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // Shadow changes require relayouts, as they affect the repaint rects. > if (m_shadowData != other.m_shadowData) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // The x or y properties require relayout. > if (m_layoutData != other.m_layoutData) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // Some stroke properties, requires relayouts, as the cached stroke boundaries need to be recalculated. > if (m_strokeData != other.m_strokeData) { >@@ -191,35 +191,35 @@ StyleDifference SVGRenderStyle::diff(con > || m_strokeData->visitedLinkPaintColor != other.m_strokeData->visitedLinkPaintColor > || m_strokeData->visitedLinkPaintUri != other.m_strokeData->visitedLinkPaintUri > || m_strokeData->visitedLinkPaintType != other.m_strokeData->visitedLinkPaintType) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > > // Only the stroke-opacity case remains, where we only need a repaint. > ASSERT(m_strokeData->opacity != other.m_strokeData->opacity); >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > } > > // vector-effect changes require a re-layout. > if (m_nonInheritedFlags.flagBits.vectorEffect != other.m_nonInheritedFlags.flagBits.vectorEffect) >- return StyleDifferenceLayout; >+ return StyleDifference::Layout; > >- // NOTE: All comparisions below may only return StyleDifferenceRepaint >+ // NOTE: All comparisions below may only return StyleDifference::Repaint > > // Painting related properties only need repaints. > if (miscNotEqual) { > if (m_miscData->floodColor != other.m_miscData->floodColor > || m_miscData->floodOpacity != other.m_miscData->floodOpacity > || m_miscData->lightingColor != other.m_miscData->lightingColor) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > } > > // If fill data changes, we just need to repaint. Fill boundaries are not influenced by this, only by the Path, that RenderSVGPath contains. > if (m_fillData->paintType != other.m_fillData->paintType || m_fillData->paintColor != other.m_fillData->paintColor > || m_fillData->paintUri != other.m_fillData->paintUri || m_fillData->opacity != other.m_fillData->opacity) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > > // If gradient stops change, we just need to repaint. Style updates are already handled through RenderSVGGradientSTop. > if (m_stopData != other.m_stopData) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > > // Changes of these flags only cause repaints. > if (m_inheritedFlags.colorRendering != other.m_inheritedFlags.colorRendering >@@ -228,15 +228,15 @@ StyleDifference SVGRenderStyle::diff(con > || m_inheritedFlags.fillRule != other.m_inheritedFlags.fillRule > || m_inheritedFlags.colorInterpolation != other.m_inheritedFlags.colorInterpolation > || m_inheritedFlags.colorInterpolationFilters != other.m_inheritedFlags.colorInterpolationFilters) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > > if (m_nonInheritedFlags.flagBits.bufferedRendering != other.m_nonInheritedFlags.flagBits.bufferedRendering) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > > if (m_nonInheritedFlags.flagBits.maskType != other.m_nonInheritedFlags.flagBits.maskType) >- return StyleDifferenceRepaint; >+ return StyleDifference::Repaint; > >- return StyleDifferenceEqual; >+ return StyleDifference::Equal; > } > > } >Index: Source/WebCore/rendering/style/StyleBackgroundData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleBackgroundData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleBackgroundData.cpp (working copy) >@@ -28,7 +28,7 @@ > namespace WebCore { > > StyleBackgroundData::StyleBackgroundData() >- : background(BackgroundFillLayer) >+ : background(FillLayerType::Background) > , color(RenderStyle::initialBackgroundColor()) > { > } >Index: Source/WebCore/rendering/style/StyleBoxData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleBoxData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleBoxData.cpp (working copy) >@@ -42,9 +42,9 @@ StyleBoxData::StyleBoxData() > , m_maxHeight(RenderStyle::initialMaxSize()) > , m_zIndex(0) > , m_hasAutoZIndex(true) >- , m_boxSizing(CONTENT_BOX) >+ , m_boxSizing(static_cast<unsigned>(BoxSizing::ContentBox)) > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- , m_boxDecorationBreak(DSLICE) >+ , m_boxDecorationBreak(static_cast<unsigned>(BoxDecorationBreak::Slice)) > #endif > { > } >Index: Source/WebCore/rendering/style/StyleBoxData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleBoxData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleBoxData.h (working copy) >@@ -56,9 +56,9 @@ public: > int zIndex() const { return m_zIndex; } > bool hasAutoZIndex() const { return m_hasAutoZIndex; } > >- EBoxSizing boxSizing() const { return static_cast<EBoxSizing>(m_boxSizing); } >+ BoxSizing boxSizing() const { return static_cast<BoxSizing>(m_boxSizing); } > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- EBoxDecorationBreak boxDecorationBreak() const { return static_cast<EBoxDecorationBreak>(m_boxDecorationBreak); } >+ BoxDecorationBreak boxDecorationBreak() const { return static_cast<BoxDecorationBreak>(m_boxDecorationBreak); } > #endif > > private: >@@ -80,9 +80,9 @@ private: > > int m_zIndex; > unsigned m_hasAutoZIndex : 1; >- unsigned m_boxSizing : 1; // EBoxSizing >+ unsigned m_boxSizing : 1; // BoxSizing > #if ENABLE(CSS_BOX_DECORATION_BREAK) >- unsigned m_boxDecorationBreak : 1; // EBoxDecorationBreak >+ unsigned m_boxDecorationBreak : 1; // BoxDecorationBreak > #endif > }; > >Index: Source/WebCore/rendering/style/StyleContentAlignmentData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleContentAlignmentData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleContentAlignmentData.h (working copy) >@@ -33,19 +33,19 @@ class StyleContentAlignmentData { > public: > // Style data for Content-Distribution properties: align-content, justify-content. > // <content-distribution> || [ <overflow-position>? && <content-position> ] >- StyleContentAlignmentData(ContentPosition position, ContentDistributionType distribution, OverflowAlignment overflow = OverflowAlignmentDefault) >- : m_position(position) >- , m_distribution(distribution) >- , m_overflow(overflow) >+ StyleContentAlignmentData(ContentPosition position, ContentDistribution distribution, OverflowAlignment overflow = OverflowAlignment::Default) >+ : m_position(static_cast<unsigned>(position)) >+ , m_distribution(static_cast<unsigned>(distribution)) >+ , m_overflow(static_cast<unsigned>(overflow)) > { > } > >- void setPosition(ContentPosition position) { m_position = position; } >- void setDistribution(ContentDistributionType distribution) { m_distribution = distribution; } >- void setOverflow(OverflowAlignment overflow) { m_overflow = overflow; } >+ void setPosition(ContentPosition position) { m_position = static_cast<unsigned>(position); } >+ void setDistribution(ContentDistribution distribution) { m_distribution = static_cast<unsigned>(distribution); } >+ void setOverflow(OverflowAlignment overflow) { m_overflow = static_cast<unsigned>(overflow); } > > ContentPosition position() const { return static_cast<ContentPosition>(m_position); } >- ContentDistributionType distribution() const { return static_cast<ContentDistributionType>(m_distribution); } >+ ContentDistribution distribution() const { return static_cast<ContentDistribution>(m_distribution); } > OverflowAlignment overflow() const { return static_cast<OverflowAlignment>(m_overflow); } > > bool operator==(const StyleContentAlignmentData& o) const >@@ -60,7 +60,7 @@ public: > > private: > unsigned m_position : 4; // ContentPosition >- unsigned m_distribution : 3; // ContentDistributionType >+ unsigned m_distribution : 3; // ContentDistribution > unsigned m_overflow : 2; // OverflowAlignment > }; > >Index: Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.cpp (working copy) >@@ -30,10 +30,10 @@ StyleDeprecatedFlexibleBoxData::StyleDep > : flex(RenderStyle::initialBoxFlex()) > , flexGroup(RenderStyle::initialBoxFlexGroup()) > , ordinalGroup(RenderStyle::initialBoxOrdinalGroup()) >- , align(RenderStyle::initialBoxAlign()) >- , pack(RenderStyle::initialBoxPack()) >- , orient(RenderStyle::initialBoxOrient()) >- , lines(RenderStyle::initialBoxLines()) >+ , align(static_cast<unsigned>(RenderStyle::initialBoxAlign())) >+ , pack(static_cast<unsigned>(RenderStyle::initialBoxPack())) >+ , orient(static_cast<unsigned>(RenderStyle::initialBoxOrient())) >+ , lines(static_cast<unsigned>(RenderStyle::initialBoxLines())) > { > } > >Index: Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleDeprecatedFlexibleBoxData.h (working copy) >@@ -44,10 +44,10 @@ public: > unsigned flexGroup; > unsigned ordinalGroup; > >- unsigned align : 3; // EBoxAlignment >- unsigned pack: 2; // EBoxPack >- unsigned orient: 1; // EBoxOrient >- unsigned lines : 1; // EBoxLines >+ unsigned align : 3; // BoxAlignment >+ unsigned pack: 2; // BoxPack >+ unsigned orient: 1; // BoxOrient >+ unsigned lines : 1; // BoxLines > > private: > StyleDeprecatedFlexibleBoxData(); >Index: Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleFlexibleBoxData.cpp (working copy) >@@ -34,8 +34,8 @@ StyleFlexibleBoxData::StyleFlexibleBoxDa > : flexGrow(RenderStyle::initialFlexGrow()) > , flexShrink(RenderStyle::initialFlexShrink()) > , flexBasis(RenderStyle::initialFlexBasis()) >- , flexDirection(RenderStyle::initialFlexDirection()) >- , flexWrap(RenderStyle::initialFlexWrap()) >+ , flexDirection(static_cast<unsigned>(RenderStyle::initialFlexDirection())) >+ , flexWrap(static_cast<unsigned>(RenderStyle::initialFlexWrap())) > { > } > >Index: Source/WebCore/rendering/style/StyleFlexibleBoxData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleFlexibleBoxData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleFlexibleBoxData.h (working copy) >@@ -46,8 +46,8 @@ public: > float flexShrink; > Length flexBasis; > >- unsigned flexDirection : 2; // EFlexDirection >- unsigned flexWrap : 2; // EFlexWrap >+ unsigned flexDirection : 2; // FlexDirection >+ unsigned flexWrap : 2; // FlexWrap > > private: > StyleFlexibleBoxData(); >Index: Source/WebCore/rendering/style/StyleMultiColData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleMultiColData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleMultiColData.cpp (working copy) >@@ -30,7 +30,7 @@ StyleMultiColData::StyleMultiColData() > : count(RenderStyle::initialColumnCount()) > , autoWidth(true) > , autoCount(true) >- , fill(RenderStyle::initialColumnFill()) >+ , fill(static_cast<unsigned>(RenderStyle::initialColumnFill())) > , columnSpan(false) > , axis(RenderStyle::initialColumnAxis()) > , progression(RenderStyle::initialColumnProgression()) >Index: Source/WebCore/rendering/style/StyleMultiColData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleMultiColData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleMultiColData.h (working copy) >@@ -43,7 +43,7 @@ public: > > unsigned short ruleWidth() const > { >- if (rule.style() == BNONE || rule.style() == BHIDDEN) >+ if (rule.style() == BorderStyle::None || rule.style() == BorderStyle::Hidden) > return 0; > return rule.width(); > } >@@ -56,7 +56,7 @@ public: > bool autoWidth : 1; > bool autoCount : 1; > unsigned fill : 1; // ColumnFill >- unsigned columnSpan : 1; >+ unsigned columnSpan : 1; // ColumnSpan > unsigned axis : 2; // ColumnAxis > unsigned progression : 2; // ColumnProgression > >Index: Source/WebCore/rendering/style/StyleRareInheritedData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleRareInheritedData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleRareInheritedData.cpp (working copy) >@@ -80,13 +80,13 @@ StyleRareInheritedData::StyleRareInherit > , orphans(RenderStyle::initialOrphans()) > , hasAutoWidows(true) > , hasAutoOrphans(true) >- , textSecurity(RenderStyle::initialTextSecurity()) >- , userModify(READ_ONLY) >- , wordBreak(RenderStyle::initialWordBreak()) >- , overflowWrap(RenderStyle::initialOverflowWrap()) >- , nbspMode(NBNORMAL) >- , lineBreak(LineBreakAuto) >- , userSelect(RenderStyle::initialUserSelect()) >+ , textSecurity(static_cast<unsigned>(RenderStyle::initialTextSecurity())) >+ , userModify(static_cast<unsigned>(UserModify::ReadOnly)) >+ , wordBreak(static_cast<unsigned>(RenderStyle::initialWordBreak())) >+ , overflowWrap(static_cast<unsigned>(RenderStyle::initialOverflowWrap())) >+ , nbspMode(static_cast<unsigned>(NBSPMode::Normal)) >+ , lineBreak(static_cast<unsigned>(LineBreak::Auto)) >+ , userSelect(static_cast<unsigned>(RenderStyle::initialUserSelect())) > , speakAs(SpeakNormal) > , hyphens(HyphensManual) > , textEmphasisFill(TextEmphasisFillFilled) >@@ -101,7 +101,7 @@ StyleRareInheritedData::StyleRareInherit > #if ENABLE(CSS_IMAGE_ORIENTATION) > , imageOrientation(RenderStyle::initialImageOrientation()) > #endif >- , imageRendering(RenderStyle::initialImageRendering()) >+ , imageRendering(static_cast<unsigned>(RenderStyle::initialImageRendering())) > , lineSnap(RenderStyle::initialLineSnap()) > , lineAlign(RenderStyle::initialLineAlign()) > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >Index: Source/WebCore/rendering/style/StyleRareInheritedData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleRareInheritedData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleRareInheritedData.h (working copy) >@@ -90,13 +90,13 @@ public: > unsigned hasAutoWidows : 1; > unsigned hasAutoOrphans : 1; > >- unsigned textSecurity : 2; // ETextSecurity >- unsigned userModify : 2; // EUserModify (editing) >- unsigned wordBreak : 2; // EWordBreak >- unsigned overflowWrap : 1; // EOverflowWrap >- unsigned nbspMode : 1; // ENBSPMode >+ unsigned textSecurity : 2; // TextSecurity >+ unsigned userModify : 2; // UserModify (editing) >+ unsigned wordBreak : 2; // WordBreak >+ unsigned overflowWrap : 1; // OverflowWrap >+ unsigned nbspMode : 1; // NBSPMode > unsigned lineBreak : 3; // LineBreak >- unsigned userSelect : 2; // EUserSelect >+ unsigned userSelect : 2; // UserSelect > unsigned colorSpace : 1; // ColorSpace > unsigned speakAs : 4; // ESpeakAs > unsigned hyphens : 2; // Hyphens >@@ -113,7 +113,7 @@ public: > #if ENABLE(CSS_IMAGE_ORIENTATION) > unsigned imageOrientation : 4; // ImageOrientationEnum > #endif >- unsigned imageRendering : 3; // EImageRendering >+ unsigned imageRendering : 3; // ImageRendering > unsigned lineSnap : 2; // LineSnap > unsigned lineAlign : 1; // LineAlign > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) >Index: Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (revision 232008) >+++ Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (working copy) >@@ -62,7 +62,7 @@ StyleRareNonInheritedData::StyleRareNonI > , scrollSnapArea(StyleScrollSnapArea::create()) > #endif > , willChange(RenderStyle::initialWillChange()) >- , mask(FillLayer(MaskFillLayer)) >+ , mask(FillLayerType::Mask) > , objectPosition(RenderStyle::initialObjectPosition()) > , shapeOutside(RenderStyle::initialShapeOutside()) > , shapeMargin(RenderStyle::initialShapeMargin()) >@@ -80,30 +80,30 @@ StyleRareNonInheritedData::StyleRareNonI > , touchAction(static_cast<unsigned>(RenderStyle::initialTouchAction())) > #endif > , pageSizeType(PAGE_SIZE_AUTO) >- , transformStyle3D(RenderStyle::initialTransformStyle3D()) >- , backfaceVisibility(RenderStyle::initialBackfaceVisibility()) >- , userDrag(RenderStyle::initialUserDrag()) >- , textOverflow(RenderStyle::initialTextOverflow()) >- , marginBeforeCollapse(MCOLLAPSE) >- , marginAfterCollapse(MCOLLAPSE) >+ , transformStyle3D(static_cast<unsigned>(RenderStyle::initialTransformStyle3D())) >+ , backfaceVisibility(static_cast<unsigned>(RenderStyle::initialBackfaceVisibility())) >+ , userDrag(static_cast<unsigned>(RenderStyle::initialUserDrag())) >+ , textOverflow(static_cast<unsigned>(RenderStyle::initialTextOverflow())) >+ , marginBeforeCollapse(static_cast<unsigned>(MarginCollapse::Collapse)) >+ , marginAfterCollapse(static_cast<unsigned>(MarginCollapse::Collapse)) > , appearance(RenderStyle::initialAppearance()) > , borderFit(RenderStyle::initialBorderFit()) >- , textCombine(RenderStyle::initialTextCombine()) >+ , textCombine(static_cast<unsigned>(RenderStyle::initialTextCombine())) > , textDecorationStyle(RenderStyle::initialTextDecorationStyle()) >- , aspectRatioType(RenderStyle::initialAspectRatioType()) >+ , aspectRatioType(static_cast<unsigned>(RenderStyle::initialAspectRatioType())) > #if ENABLE(CSS_COMPOSITING) > , effectiveBlendMode(RenderStyle::initialBlendMode()) >- , isolation(RenderStyle::initialIsolation()) >+ , isolation(static_cast<unsigned>(RenderStyle::initialIsolation())) > #endif > #if ENABLE(APPLE_PAY) > , applePayButtonStyle(static_cast<unsigned>(RenderStyle::initialApplePayButtonStyle())) > , applePayButtonType(static_cast<unsigned>(RenderStyle::initialApplePayButtonType())) > #endif >- , objectFit(RenderStyle::initialObjectFit()) >- , breakBefore(RenderStyle::initialBreakBetween()) >- , breakAfter(RenderStyle::initialBreakBetween()) >- , breakInside(RenderStyle::initialBreakInside()) >- , resize(RenderStyle::initialResize()) >+ , objectFit(static_cast<unsigned>(RenderStyle::initialObjectFit())) >+ , breakBefore(static_cast<unsigned>(RenderStyle::initialBreakBetween())) >+ , breakAfter(static_cast<unsigned>(RenderStyle::initialBreakBetween())) >+ , breakInside(static_cast<unsigned>(RenderStyle::initialBreakInside())) >+ , resize(static_cast<unsigned>(RenderStyle::initialResize())) > , hasAttrContent(false) > , isNotFinal(false) > , columnGap(RenderStyle::initialColumnGap()) >Index: Source/WebCore/rendering/style/StyleRareNonInheritedData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleRareNonInheritedData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleRareNonInheritedData.h (working copy) >@@ -177,13 +177,13 @@ public: > #endif > > unsigned pageSizeType : 2; // PageSizeType >- unsigned transformStyle3D : 1; // ETransformStyle3D >- unsigned backfaceVisibility : 1; // EBackfaceVisibility >+ unsigned transformStyle3D : 1; // TransformStyle3D >+ unsigned backfaceVisibility : 1; // BackfaceVisibility > >- unsigned userDrag : 2; // EUserDrag >+ unsigned userDrag : 2; // UserDrag > unsigned textOverflow : 1; // Whether or not lines that spill out should be truncated with "..." >- unsigned marginBeforeCollapse : 2; // EMarginCollapse >- unsigned marginAfterCollapse : 2; // EMarginCollapse >+ unsigned marginBeforeCollapse : 2; // MarginCollapse >+ unsigned marginAfterCollapse : 2; // MarginCollapse > unsigned appearance : 6; // EAppearance > unsigned borderFit : 1; // EBorderFit > unsigned textCombine : 1; // CSS3 text-combine properties >@@ -207,7 +207,7 @@ public: > unsigned breakBefore : 4; // BreakBetween > unsigned breakAfter : 4; > unsigned breakInside : 3; // BreakInside >- unsigned resize : 2; // EResize >+ unsigned resize : 2; // Resize > > unsigned hasAttrContent : 1; > >Index: Source/WebCore/rendering/style/StyleSelfAlignmentData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleSelfAlignmentData.h (revision 232008) >+++ Source/WebCore/rendering/style/StyleSelfAlignmentData.h (working copy) >@@ -33,16 +33,16 @@ class StyleSelfAlignmentData { > public: > // Style data for Self-Aligment and Default-Alignment properties: align-{self, items}, justify-{self, items}. > // [ <self-position> && <overflow-position>? ] | [ legacy && [ left | right | center ] ] >- StyleSelfAlignmentData(ItemPosition position, OverflowAlignment overflow, ItemPositionType positionType = NonLegacyPosition) >- : m_position(position) >- , m_positionType(positionType) >- , m_overflow(overflow) >+ StyleSelfAlignmentData(ItemPosition position, OverflowAlignment overflow, ItemPositionType positionType = ItemPositionType::NonLegacy) >+ : m_position(static_cast<unsigned>(position)) >+ , m_positionType(static_cast<unsigned>(positionType)) >+ , m_overflow(static_cast<unsigned>(overflow)) > { > } > >- void setPosition(ItemPosition position) { m_position = position; } >- void setPositionType(ItemPositionType positionType) { m_positionType = positionType; } >- void setOverflow(OverflowAlignment overflow) { m_overflow = overflow; } >+ void setPosition(ItemPosition position) { m_position = static_cast<unsigned>(position); } >+ void setPositionType(ItemPositionType positionType) { m_positionType = static_cast<unsigned>(positionType); } >+ void setOverflow(OverflowAlignment overflow) { m_overflow = static_cast<unsigned>(overflow); } > > ItemPosition position() const { return static_cast<ItemPosition>(m_position); } > ItemPositionType positionType() const { return static_cast<ItemPositionType>(m_positionType); } >Index: Source/WebCore/rendering/svg/RenderSVGBlock.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGBlock.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGBlock.cpp (working copy) >@@ -79,7 +79,7 @@ void RenderSVGBlock::willBeDestroyed() > > void RenderSVGBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- if (diff == StyleDifferenceLayout) >+ if (diff == StyleDifference::Layout) > setNeedsBoundariesUpdate(); > RenderBlockFlow::styleDidChange(diff, oldStyle); > SVGResourcesCache::clientStyleChanged(*this, diff, style()); >Index: Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGGradientStop.cpp (working copy) >@@ -44,7 +44,7 @@ RenderSVGGradientStop::~RenderSVGGradien > void RenderSVGGradientStop::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { > RenderElement::styleDidChange(diff, oldStyle); >- if (diff == StyleDifferenceEqual) >+ if (diff == StyleDifference::Equal) > return; > > // <stop> elements should only be allowed to make renderers under gradient elements >Index: Source/WebCore/rendering/svg/RenderSVGInline.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGInline.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGInline.cpp (working copy) >@@ -109,7 +109,7 @@ void RenderSVGInline::willBeDestroyed() > > void RenderSVGInline::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- if (diff == StyleDifferenceLayout) >+ if (diff == StyleDifference::Layout) > setNeedsBoundariesUpdate(); > RenderInline::styleDidChange(diff, oldStyle); > SVGResourcesCache::clientStyleChanged(*this, diff, style()); >Index: Source/WebCore/rendering/svg/RenderSVGInlineText.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (working copy) >@@ -103,7 +103,7 @@ void RenderSVGInlineText::styleDidChange > return; > } > >- if (diff != StyleDifferenceLayout) >+ if (diff != StyleDifference::Layout) > return; > > // The text metrics may be influenced by style changes. >Index: Source/WebCore/rendering/svg/RenderSVGModelObject.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (working copy) >@@ -100,7 +100,7 @@ void RenderSVGModelObject::willBeDestroy > > void RenderSVGModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- if (diff == StyleDifferenceLayout) { >+ if (diff == StyleDifference::Layout) { > setNeedsBoundariesUpdate(); > if (style().hasTransform()) > setNeedsTransformUpdate(); >Index: Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGResourceContainer.cpp (working copy) >@@ -187,7 +187,7 @@ void RenderSVGResourceContainer::registe > auto* renderer = client->renderer(); > if (!renderer) > continue; >- SVGResourcesCache::clientStyleChanged(*renderer, StyleDifferenceLayout, renderer->style()); >+ SVGResourcesCache::clientStyleChanged(*renderer, StyleDifference::Layout, renderer->style()); > renderer->setNeedsLayout(); > } > } >Index: Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp (working copy) >@@ -58,7 +58,7 @@ void RenderSVGResourceFilterPrimitive::s > if (!filter) > return; > >- if (diff == StyleDifferenceEqual || !oldStyle) >+ if (diff == StyleDifference::Equal || !oldStyle) > return; > > const SVGRenderStyle& newStyle = style().svgStyle(); >Index: Source/WebCore/rendering/svg/RenderSVGRoot.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGRoot.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/RenderSVGRoot.cpp (working copy) >@@ -164,7 +164,7 @@ void RenderSVGRoot::layout() > // Invalidate resource clients, which may mark some nodes for layout. > for (auto& resource : m_resourcesNeedingToInvalidateClients) { > resource->removeAllClientsFromCache(); >- SVGResourcesCache::clientStyleChanged(*resource, StyleDifferenceLayout, resource->style()); >+ SVGResourcesCache::clientStyleChanged(*resource, StyleDifference::Layout, resource->style()); > } > > m_isLayoutSizeChanged = false; >@@ -199,9 +199,9 @@ bool RenderSVGRoot::shouldApplyViewportC > // the outermost svg is clipped if auto, and svg document roots are always clipped > // When the svg is stand-alone (isDocumentElement() == true) the viewport clipping should always > // be applied, noting that the window scrollbars should be hidden if overflow=hidden. >- return style().overflowX() == OHIDDEN >- || style().overflowX() == OAUTO >- || style().overflowX() == OSCROLL >+ return style().overflowX() == Overflow::Hidden >+ || style().overflowX() == Overflow::Auto >+ || style().overflowX() == Overflow::Scroll > || this->isDocumentElementRenderer(); > } > >@@ -292,11 +292,11 @@ void RenderSVGRoot::willBeRemovedFromTre > > void RenderSVGRoot::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- if (diff == StyleDifferenceLayout) >+ if (diff == StyleDifference::Layout) > setNeedsBoundariesUpdate(); > > // Box decorations may have appeared/disappeared - recompute status. >- if (diff == StyleDifferenceRepaint) >+ if (diff == StyleDifference::Repaint) > m_hasBoxDecorations = hasVisibleBoxDecorationStyle(); > > RenderReplaced::styleDidChange(diff, oldStyle); >Index: Source/WebCore/rendering/svg/SVGInlineTextBox.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (working copy) >@@ -605,12 +605,12 @@ void SVGInlineTextBox::paintText(Graphic > > // Draw text using selection style from the start to the end position of the selection > if (style != selectionStyle) >- SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, selectionStyle); >+ SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifference::Repaint, selectionStyle); > > paintTextWithShadows(context, selectionStyle, textRun, fragment, startPosition, endPosition); > > if (style != selectionStyle) >- SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifferenceRepaint, style); >+ SVGResourcesCache::clientStyleChanged(parent()->renderer(), StyleDifference::Repaint, style); > > // Eventually draw text using regular style from the end position of the selection to the end of the current chunk part > if (endPosition < fragment.length && !paintSelectedTextOnly) >Index: Source/WebCore/rendering/svg/SVGRenderSupport.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGRenderSupport.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/SVGRenderSupport.cpp (working copy) >@@ -316,7 +316,7 @@ bool SVGRenderSupport::isOverflowHidden( > // RenderSVGRoot should never query for overflow state - it should always clip itself to the initial viewport size. > ASSERT(!renderer.isDocumentElementRenderer()); > >- return renderer.style().overflowX() == OHIDDEN || renderer.style().overflowX() == OSCROLL; >+ return renderer.style().overflowX() == Overflow::Hidden || renderer.style().overflowX() == Overflow::Scroll; > } > > bool SVGRenderSupport::rendererHasSVGShadow(const RenderObject& renderer) >Index: Source/WebCore/rendering/svg/SVGResourcesCache.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGResourcesCache.cpp (revision 232008) >+++ Source/WebCore/rendering/svg/SVGResourcesCache.cpp (working copy) >@@ -97,11 +97,11 @@ static inline bool rendererCanHaveResour > > void SVGResourcesCache::clientStyleChanged(RenderElement& renderer, StyleDifference diff, const RenderStyle& newStyle) > { >- if (diff == StyleDifferenceEqual || !renderer.parent()) >+ if (diff == StyleDifference::Equal || !renderer.parent()) > return; > > // In this case the proper SVGFE*Element will decide whether the modified CSS properties require a relayout or repaint. >- if (renderer.isSVGResourceFilterPrimitive() && (diff == StyleDifferenceRepaint || diff == StyleDifferenceRepaintIfTextOrBorderOrOutline)) >+ if (renderer.isSVGResourceFilterPrimitive() && (diff == StyleDifference::Repaint || diff == StyleDifference::RepaintIfTextOrBorderOrOutline)) > return; > > // Dynamic changes of CSS properties like 'clip-path' may require us to recompute the associated resources for a renderer. >Index: Source/WebCore/rendering/updating/RenderTreeBuilder.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (revision 232008) >+++ Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (working copy) >@@ -424,7 +424,7 @@ void RenderTreeBuilder::attachToRenderEl > cache->childrenChanged(&parent, newChild); > if (is<RenderBlockFlow>(parent)) > downcast<RenderBlockFlow>(parent).invalidateLineLayoutPath(); >- if (parent.hasOutlineAutoAncestor() || parent.outlineStyleForRepaint().outlineStyleIsAuto()) >+ if (parent.hasOutlineAutoAncestor() || parent.outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On) > newChild->setHasOutlineAutoAncestor(); > } > >Index: Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (revision 232008) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (working copy) >@@ -134,9 +134,9 @@ void RenderTreeBuilder::Block::insertChi > return; > } > >- bool childIsNormal = child->isInline() || !child->style().columnSpan(); >- bool bcpIsNormal = beforeChildParent->isInline() || !beforeChildParent->style().columnSpan(); >- bool flowIsNormal = flow->isInline() || !flow->style().columnSpan(); >+ bool childIsNormal = child->isInline() || child->style().columnSpan() == ColumnSpan::None; >+ bool bcpIsNormal = beforeChildParent->isInline() || beforeChildParent->style().columnSpan() == ColumnSpan::None; >+ bool flowIsNormal = flow->isInline() || flow->style().columnSpan() == ColumnSpan::None; > > if (flow == beforeChildParent) { > m_builder.attachIgnoringContinuation(*flow, WTFMove(child), beforeChild); >Index: Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (revision 232008) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (working copy) >@@ -46,7 +46,7 @@ static RenderStyle styleForFirstLetter(c > > // If we have an initial letter drop that is >= 1, then we need to force floating to be on. > if (firstLetterStyle.initialLetterDrop() >= 1 && !firstLetterStyle.isFloating()) >- firstLetterStyle.setFloating(firstLetterStyle.isLeftToRightDirection() ? LeftFloat : RightFloat); >+ firstLetterStyle.setFloating(firstLetterStyle.isLeftToRightDirection() ? Float::Left : Float::Right); > > // We have to compute the correct font-size for the first-letter if it has an initial letter height set. > auto* paragraph = firstLetterContainer.isRenderBlockFlow() ? &firstLetterContainer : firstLetterContainer.containingBlock(); >@@ -84,7 +84,7 @@ static RenderStyle styleForFirstLetter(c > // Force inline display (except for floating first-letters). > firstLetterStyle.setDisplay(firstLetterStyle.isFloating() ? BLOCK : INLINE); > // CSS2 says first-letter can't be positioned. >- firstLetterStyle.setPosition(StaticPosition); >+ firstLetterStyle.setPosition(PositionType::Static); > return firstLetterStyle; > } > >Index: Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (revision 232008) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (working copy) >@@ -108,7 +108,7 @@ static bool isValidColumnSpanner(const R > // This ancestor (descendent of the fragmentedFlow) will create columns later. The spanner belongs to it. > if (is<RenderBlockFlow>(*ancestor) && downcast<RenderBlockFlow>(*ancestor).willCreateColumns()) > return false; >- ASSERT(ancestor->style().columnSpan() != ColumnSpanAll || !isValidColumnSpanner(fragmentedFlow, *ancestor)); >+ ASSERT(ancestor->style().columnSpan() != ColumnSpan::All || !isValidColumnSpanner(fragmentedFlow, *ancestor)); > if (ancestor->isUnsplittableForPagination()) > return false; > } >@@ -234,7 +234,7 @@ RenderObject* RenderTreeBuilder::MultiCo > return beforeChild; > > // We only need to resolve for column spanners. >- if (beforeChild->style().columnSpan() != ColumnSpanAll) >+ if (beforeChild->style().columnSpan() != ColumnSpan::All) > return beforeChild; > > // The renderer for the actual DOM node that establishes a spanner is moved from its original >@@ -396,7 +396,7 @@ void RenderTreeBuilder::MultiColumn::mul > flow.spannerMap().remove(downcast<RenderMultiColumnSpannerPlaceholder>(relative).spanner()); > return; > } >- if (relative.style().columnSpan() == ColumnSpanAll) { >+ if (relative.style().columnSpan() == ColumnSpan::All) { > if (relative.parent() != flow.parent()) > return; // not a valid spanner. > >Index: Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeUpdater.cpp (revision 232008) >+++ Source/WebCore/rendering/updating/RenderTreeUpdater.cpp (working copy) >@@ -344,19 +344,19 @@ void RenderTreeUpdater::updateElementRen > auto& renderer = *element.renderer(); > > if (update.recompositeLayer) { >- updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifferenceRecompositeLayer); >+ updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifference::RecompositeLayer); > return; > } > > if (update.change == Style::NoChange) { > if (pseudoStyleCacheIsInvalid(&renderer, update.style.get())) { >- updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifferenceEqual); >+ updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifference::Equal); > return; > } > return; > } > >- updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifferenceEqual); >+ updateRendererStyle(renderer, RenderStyle::clone(*update.style), StyleDifference::Equal); > } > > void RenderTreeUpdater::createRenderer(Element& element, RenderStyle&& style) >Index: Source/WebCore/style/StyleResolveForDocument.cpp >=================================================================== >--- Source/WebCore/style/StyleResolveForDocument.cpp (revision 232008) >+++ Source/WebCore/style/StyleResolveForDocument.cpp (working copy) >@@ -67,7 +67,7 @@ RenderStyle resolveForDocument(const Doc > documentStyle.setFontDescription(WTFMove(documentFontDescription)); > > // This overrides any -webkit-user-modify inherited from the parent iframe. >- documentStyle.setUserModify(document.inDesignMode() ? READ_WRITE : READ_ONLY); >+ documentStyle.setUserModify(document.inDesignMode() ? UserModify::ReadWrite : UserModify::ReadOnly); > #if PLATFORM(IOS) > if (document.inDesignMode()) > documentStyle.setTextSizeAdjust(TextSizeAdjustment(NoTextSizeAdjustment)); >Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 232008) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-05-20 Sam Weinig <sam@webkit.org> >+ >+ Modernize RenderStyleConstants.h - Part 1 >+ https://bugs.webkit.org/show_bug.cgi?id=185809 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::rangeForWebSelectionAtPosition): >+ (WebKit::WebPage::getPositionInformation): >+ Update for new enum names. >+ > 2018-05-18 Commit Queue <commit-queue@webkit.org> > > Unreviewed, rolling out r231982. >Index: Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >=================================================================== >--- Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (revision 232008) >+++ Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (working copy) >@@ -1053,7 +1053,7 @@ RefPtr<Range> WebPage::rangeForWebSelect > return nullptr; > > RenderObject* renderer = bestChoice->renderer(); >- if (!renderer || renderer->style().userSelect() == SELECT_NONE) >+ if (!renderer || renderer->style().userSelect() == UserSelect::None) > return nullptr; > > if (renderer->childrenInline() && (is<RenderBlock>(*renderer) && !downcast<RenderBlock>(*renderer).inlineContinuation()) && !renderer->isTable()) { >@@ -2165,7 +2165,7 @@ void WebPage::getPositionInformation(con > if (attachment.file()) > info.url = URL::fileURLWithFileSystemPath(downcast<HTMLAttachmentElement>(*hitNode).file()->path()); > } else { >- info.isSelectable = renderer->style().userSelect() != SELECT_NONE; >+ info.isSelectable = renderer->style().userSelect() != UserSelect::None; > if (info.isSelectable && !hitNode->isTextNode()) > info.isSelectable = !isAssistableElement(*downcast<Element>(hitNode)) && !rectIsTooBigForSelection(info.bounds, *result.innerNodeFrame()); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185809
:
340810
|
340811
|
340813
|
340814
|
340815
|
340816
|
340817
|
340820
|
340822
|
340823
|
340826
|
340827