Modernize RenderStyleConstants.h - Part 2
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2018 01:42:36 +0000 (01:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 May 2018 01:42:36 +0000 (01:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185901

Patch by Sam Weinig <sam@webkit.org> on 2018-05-24
Reviewed by Simon Fraser.

Source/WebCore:

Modernized the second 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:
    PseudoId
    ListStyleType (renamed from EListStyleType)
    BorderFit (renamed from EBorderFit)
    AnimationFillMode (renamed from EAnimationFillMode)
    AnimationPlayState (renamed from EAnimPlayState)
    WhiteSpace (renamed from EWhiteSpace)
    TextAlignMode (renamed from ETextAlign)
    TextTransform (renamed from ETextTransform)
    TextDecorationStyle
    TextAlignLast
    TextJustify
    TextZoom
    BreakBetween
    BreakInside
    EmptyCell (renamed from EEmptyCell)
    CaptionSide (renamed from ECaptionSide)
    ListStylePosition (renamed from EListStylePosition)
    Visibility (renamed from EVisibility)
    CursorType (renamed from ECursor)
    CursorVisibility
    DisplayType (renamed from EDisplay)
    InsideLink (renamed from EInsideLink)
    PointerEvents (renamed from EPointerEvents)
    Hyphens
    TextEmphasisFill
    TextEmphasisMark
    ImageResolutionSource
    ImageResolutionSnap
    Order
    ColumnAxis
    ColumnProgression
    LineSnap
    LineAlign
    RubyPosition
    AutoRepeatType
    CSSBoxType

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::isNodeVisible const):
* accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::determineAccessibilityRole):
* accessibility/AccessibilityMediaControls.cpp:
(WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored const):
(WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored const):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isDOMHidden const):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::defaultObjectInclusion const):
(WebCore::AccessibilityRenderObject::isUnvisited const):
(WebCore::AccessibilityRenderObject::isVisited const):
(WebCore::AccessibilityRenderObject::setValue):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable const):
* accessibility/atk/WebKitAccessibleInterfaceText.cpp:
(getAttributeSetForAccessibilityObject):
* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::updateCSSAnimationsForElement):
(WebCore::AnimationTimeline::updateCSSTransitionsForElement):
* animation/CSSAnimation.cpp:
(WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
* animation/DeclarativeAnimation.cpp:
(WebCore::DeclarativeAnimation::initialize):
* animation/KeyframeEffectReadOnly.cpp:
(WebCore::KeyframeEffectReadOnly::backingAnimationForCompositedRenderer const):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderTextDecorationStyleFlagsToCSSValue):
(WebCore::convertToPageBreak):
(WebCore::convertToColumnBreak):
(WebCore::ComputedStyleExtractor::styledElement const):
(WebCore::ComputedStyleExtractor::styledRenderer const):
(WebCore::computeRenderStyleForProperty):
(WebCore::shapePropertyValue):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
* css/CSSComputedStyleDeclaration.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CaptionSide const):
(WebCore::CSSPrimitiveValue::operator CursorType const):
(WebCore::CSSPrimitiveValue::operator CursorVisibility const):
(WebCore::CSSPrimitiveValue::operator DisplayType const):
(WebCore::CSSPrimitiveValue::operator EmptyCell const):
(WebCore::CSSPrimitiveValue::operator ListStylePosition const):
(WebCore::CSSPrimitiveValue::operator ListStyleType const):
(WebCore::CSSPrimitiveValue::operator BreakBetween const):
(WebCore::CSSPrimitiveValue::operator BreakInside const):
(WebCore::CSSPrimitiveValue::operator TextAlignMode const):
(WebCore::CSSPrimitiveValue::operator TextAlignLast const):
(WebCore::CSSPrimitiveValue::operator TextJustify const):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle const):
(WebCore::CSSPrimitiveValue::operator TextTransform const):
(WebCore::CSSPrimitiveValue::operator Visibility const):
(WebCore::CSSPrimitiveValue::operator WhiteSpace const):
(WebCore::CSSPrimitiveValue::operator RubyPosition const):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill const):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark const):
(WebCore::CSSPrimitiveValue::operator PointerEvents const):
(WebCore::CSSPrimitiveValue::operator Hyphens const):
(WebCore::CSSPrimitiveValue::operator LineSnap const):
(WebCore::CSSPrimitiveValue::operator LineAlign const):
(WebCore::CSSPrimitiveValue::operator Order const):
(WebCore::CSSPrimitiveValue::operator BorderFit const):
(WebCore::CSSPrimitiveValue::operator ColumnAxis const):
(WebCore::CSSPrimitiveValue::operator ColumnProgression const):
(WebCore::CSSPrimitiveValue::operator CSSBoxType const):
(WebCore::CSSPrimitiveValue::operator TextZoom const):
(WebCore::CSSPrimitiveValue::operator ECaptionSide const): Deleted.
(WebCore::CSSPrimitiveValue::operator ECursor const): Deleted.
(WebCore::CSSPrimitiveValue::operator EDisplay const): Deleted.
(WebCore::CSSPrimitiveValue::operator EEmptyCell const): Deleted.
(WebCore::CSSPrimitiveValue::operator EListStylePosition const): Deleted.
(WebCore::CSSPrimitiveValue::operator EListStyleType const): Deleted.
(WebCore::CSSPrimitiveValue::operator ETextAlign const): Deleted.
(WebCore::CSSPrimitiveValue::operator ETextTransform const): Deleted.
(WebCore::CSSPrimitiveValue::operator EVisibility const): Deleted.
(WebCore::CSSPrimitiveValue::operator EWhiteSpace const): Deleted.
(WebCore::CSSPrimitiveValue::operator EPointerEvents const): Deleted.
(WebCore::CSSPrimitiveValue::operator EBorderFit const): Deleted.
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationFillMode):
(WebCore::CSSToStyleMap::mapAnimationPlayState):
* css/CSSValueKeywords.in:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::ruleMatches):
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match const):
(WebCore::SelectorChecker::matchHostPseudoClass const):
(WebCore::hasScrollbarPseudoElement):
(WebCore::SelectorChecker::matchRecursively const):
* css/SelectorChecker.h:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextAlign):
(WebCore::StyleBuilderConverter::convertClipPath):
(WebCore::StyleBuilderConverter::convertShapeValue):
(WebCore::StyleBuilderConverter::createGridTrackList):
(WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
(WebCore::StyleBuilderConverter::convertPageBreakBetween):
(WebCore::StyleBuilderConverter::convertPageBreakInside):
(WebCore::StyleBuilderConverter::convertColumnBreakBetween):
(WebCore::StyleBuilderConverter::convertColumnBreakInside):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueImageResolution):
(WebCore::computeBaseSpecifiedFontSize):
(WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
(WebCore::StyleBuilderCustom::isValidDisplayValue):
(WebCore::StyleBuilderCustom::applyInheritDisplay):
(WebCore::StyleBuilderCustom::applyValueDisplay):
(WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
(WebCore::StyleBuilderCustom::applyValueCursor):
(WebCore::StyleBuilderCustom::applyValueContent):
(WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
(WebCore::StyleBuilderCustom::applyValueAlt):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
(WebCore::equivalentBlockDisplay):
(WebCore::doesNotInheritTextDecoration):
(WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
(WebCore::adjustDisplayContentsStyle):
(WebCore::StyleResolver::adjustSVGElementStyle):
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::styleRulesForElement):
(WebCore::isCacheableInMatchedPropertiesCache):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::CascadedProperties::Property::apply):
* css/StyleResolver.h:
(WebCore::StyleResolver::State::elementLinkState const):
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::constructFragmentsInternal):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
* dom/Document.cpp:
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::isPageBoxVisible):
(WebCore::Document::setVisuallyOrdered):
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::isFocusable const):
(WebCore::Element::hasDisplayContents const):
(WebCore::Element::storeDisplayContentsStyle):
(WebCore::Element::rendererIsNeeded):
(WebCore::beforeOrAfterPseudoElement):
(WebCore::Element::computedStyle):
* dom/Element.h:
* dom/Node.cpp:
(WebCore::computeEditabilityFromComputedStyle):
* dom/Node.h:
(WebCore::Node::isPseudoElement const):
(WebCore::Node::isBeforePseudoElement const):
(WebCore::Node::isAfterPseudoElement const):
(WebCore::Node::pseudoId const):
(WebCore::Node::customPseudoId const):
* dom/Position.cpp:
(WebCore::Position::upstream const):
(WebCore::Position::downstream const):
(WebCore::Position::isCandidate const):
(WebCore::Position::rendersInDifferentPosition const):
* dom/PositionIterator.cpp:
(WebCore::PositionIterator::isCandidate const):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::pseudoElementNameForEvents):
(WebCore::PseudoElement::PseudoElement):
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* dom/VisitedLinkState.h:
(WebCore::VisitedLinkState::determineLinkState):
* editing/Editing.cpp:
(WebCore::isSpecialHTMLElement):
(WebCore::isNodeRendered):
* editing/TextIterator.cpp:
(WebCore::hasVisibleTextNode):
(WebCore::TextIterator::handleTextNode):
(WebCore::TextIterator::handleTextBox):
(WebCore::TextIterator::handleTextNodeFirstLetter):
(WebCore::TextIterator::handleReplacedElement):
(WebCore::TextIterator::shouldRepresentNodeOffsetZero):
(WebCore::SimplifiedBackwardsTextIterator::advance):
* editing/VisibleUnits.cpp:
(WebCore::findStartOfParagraph):
(WebCore::findEndOfParagraph):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
* html/HTMLAreaElement.cpp:
(WebCore::HTMLAreaElement::isFocusable const):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::rendererIsNeeded):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::rendererIsNeeded):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::createInnerTextStyle):
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::isFocusable const):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::isFocusable const):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::createInnerTextStyle):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setSelectionRange):
(WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::autoplayPermitted const):
(WebCore::isMainContentForPurposesOfAutoplay):
* html/RubyElement.cpp:
(WebCore::RubyElement::createElementRenderer):
* html/RubyTextElement.cpp:
(WebCore::RubyTextElement::createElementRenderer):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):
* inspector/InspectorOverlay.cpp:
(WebCore::buildObjectForElementData):
* inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::getMatchedStylesForNode):
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* inspector/agents/InspectorDOMAgent.cpp:
(WebCore::pseudoElementType):
(WebCore::InspectorDOMAgent::buildObjectForNode):
* inspector/agents/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
* layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isInlineBlockBox const):
(WebCore::Layout::Box::isBlockLevelBox const):
(WebCore::Layout::Box::isInlineLevelBox const):
(WebCore::Layout::Box::isBlockContainerBox const):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectCursor):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsAboveCell):
(WebCore::Frame::searchForLabelsBeforeElement):
* page/FrameView.cpp:
(WebCore::FrameView::createScrollbar):
(WebCore::FrameView::adjustScrollStepForFixedContent):
(WebCore::FrameView::updateScrollCorner):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::playStatePlaying const):
(WebCore::AnimationBase::updatePlayState):
* page/animation/AnimationBase.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::suspendAnimations):
(WebCore::CompositeAnimation::resumeAnimations):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):
* page/ios/FrameIOS.mm:
(WebCore::Frame::nodeRespondingToClickEvents):
* platform/animation/Animation.cpp:
(WebCore::Animation::Animation):
* platform/animation/Animation.h:
(WebCore::Animation::clearPlayState):
(WebCore::Animation::fillMode const):
(WebCore::Animation::playState const):
(WebCore::Animation::setFillMode):
(WebCore::Animation::setPlayState):
(WebCore::Animation::fillsBackwards const):
(WebCore::Animation::fillsForwards const):
(WebCore::Animation::initialFillMode):
(WebCore::Animation::initialPlayState):
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/ios/wak/WAKWindow.mm:
(-[WAKWindow dumpTiles]):
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isLookalikeCharacter):
* rendering/ClipPathOperation.h:
* rendering/InlineBox.h:
(WebCore::InlineBox::visibleToHitTesting const):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::addToLine):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
(WebCore::InlineFlowBox::paint):
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
(WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::createTextRun const):
* rendering/PointerEventsHitRules.cpp:
(WebCore::PointerEventsHitRules::PointerEventsHitRules):
* rendering/PointerEventsHitRules.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::paint):
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::shouldPaintSelectionGaps const):
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
(WebCore::RenderBlock::firstLineBlock const):
(WebCore::findFirstLetterBlock):
(WebCore::RenderBlock::getFirstLetter):
(WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
(WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
(WebCore::RenderBlock::constructTextRun):
(WebCore::RenderBlock::layoutExcludedChildren):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
(WebCore::RenderBlock::createAnonymousBlock const):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::willCreateColumns const):
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
(WebCore::RenderBlockFlow::updateStylesForColumnChildren):
(WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
(WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
(WebCore::RenderBlockFlow::adjustForBorderFit const):
(WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
(WebCore::RenderBlockFlow::lineAtIndex const):
(WebCore::RenderBlockFlow::lineCount const):
(WebCore::getHeightForLineCount):
(WebCore::RenderBlockFlow::clearTruncation):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::lineCountForTextAutosizing):
(WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
(WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
(WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
(WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::constructLine):
(WebCore::RenderBlockFlow::textAlignmentForLine const):
(WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
(WebCore::expansionBehaviorForInlineTextBox):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::checkFloatInCleanLine):
(WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
(WebCore::RenderBlockFlow::startAlignedOffsetForLine):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
(WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
(WebCore::isCandidateForOpaquenessTest):
(WebCore::RenderBox::paintMask):
(WebCore::RenderBox::paintClippingMask):
(WebCore::RenderBox::positionLineBox):
(WebCore::RenderBox::clippedOverflowRectForRepaint const):
(WebCore::RenderBox::computeLogicalWidthInFragment const):
(WebCore::RenderBox::computeInlineDirectionMargins const):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::isUnsplittableForPagination const):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
* rendering/RenderBoxModelObject.h:
* rendering/RenderCounter.cpp:
(WebCore::planCounter):
(WebCore::RenderCounter::originalText const):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::childDoesNotAffectWidthOrFlexing):
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderDetailsMarker.cpp:
(WebCore::RenderDetailsMarker::paint):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
(WebCore::RenderElement::computeFirstLineStyle const):
(WebCore::RenderElement::propagateStyleToAnonymousChildren):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::insertedIntoTree):
(WebCore::RenderElement::willBeRemovedFromTree):
(WebCore::RenderElement::repaintAfterLayoutIfNeeded):
(WebCore::RenderElement::isVisibleInDocumentRect const):
(WebCore::RenderElement::getCachedPseudoStyle const):
(WebCore::RenderElement::getUncachedPseudoStyle const):
(WebCore::RenderElement::selectionPseudoStyle const):
* rendering/RenderElement.h:
(WebCore::RenderElement::visibleToHitTesting const):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::repaintOrMarkForLayout):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed):
(WebCore::updateStyleOfAnonymousBlockContinuations):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::clippedOverflowRectForRepaint const):
(WebCore::RenderInline::addAnnotatedRegions):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer):
(WebCore::RenderLayer::updateDescendantDependentFlags):
(WebCore::RenderLayer::createScrollbar):
(WebCore::styleRequiresScrollbar):
(WebCore::styleDefinesAutomaticScrollbar):
(WebCore::computeReferenceBox):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateAfterDescendants):
* rendering/RenderLayerCompositor.cpp:
(WebCore::scrollbarHasDisplayNone):
(WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
(WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintObject):
(WebCore::itemOffsetForAlignment):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):
(WebCore::RenderListBox::createScrollbar):
* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::computeMarkerStyle const):
* rendering/RenderListMarker.cpp:
(WebCore::effectiveListMarkerType):
(WebCore::listMarkerSuffix):
(WebCore::listMarkerText):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::suffix const):
(WebCore::RenderListMarker::isInside const):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderListMarker.h:
* rendering/RenderMediaControlElements.cpp:
(WebCore::RenderMediaVolumeSliderContainer::layout):
(WebCore::RenderTextTrackContainerElement::layout):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle):
(WebCore::if):
(RenderMenuList::itemStyle const):
(RenderMenuList::menuStyle const):
(RenderMenuList::createScrollbar):
* rendering/RenderMultiColumnSpannerPlaceholder.cpp:
(WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::addAnnotatedRegions):
* rendering/RenderObject.h:
(WebCore::RenderObject::isAnonymousBlock const):
(WebCore::RenderObject::isBeforeContent const):
(WebCore::RenderObject::isAfterContent const):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::shouldPaint):
(WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
* rendering/RenderRubyBase.cpp:
(WebCore::RenderRubyBase::textAlignmentForLine const):
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.cpp:
(WebCore::RenderRubyRun::createRubyBase const):
(WebCore::RenderRubyRun::staticCreateRubyRun):
(WebCore::RenderRubyRun::layoutBlock):
* rendering/RenderRubyText.cpp:
(WebCore::RenderRubyText::textAlignmentForLine const):
(WebCore::RenderRubyText::adjustInlineDirectionLineBounds const):
* rendering/RenderRubyText.h:
* rendering/RenderScrollbar.cpp:
(WebCore::pseudoForScrollbarPart):
(WebCore::RenderScrollbar::updateScrollbarPart):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::updateCancelButtonVisibility const):
(WebCore::RenderSearchField::visibilityForCancelButton const):
(WebCore::RenderSearchField::menuStyle const):
(WebCore::RenderSearchField::createScrollbar):
* rendering/RenderSearchField.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::willInsertTableSection):
(WebCore::RenderTable::layoutCaptions):
(WebCore::RenderTable::layout):
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::adjustBorderBoxRectForPainting):
(WebCore::RenderTable::paintMask):
(WebCore::RenderTable::recalcSections const):
(WebCore::RenderTable::createTableWithStyle):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::styleDidChange):
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
(WebCore::RenderTableCell::paintMask):
(WebCore::RenderTableCell::createTableCellWithStyle):
* rendering/RenderTableCol.cpp:
(WebCore::RenderTableCol::updateFromElement):
(WebCore::RenderTableCol::isChildAllowed const):
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::styleDidChange):
(WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
(WebCore::RenderTableRow::createTableRowWithStyle):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::addCell):
(WebCore::RenderTableSection::paint):
(WebCore::RenderTableSection::createTableSectionWithStyle):
* rendering/RenderText.cpp:
(WebCore::RenderText::styleDidChange):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::applyTextTransform):
* rendering/RenderTextFragment.cpp:
(WebCore::RenderTextFragment::styleDidChange):
(WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::adjustMenuListStyle const):
* rendering/RenderThemeWin.cpp:
(WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
* rendering/RenderView.cpp:
(WebCore::rendererObscuresBackground):
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::setWidget):
(WebCore::RenderWidget::styleDidChange):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox const):
(WebCore::RootInlineBox::lineSnapAdjustment const):
(WebCore::RootInlineBox::lineSelectionGap):
(WebCore::RootInlineBox::computeCaretRect const):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForFontAndText):
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::textAlignForLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::hitTestFlow):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
* rendering/TextDecorationPainter.cpp:
(WebCore::textDecorationStyleToStrokeStyle):
(WebCore::TextDecorationPainter::paintTextDecoration):
(WebCore::collectStylesForRenderer):
* rendering/TextDecorationPainter.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
(WebCore::BreakingContext::handleBR):
(WebCore::BreakingContext::handleOutOfFlowPositioned):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::canBreakAtThisPosition):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineInlineHeaders.h:
(WebCore::shouldCollapseWhiteSpace):
* rendering/line/LineWidth.cpp:
(WebCore::newFloatShrinksLine):
* rendering/mathml/MathOperator.cpp:
(WebCore::MathOperator::paint):
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint):
* rendering/mathml/RenderMathMLMath.cpp:
(WebCore::RenderMathMLMath::layoutBlock):
* rendering/mathml/RenderMathMLMenclose.cpp:
(WebCore::RenderMathMLMenclose::paint):
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint):
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::paint):
* rendering/shapes/BoxShape.cpp:
(WebCore::computeRoundedRectForBoxShape):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::ShapeOutsideInfo::logicalTopOffset const):
(WebCore::ShapeOutsideInfo::logicalLeftOffset const):
* rendering/style/CounterContent.h:
(WebCore::CounterContent::CounterContent):
(WebCore::CounterContent::listStyle const):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::createAnonymousStyleWithDisplay):
(WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::hasUniquePseudoStyle const):
(WebCore::RenderStyle::getCachedPseudoStyle const):
(WebCore::RenderStyle::addCachedPseudoStyle):
(WebCore::RenderStyle::changeRequiresLayout const):
(WebCore::requiresPainting):
(WebCore::RenderStyle::hyphenString const):
(WebCore::RenderStyle::textEmphasisMarkString const):
(WebCore::RenderStyle::visitedDependentColor const):
(WebCore::RenderStyle::textEmphasisMark const):
(WebCore::RenderStyle::setColumnStylesFromPaginationMode):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setStyleType):
(WebCore::RenderStyle::setRTLOrdering):
(WebCore::RenderStyle::display const):
(WebCore::RenderStyle::visibility const):
(WebCore::RenderStyle::textAlign const):
(WebCore::RenderStyle::textTransform const):
(WebCore::RenderStyle::whiteSpace const):
(WebCore::RenderStyle::emptyCells const):
(WebCore::RenderStyle::captionSide const):
(WebCore::RenderStyle::listStyleType const):
(WebCore::RenderStyle::listStylePosition const):
(WebCore::RenderStyle::cursor const):
(WebCore::RenderStyle::insideLink const):
(WebCore::RenderStyle::borderFit const):
(WebCore::RenderStyle::pointerEvents const):
(WebCore::RenderStyle::setDisplay):
(WebCore::RenderStyle::setOriginalDisplay):
(WebCore::RenderStyle::setVisibility):
(WebCore::RenderStyle::setTextAlign):
(WebCore::RenderStyle::setTextTransform):
(WebCore::RenderStyle::setTextDecorationStyle):
(WebCore::RenderStyle::setTextDecorationSkip):
(WebCore::RenderStyle::setTextUnderlinePosition):
(WebCore::RenderStyle::setDirection):
(WebCore::RenderStyle::setTextZoom):
(WebCore::RenderStyle::setWhiteSpace):
(WebCore::RenderStyle::setEmptyCells):
(WebCore::RenderStyle::setCaptionSide):
(WebCore::RenderStyle::setListStyleType):
(WebCore::RenderStyle::setListStylePosition):
(WebCore::RenderStyle::setCursor):
(WebCore::RenderStyle::setCursorVisibility):
(WebCore::RenderStyle::setInsideLink):
(WebCore::RenderStyle::setHyphens):
(WebCore::RenderStyle::setBorderFit):
(WebCore::RenderStyle::setColumnAxis):
(WebCore::RenderStyle::setColumnProgression):
(WebCore::RenderStyle::setTextEmphasisFill):
(WebCore::RenderStyle::setTextEmphasisMark):
(WebCore::RenderStyle::setRubyPosition):
(WebCore::RenderStyle::setBreakBefore):
(WebCore::RenderStyle::setBreakAfter):
(WebCore::RenderStyle::setBreakInside):
(WebCore::RenderStyle::setHangingPunctuation):
(WebCore::RenderStyle::setLineSnap):
(WebCore::RenderStyle::setLineAlign):
(WebCore::RenderStyle::setPointerEvents):
(WebCore::RenderStyle::initialDisplay):
(WebCore::RenderStyle::initialBreakBetween):
(WebCore::RenderStyle::initialBreakInside):
(WebCore::RenderStyle::initialCaptionSide):
(WebCore::RenderStyle::initialColumnAxis):
(WebCore::RenderStyle::initialColumnProgression):
(WebCore::RenderStyle::initialEmptyCells):
(WebCore::RenderStyle::initialListStylePosition):
(WebCore::RenderStyle::initialListStyleType):
(WebCore::RenderStyle::initialTextTransform):
(WebCore::RenderStyle::initialVisibility):
(WebCore::RenderStyle::initialWhiteSpace):
(WebCore::RenderStyle::initialCursor):
(WebCore::RenderStyle::initialTextAlign):
(WebCore::RenderStyle::initialTextDecorationStyle):
(WebCore::RenderStyle::initialTextZoom):
(WebCore::RenderStyle::initialHyphens):
(WebCore::RenderStyle::initialBorderFit):
(WebCore::RenderStyle::initialRTLOrdering):
(WebCore::RenderStyle::initialPointerEvents):
(WebCore::RenderStyle::initialTextEmphasisColor):
(WebCore::RenderStyle::initialTextEmphasisFill):
(WebCore::RenderStyle::initialTextEmphasisMark):
(WebCore::RenderStyle::initialRubyPosition):
(WebCore::RenderStyle::initialImageResolutionSource):
(WebCore::RenderStyle::initialImageResolutionSnap):
(WebCore::RenderStyle::initialTextAlignLast):
(WebCore::RenderStyle::initialTextJustify):
(WebCore::RenderStyle::initialCursorVisibility):
(WebCore::RenderStyle::initialGridAutoRepeatType):
(WebCore::RenderStyle::initialLineSnap):
(WebCore::RenderStyle::initialLineAlign):
(WebCore::RenderStyle::NonInheritedFlags::hasAnyPublicPseudoStyles const):
(WebCore::RenderStyle::originalDisplay const):
(WebCore::RenderStyle::NonInheritedFlags::hasPseudoStyle const):
(WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyle):
(WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyles):
(WebCore::RenderStyle::autoWrap):
(WebCore::RenderStyle::preserveNewline):
(WebCore::RenderStyle::collapseWhiteSpace):
(WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
(WebCore::RenderStyle::hasInlineColumnAxis const):
(WebCore::RenderStyle::isDisplayRegionType const):
(WebCore::RenderStyle::isDisplayReplacedType):
(WebCore::RenderStyle::isDisplayInlineType):
(WebCore::RenderStyle::isDisplayFlexibleBox):
(WebCore::RenderStyle::isDisplayGridBox):
(WebCore::RenderStyle::isDisplayFlexibleOrGridBox):
(WebCore::pseudoElementRendererIsNeeded):
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
(WebCore::alwaysPageBreak):
* rendering/style/RenderStyleConstants.h:
(WebCore::PseudoIdSet::has const):
(WebCore::PseudoIdSet::add):
* rendering/style/ShapeValue.h:
* rendering/style/StyleMultiColData.cpp:
(WebCore::StyleMultiColData::StyleMultiColData):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
* rendering/style/StyleRareNonInheritedData.h:
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGImage.cpp:
(WebCore::RenderSVGImage::paint):
(WebCore::RenderSVGImage::nodeAtFloatPoint):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::styleDidChange):
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::checkIntersection):
(WebCore::RenderSVGModelObject::checkEnclosure):
* rendering/svg/RenderSVGResource.cpp:
(WebCore::requestPaintingResource):
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::pathOnlyClipping):
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
(WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::clippedOverflowRectForRepaint const):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::paint):
(WebCore::RenderSVGShape::nodeAtFloatPoint):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::nodeAtFloatPoint):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::constructTextRun const):
(WebCore::SVGInlineTextBox::paintDecoration):
(WebCore::SVGInlineTextBox::nodeAtPoint):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::processRenderSVGInlineText):
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
* rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::RenderTreeBuilder::Block::detach):
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::styleForFirstLetter):
(WebCore::RenderTreeBuilder::FirstLetter::updateAfterDescendants):
(WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
(WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
* rendering/updating/RenderTreeBuilderInline.cpp:
(WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
(WebCore::RenderTreeBuilder::Inline::newChildIsInline):
* rendering/updating/RenderTreeBuilderList.cpp:
(WebCore::RenderTreeBuilder::List::updateItemMarker):
* rendering/updating/RenderTreeBuilderMathML.cpp:
(WebCore::RenderTreeBuilder::MathML::createMathMLOperator):
* rendering/updating/RenderTreeBuilderMultiColumn.cpp:
(WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
(WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
* rendering/updating/RenderTreeBuilderRuby.cpp:
(WebCore::isAnonymousRubyInlineBlock):
(WebCore::isRubyBeforeBlock):
(WebCore::isRubyAfterBlock):
(WebCore::createAnonymousRubyInlineBlock):
* rendering/updating/RenderTreeBuilderTable.cpp:
(WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateBeforeDescendants):
(WebCore::RenderTreeUpdater::updateAfterDescendants):
(WebCore::RenderTreeUpdater::updateElementRenderer):
(WebCore::elementImplicitVisibility):
(WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
(WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
* rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
* style/InlineTextBoxStyle.cpp:
(WebCore::visualOverflowForDecorations):
* style/StyleChange.cpp:
(WebCore::Style::determineChange):
* style/StyleFontSizeFunctions.cpp:
(WebCore::Style::computedFontSizeFromSpecifiedSize):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleSharingResolver.cpp:
* style/StyleTreeResolver.cpp:
(WebCore::Style::affectsRenderedSubtree):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::TreeResolver::resolvePseudoStyle):
(WebCore::Style::TreeResolver::parentBoxStyle const):
(WebCore::Style::createInheritedDisplayContentsStyleIfNeeded):
(WebCore::Style::TreeResolver::resolveComposedTree):
* svg/SVGElement.h:
* svg/SVGGElement.cpp:
(WebCore::SVGGElement::createElementRenderer):

Source/WebKitLegacy/mac:

* WebView/WebHTMLRepresentation.mm:
(searchForLabelsBeforeElement):
* WebView/WebView.mm:
(nsTextAlignmentFromRenderStyle):
Update for new enum names.

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

197 files changed:
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/AccessibilityList.cpp
Source/WebCore/accessibility/AccessibilityMediaControls.cpp
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityTable.cpp
Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/CSSAnimation.cpp
Source/WebCore/animation/DeclarativeAnimation.cpp
Source/WebCore/animation/KeyframeEffectReadOnly.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.h
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSSelector.cpp
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/css/ElementRuleCollector.h
Source/WebCore/css/SelectorChecker.cpp
Source/WebCore/css/SelectorChecker.h
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/Position.cpp
Source/WebCore/dom/PositionIterator.cpp
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/dom/VisitedLinkState.cpp
Source/WebCore/dom/VisitedLinkState.h
Source/WebCore/editing/Editing.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/VisibleUnits.cpp
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/html/HTMLAreaElement.cpp
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLIFrameElement.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLOptGroupElement.cpp
Source/WebCore/html/HTMLOptionElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLTextFormControlElement.cpp
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/html/RubyElement.cpp
Source/WebCore/html/RubyTextElement.cpp
Source/WebCore/html/shadow/TextControlInnerElements.cpp
Source/WebCore/inspector/InspectorOverlay.cpp
Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp
Source/WebCore/layout/layouttree/LayoutBox.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/animation/AnimationBase.cpp
Source/WebCore/page/animation/AnimationBase.h
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/page/animation/CompositeAnimation.cpp
Source/WebCore/page/animation/KeyframeAnimation.cpp
Source/WebCore/page/ios/FrameIOS.mm
Source/WebCore/platform/animation/Animation.cpp
Source/WebCore/platform/animation/Animation.h
Source/WebCore/platform/graphics/GraphicsTypes.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/ios/wak/WAKWindow.mm
Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
Source/WebCore/rendering/ClipPathOperation.h
Source/WebCore/rendering/InlineBox.h
Source/WebCore/rendering/InlineFlowBox.cpp
Source/WebCore/rendering/InlineFlowBox.h
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/PointerEventsHitRules.cpp
Source/WebCore/rendering/PointerEventsHitRules.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderCounter.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderDetailsMarker.cpp
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderElement.h
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderFullScreen.cpp
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListItem.cpp
Source/WebCore/rendering/RenderListMarker.cpp
Source/WebCore/rendering/RenderListMarker.h
Source/WebCore/rendering/RenderMediaControlElements.cpp
Source/WebCore/rendering/RenderMenuList.cpp
Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderRubyBase.cpp
Source/WebCore/rendering/RenderRubyBase.h
Source/WebCore/rendering/RenderRubyRun.cpp
Source/WebCore/rendering/RenderRubyText.cpp
Source/WebCore/rendering/RenderRubyText.h
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderSearchField.cpp
Source/WebCore/rendering/RenderSearchField.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTableCell.cpp
Source/WebCore/rendering/RenderTableCol.cpp
Source/WebCore/rendering/RenderTableCol.h
Source/WebCore/rendering/RenderTableRow.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderTextFragment.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/RenderThemeWin.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderWidget.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h
Source/WebCore/rendering/TextDecorationPainter.cpp
Source/WebCore/rendering/TextDecorationPainter.h
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/rendering/line/LineInlineHeaders.h
Source/WebCore/rendering/line/LineWidth.cpp
Source/WebCore/rendering/mathml/MathOperator.cpp
Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp
Source/WebCore/rendering/mathml/RenderMathMLMath.cpp
Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp
Source/WebCore/rendering/mathml/RenderMathMLToken.cpp
Source/WebCore/rendering/shapes/BoxShape.cpp
Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
Source/WebCore/rendering/style/CounterContent.h
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/ShapeValue.h
Source/WebCore/rendering/style/StyleMultiColData.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.h
Source/WebCore/rendering/svg/RenderSVGContainer.cpp
Source/WebCore/rendering/svg/RenderSVGImage.cpp
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/svg/RenderSVGModelObject.cpp
Source/WebCore/rendering/svg/RenderSVGResource.cpp
Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/RenderSVGShape.cpp
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/rendering/svg/SVGRenderSupport.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp
Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp
Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
Source/WebCore/style/InlineTextBoxStyle.cpp
Source/WebCore/style/StyleChange.cpp
Source/WebCore/style/StyleFontSizeFunctions.cpp
Source/WebCore/style/StyleResolveForDocument.cpp
Source/WebCore/style/StyleSharingResolver.cpp
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/svg/SVGElement.h
Source/WebCore/svg/SVGGElement.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm
Source/WebKitLegacy/mac/WebView/WebView.mm

index bf9acc5..514f099 100644 (file)
@@ -1,3 +1,853 @@
+2018-05-24  Sam Weinig  <sam@webkit.org>
+
+        Modernize RenderStyleConstants.h - Part 2
+        https://bugs.webkit.org/show_bug.cgi?id=185901
+
+        Reviewed by Simon Fraser.
+
+        Modernized the second 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:
+            PseudoId
+            ListStyleType (renamed from EListStyleType)
+            BorderFit (renamed from EBorderFit)
+            AnimationFillMode (renamed from EAnimationFillMode)
+            AnimationPlayState (renamed from EAnimPlayState)
+            WhiteSpace (renamed from EWhiteSpace)
+            TextAlignMode (renamed from ETextAlign)
+            TextTransform (renamed from ETextTransform)
+            TextDecorationStyle
+            TextAlignLast
+            TextJustify
+            TextZoom
+            BreakBetween
+            BreakInside
+            EmptyCell (renamed from EEmptyCell)
+            CaptionSide (renamed from ECaptionSide)
+            ListStylePosition (renamed from EListStylePosition)
+            Visibility (renamed from EVisibility)
+            CursorType (renamed from ECursor)
+            CursorVisibility
+            DisplayType (renamed from EDisplay)
+            InsideLink (renamed from EInsideLink)
+            PointerEvents (renamed from EPointerEvents)
+            Hyphens
+            TextEmphasisFill
+            TextEmphasisMark
+            ImageResolutionSource
+            ImageResolutionSnap
+            Order
+            ColumnAxis
+            ColumnProgression
+            LineSnap
+            LineAlign
+            RubyPosition
+            AutoRepeatType
+            CSSBoxType
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::isNodeVisible const):
+        * accessibility/AccessibilityList.cpp:
+        (WebCore::AccessibilityList::determineAccessibilityRole):
+        * accessibility/AccessibilityMediaControls.cpp:
+        (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored const):
+        (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored const):
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::isDOMHidden const):
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::defaultObjectInclusion const):
+        (WebCore::AccessibilityRenderObject::isUnvisited const):
+        (WebCore::AccessibilityRenderObject::isVisited const):
+        (WebCore::AccessibilityRenderObject::setValue):
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::isDataTable const):
+        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
+        (getAttributeSetForAccessibilityObject):
+        * animation/AnimationTimeline.cpp:
+        (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
+        (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
+        * animation/CSSAnimation.cpp:
+        (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
+        * animation/DeclarativeAnimation.cpp:
+        (WebCore::DeclarativeAnimation::initialize):
+        * animation/KeyframeEffectReadOnly.cpp:
+        (WebCore::KeyframeEffectReadOnly::backingAnimationForCompositedRenderer const):
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::renderTextDecorationStyleFlagsToCSSValue):
+        (WebCore::convertToPageBreak):
+        (WebCore::convertToColumnBreak):
+        (WebCore::ComputedStyleExtractor::styledElement const):
+        (WebCore::ComputedStyleExtractor::styledRenderer const):
+        (WebCore::computeRenderStyleForProperty):
+        (WebCore::shapePropertyValue):
+        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
+        * css/CSSComputedStyleDeclaration.h:
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator CaptionSide const):
+        (WebCore::CSSPrimitiveValue::operator CursorType const):
+        (WebCore::CSSPrimitiveValue::operator CursorVisibility const):
+        (WebCore::CSSPrimitiveValue::operator DisplayType const):
+        (WebCore::CSSPrimitiveValue::operator EmptyCell const):
+        (WebCore::CSSPrimitiveValue::operator ListStylePosition const):
+        (WebCore::CSSPrimitiveValue::operator ListStyleType const):
+        (WebCore::CSSPrimitiveValue::operator BreakBetween const):
+        (WebCore::CSSPrimitiveValue::operator BreakInside const):
+        (WebCore::CSSPrimitiveValue::operator TextAlignMode const):
+        (WebCore::CSSPrimitiveValue::operator TextAlignLast const):
+        (WebCore::CSSPrimitiveValue::operator TextJustify const):
+        (WebCore::CSSPrimitiveValue::operator TextDecorationStyle const):
+        (WebCore::CSSPrimitiveValue::operator TextTransform const):
+        (WebCore::CSSPrimitiveValue::operator Visibility const):
+        (WebCore::CSSPrimitiveValue::operator WhiteSpace const):
+        (WebCore::CSSPrimitiveValue::operator RubyPosition const):
+        (WebCore::CSSPrimitiveValue::operator TextEmphasisFill const):
+        (WebCore::CSSPrimitiveValue::operator TextEmphasisMark const):
+        (WebCore::CSSPrimitiveValue::operator PointerEvents const):
+        (WebCore::CSSPrimitiveValue::operator Hyphens const):
+        (WebCore::CSSPrimitiveValue::operator LineSnap const):
+        (WebCore::CSSPrimitiveValue::operator LineAlign const):
+        (WebCore::CSSPrimitiveValue::operator Order const):
+        (WebCore::CSSPrimitiveValue::operator BorderFit const):
+        (WebCore::CSSPrimitiveValue::operator ColumnAxis const):
+        (WebCore::CSSPrimitiveValue::operator ColumnProgression const):
+        (WebCore::CSSPrimitiveValue::operator CSSBoxType const):
+        (WebCore::CSSPrimitiveValue::operator TextZoom const):
+        (WebCore::CSSPrimitiveValue::operator ECaptionSide const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator ECursor const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EDisplay const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EEmptyCell const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EListStylePosition const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EListStyleType const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator ETextAlign const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator ETextTransform const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EVisibility const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EWhiteSpace const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EPointerEvents const): Deleted.
+        (WebCore::CSSPrimitiveValue::operator EBorderFit const): Deleted.
+        * css/CSSSelector.cpp:
+        (WebCore::CSSSelector::pseudoId):
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapAnimationFillMode):
+        (WebCore::CSSToStyleMap::mapAnimationPlayState):
+        * css/CSSValueKeywords.in:
+        * css/ElementRuleCollector.cpp:
+        (WebCore::ElementRuleCollector::collectMatchingRules):
+        (WebCore::ElementRuleCollector::ruleMatches):
+        (WebCore::ElementRuleCollector::collectMatchingRulesForList):
+        * css/ElementRuleCollector.h:
+        * css/SelectorChecker.cpp:
+        (WebCore::SelectorChecker::match const):
+        (WebCore::SelectorChecker::matchHostPseudoClass const):
+        (WebCore::hasScrollbarPseudoElement):
+        (WebCore::SelectorChecker::matchRecursively const):
+        * css/SelectorChecker.h:
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertTextAlign):
+        (WebCore::StyleBuilderConverter::convertClipPath):
+        (WebCore::StyleBuilderConverter::convertShapeValue):
+        (WebCore::StyleBuilderConverter::createGridTrackList):
+        (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
+        (WebCore::StyleBuilderConverter::convertPageBreakBetween):
+        (WebCore::StyleBuilderConverter::convertPageBreakInside):
+        (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
+        (WebCore::StyleBuilderConverter::convertColumnBreakInside):
+        * css/StyleBuilderCustom.h:
+        (WebCore::StyleBuilderCustom::applyValueImageResolution):
+        (WebCore::computeBaseSpecifiedFontSize):
+        (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
+        (WebCore::StyleBuilderCustom::isValidDisplayValue):
+        (WebCore::StyleBuilderCustom::applyInheritDisplay):
+        (WebCore::StyleBuilderCustom::applyValueDisplay):
+        (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
+        (WebCore::StyleBuilderCustom::applyValueCursor):
+        (WebCore::StyleBuilderCustom::applyValueContent):
+        (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
+        (WebCore::StyleBuilderCustom::applyValueAlt):
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::styleForElement):
+        (WebCore::equivalentBlockDisplay):
+        (WebCore::doesNotInheritTextDecoration):
+        (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
+        (WebCore::adjustDisplayContentsStyle):
+        (WebCore::StyleResolver::adjustSVGElementStyle):
+        (WebCore::StyleResolver::adjustRenderStyle):
+        (WebCore::StyleResolver::styleRulesForElement):
+        (WebCore::isCacheableInMatchedPropertiesCache):
+        (WebCore::StyleResolver::applyMatchedProperties):
+        (WebCore::StyleResolver::CascadedProperties::Property::apply):
+        * css/StyleResolver.h:
+        (WebCore::StyleResolver::State::elementLinkState const):
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::constructFragmentsInternal):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
+        * dom/Document.cpp:
+        (WebCore::Document::styleForElementIgnoringPendingStylesheets):
+        (WebCore::Document::isPageBoxVisible):
+        (WebCore::Document::setVisuallyOrdered):
+        * dom/Document.h:
+        * dom/Element.cpp:
+        (WebCore::Element::isFocusable const):
+        (WebCore::Element::hasDisplayContents const):
+        (WebCore::Element::storeDisplayContentsStyle):
+        (WebCore::Element::rendererIsNeeded):
+        (WebCore::beforeOrAfterPseudoElement):
+        (WebCore::Element::computedStyle):
+        * dom/Element.h:
+        * dom/Node.cpp:
+        (WebCore::computeEditabilityFromComputedStyle):
+        * dom/Node.h:
+        (WebCore::Node::isPseudoElement const):
+        (WebCore::Node::isBeforePseudoElement const):
+        (WebCore::Node::isAfterPseudoElement const):
+        (WebCore::Node::pseudoId const):
+        (WebCore::Node::customPseudoId const):
+        * dom/Position.cpp:
+        (WebCore::Position::upstream const):
+        (WebCore::Position::downstream const):
+        (WebCore::Position::isCandidate const):
+        (WebCore::Position::rendersInDifferentPosition const):
+        * dom/PositionIterator.cpp:
+        (WebCore::PositionIterator::isCandidate const):
+        * dom/PseudoElement.cpp:
+        (WebCore::PseudoElement::pseudoElementNameForEvents):
+        (WebCore::PseudoElement::PseudoElement):
+        * dom/VisitedLinkState.cpp:
+        (WebCore::VisitedLinkState::determineLinkStateSlowCase):
+        * dom/VisitedLinkState.h:
+        (WebCore::VisitedLinkState::determineLinkState):
+        * editing/Editing.cpp:
+        (WebCore::isSpecialHTMLElement):
+        (WebCore::isNodeRendered):
+        * editing/TextIterator.cpp:
+        (WebCore::hasVisibleTextNode):
+        (WebCore::TextIterator::handleTextNode):
+        (WebCore::TextIterator::handleTextBox):
+        (WebCore::TextIterator::handleTextNodeFirstLetter):
+        (WebCore::TextIterator::handleReplacedElement):
+        (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
+        (WebCore::SimplifiedBackwardsTextIterator::advance):
+        * editing/VisibleUnits.cpp:
+        (WebCore::findStartOfParagraph):
+        (WebCore::findEndOfParagraph):
+        * editing/ios/EditorIOS.mm:
+        (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
+        * html/HTMLAreaElement.cpp:
+        (WebCore::HTMLAreaElement::isFocusable const):
+        * html/HTMLFormElement.cpp:
+        (WebCore::HTMLFormElement::rendererIsNeeded):
+        * html/HTMLIFrameElement.cpp:
+        (WebCore::HTMLIFrameElement::rendererIsNeeded):
+        * html/HTMLInputElement.cpp:
+        (WebCore::HTMLInputElement::createInnerTextStyle):
+        * html/HTMLOptGroupElement.cpp:
+        (WebCore::HTMLOptGroupElement::isFocusable const):
+        * html/HTMLOptionElement.cpp:
+        (WebCore::HTMLOptionElement::isFocusable const):
+        * html/HTMLTextAreaElement.cpp:
+        (WebCore::HTMLTextAreaElement::createInnerTextStyle):
+        * html/HTMLTextFormControlElement.cpp:
+        (WebCore::HTMLTextFormControlElement::setSelectionRange):
+        (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
+        * html/MediaElementSession.cpp:
+        (WebCore::MediaElementSession::autoplayPermitted const):
+        (WebCore::isMainContentForPurposesOfAutoplay):
+        * html/RubyElement.cpp:
+        (WebCore::RubyElement::createElementRenderer):
+        * html/RubyTextElement.cpp:
+        (WebCore::RubyTextElement::createElementRenderer):
+        * html/shadow/TextControlInnerElements.cpp:
+        (WebCore::TextControlInnerElement::resolveCustomStyle):
+        (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
+        * inspector/InspectorOverlay.cpp:
+        (WebCore::buildObjectForElementData):
+        * inspector/agents/InspectorCSSAgent.cpp:
+        (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
+        (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
+        * inspector/agents/InspectorDOMAgent.cpp:
+        (WebCore::pseudoElementType):
+        (WebCore::InspectorDOMAgent::buildObjectForNode):
+        * inspector/agents/InspectorLayerTreeAgent.cpp:
+        (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
+        * layout/layouttree/LayoutBox.cpp:
+        (WebCore::Layout::Box::isInlineBlockBox const):
+        (WebCore::Layout::Box::isBlockLevelBox const):
+        (WebCore::Layout::Box::isInlineLevelBox const):
+        (WebCore::Layout::Box::isBlockContainerBox const):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::selectCursor):
+        * page/Frame.cpp:
+        (WebCore::Frame::searchForLabelsAboveCell):
+        (WebCore::Frame::searchForLabelsBeforeElement):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::createScrollbar):
+        (WebCore::FrameView::adjustScrollStepForFixedContent):
+        (WebCore::FrameView::updateScrollCorner):
+        * page/animation/AnimationBase.cpp:
+        (WebCore::AnimationBase::playStatePlaying const):
+        (WebCore::AnimationBase::updatePlayState):
+        * page/animation/AnimationBase.h:
+        * page/animation/CSSPropertyAnimation.cpp:
+        (WebCore::blendFunc):
+        (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+        * page/animation/CompositeAnimation.cpp:
+        (WebCore::CompositeAnimation::updateTransitions):
+        (WebCore::CompositeAnimation::updateKeyframeAnimations):
+        (WebCore::CompositeAnimation::suspendAnimations):
+        (WebCore::CompositeAnimation::resumeAnimations):
+        * page/animation/KeyframeAnimation.cpp:
+        (WebCore::KeyframeAnimation::animate):
+        * page/ios/FrameIOS.mm:
+        (WebCore::Frame::nodeRespondingToClickEvents):
+        * platform/animation/Animation.cpp:
+        (WebCore::Animation::Animation):
+        * platform/animation/Animation.h:
+        (WebCore::Animation::clearPlayState):
+        (WebCore::Animation::fillMode const):
+        (WebCore::Animation::playState const):
+        (WebCore::Animation::setFillMode):
+        (WebCore::Animation::setPlayState):
+        (WebCore::Animation::fillsBackwards const):
+        (WebCore::Animation::fillsForwards const):
+        (WebCore::Animation::initialFillMode):
+        (WebCore::Animation::initialPlayState):
+        * platform/graphics/GraphicsTypes.h:
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
+        * platform/ios/wak/WAKWindow.mm:
+        (-[WAKWindow dumpTiles]):
+        * platform/mac/WebCoreNSURLExtras.mm:
+        (WebCore::isLookalikeCharacter):
+        * rendering/ClipPathOperation.h:
+        * rendering/InlineBox.h:
+        (WebCore::InlineBox::visibleToHitTesting const):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::addToLine):
+        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
+        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
+        (WebCore::InlineFlowBox::paint):
+        (WebCore::InlineFlowBox::paintBoxDecorations):
+        (WebCore::InlineFlowBox::paintMask):
+        (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
+        (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
+        (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
+        * rendering/InlineFlowBox.h:
+        (WebCore::InlineFlowBox::InlineFlowBox):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
+        (WebCore::InlineTextBox::paint):
+        (WebCore::InlineTextBox::createTextRun const):
+        * rendering/PointerEventsHitRules.cpp:
+        (WebCore::PointerEventsHitRules::PointerEventsHitRules):
+        * rendering/PointerEventsHitRules.h:
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
+        (WebCore::RenderBlock::paint):
+        (WebCore::RenderBlock::paintObject):
+        (WebCore::RenderBlock::shouldPaintSelectionGaps const):
+        (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
+        (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
+        (WebCore::isChildHitTestCandidate):
+        (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
+        (WebCore::RenderBlock::firstLineBlock const):
+        (WebCore::findFirstLetterBlock):
+        (WebCore::RenderBlock::getFirstLetter):
+        (WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
+        (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
+        (WebCore::RenderBlock::constructTextRun):
+        (WebCore::RenderBlock::layoutExcludedChildren):
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
+        (WebCore::RenderBlock::createAnonymousBlock const):
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::willCreateColumns const):
+        (WebCore::RenderBlockFlow::layoutBlock):
+        (WebCore::RenderBlockFlow::applyBeforeBreak):
+        (WebCore::RenderBlockFlow::applyAfterBreak):
+        (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
+        (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
+        (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
+        (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
+        (WebCore::RenderBlockFlow::adjustForBorderFit const):
+        (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
+        (WebCore::RenderBlockFlow::lineAtIndex const):
+        (WebCore::RenderBlockFlow::lineCount const):
+        (WebCore::getHeightForLineCount):
+        (WebCore::RenderBlockFlow::clearTruncation):
+        (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
+        (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
+        (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
+        (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
+        (WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
+        (WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::constructLine):
+        (WebCore::RenderBlockFlow::textAlignmentForLine const):
+        (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
+        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
+        (WebCore::expansionBehaviorForInlineTextBox):
+        (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::checkFloatInCleanLine):
+        (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
+        (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
+        (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
+        (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
+        (WebCore::isCandidateForOpaquenessTest):
+        (WebCore::RenderBox::paintMask):
+        (WebCore::RenderBox::paintClippingMask):
+        (WebCore::RenderBox::positionLineBox):
+        (WebCore::RenderBox::clippedOverflowRectForRepaint const):
+        (WebCore::RenderBox::computeLogicalWidthInFragment const):
+        (WebCore::RenderBox::computeInlineDirectionMargins const):
+        (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
+        (WebCore::RenderBox::positionForPoint):
+        (WebCore::RenderBox::isUnsplittableForPagination const):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
+        * rendering/RenderBoxModelObject.h:
+        * rendering/RenderCounter.cpp:
+        (WebCore::planCounter):
+        (WebCore::RenderCounter::originalText const):
+        * rendering/RenderDeprecatedFlexibleBox.cpp:
+        (WebCore::childDoesNotAffectWidthOrFlexing):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
+        (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
+        * rendering/RenderDetailsMarker.cpp:
+        (WebCore::RenderDetailsMarker::paint):
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::createFor):
+        (WebCore::RenderElement::computeFirstLineStyle const):
+        (WebCore::RenderElement::propagateStyleToAnonymousChildren):
+        (WebCore::RenderElement::styleWillChange):
+        (WebCore::RenderElement::insertedIntoTree):
+        (WebCore::RenderElement::willBeRemovedFromTree):
+        (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
+        (WebCore::RenderElement::isVisibleInDocumentRect const):
+        (WebCore::RenderElement::getCachedPseudoStyle const):
+        (WebCore::RenderElement::getUncachedPseudoStyle const):
+        (WebCore::RenderElement::selectionPseudoStyle const):
+        * rendering/RenderElement.h:
+        (WebCore::RenderElement::visibleToHitTesting const):
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::paintObject):
+        * rendering/RenderFullScreen.cpp:
+        (WebCore::createFullScreenStyle):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::repaintOrMarkForLayout):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::willBeDestroyed):
+        (WebCore::updateStyleOfAnonymousBlockContinuations):
+        (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
+        (WebCore::RenderInline::clippedOverflowRectForRepaint const):
+        (WebCore::RenderInline::addAnnotatedRegions):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::RenderLayer):
+        (WebCore::RenderLayer::updateDescendantDependentFlags):
+        (WebCore::RenderLayer::createScrollbar):
+        (WebCore::styleRequiresScrollbar):
+        (WebCore::styleDefinesAutomaticScrollbar):
+        (WebCore::computeReferenceBox):
+        (WebCore::RenderLayer::calculateClipRects const):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateAfterDescendants):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::scrollbarHasDisplayNone):
+        (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
+        (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
+        * rendering/RenderListBox.cpp:
+        (WebCore::RenderListBox::paintObject):
+        (WebCore::itemOffsetForAlignment):
+        (WebCore::RenderListBox::paintItemForeground):
+        (WebCore::RenderListBox::paintItemBackground):
+        (WebCore::RenderListBox::createScrollbar):
+        * rendering/RenderListItem.cpp:
+        (WebCore::RenderListItem::computeMarkerStyle const):
+        * rendering/RenderListMarker.cpp:
+        (WebCore::effectiveListMarkerType):
+        (WebCore::listMarkerSuffix):
+        (WebCore::listMarkerText):
+        (WebCore::RenderListMarker::paint):
+        (WebCore::RenderListMarker::updateContent):
+        (WebCore::RenderListMarker::computePreferredLogicalWidths):
+        (WebCore::RenderListMarker::updateMargins):
+        (WebCore::RenderListMarker::suffix const):
+        (WebCore::RenderListMarker::isInside const):
+        (WebCore::RenderListMarker::getRelativeMarkerRect):
+        * rendering/RenderListMarker.h:
+        * rendering/RenderMediaControlElements.cpp:
+        (WebCore::RenderMediaVolumeSliderContainer::layout):
+        (WebCore::RenderTextTrackContainerElement::layout):
+        * rendering/RenderMenuList.cpp:
+        (WebCore::RenderMenuList::adjustInnerStyle):
+        (WebCore::if):
+        (RenderMenuList::itemStyle const):
+        (RenderMenuList::menuStyle const):
+        (RenderMenuList::createScrollbar):
+        * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
+        (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::addAnnotatedRegions):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isAnonymousBlock const):
+        (WebCore::RenderObject::isBeforeContent const):
+        (WebCore::RenderObject::isAfterContent const):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::shouldPaint):
+        (WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
+        * rendering/RenderRubyBase.cpp:
+        (WebCore::RenderRubyBase::textAlignmentForLine const):
+        * rendering/RenderRubyBase.h:
+        * rendering/RenderRubyRun.cpp:
+        (WebCore::RenderRubyRun::createRubyBase const):
+        (WebCore::RenderRubyRun::staticCreateRubyRun):
+        (WebCore::RenderRubyRun::layoutBlock):
+        * rendering/RenderRubyText.cpp:
+        (WebCore::RenderRubyText::textAlignmentForLine const):
+        (WebCore::RenderRubyText::adjustInlineDirectionLineBounds const):
+        * rendering/RenderRubyText.h:
+        * rendering/RenderScrollbar.cpp:
+        (WebCore::pseudoForScrollbarPart):
+        (WebCore::RenderScrollbar::updateScrollbarPart):
+        * rendering/RenderSearchField.cpp:
+        (WebCore::RenderSearchField::updateCancelButtonVisibility const):
+        (WebCore::RenderSearchField::visibilityForCancelButton const):
+        (WebCore::RenderSearchField::menuStyle const):
+        (WebCore::RenderSearchField::createScrollbar):
+        * rendering/RenderSearchField.h:
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::willInsertTableSection):
+        (WebCore::RenderTable::layoutCaptions):
+        (WebCore::RenderTable::layout):
+        (WebCore::RenderTable::paintObject):
+        (WebCore::RenderTable::adjustBorderBoxRectForPainting):
+        (WebCore::RenderTable::paintMask):
+        (WebCore::RenderTable::recalcSections const):
+        (WebCore::RenderTable::createTableWithStyle):
+        * rendering/RenderTableCell.cpp:
+        (WebCore::RenderTableCell::styleDidChange):
+        (WebCore::RenderTableCell::paintCollapsedBorders):
+        (WebCore::RenderTableCell::paintBackgroundsBehindCell):
+        (WebCore::RenderTableCell::paintBoxDecorations):
+        (WebCore::RenderTableCell::paintMask):
+        (WebCore::RenderTableCell::createTableCellWithStyle):
+        * rendering/RenderTableCol.cpp:
+        (WebCore::RenderTableCol::updateFromElement):
+        (WebCore::RenderTableCol::isChildAllowed const):
+        * rendering/RenderTableCol.h:
+        * rendering/RenderTableRow.cpp:
+        (WebCore::RenderTableRow::styleDidChange):
+        (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
+        (WebCore::RenderTableRow::createTableRowWithStyle):
+        * rendering/RenderTableSection.cpp:
+        (WebCore::RenderTableSection::addCell):
+        (WebCore::RenderTableSection::paint):
+        (WebCore::RenderTableSection::createTableSectionWithStyle):
+        * rendering/RenderText.cpp:
+        (WebCore::RenderText::styleDidChange):
+        (WebCore::RenderText::computePreferredLogicalWidths):
+        (WebCore::applyTextTransform):
+        * rendering/RenderTextFragment.cpp:
+        (WebCore::RenderTextFragment::styleDidChange):
+        (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::adjustStyle):
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::adjustMenuListStyle const):
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
+        * rendering/RenderView.cpp:
+        (WebCore::rendererObscuresBackground):
+        * rendering/RenderWidget.cpp:
+        (WebCore::RenderWidget::setWidget):
+        (WebCore::RenderWidget::styleDidChange):
+        * rendering/RootInlineBox.cpp:
+        (WebCore::RootInlineBox::paintEllipsisBox const):
+        (WebCore::RootInlineBox::lineSnapAdjustment const):
+        (WebCore::RootInlineBox::lineSelectionGap):
+        (WebCore::RootInlineBox::computeCaretRect const):
+        * rendering/SimpleLineLayout.cpp:
+        (WebCore::SimpleLineLayout::canUseForFontAndText):
+        (WebCore::SimpleLineLayout::canUseForStyle):
+        (WebCore::SimpleLineLayout::computeLineLeft):
+        (WebCore::SimpleLineLayout::updateLineConstrains):
+        (WebCore::SimpleLineLayout::createLineRuns):
+        (WebCore::SimpleLineLayout::textAlignForLine):
+        (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
+        * rendering/SimpleLineLayoutFunctions.cpp:
+        (WebCore::SimpleLineLayout::paintFlow):
+        (WebCore::SimpleLineLayout::hitTestFlow):
+        * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
+        (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
+        * rendering/SimpleLineLayoutTextFragmentIterator.h:
+        * rendering/TextDecorationPainter.cpp:
+        (WebCore::textDecorationStyleToStrokeStyle):
+        (WebCore::TextDecorationPainter::paintTextDecoration):
+        (WebCore::collectStylesForRenderer):
+        * rendering/TextDecorationPainter.h:
+        * rendering/line/BreakingContext.h:
+        (WebCore::BreakingContext::BreakingContext):
+        (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
+        (WebCore::BreakingContext::handleBR):
+        (WebCore::BreakingContext::handleOutOfFlowPositioned):
+        (WebCore::BreakingContext::handleText):
+        (WebCore::BreakingContext::canBreakAtThisPosition):
+        (WebCore::BreakingContext::handleEndOfLine):
+        * rendering/line/LineInlineHeaders.h:
+        (WebCore::shouldCollapseWhiteSpace):
+        * rendering/line/LineWidth.cpp:
+        (WebCore::newFloatShrinksLine):
+        * rendering/mathml/MathOperator.cpp:
+        (WebCore::MathOperator::paint):
+        * rendering/mathml/RenderMathMLFraction.cpp:
+        (WebCore::RenderMathMLFraction::paint):
+        * rendering/mathml/RenderMathMLMath.cpp:
+        (WebCore::RenderMathMLMath::layoutBlock):
+        * rendering/mathml/RenderMathMLMenclose.cpp:
+        (WebCore::RenderMathMLMenclose::paint):
+        * rendering/mathml/RenderMathMLRoot.cpp:
+        (WebCore::RenderMathMLRoot::paint):
+        * rendering/mathml/RenderMathMLToken.cpp:
+        (WebCore::RenderMathMLToken::paint):
+        * rendering/shapes/BoxShape.cpp:
+        (WebCore::computeRoundedRectForBoxShape):
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::referenceBox):
+        (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
+        (WebCore::ShapeOutsideInfo::logicalTopOffset const):
+        (WebCore::ShapeOutsideInfo::logicalLeftOffset const):
+        * rendering/style/CounterContent.h:
+        (WebCore::CounterContent::CounterContent):
+        (WebCore::CounterContent::listStyle const):
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
+        (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
+        (WebCore::RenderStyle::RenderStyle):
+        (WebCore::RenderStyle::hasUniquePseudoStyle const):
+        (WebCore::RenderStyle::getCachedPseudoStyle const):
+        (WebCore::RenderStyle::addCachedPseudoStyle):
+        (WebCore::RenderStyle::changeRequiresLayout const):
+        (WebCore::requiresPainting):
+        (WebCore::RenderStyle::hyphenString const):
+        (WebCore::RenderStyle::textEmphasisMarkString const):
+        (WebCore::RenderStyle::visitedDependentColor const):
+        (WebCore::RenderStyle::textEmphasisMark const):
+        (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::setStyleType):
+        (WebCore::RenderStyle::setRTLOrdering):
+        (WebCore::RenderStyle::display const):
+        (WebCore::RenderStyle::visibility const):
+        (WebCore::RenderStyle::textAlign const):
+        (WebCore::RenderStyle::textTransform const):
+        (WebCore::RenderStyle::whiteSpace const):
+        (WebCore::RenderStyle::emptyCells const):
+        (WebCore::RenderStyle::captionSide const):
+        (WebCore::RenderStyle::listStyleType const):
+        (WebCore::RenderStyle::listStylePosition const):
+        (WebCore::RenderStyle::cursor const):
+        (WebCore::RenderStyle::insideLink const):
+        (WebCore::RenderStyle::borderFit const):
+        (WebCore::RenderStyle::pointerEvents const):
+        (WebCore::RenderStyle::setDisplay):
+        (WebCore::RenderStyle::setOriginalDisplay):
+        (WebCore::RenderStyle::setVisibility):
+        (WebCore::RenderStyle::setTextAlign):
+        (WebCore::RenderStyle::setTextTransform):
+        (WebCore::RenderStyle::setTextDecorationStyle):
+        (WebCore::RenderStyle::setTextDecorationSkip):
+        (WebCore::RenderStyle::setTextUnderlinePosition):
+        (WebCore::RenderStyle::setDirection):
+        (WebCore::RenderStyle::setTextZoom):
+        (WebCore::RenderStyle::setWhiteSpace):
+        (WebCore::RenderStyle::setEmptyCells):
+        (WebCore::RenderStyle::setCaptionSide):
+        (WebCore::RenderStyle::setListStyleType):
+        (WebCore::RenderStyle::setListStylePosition):
+        (WebCore::RenderStyle::setCursor):
+        (WebCore::RenderStyle::setCursorVisibility):
+        (WebCore::RenderStyle::setInsideLink):
+        (WebCore::RenderStyle::setHyphens):
+        (WebCore::RenderStyle::setBorderFit):
+        (WebCore::RenderStyle::setColumnAxis):
+        (WebCore::RenderStyle::setColumnProgression):
+        (WebCore::RenderStyle::setTextEmphasisFill):
+        (WebCore::RenderStyle::setTextEmphasisMark):
+        (WebCore::RenderStyle::setRubyPosition):
+        (WebCore::RenderStyle::setBreakBefore):
+        (WebCore::RenderStyle::setBreakAfter):
+        (WebCore::RenderStyle::setBreakInside):
+        (WebCore::RenderStyle::setHangingPunctuation):
+        (WebCore::RenderStyle::setLineSnap):
+        (WebCore::RenderStyle::setLineAlign):
+        (WebCore::RenderStyle::setPointerEvents):
+        (WebCore::RenderStyle::initialDisplay):
+        (WebCore::RenderStyle::initialBreakBetween):
+        (WebCore::RenderStyle::initialBreakInside):
+        (WebCore::RenderStyle::initialCaptionSide):
+        (WebCore::RenderStyle::initialColumnAxis):
+        (WebCore::RenderStyle::initialColumnProgression):
+        (WebCore::RenderStyle::initialEmptyCells):
+        (WebCore::RenderStyle::initialListStylePosition):
+        (WebCore::RenderStyle::initialListStyleType):
+        (WebCore::RenderStyle::initialTextTransform):
+        (WebCore::RenderStyle::initialVisibility):
+        (WebCore::RenderStyle::initialWhiteSpace):
+        (WebCore::RenderStyle::initialCursor):
+        (WebCore::RenderStyle::initialTextAlign):
+        (WebCore::RenderStyle::initialTextDecorationStyle):
+        (WebCore::RenderStyle::initialTextZoom):
+        (WebCore::RenderStyle::initialHyphens):
+        (WebCore::RenderStyle::initialBorderFit):
+        (WebCore::RenderStyle::initialRTLOrdering):
+        (WebCore::RenderStyle::initialPointerEvents):
+        (WebCore::RenderStyle::initialTextEmphasisColor):
+        (WebCore::RenderStyle::initialTextEmphasisFill):
+        (WebCore::RenderStyle::initialTextEmphasisMark):
+        (WebCore::RenderStyle::initialRubyPosition):
+        (WebCore::RenderStyle::initialImageResolutionSource):
+        (WebCore::RenderStyle::initialImageResolutionSnap):
+        (WebCore::RenderStyle::initialTextAlignLast):
+        (WebCore::RenderStyle::initialTextJustify):
+        (WebCore::RenderStyle::initialCursorVisibility):
+        (WebCore::RenderStyle::initialGridAutoRepeatType):
+        (WebCore::RenderStyle::initialLineSnap):
+        (WebCore::RenderStyle::initialLineAlign):
+        (WebCore::RenderStyle::NonInheritedFlags::hasAnyPublicPseudoStyles const):
+        (WebCore::RenderStyle::originalDisplay const):
+        (WebCore::RenderStyle::NonInheritedFlags::hasPseudoStyle const):
+        (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyle):
+        (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyles):
+        (WebCore::RenderStyle::autoWrap):
+        (WebCore::RenderStyle::preserveNewline):
+        (WebCore::RenderStyle::collapseWhiteSpace):
+        (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
+        (WebCore::RenderStyle::hasInlineColumnAxis const):
+        (WebCore::RenderStyle::isDisplayRegionType const):
+        (WebCore::RenderStyle::isDisplayReplacedType):
+        (WebCore::RenderStyle::isDisplayInlineType):
+        (WebCore::RenderStyle::isDisplayFlexibleBox):
+        (WebCore::RenderStyle::isDisplayGridBox):
+        (WebCore::RenderStyle::isDisplayFlexibleOrGridBox):
+        (WebCore::pseudoElementRendererIsNeeded):
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::operator<<):
+        (WebCore::alwaysPageBreak):
+        * rendering/style/RenderStyleConstants.h:
+        (WebCore::PseudoIdSet::has const):
+        (WebCore::PseudoIdSet::add):
+        * rendering/style/ShapeValue.h:
+        * rendering/style/StyleMultiColData.cpp:
+        (WebCore::StyleMultiColData::StyleMultiColData):
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        * rendering/style/StyleRareNonInheritedData.cpp:
+        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
+        * rendering/style/StyleRareNonInheritedData.h:
+        * rendering/svg/RenderSVGContainer.cpp:
+        (WebCore::RenderSVGContainer::paint):
+        * rendering/svg/RenderSVGImage.cpp:
+        (WebCore::RenderSVGImage::paint):
+        (WebCore::RenderSVGImage::nodeAtFloatPoint):
+        * rendering/svg/RenderSVGInlineText.cpp:
+        (WebCore::RenderSVGInlineText::styleDidChange):
+        * rendering/svg/RenderSVGModelObject.cpp:
+        (WebCore::RenderSVGModelObject::checkIntersection):
+        (WebCore::RenderSVGModelObject::checkEnclosure):
+        * rendering/svg/RenderSVGResource.cpp:
+        (WebCore::requestPaintingResource):
+        * rendering/svg/RenderSVGResourceClipper.cpp:
+        (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
+        (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
+        (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
+        * rendering/svg/RenderSVGResourceMasker.cpp:
+        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
+        (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
+        * rendering/svg/RenderSVGRoot.cpp:
+        (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint const):
+        * rendering/svg/RenderSVGShape.cpp:
+        (WebCore::RenderSVGShape::paint):
+        (WebCore::RenderSVGShape::nodeAtFloatPoint):
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::nodeAtFloatPoint):
+        * rendering/svg/SVGInlineTextBox.cpp:
+        (WebCore::SVGInlineTextBox::paintSelectionBackground):
+        (WebCore::SVGInlineTextBox::paint):
+        (WebCore::SVGInlineTextBox::constructTextRun const):
+        (WebCore::SVGInlineTextBox::paintDecoration):
+        (WebCore::SVGInlineTextBox::nodeAtPoint):
+        * rendering/svg/SVGRenderSupport.cpp:
+        (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
+        * rendering/svg/SVGRenderingContext.cpp:
+        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
+        * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
+        (WebCore::processRenderSVGInlineText):
+        * rendering/svg/SVGTextMetricsBuilder.cpp:
+        (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
+        * rendering/updating/RenderTreeBuilderBlock.cpp:
+        (WebCore::RenderTreeBuilder::Block::detach):
+        * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
+        (WebCore::styleForFirstLetter):
+        (WebCore::RenderTreeBuilder::FirstLetter::updateAfterDescendants):
+        (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
+        (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
+        * rendering/updating/RenderTreeBuilderInline.cpp:
+        (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
+        (WebCore::RenderTreeBuilder::Inline::newChildIsInline):
+        * rendering/updating/RenderTreeBuilderList.cpp:
+        (WebCore::RenderTreeBuilder::List::updateItemMarker):
+        * rendering/updating/RenderTreeBuilderMathML.cpp:
+        (WebCore::RenderTreeBuilder::MathML::createMathMLOperator):
+        * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
+        (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
+        (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
+        * rendering/updating/RenderTreeBuilderRuby.cpp:
+        (WebCore::isAnonymousRubyInlineBlock):
+        (WebCore::isRubyBeforeBlock):
+        (WebCore::isRubyAfterBlock):
+        (WebCore::createAnonymousRubyInlineBlock):
+        * rendering/updating/RenderTreeBuilderTable.cpp:
+        (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
+        * rendering/updating/RenderTreeUpdater.cpp:
+        (WebCore::RenderTreeUpdater::updateBeforeDescendants):
+        (WebCore::RenderTreeUpdater::updateAfterDescendants):
+        (WebCore::RenderTreeUpdater::updateElementRenderer):
+        (WebCore::elementImplicitVisibility):
+        (WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
+        (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
+        * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
+        (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
+        * style/InlineTextBoxStyle.cpp:
+        (WebCore::visualOverflowForDecorations):
+        * style/StyleChange.cpp:
+        (WebCore::Style::determineChange):
+        * style/StyleFontSizeFunctions.cpp:
+        (WebCore::Style::computedFontSizeFromSpecifiedSize):
+        * style/StyleResolveForDocument.cpp:
+        (WebCore::Style::resolveForDocument):
+        * style/StyleSharingResolver.cpp:
+        * style/StyleTreeResolver.cpp:
+        (WebCore::Style::affectsRenderedSubtree):
+        (WebCore::Style::TreeResolver::resolveElement):
+        (WebCore::Style::TreeResolver::resolvePseudoStyle):
+        (WebCore::Style::TreeResolver::parentBoxStyle const):
+        (WebCore::Style::createInheritedDisplayContentsStyleIfNeeded):
+        (WebCore::Style::TreeResolver::resolveComposedTree):
+        * svg/SVGElement.h:
+        * svg/SVGGElement.cpp:
+        (WebCore::SVGGElement::createElementRenderer):
+
 2018-05-24  Chris Dumez  <cdumez@apple.com>
 
         Enable subsampling for progressive JPEG images
index 31b8a2b..635562d 100644 (file)
@@ -286,7 +286,7 @@ bool AXObjectCache::isNodeVisible(Node* node) const
     if (!renderer)
         return false;
     const RenderStyle& style = renderer->style();
-    if (style.display() == NONE || style.visibility() != VISIBLE)
+    if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible)
         return false;
     
     // We also need to consider aria hidden status.
index d5db9e2..0e36598 100644 (file)
@@ -163,7 +163,7 @@ AccessibilityRole AccessibilityList::determineAccessibilityRole()
             
             // Rendered list items always count.
             if (listItem->isListItem()) {
-                if (!hasVisibleMarkers && (listItem->style().listStyleType() != NoneListStyle || listItem->style().listStyleImage() || childHasPseudoVisibleListItemMarkers(listItem)))
+                if (!hasVisibleMarkers && (listItem->style().listStyleType() != ListStyleType::None || listItem->style().listStyleImage() || childHasPseudoVisibleListItemMarkers(listItem)))
                     hasVisibleMarkers = true;
                 listItemCount++;
             } else if (listItem->node() && listItem->node()->hasTagName(liTag)) {
index 5c4697e..24b8cf5 100644 (file)
@@ -176,7 +176,7 @@ String AccessibilityMediaControl::helpText() const
 
 bool AccessibilityMediaControl::computeAccessibilityIsIgnored() const
 {
-    if (!m_renderer || m_renderer->style().visibility() != VISIBLE || controlType() == MediaTimelineContainer)
+    if (!m_renderer || m_renderer->style().visibility() != Visibility::Visible || controlType() == MediaTimelineContainer)
         return true;
 
     return accessibilityIsIgnoredByDefault();
@@ -302,7 +302,7 @@ Ref<AccessibilityObject> AccessibilityMediaTimeDisplay::create(RenderObject* ren
 
 bool AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored() const
 {
-    if (!m_renderer || m_renderer->style().visibility() != VISIBLE)
+    if (!m_renderer || m_renderer->style().visibility() != Visibility::Visible)
         return true;
 
     if (!m_renderer->style().width().value())
index cb03cd4..9997a48 100644 (file)
@@ -3275,7 +3275,7 @@ bool AccessibilityObject::isDOMHidden() const
         return true;
     
     const RenderStyle& style = renderer->style();
-    return style.display() == NONE || style.visibility() != VISIBLE;
+    return style.display() == DisplayType::None || style.visibility() != Visibility::Visible;
 }
 
 bool AccessibilityObject::isShowingValidationMessage() const
index b93b8a1..4502c6d 100644 (file)
@@ -1144,7 +1144,7 @@ AccessibilityObjectInclusion AccessibilityRenderObject::defaultObjectInclusion()
     if (!m_renderer)
         return AccessibilityObjectInclusion::IgnoreObject;
 
-    if (m_renderer->style().visibility() != VISIBLE) {
+    if (m_renderer->style().visibility() != Visibility::Visible) {
         // aria-hidden is meant to override visibility as the determinant in AX hierarchy inclusion.
         if (equalLettersIgnoringASCIICase(getAttribute(aria_hiddenAttr), "false"))
             return AccessibilityObjectInclusion::DefaultBehavior;
@@ -1596,7 +1596,7 @@ bool AccessibilityRenderObject::isUnvisited() const
         return true;
 
     // FIXME: Is it a privacy violation to expose unvisited information to accessibility APIs?
-    return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideUnvisitedLink;
+    return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideLink::InsideUnvisited;
 }
 
 bool AccessibilityRenderObject::isVisited() const
@@ -1605,7 +1605,7 @@ bool AccessibilityRenderObject::isVisited() const
         return false;
 
     // FIXME: Is it a privacy violation to expose visited information to accessibility APIs?
-    return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideVisitedLink;
+    return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideLink::InsideVisited;
 }
 
 void AccessibilityRenderObject::setElementAttributeValue(const QualifiedName& attributeName, bool value)
@@ -1783,7 +1783,7 @@ void AccessibilityRenderObject::setValue(const String& string)
             RenderElement& renderElement = downcast<RenderElement>(renderer);
             auto style = RenderStyle::create();
             style.inheritFrom(renderElement.style());
-            style.setWhiteSpace(PRE);
+            style.setWhiteSpace(WhiteSpace::Pre);
             renderElement.setStyleInternal(WTFMove(style));
         }
         downcast<HTMLElement>(element).setInnerText(string);
index e026428..9df9d27 100644 (file)
@@ -262,7 +262,7 @@ bool AccessibilityTable::isDataTable() const
             const RenderStyle& renderStyle = cell->style();
 
             // If the empty-cells style is set, we'll call it a data table.
-            if (renderStyle.emptyCells() == HIDE)
+            if (renderStyle.emptyCells() == EmptyCell::Hide)
                 return true;
 
             // If a cell has matching bordered sides, call it a (fully) bordered cell.
index 0e37ea6..a5f4b9a 100644 (file)
@@ -143,22 +143,22 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
     }
 
     switch (style->textAlign()) {
-    case TASTART:
-    case TAEND:
+    case TextAlignMode::Start:
+    case TextAlignMode::End:
         break;
-    case LEFT:
-    case WEBKIT_LEFT:
+    case TextAlignMode::Left:
+    case TextAlignMode::WebKitLeft:
         result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_JUSTIFICATION), "left");
         break;
-    case RIGHT:
-    case WEBKIT_RIGHT:
+    case TextAlignMode::Right:
+    case TextAlignMode::WebKitRight:
         result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_JUSTIFICATION), "right");
         break;
-    case CENTER:
-    case WEBKIT_CENTER:
+    case TextAlignMode::Center:
+    case TextAlignMode::WebKitCenter:
         result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_JUSTIFICATION), "center");
         break;
-    case JUSTIFY:
+    case TextAlignMode::Justify:
         result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_JUSTIFICATION), "fill");
     }
 
@@ -168,7 +168,7 @@ static AtkAttributeSet* getAttributeSetForAccessibilityObject(const Accessibilit
 
     result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & TextDecorationLineThrough) ? "true" : "false");
 
-    result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INVISIBLE), (style->visibility() == HIDDEN) ? "true" : "false");
+    result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INVISIBLE), (style->visibility() == Visibility::Hidden) ? "true" : "false");
 
     result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_EDITABLE), object->canSetValueAttribute() ? "true" : "false");
 
index 1aa8dbc..3eec633 100644 (file)
@@ -144,7 +144,7 @@ void AnimationTimeline::updateCSSAnimationsForElement(Element& element, const Re
         return;
 
     // In case this element is newly getting a "display: none" we need to cancel all of its animations and disregard new ones.
-    if (oldStyle && oldStyle->hasAnimations() && oldStyle->display() != NONE && newStyle.display() == NONE) {
+    if (oldStyle && oldStyle->hasAnimations() && oldStyle->display() != DisplayType::None && newStyle.display() == DisplayType::None) {
         if (m_elementToCSSAnimationByName.contains(&element)) {
             for (const auto& cssAnimationsByNameMapItem : m_elementToCSSAnimationByName.take(&element))
                 cancelOrRemoveDeclarativeAnimation(cssAnimationsByNameMapItem.value);
@@ -229,7 +229,7 @@ void AnimationTimeline::updateCSSTransitionsForElement(Element& element, const R
         return;
 
     // In case this element is newly getting a "display: none" we need to cancel all of its animations and disregard new ones.
-    if (oldStyle && oldStyle->hasTransitions() && oldStyle->display() != NONE && newStyle.display() == NONE) {
+    if (oldStyle && oldStyle->hasTransitions() && oldStyle->display() != DisplayType::None && newStyle.display() == DisplayType::None) {
         if (m_elementToCSSTransitionByCSSPropertyID.contains(&element)) {
             for (const auto& cssTransitionsByCSSPropertyIDMapItem : m_elementToCSSTransitionByCSSPropertyID.take(&element))
                 cancelOrRemoveDeclarativeAnimation(cssTransitionsByCSSPropertyIDMapItem.value);
index 9d17205..2f8cdc4 100644 (file)
@@ -55,16 +55,16 @@ void CSSAnimation::syncPropertiesWithBackingAnimation()
     auto* timing = effect()->timing();
 
     switch (animation.fillMode()) {
-    case AnimationFillModeNone:
+    case AnimationFillMode::None:
         timing->setFill(FillMode::None);
         break;
-    case AnimationFillModeBackwards:
+    case AnimationFillMode::Backwards:
         timing->setFill(FillMode::Backwards);
         break;
-    case AnimationFillModeForwards:
+    case AnimationFillMode::Forwards:
         timing->setFill(FillMode::Forwards);
         break;
-    case AnimationFillModeBoth:
+    case AnimationFillMode::Both:
         timing->setFill(FillMode::Both);
         break;
     }
@@ -88,9 +88,9 @@ void CSSAnimation::syncPropertiesWithBackingAnimation()
     timing->setIterations(iterationCount == Animation::IterationCountInfinite ? std::numeric_limits<double>::infinity() : iterationCount);
 
     // Synchronize the play state
-    if (backingAnimation().playState() == AnimPlayStatePlaying && playState() == WebAnimation::PlayState::Paused)
+    if (backingAnimation().playState() == AnimationPlayState::Playing && playState() == WebAnimation::PlayState::Paused)
         play();
-    else if (backingAnimation().playState() == AnimPlayStatePaused && playState() == WebAnimation::PlayState::Running)
+    else if (backingAnimation().playState() == AnimationPlayState::Paused && playState() == WebAnimation::PlayState::Running)
         pause();
 
     unsuspendEffectInvalidation();
index b6137c1..f9e3a9d 100644 (file)
@@ -67,7 +67,7 @@ void DeclarativeAnimation::initialize(const Element& target, const RenderStyle*
     setTimeline(&target.document().timeline());
     downcast<KeyframeEffectReadOnly>(effect())->computeDeclarativeAnimationBlendingKeyframes(oldStyle, newStyle);
     syncPropertiesWithBackingAnimation();
-    if (backingAnimation().playState() == AnimPlayStatePlaying)
+    if (backingAnimation().playState() == AnimationPlayState::Playing)
         play();
     else
         pause();
index 54fad57..cfa44d6 100644 (file)
@@ -1265,16 +1265,16 @@ Ref<const Animation> KeyframeEffectReadOnly::backingAnimationForCompositedRender
     switch (effectTiming->fill()) {
     case FillMode::None:
     case FillMode::Auto:
-        animation->setFillMode(AnimationFillModeNone);
+        animation->setFillMode(AnimationFillMode::None);
         break;
     case FillMode::Backwards:
-        animation->setFillMode(AnimationFillModeBackwards);
+        animation->setFillMode(AnimationFillMode::Backwards);
         break;
     case FillMode::Forwards:
-        animation->setFillMode(AnimationFillModeForwards);
+        animation->setFillMode(AnimationFillMode::Forwards);
         break;
     case FillMode::Both:
-        animation->setFillMode(AnimationFillModeBoth);
+        animation->setFillMode(AnimationFillMode::Both);
         break;
     }
 
index 38ad56c..5be3cc6 100644 (file)
@@ -1780,15 +1780,15 @@ static Ref<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration)
 static Ref<CSSValue> renderTextDecorationStyleFlagsToCSSValue(TextDecorationStyle textDecorationStyle)
 {
     switch (textDecorationStyle) {
-    case TextDecorationStyleSolid:
+    case TextDecorationStyle::Solid:
         return CSSValuePool::singleton().createIdentifierValue(CSSValueSolid);
-    case TextDecorationStyleDouble:
+    case TextDecorationStyle::Double:
         return CSSValuePool::singleton().createIdentifierValue(CSSValueDouble);
-    case TextDecorationStyleDotted:
+    case TextDecorationStyle::Dotted:
         return CSSValuePool::singleton().createIdentifierValue(CSSValueDotted);
-    case TextDecorationStyleDashed:
+    case TextDecorationStyle::Dashed:
         return CSSValuePool::singleton().createIdentifierValue(CSSValueDashed);
-    case TextDecorationStyleWavy:
+    case TextDecorationStyle::Wavy:
         return CSSValuePool::singleton().createIdentifierValue(CSSValueWavy);
     }
 
@@ -2272,33 +2272,33 @@ static bool positionOffsetValueIsRendererDependent(const RenderStyle* style, Ren
 
 static CSSValueID convertToPageBreak(BreakBetween value)
 {
-    if (value == PageBreakBetween || value == LeftPageBreakBetween || value == RightPageBreakBetween
-        || value == RectoPageBreakBetween || value == VersoPageBreakBetween)
+    if (value == BreakBetween::Page || value == BreakBetween::LeftPage || value == BreakBetween::RightPage
+        || value == BreakBetween::RectoPage || value == BreakBetween::VersoPage)
         return CSSValueAlways; // CSS 2.1 allows us to map these to always.
-    if (value == AvoidBreakBetween || value == AvoidPageBreakBetween)
+    if (value == BreakBetween::Avoid || value == BreakBetween::AvoidPage)
         return CSSValueAvoid;
     return CSSValueAuto;
 }
 
 static CSSValueID convertToColumnBreak(BreakBetween value)
 {
-    if (value == ColumnBreakBetween)
+    if (value == BreakBetween::Column)
         return CSSValueAlways;
-    if (value == AvoidBreakBetween || value == AvoidColumnBreakBetween)
+    if (value == BreakBetween::Avoid || value == BreakBetween::AvoidColumn)
         return CSSValueAvoid;
     return CSSValueAuto;
 }
 
 static CSSValueID convertToPageBreak(BreakInside value)
 {
-    if (value == AvoidBreakInside || value == AvoidPageBreakInside)
+    if (value == BreakInside::Avoid || value == BreakInside::AvoidPage)
         return CSSValueAvoid;
     return CSSValueAuto;
 }
 
 static CSSValueID convertToColumnBreak(BreakInside value)
 {
-    if (value == AvoidBreakInside || value == AvoidColumnBreakInside)
+    if (value == BreakInside::Avoid || value == BreakInside::AvoidColumn)
         return CSSValueAvoid;
     return CSSValueAuto;
 }
@@ -2370,20 +2370,19 @@ Element* ComputedStyleExtractor::styledElement() const
     if (!m_element)
         return nullptr;
     PseudoElement* pseudoElement;
-    if (m_pseudoElementSpecifier == BEFORE && (pseudoElement = m_element->beforePseudoElement()))
+    if (m_pseudoElementSpecifier == PseudoId::Before && (pseudoElement = m_element->beforePseudoElement()))
         return pseudoElement;
-    if (m_pseudoElementSpecifier == AFTER && (pseudoElement = m_element->afterPseudoElement()))
+    if (m_pseudoElementSpecifier == PseudoId::After && (pseudoElement = m_element->afterPseudoElement()))
         return pseudoElement;
     return m_element.get();
 }
 
-
 RenderElement* ComputedStyleExtractor::styledRenderer() const
 {
     auto* element = styledElement();
     if (!element)
         return nullptr;
-    if (m_pseudoElementSpecifier != NOPSEUDO && element == m_element.get())
+    if (m_pseudoElementSpecifier != PseudoId::None && element == m_element.get())
         return nullptr;
     if (element->hasDisplayContents())
         return nullptr;
@@ -2478,14 +2477,14 @@ static inline const RenderStyle* computeRenderStyleForProperty(Element& element,
             ownedStyle = timeline->animatedStyleForRenderer(*renderer);
         else
             ownedStyle = renderer->animation().animatedStyleForRenderer(*renderer);
-        if (pseudoElementSpecifier && !element.isPseudoElement()) {
+        if (pseudoElementSpecifier != PseudoId::None && !element.isPseudoElement()) {
             // FIXME: This cached pseudo style will only exist if the animation has been run at least once.
             return ownedStyle->getCachedPseudoStyle(pseudoElementSpecifier);
         }
         return ownedStyle.get();
     }
 
-    return element.computedStyle(element.isPseudoElement() ? NOPSEUDO : pseudoElementSpecifier);
+    return element.computedStyle(element.isPseudoElement() ? PseudoId::None : pseudoElementSpecifier);
 }
 
 static Ref<CSSValue> shapePropertyValue(const RenderStyle& style, const ShapeValue* shapeValue)
@@ -2506,7 +2505,7 @@ static Ref<CSSValue> shapePropertyValue(const RenderStyle& style, const ShapeVal
 
     auto list = CSSValueList::createSpaceSeparated();
     list->append(valueForBasicShape(style, *shapeValue->shape()));
-    if (shapeValue->cssBox() != BoxMissing)
+    if (shapeValue->cssBox() != CSSBoxType::BoxMissing)
         list->append(CSSValuePool::singleton().createValue(shapeValue->cssBox()));
     return WTFMove(list);
 }
@@ -3016,7 +3015,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
         case CSSPropertyOrder:
             return cssValuePool.createValue(style.order(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyFloat:
-            if (style.display() != NONE && style.hasOutOfFlowPosition())
+            if (style.display() != DisplayType::None && style.hasOutOfFlowPosition())
                 return cssValuePool.createIdentifierValue(CSSValueNone);
             return cssValuePool.createValue(style.floating());
         case CSSPropertyFont: {
@@ -3145,7 +3144,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
                 return CSSPrimitiveValue::createIdentifier(CSSValueNoLimit);
             return CSSPrimitiveValue::create(style.hyphenationLimitLines(), CSSPrimitiveValue::CSS_NUMBER);
         case CSSPropertyWebkitBorderFit:
-            if (style.borderFit() == BorderFitBorder)
+            if (style.borderFit() == BorderFit::Border)
                 return cssValuePool.createIdentifierValue(CSSValueBorder);
             return cssValuePool.createIdentifierValue(CSSValueLines);
 #if ENABLE(CSS_IMAGE_ORIENTATION)
@@ -3200,7 +3199,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             float value;
             if (marginRight.isPercentOrCalculated()) {
                 // RenderBox gives a marginRight() that is the distance between the right-edge of the child box
-                // and the right-edge of the containing box, when display == BLOCK. Let's calculate the absolute
+                // and the right-edge of the containing box, when display == DisplayType::Block. Let's calculate the absolute
                 // value of the specified margin-right % instead of relying on RenderBox's marginRight() value.
                 value = minimumValueForLength(marginRight, downcast<RenderBox>(*renderer).containingBlockLogicalWidthForContent());
             } else
@@ -3345,20 +3344,20 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             return renderEmphasisPositionFlagsToCSSValue(style.textEmphasisPosition());
         case CSSPropertyWebkitTextEmphasisStyle:
             switch (style.textEmphasisMark()) {
-            case TextEmphasisMarkNone:
+            case TextEmphasisMark::None:
                 return cssValuePool.createIdentifierValue(CSSValueNone);
-            case TextEmphasisMarkCustom:
+            case TextEmphasisMark::Custom:
                 return cssValuePool.createValue(style.textEmphasisCustomMark(), CSSPrimitiveValue::CSS_STRING);
-            case TextEmphasisMarkAuto:
+            case TextEmphasisMark::Auto:
                 ASSERT_NOT_REACHED();
 #if ASSERT_DISABLED
                 FALLTHROUGH;
 #endif
-            case TextEmphasisMarkDot:
-            case TextEmphasisMarkCircle:
-            case TextEmphasisMarkDoubleCircle:
-            case TextEmphasisMarkTriangle:
-            case TextEmphasisMarkSesame:
+            case TextEmphasisMark::Dot:
+            case TextEmphasisMark::Circle:
+            case TextEmphasisMark::DoubleCircle:
+            case TextEmphasisMark::Triangle:
+            case TextEmphasisMark::Sesame:
                 auto list = CSSValueList::createSpaceSeparated();
                 list->append(cssValuePool.createValue(style.textEmphasisFill()));
                 list->append(cssValuePool.createValue(style.textEmphasisMark()));
@@ -3560,16 +3559,16 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             if (t) {
                 for (size_t i = 0; i < t->size(); ++i) {
                     switch (t->animation(i).fillMode()) {
-                    case AnimationFillModeNone:
+                    case AnimationFillMode::None:
                         list->append(cssValuePool.createIdentifierValue(CSSValueNone));
                         break;
-                    case AnimationFillModeForwards:
+                    case AnimationFillMode::Forwards:
                         list->append(cssValuePool.createIdentifierValue(CSSValueForwards));
                         break;
-                    case AnimationFillModeBackwards:
+                    case AnimationFillMode::Backwards:
                         list->append(cssValuePool.createIdentifierValue(CSSValueBackwards));
                         break;
-                    case AnimationFillModeBoth:
+                    case AnimationFillMode::Both:
                         list->append(cssValuePool.createIdentifierValue(CSSValueBoth));
                         break;
                     }
@@ -3608,11 +3607,14 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             const AnimationList* t = style.animations();
             if (t) {
                 for (size_t i = 0; i < t->size(); ++i) {
-                    int prop = t->animation(i).playState();
-                    if (prop == AnimPlayStatePlaying)
+                    switch (t->animation(i).playState()) {
+                    case AnimationPlayState::Playing:
                         list->append(cssValuePool.createIdentifierValue(CSSValueRunning));
-                    else
+                        break;
+                    case AnimationPlayState::Paused:
                         list->append(cssValuePool.createIdentifierValue(CSSValuePaused));
+                        break;
+                    }
                 }
             } else
                 list->append(cssValuePool.createIdentifierValue(CSSValueRunning));
@@ -3705,7 +3707,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             return WTFMove(list);
         }
         case CSSPropertyWebkitRtlOrdering:
-            return cssValuePool.createIdentifierValue(style.rtlOrdering() ? CSSValueVisual : CSSValueLogical);
+            return cssValuePool.createIdentifierValue(style.rtlOrdering() == Order::Visual ? CSSValueVisual : CSSValueLogical);
 #if ENABLE(TOUCH_EVENTS)
         case CSSPropertyWebkitTapHighlightColor:
             return currentColorOrValidColor(&style, style.tapHighlightColor());
@@ -3833,7 +3835,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
             if (is<ShapeClipPathOperation>(*operation)) {
                 auto& shapeOperation = downcast<ShapeClipPathOperation>(*operation);
                 list->append(valueForBasicShape(style, shapeOperation.basicShape()));
-                if (shapeOperation.referenceBox() != BoxMissing)
+                if (shapeOperation.referenceBox() != CSSBoxType::BoxMissing)
                     list->append(cssValuePool.createValue(shapeOperation.referenceBox()));
             }
             if (is<BoxClipPathOperation>(*operation))
index 39ae6c3..3916182 100644 (file)
@@ -51,8 +51,8 @@ enum AdjustPixelValuesForComputedStyle { AdjustPixelValues, DoNotAdjustPixelValu
 
 class ComputedStyleExtractor {
 public:
-    ComputedStyleExtractor(Node*, bool allowVisitedStyle = false, PseudoId = NOPSEUDO);
-    ComputedStyleExtractor(Element*, bool allowVisitedStyle = false, PseudoId = NOPSEUDO);
+    ComputedStyleExtractor(Node*, bool allowVisitedStyle = false, PseudoId = PseudoId::None);
+    ComputedStyleExtractor(Element*, bool allowVisitedStyle = false, PseudoId = PseudoId::None);
 
     RefPtr<CSSValue> propertyValue(CSSPropertyID, EUpdateLayout = UpdateLayout);
     RefPtr<CSSValue> valueForPropertyinStyle(const RenderStyle&, CSSPropertyID, RenderElement* = nullptr);
index 1c2a3dd..4f8fc04 100644 (file)
@@ -1073,45 +1073,45 @@ template<> inline CSSPrimitiveValue::operator BoxOrient() const
     return BoxOrient::Horizontal;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECaptionSide e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CaptionSide e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case CAPLEFT:
+    case CaptionSide::Left:
         m_value.valueID = CSSValueLeft;
         break;
-    case CAPRIGHT:
+    case CaptionSide::Right:
         m_value.valueID = CSSValueRight;
         break;
-    case CAPTOP:
+    case CaptionSide::Top:
         m_value.valueID = CSSValueTop;
         break;
-    case CAPBOTTOM:
+    case CaptionSide::Bottom:
         m_value.valueID = CSSValueBottom;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator ECaptionSide() const
+template<> inline CSSPrimitiveValue::operator CaptionSide() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueLeft:
-        return CAPLEFT;
+        return CaptionSide::Left;
     case CSSValueRight:
-        return CAPRIGHT;
+        return CaptionSide::Right;
     case CSSValueTop:
-        return CAPTOP;
+        return CaptionSide::Top;
     case CSSValueBottom:
-        return CAPBOTTOM;
+        return CaptionSide::Bottom;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return CAPTOP;
+    return CaptionSide::Top;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Clear e)
@@ -1155,140 +1155,140 @@ template<> inline CSSPrimitiveValue::operator Clear() const
     return Clear::None;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ECursor e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CursorType e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case CursorAuto:
+    case CursorType::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case CursorDefault:
+    case CursorType::Default:
         m_value.valueID = CSSValueDefault;
         break;
-    case CursorNone:
+    case CursorType::None:
         m_value.valueID = CSSValueNone;
         break;
-    case CursorContextMenu:
+    case CursorType::ContextMenu:
         m_value.valueID = CSSValueContextMenu;
         break;
-    case CursorHelp:
+    case CursorType::Help:
         m_value.valueID = CSSValueHelp;
         break;
-    case CursorPointer:
+    case CursorType::Pointer:
         m_value.valueID = CSSValuePointer;
         break;
-    case CursorProgress:
+    case CursorType::Progress:
         m_value.valueID = CSSValueProgress;
         break;
-    case CursorWait:
+    case CursorType::Wait:
         m_value.valueID = CSSValueWait;
         break;
-    case CursorCell:
+    case CursorType::Cell:
         m_value.valueID = CSSValueCell;
         break;
-    case CursorCrosshair:
+    case CursorType::Crosshair:
         m_value.valueID = CSSValueCrosshair;
         break;
-    case CursorText:
+    case CursorType::Text:
         m_value.valueID = CSSValueText;
         break;
-    case CursorVerticalText:
+    case CursorType::VerticalText:
         m_value.valueID = CSSValueVerticalText;
         break;
-    case CursorAlias:
+    case CursorType::Alias:
         m_value.valueID = CSSValueAlias;
         break;
-    case CursorCopy:
+    case CursorType::Copy:
         m_value.valueID = CSSValueCopy;
         break;
-    case CursorMove:
+    case CursorType::Move:
         m_value.valueID = CSSValueMove;
         break;
-    case CursorNoDrop:
+    case CursorType::NoDrop:
         m_value.valueID = CSSValueNoDrop;
         break;
-    case CursorNotAllowed:
+    case CursorType::NotAllowed:
         m_value.valueID = CSSValueNotAllowed;
         break;
-    case CursorGrab:
+    case CursorType::Grab:
         m_value.valueID = CSSValueGrab;
         break;
-    case CursorGrabbing:
+    case CursorType::Grabbing:
         m_value.valueID = CSSValueGrabbing;
         break;
-    case CursorEResize:
+    case CursorType::EResize:
         m_value.valueID = CSSValueEResize;
         break;
-    case CursorNResize:
+    case CursorType::NResize:
         m_value.valueID = CSSValueNResize;
         break;
-    case CursorNeResize:
+    case CursorType::NEResize:
         m_value.valueID = CSSValueNeResize;
         break;
-    case CursorNwResize:
+    case CursorType::NWResize:
         m_value.valueID = CSSValueNwResize;
         break;
-    case CursorSResize:
+    case CursorType::SResize:
         m_value.valueID = CSSValueSResize;
         break;
-    case CursorSeResize:
+    case CursorType::SEResize:
         m_value.valueID = CSSValueSeResize;
         break;
-    case CursorSwResize:
+    case CursorType::SWResize:
         m_value.valueID = CSSValueSwResize;
         break;
-    case CursorWResize:
+    case CursorType::WResize:
         m_value.valueID = CSSValueWResize;
         break;
-    case CursorEwResize:
+    case CursorType::EWResize:
         m_value.valueID = CSSValueEwResize;
         break;
-    case CursorNsResize:
+    case CursorType::NSResize:
         m_value.valueID = CSSValueNsResize;
         break;
-    case CursorNeswResize:
+    case CursorType::NESWResize:
         m_value.valueID = CSSValueNeswResize;
         break;
-    case CursorNwseResize:
+    case CursorType::NWSEResize:
         m_value.valueID = CSSValueNwseResize;
         break;
-    case CursorColResize:
+    case CursorType::ColumnResize:
         m_value.valueID = CSSValueColResize;
         break;
-    case CursorRowResize:
+    case CursorType::RowResize:
         m_value.valueID = CSSValueRowResize;
         break;
-    case CursorAllScroll:
+    case CursorType::AllScroll:
         m_value.valueID = CSSValueAllScroll;
         break;
-    case CursorZoomIn:
+    case CursorType::ZoomIn:
         m_value.valueID = CSSValueZoomIn;
         break;
-    case CursorZoomOut:
+    case CursorType::ZoomOut:
         m_value.valueID = CSSValueZoomOut;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator ECursor() const
+template<> inline CSSPrimitiveValue::operator CursorType() const
 {
     ASSERT(isValueID());
     switch (m_value.valueID) {
     case CSSValueCopy:
-        return CursorCopy;
+        return CursorType::Copy;
     case CSSValueWebkitGrab:
-        return CursorGrab;
+        return CursorType::Grab;
     case CSSValueWebkitGrabbing:
-        return CursorGrabbing;
+        return CursorType::Grabbing;
     case CSSValueWebkitZoomIn:
-        return CursorZoomIn;
+        return CursorType::ZoomIn;
     case CSSValueWebkitZoomOut:
-        return CursorZoomOut;
+        return CursorType::ZoomOut;
     case CSSValueNone:
-        return CursorNone;
+        return CursorType::None;
     default:
-        return static_cast<ECursor>(m_value.valueID - CSSValueAuto);
+        return static_cast<CursorType>(m_value.valueID - CSSValueAuto);
     }
 }
 
@@ -1298,10 +1298,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CursorVisibility e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case CursorVisibilityAuto:
+    case CursorVisibility::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case CursorVisibilityAutoHide:
+    case CursorVisibility::AutoHide:
         m_value.valueID = CSSValueAutoHide;
         break;
     }
@@ -1312,139 +1312,139 @@ template<> inline CSSPrimitiveValue::operator CursorVisibility() const
     ASSERT(isValueID());
 
     if (m_value.valueID == CSSValueAuto)
-        return CursorVisibilityAuto;
+        return CursorVisibility::Auto;
     if (m_value.valueID == CSSValueAutoHide)
-        return CursorVisibilityAutoHide;
+        return CursorVisibility::AutoHide;
 
     ASSERT_NOT_REACHED();
-    return CursorVisibilityAuto;
+    return CursorVisibility::Auto;
 }
 #endif
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(DisplayType e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case INLINE:
+    case DisplayType::Inline:
         m_value.valueID = CSSValueInline;
         break;
-    case BLOCK:
+    case DisplayType::Block:
         m_value.valueID = CSSValueBlock;
         break;
-    case LIST_ITEM:
+    case DisplayType::ListItem:
         m_value.valueID = CSSValueListItem;
         break;
-    case COMPACT:
+    case DisplayType::Compact:
         m_value.valueID = CSSValueCompact;
         break;
-    case INLINE_BLOCK:
+    case DisplayType::InlineBlock:
         m_value.valueID = CSSValueInlineBlock;
         break;
-    case TABLE:
+    case DisplayType::Table:
         m_value.valueID = CSSValueTable;
         break;
-    case INLINE_TABLE:
+    case DisplayType::InlineTable:
         m_value.valueID = CSSValueInlineTable;
         break;
-    case TABLE_ROW_GROUP:
+    case DisplayType::TableRowGroup:
         m_value.valueID = CSSValueTableRowGroup;
         break;
-    case TABLE_HEADER_GROUP:
+    case DisplayType::TableHeaderGroup:
         m_value.valueID = CSSValueTableHeaderGroup;
         break;
-    case TABLE_FOOTER_GROUP:
+    case DisplayType::TableFooterGroup:
         m_value.valueID = CSSValueTableFooterGroup;
         break;
-    case TABLE_ROW:
+    case DisplayType::TableRow:
         m_value.valueID = CSSValueTableRow;
         break;
-    case TABLE_COLUMN_GROUP:
+    case DisplayType::TableColumnGroup:
         m_value.valueID = CSSValueTableColumnGroup;
         break;
-    case TABLE_COLUMN:
+    case DisplayType::TableColumn:
         m_value.valueID = CSSValueTableColumn;
         break;
-    case TABLE_CELL:
+    case DisplayType::TableCell:
         m_value.valueID = CSSValueTableCell;
         break;
-    case TABLE_CAPTION:
+    case DisplayType::TableCaption:
         m_value.valueID = CSSValueTableCaption;
         break;
-    case BOX:
+    case DisplayType::Box:
         m_value.valueID = CSSValueWebkitBox;
         break;
-    case INLINE_BOX:
+    case DisplayType::InlineBox:
         m_value.valueID = CSSValueWebkitInlineBox;
         break;
-    case FLEX:
-    case WEBKIT_FLEX:
+    case DisplayType::Flex:
+    case DisplayType::WebKitFlex:
         m_value.valueID = CSSValueFlex;
         break;
-    case INLINE_FLEX:
-    case WEBKIT_INLINE_FLEX:
+    case DisplayType::InlineFlex:
+    case DisplayType::WebKitInlineFlex:
         m_value.valueID = CSSValueInlineFlex;
         break;
-    case GRID:
+    case DisplayType::Grid:
         m_value.valueID = CSSValueGrid;
         break;
-    case INLINE_GRID:
+    case DisplayType::InlineGrid:
         m_value.valueID = CSSValueInlineGrid;
         break;
-    case NONE:
+    case DisplayType::None:
         m_value.valueID = CSSValueNone;
         break;
-    case CONTENTS:
+    case DisplayType::Contents:
         m_value.valueID = CSSValueContents;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EDisplay() const
+template<> inline CSSPrimitiveValue::operator DisplayType() const
 {
     ASSERT(isValueID());
 
     if (m_value.valueID == CSSValueNone)
-        return NONE;
-
-    EDisplay display = static_cast<EDisplay>(m_value.valueID - CSSValueInline);
-    ASSERT(display >= INLINE && display <= NONE);
-    if (display == WEBKIT_FLEX)
-        return FLEX;
-    if (display == WEBKIT_INLINE_FLEX)
-        return INLINE_FLEX;
+        return DisplayType::None;
+
+    DisplayType display = static_cast<DisplayType>(m_value.valueID - CSSValueInline);
+    ASSERT(display >= DisplayType::Inline && display <= DisplayType::None);
+    if (display == DisplayType::WebKitFlex)
+        return DisplayType::Flex;
+    if (display == DisplayType::WebKitInlineFlex)
+        return DisplayType::InlineFlex;
     return display;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EEmptyCell e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EmptyCell e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case SHOW:
+    case EmptyCell::Show:
         m_value.valueID = CSSValueShow;
         break;
-    case HIDE:
+    case EmptyCell::Hide:
         m_value.valueID = CSSValueHide;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EEmptyCell() const
+template<> inline CSSPrimitiveValue::operator EmptyCell() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueShow:
-        return SHOW;
+        return EmptyCell::Show;
     case CSSValueHide:
-        return HIDE;
+        return EmptyCell::Hide;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return SHOW;
+    return EmptyCell::Show;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FlexDirection e)
@@ -1681,297 +1681,297 @@ template<> inline CSSPrimitiveValue::operator LineBreak() const
     return LineBreak::Auto;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStylePosition e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ListStylePosition e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case OUTSIDE:
+    case ListStylePosition::Outside:
         m_value.valueID = CSSValueOutside;
         break;
-    case INSIDE:
+    case ListStylePosition::Inside:
         m_value.valueID = CSSValueInside;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EListStylePosition() const
+template<> inline CSSPrimitiveValue::operator ListStylePosition() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueOutside:
-        return OUTSIDE;
+        return ListStylePosition::Outside;
     case CSSValueInside:
-        return INSIDE;
+        return ListStylePosition::Inside;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return OUTSIDE;
+    return ListStylePosition::Outside;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EListStyleType e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ListStyleType e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case Afar:
+    case ListStyleType::Afar:
         m_value.valueID = CSSValueAfar;
         break;
-    case Amharic:
+    case ListStyleType::Amharic:
         m_value.valueID = CSSValueAmharic;
         break;
-    case AmharicAbegede:
+    case ListStyleType::AmharicAbegede:
         m_value.valueID = CSSValueAmharicAbegede;
         break;
-    case ArabicIndic:
+    case ListStyleType::ArabicIndic:
         m_value.valueID = CSSValueArabicIndic;
         break;
-    case Armenian:
+    case ListStyleType::Armenian:
         m_value.valueID = CSSValueArmenian;
         break;
-    case Asterisks:
+    case ListStyleType::Asterisks:
         m_value.valueID = CSSValueAsterisks;
         break;
-    case BinaryListStyle:
+    case ListStyleType::Binary:
         m_value.valueID = CSSValueBinary;
         break;
-    case Bengali:
+    case ListStyleType::Bengali:
         m_value.valueID = CSSValueBengali;
         break;
-    case Cambodian:
+    case ListStyleType::Cambodian:
         m_value.valueID = CSSValueCambodian;
         break;
-    case Circle:
+    case ListStyleType::Circle:
         m_value.valueID = CSSValueCircle;
         break;
-    case CjkEarthlyBranch:
+    case ListStyleType::CjkEarthlyBranch:
         m_value.valueID = CSSValueCjkEarthlyBranch;
         break;
-    case CjkHeavenlyStem:
+    case ListStyleType::CjkHeavenlyStem:
         m_value.valueID = CSSValueCjkHeavenlyStem;
         break;
-    case CJKIdeographic:
+    case ListStyleType::CJKIdeographic:
         m_value.valueID = CSSValueCjkIdeographic;
         break;
-    case DecimalLeadingZero:
+    case ListStyleType::DecimalLeadingZero:
         m_value.valueID = CSSValueDecimalLeadingZero;
         break;
-    case DecimalListStyle:
+    case ListStyleType::Decimal:
         m_value.valueID = CSSValueDecimal;
         break;
-    case Devanagari:
+    case ListStyleType::Devanagari:
         m_value.valueID = CSSValueDevanagari;
         break;
-    case Disc:
+    case ListStyleType::Disc:
         m_value.valueID = CSSValueDisc;
         break;
-    case Ethiopic:
+    case ListStyleType::Ethiopic:
         m_value.valueID = CSSValueEthiopic;
         break;
-    case EthiopicAbegede:
+    case ListStyleType::EthiopicAbegede:
         m_value.valueID = CSSValueEthiopicAbegede;
         break;
-    case EthiopicAbegedeAmEt:
+    case ListStyleType::EthiopicAbegedeAmEt:
         m_value.valueID = CSSValueEthiopicAbegedeAmEt;
         break;
-    case EthiopicAbegedeGez:
+    case ListStyleType::EthiopicAbegedeGez:
         m_value.valueID = CSSValueEthiopicAbegedeGez;
         break;
-    case EthiopicAbegedeTiEr:
+    case ListStyleType::EthiopicAbegedeTiEr:
         m_value.valueID = CSSValueEthiopicAbegedeTiEr;
         break;
-    case EthiopicAbegedeTiEt:
+    case ListStyleType::EthiopicAbegedeTiEt:
         m_value.valueID = CSSValueEthiopicAbegedeTiEt;
         break;
-    case EthiopicHalehameAaEr:
+    case ListStyleType::EthiopicHalehameAaEr:
         m_value.valueID = CSSValueEthiopicHalehameAaEr;
         break;
-    case EthiopicHalehameAaEt:
+    case ListStyleType::EthiopicHalehameAaEt:
         m_value.valueID = CSSValueEthiopicHalehameAaEt;
         break;
-    case EthiopicHalehameAmEt:
+    case ListStyleType::EthiopicHalehameAmEt:
         m_value.valueID = CSSValueEthiopicHalehameAmEt;
         break;
-    case EthiopicHalehameGez:
+    case ListStyleType::EthiopicHalehameGez:
         m_value.valueID = CSSValueEthiopicHalehameGez;
         break;
-    case EthiopicHalehameOmEt:
+    case ListStyleType::EthiopicHalehameOmEt:
         m_value.valueID = CSSValueEthiopicHalehameOmEt;
         break;
-    case EthiopicHalehameSidEt:
+    case ListStyleType::EthiopicHalehameSidEt:
         m_value.valueID = CSSValueEthiopicHalehameSidEt;
         break;
-    case EthiopicHalehameSoEt:
+    case ListStyleType::EthiopicHalehameSoEt:
         m_value.valueID = CSSValueEthiopicHalehameSoEt;
         break;
-    case EthiopicHalehameTiEr:
+    case ListStyleType::EthiopicHalehameTiEr:
         m_value.valueID = CSSValueEthiopicHalehameTiEr;
         break;
-    case EthiopicHalehameTiEt:
+    case ListStyleType::EthiopicHalehameTiEt:
         m_value.valueID = CSSValueEthiopicHalehameTiEt;
         break;
-    case EthiopicHalehameTig:
+    case ListStyleType::EthiopicHalehameTig:
         m_value.valueID = CSSValueEthiopicHalehameTig;
         break;
-    case Footnotes:
+    case ListStyleType::Footnotes:
         m_value.valueID = CSSValueFootnotes;
         break;
-    case Georgian:
+    case ListStyleType::Georgian:
         m_value.valueID = CSSValueGeorgian;
         break;
-    case Gujarati:
+    case ListStyleType::Gujarati:
         m_value.valueID = CSSValueGujarati;
         break;
-    case Gurmukhi:
+    case ListStyleType::Gurmukhi:
         m_value.valueID = CSSValueGurmukhi;
         break;
-    case Hangul:
+    case ListStyleType::Hangul:
         m_value.valueID = CSSValueHangul;
         break;
-    case HangulConsonant:
+    case ListStyleType::HangulConsonant:
         m_value.valueID = CSSValueHangulConsonant;
         break;
-    case Hebrew:
+    case ListStyleType::Hebrew:
         m_value.valueID = CSSValueHebrew;
         break;
-    case Hiragana:
+    case ListStyleType::Hiragana:
         m_value.valueID = CSSValueHiragana;
         break;
-    case HiraganaIroha:
+    case ListStyleType::HiraganaIroha:
         m_value.valueID = CSSValueHiraganaIroha;
         break;
-    case Kannada:
+    case ListStyleType::Kannada:
         m_value.valueID = CSSValueKannada;
         break;
-    case Katakana:
+    case ListStyleType::Katakana:
         m_value.valueID = CSSValueKatakana;
         break;
-    case KatakanaIroha:
+    case ListStyleType::KatakanaIroha:
         m_value.valueID = CSSValueKatakanaIroha;
         break;
-    case Khmer:
+    case ListStyleType::Khmer:
         m_value.valueID = CSSValueKhmer;
         break;
-    case Lao:
+    case ListStyleType::Lao:
         m_value.valueID = CSSValueLao;
         break;
-    case LowerAlpha:
+    case ListStyleType::LowerAlpha:
         m_value.valueID = CSSValueLowerAlpha;
         break;
-    case LowerArmenian:
+    case ListStyleType::LowerArmenian:
         m_value.valueID = CSSValueLowerArmenian;
         break;
-    case LowerGreek:
+    case ListStyleType::LowerGreek:
         m_value.valueID = CSSValueLowerGreek;
         break;
-    case LowerHexadecimal:
+    case ListStyleType::LowerHexadecimal:
         m_value.valueID = CSSValueLowerHexadecimal;
         break;
-    case LowerLatin:
+    case ListStyleType::LowerLatin:
         m_value.valueID = CSSValueLowerLatin;
         break;
-    case LowerNorwegian:
+    case ListStyleType::LowerNorwegian:
         m_value.valueID = CSSValueLowerNorwegian;
         break;
-    case LowerRoman:
+    case ListStyleType::LowerRoman:
         m_value.valueID = CSSValueLowerRoman;
         break;
-    case Malayalam:
+    case ListStyleType::Malayalam:
         m_value.valueID = CSSValueMalayalam;
         break;
-    case Mongolian:
+    case ListStyleType::Mongolian:
         m_value.valueID = CSSValueMongolian;
         break;
-    case Myanmar:
+    case ListStyleType::Myanmar:
         m_value.valueID = CSSValueMyanmar;
         break;
-    case NoneListStyle:
+    case ListStyleType::None:
         m_value.valueID = CSSValueNone;
         break;
-    case Octal:
+    case ListStyleType::Octal:
         m_value.valueID = CSSValueOctal;
         break;
-    case Oriya:
+    case ListStyleType::Oriya:
         m_value.valueID = CSSValueOriya;
         break;
-    case Oromo:
+    case ListStyleType::Oromo:
         m_value.valueID = CSSValueOromo;
         break;
-    case Persian:
+    case ListStyleType::Persian:
         m_value.valueID = CSSValuePersian;
         break;
-    case Sidama:
+    case ListStyleType::Sidama:
         m_value.valueID = CSSValueSidama;
         break;
-    case Somali:
+    case ListStyleType::Somali:
         m_value.valueID = CSSValueSomali;
         break;
-    case Square:
+    case ListStyleType::Square:
         m_value.valueID = CSSValueSquare;
         break;
-    case Telugu:
+    case ListStyleType::Telugu:
         m_value.valueID = CSSValueTelugu;
         break;
-    case Thai:
+    case ListStyleType::Thai:
         m_value.valueID = CSSValueThai;
         break;
-    case Tibetan:
+    case ListStyleType::Tibetan:
         m_value.valueID = CSSValueTibetan;
         break;
-    case Tigre:
+    case ListStyleType::Tigre:
         m_value.valueID = CSSValueTigre;
         break;
-    case TigrinyaEr:
+    case ListStyleType::TigrinyaEr:
         m_value.valueID = CSSValueTigrinyaEr;
         break;
-    case TigrinyaErAbegede:
+    case ListStyleType::TigrinyaErAbegede:
         m_value.valueID = CSSValueTigrinyaErAbegede;
         break;
-    case TigrinyaEt:
+    case ListStyleType::TigrinyaEt:
         m_value.valueID = CSSValueTigrinyaEt;
         break;
-    case TigrinyaEtAbegede:
+    case ListStyleType::TigrinyaEtAbegede:
         m_value.valueID = CSSValueTigrinyaEtAbegede;
         break;
-    case UpperAlpha:
+    case ListStyleType::UpperAlpha:
         m_value.valueID = CSSValueUpperAlpha;
         break;
-    case UpperArmenian:
+    case ListStyleType::UpperArmenian:
         m_value.valueID = CSSValueUpperArmenian;
         break;
-    case UpperGreek:
+    case ListStyleType::UpperGreek:
         m_value.valueID = CSSValueUpperGreek;
         break;
-    case UpperHexadecimal:
+    case ListStyleType::UpperHexadecimal:
         m_value.valueID = CSSValueUpperHexadecimal;
         break;
-    case UpperLatin:
+    case ListStyleType::UpperLatin:
         m_value.valueID = CSSValueUpperLatin;
         break;
-    case UpperNorwegian:
+    case ListStyleType::UpperNorwegian:
         m_value.valueID = CSSValueUpperNorwegian;
         break;
-    case UpperRoman:
+    case ListStyleType::UpperRoman:
         m_value.valueID = CSSValueUpperRoman;
         break;
-    case Urdu:
+    case ListStyleType::Urdu:
         m_value.valueID = CSSValueUrdu;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EListStyleType() const
+template<> inline CSSPrimitiveValue::operator ListStyleType() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueNone:
-        return NoneListStyle;
+        return ListStyleType::None;
     default:
-        return static_cast<EListStyleType>(m_value.valueID - CSSValueDisc);
+        return static_cast<ListStyleType>(m_value.valueID - CSSValueDisc);
     }
 }
 
@@ -2202,34 +2202,34 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BreakBetween e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case AutoBreakBetween:
+    case BreakBetween::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case AvoidBreakBetween:
+    case BreakBetween::Avoid:
         m_value.valueID = CSSValueAvoid;
         break;
-    case AvoidColumnBreakBetween:
+    case BreakBetween::AvoidColumn:
         m_value.valueID = CSSValueAvoidColumn;
         break;
-    case AvoidPageBreakBetween:
+    case BreakBetween::AvoidPage:
         m_value.valueID = CSSValueAvoidPage;
         break;
-    case ColumnBreakBetween:
+    case BreakBetween::Column:
         m_value.valueID = CSSValueColumn;
         break;
-    case PageBreakBetween:
+    case BreakBetween::Page:
         m_value.valueID = CSSValuePage;
         break;
-    case LeftPageBreakBetween:
+    case BreakBetween::LeftPage:
         m_value.valueID = CSSValueLeft;
         break;
-    case RightPageBreakBetween:
+    case BreakBetween::RightPage:
         m_value.valueID = CSSValueRight;
         break;
-    case RectoPageBreakBetween:
+    case BreakBetween::RectoPage:
         m_value.valueID = CSSValueRecto;
         break;
-    case VersoPageBreakBetween:
+    case BreakBetween::VersoPage:
         m_value.valueID = CSSValueVerso;
         break;
     }
@@ -2241,31 +2241,31 @@ template<> inline CSSPrimitiveValue::operator BreakBetween() const
 
     switch (m_value.valueID) {
     case CSSValueAuto:
-        return AutoBreakBetween;
+        return BreakBetween::Auto;
     case CSSValueAvoid:
-        return AvoidBreakBetween;
+        return BreakBetween::Avoid;
     case CSSValueAvoidColumn:
-        return AvoidColumnBreakBetween;
+        return BreakBetween::AvoidColumn;
     case CSSValueAvoidPage:
-        return AvoidPageBreakBetween;
+        return BreakBetween::AvoidPage;
     case CSSValueColumn:
-        return ColumnBreakBetween;
+        return BreakBetween::Column;
     case CSSValuePage:
-        return PageBreakBetween;
+        return BreakBetween::Page;
     case CSSValueLeft:
-        return LeftPageBreakBetween;
+        return BreakBetween::LeftPage;
     case CSSValueRight:
-        return RightPageBreakBetween;
+        return BreakBetween::RightPage;
     case CSSValueRecto:
-        return RectoPageBreakBetween;
+        return BreakBetween::RectoPage;
     case CSSValueVerso:
-        return VersoPageBreakBetween;
+        return BreakBetween::VersoPage;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return AutoBreakBetween;
+    return BreakBetween::Auto;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BreakInside e)
@@ -2273,16 +2273,16 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BreakInside e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case AutoBreakInside:
+    case BreakInside::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case AvoidBreakInside:
+    case BreakInside::Avoid:
         m_value.valueID = CSSValueAvoid;
         break;
-    case AvoidColumnBreakInside:
+    case BreakInside::AvoidColumn:
         m_value.valueID = CSSValueAvoidColumn;
         break;
-    case AvoidPageBreakInside:
+    case BreakInside::AvoidPage:
         m_value.valueID = CSSValueAvoidPage;
         break;
     }
@@ -2294,19 +2294,19 @@ template<> inline CSSPrimitiveValue::operator BreakInside() const
     
     switch (m_value.valueID) {
     case CSSValueAuto:
-        return AutoBreakInside;
+        return BreakInside::Auto;
     case CSSValueAvoid:
-        return AvoidBreakInside;
+        return BreakInside::Avoid;
     case CSSValueAvoidColumn:
-        return AvoidColumnBreakInside;
+        return BreakInside::AvoidColumn;
     case CSSValueAvoidPage:
-        return AvoidPageBreakInside;
+        return BreakInside::AvoidPage;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return AutoBreakInside;
+    return BreakInside::Auto;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PositionType e)
@@ -2430,53 +2430,53 @@ template<> inline CSSPrimitiveValue::operator TableLayoutType() const
     return TableLayoutType::Auto;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextAlign e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextAlignMode e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case TASTART:
+    case TextAlignMode::Start:
         m_value.valueID = CSSValueStart;
         break;
-    case TAEND:
+    case TextAlignMode::End:
         m_value.valueID = CSSValueEnd;
         break;
-    case LEFT:
+    case TextAlignMode::Left:
         m_value.valueID = CSSValueLeft;
         break;
-    case RIGHT:
+    case TextAlignMode::Right:
         m_value.valueID = CSSValueRight;
         break;
-    case CENTER:
+    case TextAlignMode::Center:
         m_value.valueID = CSSValueCenter;
         break;
-    case JUSTIFY:
+    case TextAlignMode::Justify:
         m_value.valueID = CSSValueJustify;
         break;
-    case WEBKIT_LEFT:
+    case TextAlignMode::WebKitLeft:
         m_value.valueID = CSSValueWebkitLeft;
         break;
-    case WEBKIT_RIGHT:
+    case TextAlignMode::WebKitRight:
         m_value.valueID = CSSValueWebkitRight;
         break;
-    case WEBKIT_CENTER:
+    case TextAlignMode::WebKitCenter:
         m_value.valueID = CSSValueWebkitCenter;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator ETextAlign() const
+template<> inline CSSPrimitiveValue::operator TextAlignMode() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start.
     case CSSValueStart:
-        return TASTART;
+        return TextAlignMode::Start;
     case CSSValueEnd:
-        return TAEND;
+        return TextAlignMode::End;
     default:
-        return static_cast<ETextAlign>(m_value.valueID - CSSValueLeft);
+        return static_cast<TextAlignMode>(m_value.valueID - CSSValueLeft);
     }
 }
 
@@ -2486,25 +2486,25 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextAlignLast e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case TextAlignLastStart:
+    case TextAlignLast::Start:
         m_value.valueID = CSSValueStart;
         break;
-    case TextAlignLastEnd:
+    case TextAlignLast::End:
         m_value.valueID = CSSValueEnd;
         break;
-    case TextAlignLastLeft:
+    case TextAlignLast::Left:
         m_value.valueID = CSSValueLeft;
         break;
-    case TextAlignLastRight:
+    case TextAlignLast::Right:
         m_value.valueID = CSSValueRight;
         break;
-    case TextAlignLastCenter:
+    case TextAlignLast::Center:
         m_value.valueID = CSSValueCenter;
         break;
-    case TextAlignLastJustify:
+    case TextAlignLast::Justify:
         m_value.valueID = CSSValueJustify;
         break;
-    case TextAlignLastAuto:
+    case TextAlignLast::Auto:
         m_value.valueID = CSSValueAuto;
         break;
     }
@@ -2516,25 +2516,25 @@ template<> inline CSSPrimitiveValue::operator TextAlignLast() const
 
     switch (m_value.valueID) {
     case CSSValueAuto:
-        return TextAlignLastAuto;
+        return TextAlignLast::Auto;
     case CSSValueStart:
-        return TextAlignLastStart;
+        return TextAlignLast::Start;
     case CSSValueEnd:
-        return TextAlignLastEnd;
+        return TextAlignLast::End;
     case CSSValueLeft:
-        return TextAlignLastLeft;
+        return TextAlignLast::Left;
     case CSSValueRight:
-        return TextAlignLastRight;
+        return TextAlignLast::Right;
     case CSSValueCenter:
-        return TextAlignLastCenter;
+        return TextAlignLast::Center;
     case CSSValueJustify:
-        return TextAlignLastJustify;
+        return TextAlignLast::Justify;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextAlignLastAuto;
+    return TextAlignLast::Auto;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextJustify e)
@@ -2542,16 +2542,16 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextJustify e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case TextJustifyAuto:
+    case TextJustify::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case TextJustifyNone:
+    case TextJustify::None:
         m_value.valueID = CSSValueNone;
         break;
-    case TextJustifyInterWord:
+    case TextJustify::InterWord:
         m_value.valueID = CSSValueInterWord;
         break;
-    case TextJustifyDistribute:
+    case TextJustify::Distribute:
         m_value.valueID = CSSValueDistribute;
         break;
     }
@@ -2563,19 +2563,19 @@ template<> inline CSSPrimitiveValue::operator TextJustify() const
 
     switch (m_value.valueID) {
     case CSSValueAuto:
-        return TextJustifyAuto;
+        return TextJustify::Auto;
     case CSSValueNone:
-        return TextJustifyNone;
+        return TextJustify::None;
     case CSSValueInterWord:
-        return TextJustifyInterWord;
+        return TextJustify::InterWord;
     case CSSValueDistribute:
-        return TextJustifyDistribute;
+        return TextJustify::Distribute;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextJustifyAuto;
+    return TextJustify::Auto;
 }
 #endif // CSS3_TEXT
 
@@ -2612,21 +2612,21 @@ template<> inline CSSPrimitiveValue::operator TextDecorationStyle() const
 
     switch (m_value.valueID) {
     case CSSValueSolid:
-        return TextDecorationStyleSolid;
+        return TextDecorationStyle::Solid;
     case CSSValueDouble:
-        return TextDecorationStyleDouble;
+        return TextDecorationStyle::Double;
     case CSSValueDotted:
-        return TextDecorationStyleDotted;
+        return TextDecorationStyle::Dotted;
     case CSSValueDashed:
-        return TextDecorationStyleDashed;
+        return TextDecorationStyle::Dashed;
     case CSSValueWavy:
-        return TextDecorationStyleWavy;
+        return TextDecorationStyle::Wavy;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextDecorationStyleSolid;
+    return TextDecorationStyle::Solid;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextUnderlinePosition e)
@@ -2710,45 +2710,45 @@ template<> inline CSSPrimitiveValue::operator TextSecurity() const
     return TextSecurity::None;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ETextTransform e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextTransform e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case CAPITALIZE:
+    case TextTransform::Capitalize:
         m_value.valueID = CSSValueCapitalize;
         break;
-    case UPPERCASE:
+    case TextTransform::Uppercase:
         m_value.valueID = CSSValueUppercase;
         break;
-    case LOWERCASE:
+    case TextTransform::Lowercase:
         m_value.valueID = CSSValueLowercase;
         break;
-    case TTNONE:
+    case TextTransform::None:
         m_value.valueID = CSSValueNone;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator ETextTransform() const
+template<> inline CSSPrimitiveValue::operator TextTransform() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueCapitalize:
-        return CAPITALIZE;
+        return TextTransform::Capitalize;
     case CSSValueUppercase:
-        return UPPERCASE;
+        return TextTransform::Uppercase;
     case CSSValueLowercase:
-        return LOWERCASE;
+        return TextTransform::Lowercase;
     case CSSValueNone:
-        return TTNONE;
+        return TextTransform::None;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TTNONE;
+    return TextTransform::None;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EUnicodeBidi e)
@@ -2985,91 +2985,91 @@ template<> inline CSSPrimitiveValue::operator VerticalAlign() const
     return VerticalAlign::Top;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Visibility e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case VISIBLE:
+    case Visibility::Visible:
         m_value.valueID = CSSValueVisible;
         break;
-    case HIDDEN:
+    case Visibility::Hidden:
         m_value.valueID = CSSValueHidden;
         break;
-    case COLLAPSE:
+    case Visibility::Collapse:
         m_value.valueID = CSSValueCollapse;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EVisibility() const
+template<> inline CSSPrimitiveValue::operator Visibility() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueHidden:
-        return HIDDEN;
+        return Visibility::Hidden;
     case CSSValueVisible:
-        return VISIBLE;
+        return Visibility::Visible;
     case CSSValueCollapse:
-        return COLLAPSE;
+        return Visibility::Collapse;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return VISIBLE;
+    return Visibility::Visible;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EWhiteSpace e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WhiteSpace e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case NORMAL:
+    case WhiteSpace::Normal:
         m_value.valueID = CSSValueNormal;
         break;
-    case PRE:
+    case WhiteSpace::Pre:
         m_value.valueID = CSSValuePre;
         break;
-    case PRE_WRAP:
+    case WhiteSpace::PreWrap:
         m_value.valueID = CSSValuePreWrap;
         break;
-    case PRE_LINE:
+    case WhiteSpace::PreLine:
         m_value.valueID = CSSValuePreLine;
         break;
-    case NOWRAP:
+    case WhiteSpace::NoWrap:
         m_value.valueID = CSSValueNowrap;
         break;
-    case KHTML_NOWRAP:
+    case WhiteSpace::KHTMLNoWrap:
         m_value.valueID = CSSValueWebkitNowrap;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EWhiteSpace() const
+template<> inline CSSPrimitiveValue::operator WhiteSpace() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueWebkitNowrap:
-        return KHTML_NOWRAP;
+        return WhiteSpace::KHTMLNoWrap;
     case CSSValueNowrap:
-        return NOWRAP;
+        return WhiteSpace::NoWrap;
     case CSSValuePre:
-        return PRE;
+        return WhiteSpace::Pre;
     case CSSValuePreWrap:
-        return PRE_WRAP;
+        return WhiteSpace::PreWrap;
     case CSSValuePreLine:
-        return PRE_LINE;
+        return WhiteSpace::PreLine;
     case CSSValueNormal:
-        return NORMAL;
+        return WhiteSpace::Normal;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return NORMAL;
+    return WhiteSpace::Normal;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WordBreak e)
@@ -3258,13 +3258,13 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(RubyPosition position)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (position) {
-    case RubyPositionBefore:
+    case RubyPosition::Before:
         m_value.valueID = CSSValueBefore;
         break;
-    case RubyPositionAfter:
+    case RubyPosition::After:
         m_value.valueID = CSSValueAfter;
         break;
-    case RubyPositionInterCharacter:
+    case RubyPosition::InterCharacter:
         m_value.valueID = CSSValueInterCharacter;
         break;
     }
@@ -3276,17 +3276,17 @@ template<> inline CSSPrimitiveValue::operator RubyPosition() const
 
     switch (m_value.valueID) {
     case CSSValueBefore:
-        return RubyPositionBefore;
+        return RubyPosition::Before;
     case CSSValueAfter:
-        return RubyPositionAfter;
+        return RubyPosition::After;
     case CSSValueInterCharacter:
-        return RubyPositionInterCharacter;
+        return RubyPosition::InterCharacter;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return RubyPositionBefore;
+    return RubyPosition::Before;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextOverflow overflow)
@@ -3325,10 +3325,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisFill fill)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (fill) {
-    case TextEmphasisFillFilled:
+    case TextEmphasisFill::Filled:
         m_value.valueID = CSSValueFilled;
         break;
-    case TextEmphasisFillOpen:
+    case TextEmphasisFill::Open:
         m_value.valueID = CSSValueOpen;
         break;
     }
@@ -3340,15 +3340,15 @@ template<> inline CSSPrimitiveValue::operator TextEmphasisFill() const
 
     switch (m_value.valueID) {
     case CSSValueFilled:
-        return TextEmphasisFillFilled;
+        return TextEmphasisFill::Filled;
     case CSSValueOpen:
-        return TextEmphasisFillOpen;
+        return TextEmphasisFill::Open;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextEmphasisFillFilled;
+    return TextEmphasisFill::Filled;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisMark mark)
@@ -3356,24 +3356,24 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisMark mark)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (mark) {
-    case TextEmphasisMarkDot:
+    case TextEmphasisMark::Dot:
         m_value.valueID = CSSValueDot;
         break;
-    case TextEmphasisMarkCircle:
+    case TextEmphasisMark::Circle:
         m_value.valueID = CSSValueCircle;
         break;
-    case TextEmphasisMarkDoubleCircle:
+    case TextEmphasisMark::DoubleCircle:
         m_value.valueID = CSSValueDoubleCircle;
         break;
-    case TextEmphasisMarkTriangle:
+    case TextEmphasisMark::Triangle:
         m_value.valueID = CSSValueTriangle;
         break;
-    case TextEmphasisMarkSesame:
+    case TextEmphasisMark::Sesame:
         m_value.valueID = CSSValueSesame;
         break;
-    case TextEmphasisMarkNone:
-    case TextEmphasisMarkAuto:
-    case TextEmphasisMarkCustom:
+    case TextEmphasisMark::None:
+    case TextEmphasisMark::Auto:
+    case TextEmphasisMark::Custom:
         ASSERT_NOT_REACHED();
         m_value.valueID = CSSValueNone;
         break;
@@ -3386,23 +3386,23 @@ template<> inline CSSPrimitiveValue::operator TextEmphasisMark() const
 
     switch (m_value.valueID) {
     case CSSValueNone:
-        return TextEmphasisMarkNone;
+        return TextEmphasisMark::None;
     case CSSValueDot:
-        return TextEmphasisMarkDot;
+        return TextEmphasisMark::Dot;
     case CSSValueCircle:
-        return TextEmphasisMarkCircle;
+        return TextEmphasisMark::Circle;
     case CSSValueDoubleCircle:
-        return TextEmphasisMarkDoubleCircle;
+        return TextEmphasisMark::DoubleCircle;
     case CSSValueTriangle:
-        return TextEmphasisMarkTriangle;
+        return TextEmphasisMark::Triangle;
     case CSSValueSesame:
-        return TextEmphasisMarkSesame;
+        return TextEmphasisMark::Sesame;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextEmphasisMarkNone;
+    return TextEmphasisMark::None;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextOrientation e)
@@ -3445,75 +3445,75 @@ template<> inline CSSPrimitiveValue::operator TextOrientation() const
     return TextOrientation::Mixed;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(PointerEvents e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case PE_NONE:
+    case PointerEvents::None:
         m_value.valueID = CSSValueNone;
         break;
-    case PE_STROKE:
+    case PointerEvents::Stroke:
         m_value.valueID = CSSValueStroke;
         break;
-    case PE_FILL:
+    case PointerEvents::Fill:
         m_value.valueID = CSSValueFill;
         break;
-    case PE_PAINTED:
+    case PointerEvents::Painted:
         m_value.valueID = CSSValuePainted;
         break;
-    case PE_VISIBLE:
+    case PointerEvents::Visible:
         m_value.valueID = CSSValueVisible;
         break;
-    case PE_VISIBLE_STROKE:
+    case PointerEvents::VisibleStroke:
         m_value.valueID = CSSValueVisibleStroke;
         break;
-    case PE_VISIBLE_FILL:
+    case PointerEvents::VisibleFill:
         m_value.valueID = CSSValueVisibleFill;
         break;
-    case PE_VISIBLE_PAINTED:
+    case PointerEvents::VisiblePainted:
         m_value.valueID = CSSValueVisiblePainted;
         break;
-    case PE_AUTO:
+    case PointerEvents::Auto:
         m_value.valueID = CSSValueAuto;
         break;
-    case PE_ALL:
+    case PointerEvents::All:
         m_value.valueID = CSSValueAll;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EPointerEvents() const
+template<> inline CSSPrimitiveValue::operator PointerEvents() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueAll:
-        return PE_ALL;
+        return PointerEvents::All;
     case CSSValueAuto:
-        return PE_AUTO;
+        return PointerEvents::Auto;
     case CSSValueNone:
-        return PE_NONE;
+        return PointerEvents::None;
     case CSSValueVisiblePainted:
-        return PE_VISIBLE_PAINTED;
+        return PointerEvents::VisiblePainted;
     case CSSValueVisibleFill:
-        return PE_VISIBLE_FILL;
+        return PointerEvents::VisibleFill;
     case CSSValueVisibleStroke:
-        return PE_VISIBLE_STROKE;
+        return PointerEvents::VisibleStroke;
     case CSSValueVisible:
-        return PE_VISIBLE;
+        return PointerEvents::Visible;
     case CSSValuePainted:
-        return PE_PAINTED;
+        return PointerEvents::Painted;
     case CSSValueFill:
-        return PE_FILL;
+        return PointerEvents::Fill;
     case CSSValueStroke:
-        return PE_STROKE;
+        return PointerEvents::Stroke;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return PE_ALL;
+    return PointerEvents::All;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Kerning kerning)
@@ -3722,13 +3722,13 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Hyphens hyphens)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (hyphens) {
-    case HyphensNone:
+    case Hyphens::None:
         m_value.valueID = CSSValueNone;
         break;
-    case HyphensManual:
+    case Hyphens::Manual:
         m_value.valueID = CSSValueManual;
         break;
-    case HyphensAuto:
+    case Hyphens::Auto:
         m_value.valueID = CSSValueAuto;
         break;
     }
@@ -3740,17 +3740,17 @@ template<> inline CSSPrimitiveValue::operator Hyphens() const
 
     switch (m_value.valueID) {
     case CSSValueNone:
-        return HyphensNone;
+        return Hyphens::None;
     case CSSValueManual:
-        return HyphensManual;
+        return Hyphens::Manual;
     case CSSValueAuto:
-        return HyphensAuto;
+        return Hyphens::Auto;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return HyphensAuto;
+    return Hyphens::Auto;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap)
@@ -3758,13 +3758,13 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineSnap gridSnap)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (gridSnap) {
-    case LineSnapNone:
+    case LineSnap::None:
         m_value.valueID = CSSValueNone;
         break;
-    case LineSnapBaseline:
+    case LineSnap::Baseline:
         m_value.valueID = CSSValueBaseline;
         break;
-    case LineSnapContain:
+    case LineSnap::Contain:
         m_value.valueID = CSSValueContain;
         break;
     }
@@ -3776,17 +3776,17 @@ template<> inline CSSPrimitiveValue::operator LineSnap() const
 
     switch (m_value.valueID) {
     case CSSValueNone:
-        return LineSnapNone;
+        return LineSnap::None;
     case CSSValueBaseline:
-        return LineSnapBaseline;
+        return LineSnap::Baseline;
     case CSSValueContain:
-        return LineSnapContain;
+        return LineSnap::Contain;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return LineSnapNone;
+    return LineSnap::None;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineAlign lineAlign)
@@ -3794,10 +3794,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineAlign lineAlign)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (lineAlign) {
-    case LineAlignNone:
+    case LineAlign::None:
         m_value.valueID = CSSValueNone;
         break;
-    case LineAlignEdges:
+    case LineAlign::Edges:
         m_value.valueID = CSSValueEdges;
         break;
     }
@@ -3809,15 +3809,15 @@ template<> inline CSSPrimitiveValue::operator LineAlign() const
 
     switch (m_value.valueID) {
     case CSSValueNone:
-        return LineAlignNone;
+        return LineAlign::None;
     case CSSValueEdges:
-        return LineAlignEdges;
+        return LineAlign::Edges;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return LineAlignNone;
+    return LineAlign::None;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeakAs e)
@@ -3849,15 +3849,15 @@ template<> inline CSSPrimitiveValue::operator Order() const
 
     switch (m_value.valueID) {
     case CSSValueLogical:
-        return LogicalOrder;
+        return Order::Logical;
     case CSSValueVisual:
-        return VisualOrder;
+        return Order::Visual;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return LogicalOrder;
+    return Order::Logical;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Order e)
@@ -3865,10 +3865,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Order e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case LogicalOrder:
+    case Order::Logical:
         m_value.valueID = CSSValueLogical;
         break;
-    case VisualOrder:
+    case Order::Visual:
         m_value.valueID = CSSValueVisual;
         break;
     }
@@ -4256,35 +4256,35 @@ template<> inline CSSPrimitiveValue::operator BorderCollapse() const
     return BorderCollapse::Separate;
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBorderFit e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BorderFit e)
     : CSSValue(PrimitiveClass)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case BorderFitBorder:
+    case BorderFit::Border:
         m_value.valueID = CSSValueBorder;
         break;
-    case BorderFitLines:
+    case BorderFit::Lines:
         m_value.valueID = CSSValueLines;
         break;
     }
 }
 
-template<> inline CSSPrimitiveValue::operator EBorderFit() const
+template<> inline CSSPrimitiveValue::operator BorderFit() const
 {
     ASSERT(isValueID());
 
     switch (m_value.valueID) {
     case CSSValueBorder:
-        return BorderFitBorder;
+        return BorderFit::Border;
     case CSSValueLines:
-        return BorderFitLines;
+        return BorderFit::Lines;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return BorderFitLines;
+    return BorderFit::Lines;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ImageRendering imageRendering)
@@ -4407,13 +4407,13 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnAxis e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case HorizontalColumnAxis:
+    case ColumnAxis::Horizontal:
         m_value.valueID = CSSValueHorizontal;
         break;
-    case VerticalColumnAxis:
+    case ColumnAxis::Vertical:
         m_value.valueID = CSSValueVertical;
         break;
-    case AutoColumnAxis:
+    case ColumnAxis::Auto:
         m_value.valueID = CSSValueAuto;
         break;
     }
@@ -4425,17 +4425,17 @@ template<> inline CSSPrimitiveValue::operator ColumnAxis() const
 
     switch (m_value.valueID) {
     case CSSValueHorizontal:
-        return HorizontalColumnAxis;
+        return ColumnAxis::Horizontal;
     case CSSValueVertical:
-        return VerticalColumnAxis;
+        return ColumnAxis::Vertical;
     case CSSValueAuto:
-        return AutoColumnAxis;
+        return ColumnAxis::Auto;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return AutoColumnAxis;
+    return ColumnAxis::Auto;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnProgression e)
@@ -4443,10 +4443,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnProgression e)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (e) {
-    case NormalColumnProgression:
+    case ColumnProgression::Normal:
         m_value.valueID = CSSValueNormal;
         break;
-    case ReverseColumnProgression:
+    case ColumnProgression::Reverse:
         m_value.valueID = CSSValueReverse;
         break;
     }
@@ -4458,15 +4458,15 @@ template<> inline CSSPrimitiveValue::operator ColumnProgression() const
 
     switch (m_value.valueID) {
     case CSSValueNormal:
-        return NormalColumnProgression;
+        return ColumnProgression::Normal;
     case CSSValueReverse:
-        return ReverseColumnProgression;
+        return ColumnProgression::Reverse;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return NormalColumnProgression;
+    return ColumnProgression::Normal;
 }
 
 enum LengthConversion {
@@ -4905,28 +4905,28 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(CSSBoxType cssBox)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (cssBox) {
-    case MarginBox:
+    case CSSBoxType::MarginBox:
         m_value.valueID = CSSValueMarginBox;
         break;
-    case BorderBox:
+    case CSSBoxType::BorderBox:
         m_value.valueID = CSSValueBorderBox;
         break;
-    case PaddingBox:
+    case CSSBoxType::PaddingBox:
         m_value.valueID = CSSValuePaddingBox;
         break;
-    case ContentBox:
+    case CSSBoxType::ContentBox:
         m_value.valueID = CSSValueContentBox;
         break;
-    case Fill:
+    case CSSBoxType::Fill:
         m_value.valueID = CSSValueFill;
         break;
-    case Stroke:
+    case CSSBoxType::Stroke:
         m_value.valueID = CSSValueStroke;
         break;
-    case ViewBox:
+    case CSSBoxType::ViewBox:
         m_value.valueID = CSSValueViewBox;
         break;
-    case BoxMissing:
+    case CSSBoxType::BoxMissing:
         ASSERT_NOT_REACHED();
         m_value.valueID = CSSValueNone;
         break;
@@ -4937,25 +4937,25 @@ template<> inline CSSPrimitiveValue::operator CSSBoxType() const
 {
     switch (valueID()) {
     case CSSValueMarginBox:
-        return MarginBox;
+        return CSSBoxType::MarginBox;
     case CSSValueBorderBox:
-        return BorderBox;
+        return CSSBoxType::BorderBox;
     case CSSValuePaddingBox:
-        return PaddingBox;
+        return CSSBoxType::PaddingBox;
     case CSSValueContentBox:
-        return ContentBox;
+        return CSSBoxType::ContentBox;
     // The following are used in an SVG context.
     case CSSValueFill:
-        return Fill;
+        return CSSBoxType::Fill;
     case CSSValueStroke:
-        return Stroke;
+        return CSSBoxType::Stroke;
     case CSSValueViewBox:
-        return ViewBox;
+        return CSSBoxType::ViewBox;
     default:
         break;
     }
     ASSERT_NOT_REACHED();
-    return BoxMissing;
+    return CSSBoxType::BoxMissing;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ItemPosition itemPosition)
@@ -5201,15 +5201,15 @@ template<> inline CSSPrimitiveValue::operator TextZoom() const
 
     switch (m_value.valueID) {
     case CSSValueNormal:
-        return TextZoomNormal;
+        return TextZoom::Normal;
     case CSSValueReset:
-        return TextZoomReset;
+        return TextZoom::Reset;
     default:
         break;
     }
 
     ASSERT_NOT_REACHED();
-    return TextZoomNormal;
+    return TextZoom::Normal;
 }
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextZoom textZoom)
@@ -5217,10 +5217,10 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextZoom textZoom)
 {
     m_primitiveUnitType = CSS_VALUE_ID;
     switch (textZoom) {
-    case TextZoomNormal:
+    case TextZoom::Normal:
         m_value.valueID = CSSValueNormal;
         return;
-    case TextZoomReset:
+    case TextZoom::Reset:
         m_value.valueID = CSSValueReset;
         return;
     }
index 1fe42cd..906b3b0 100644 (file)
@@ -270,31 +270,31 @@ PseudoId CSSSelector::pseudoId(PseudoElementType type)
 {
     switch (type) {
     case PseudoElementFirstLine:
-        return FIRST_LINE;
+        return PseudoId::FirstLine;
     case PseudoElementFirstLetter:
-        return FIRST_LETTER;
+        return PseudoId::FirstLetter;
     case PseudoElementSelection:
-        return SELECTION;
+        return PseudoId::Selection;
     case PseudoElementMarker:
-        return MARKER;
+        return PseudoId::Marker;
     case PseudoElementBefore:
-        return BEFORE;
+        return PseudoId::Before;
     case PseudoElementAfter:
-        return AFTER;
+        return PseudoId::After;
     case PseudoElementScrollbar:
-        return SCROLLBAR;
+        return PseudoId::Scrollbar;
     case PseudoElementScrollbarButton:
-        return SCROLLBAR_BUTTON;
+        return PseudoId::ScrollbarButton;
     case PseudoElementScrollbarCorner:
-        return SCROLLBAR_CORNER;
+        return PseudoId::ScrollbarCorner;
     case PseudoElementScrollbarThumb:
-        return SCROLLBAR_THUMB;
+        return PseudoId::ScrollbarThumb;
     case PseudoElementScrollbarTrack:
-        return SCROLLBAR_TRACK;
+        return PseudoId::ScrollbarTrack;
     case PseudoElementScrollbarTrackPiece:
-        return SCROLLBAR_TRACK_PIECE;
+        return PseudoId::ScrollbarTrackPiece;
     case PseudoElementResizer:
-        return RESIZER;
+        return PseudoId::Resizer;
 #if ENABLE(VIDEO_TRACK)
     case PseudoElementCue:
 #endif
@@ -303,11 +303,11 @@ PseudoId CSSSelector::pseudoId(PseudoElementType type)
     case PseudoElementUserAgentCustom:
     case PseudoElementWebKitCustom:
     case PseudoElementWebKitCustomLegacyPrefixed:
-        return NOPSEUDO;
+        return PseudoId::None;
     }
 
     ASSERT_NOT_REACHED();
-    return NOPSEUDO;
+    return PseudoId::None;
 }
 
 CSSSelector::PseudoElementType CSSSelector::parsePseudoElementType(const String& name)
index e66ada2..a0f9bda 100644 (file)
@@ -363,16 +363,16 @@ void CSSToStyleMap::mapAnimationFillMode(Animation& layer, const CSSValue& value
 
     switch (downcast<CSSPrimitiveValue>(value).valueID()) {
     case CSSValueNone:
-        layer.setFillMode(AnimationFillModeNone);
+        layer.setFillMode(AnimationFillMode::None);
         break;
     case CSSValueForwards:
-        layer.setFillMode(AnimationFillModeForwards);
+        layer.setFillMode(AnimationFillMode::Forwards);
         break;
     case CSSValueBackwards:
-        layer.setFillMode(AnimationFillModeBackwards);
+        layer.setFillMode(AnimationFillMode::Backwards);
         break;
     case CSSValueBoth:
-        layer.setFillMode(AnimationFillModeBoth);
+        layer.setFillMode(AnimationFillMode::Both);
         break;
     default:
         break;
@@ -423,7 +423,7 @@ void CSSToStyleMap::mapAnimationPlayState(Animation& layer, const CSSValue& valu
     if (!is<CSSPrimitiveValue>(value))
         return;
 
-    EAnimPlayState playState = (downcast<CSSPrimitiveValue>(value).valueID() == CSSValuePaused) ? AnimPlayStatePaused : AnimPlayStatePlaying;
+    AnimationPlayState playState = (downcast<CSSPrimitiveValue>(value).valueID() == CSSValuePaused) ? AnimationPlayState::Paused : AnimationPlayState::Playing;
     layer.setPlayState(playState);
 }
 
index ae7f8b0..d458562 100644 (file)
@@ -287,7 +287,7 @@ bottom
 -webkit-baseline-middle
 //
 // CSS_PROP_TEXT_ALIGN:
-// The order here must match the order of the ETextAlign enum in RenderStyleConstants.h.
+// The order here must match the order of the TextAlignMode enum in RenderStyleConstants.h.
 //
 -webkit-auto
 left
@@ -312,7 +312,7 @@ outside
 inside
 //
 // CSS_PROP_LIST_STYLE_TYPE:
-// The order here must match the order of the EListStyleType enum in RenderStyleConstants.h.
+// The order here must match the order of the ListStyleType enum in RenderStyleConstants.h.
 //
 disc
 circle
@@ -397,7 +397,7 @@ katakana-iroha
 //none
 //
 // CSS_PROP_DISPLAY:
-// The order here must match the order of the EDisplay enum in RenderStyleConstants.h.
+// The order here must match the order of the DisplayType enum in RenderStyleConstants.h.
 //
 inline
 block
@@ -426,7 +426,7 @@ inline-grid
 //none
 //
 // CSS_PROP_CURSOR:
-// The order here must match the order of the ECursor enum in RenderStyleConstants.h.
+// The order here must match the order of the CursorType enum in RenderStyleConstants.h.
 //
 auto
 default
index b309301..77b9bed 100644 (file)
@@ -140,7 +140,7 @@ inline void ElementRuleCollector::addElementStyleProperties(const StylePropertie
 void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest, StyleResolver::RuleRange& ruleRange)
 {
     ASSERT(matchRequest.ruleSet);
-    ASSERT_WITH_MESSAGE(!(m_mode == SelectorChecker::Mode::CollectingRulesIgnoringVirtualPseudoElements && m_pseudoStyleRequest.pseudoId != NOPSEUDO), "When in StyleInvalidation or SharingRules, SelectorChecker does not try to match the pseudo ID. While ElementRuleCollector supports matching a particular pseudoId in this case, this would indicate a error at the call site since matching a particular element should be unnecessary.");
+    ASSERT_WITH_MESSAGE(!(m_mode == SelectorChecker::Mode::CollectingRulesIgnoringVirtualPseudoElements && m_pseudoStyleRequest.pseudoId != PseudoId::None), "When in StyleInvalidation or SharingRules, SelectorChecker does not try to match the pseudo ID. While ElementRuleCollector supports matching a particular pseudoId in this case, this would indicate a error at the call site since matching a particular element should be unnecessary.");
 
     auto* shadowRoot = m_element.containingShadowRoot();
     if (shadowRoot && shadowRoot->mode() == ShadowRootMode::UserAgent)
@@ -360,7 +360,7 @@ inline bool ElementRuleCollector::ruleMatches(const RuleData& ruleData, unsigned
     // This is limited to HTML only so we don't need to check the namespace (because of tag name match).
     MatchBasedOnRuleHash matchBasedOnRuleHash = ruleData.matchBasedOnRuleHash();
     if (matchBasedOnRuleHash != MatchBasedOnRuleHash::None && m_element.isHTMLElement()) {
-        ASSERT_WITH_MESSAGE(m_pseudoStyleRequest.pseudoId == NOPSEUDO, "If we match based on the rule hash while collecting for a particular pseudo element ID, we would add incorrect rules for that pseudo element ID. We should never end in ruleMatches() with a pseudo element if the ruleData cannot match any pseudo element.");
+        ASSERT_WITH_MESSAGE(m_pseudoStyleRequest.pseudoId == PseudoId::None, "If we match based on the rule hash while collecting for a particular pseudo element ID, we would add incorrect rules for that pseudo element ID. We should never end in ruleMatches() with a pseudo element if the ruleData cannot match any pseudo element.");
 
         switch (matchBasedOnRuleHash) {
         case MatchBasedOnRuleHash::None:
@@ -395,7 +395,7 @@ inline bool ElementRuleCollector::ruleMatches(const RuleData& ruleData, unsigned
         auto selectorChecker = SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction(compiledSelectorChecker, compiledSelector.status);
 #if !ASSERT_MSG_DISABLED
         unsigned ignoreSpecificity;
-        ASSERT_WITH_MESSAGE(!selectorChecker(&m_element, &ignoreSpecificity) || m_pseudoStyleRequest.pseudoId == NOPSEUDO, "When matching pseudo elements, we should never compile a selector checker without context unless it cannot match anything.");
+        ASSERT_WITH_MESSAGE(!selectorChecker(&m_element, &ignoreSpecificity) || m_pseudoStyleRequest.pseudoId == PseudoId::None, "When matching pseudo elements, we should never compile a selector checker without context unless it cannot match anything.");
 #endif
 #if CSS_SELECTOR_JIT_PROFILING
         ruleData.compiledSelectorUsed();
@@ -458,7 +458,7 @@ void ElementRuleCollector::collectMatchingRulesForList(const RuleSet::RuleDataVe
     for (unsigned i = 0, size = rules->size(); i < size; ++i) {
         const RuleData& ruleData = rules->data()[i];
 
-        if (!ruleData.canMatchPseudoElement() && m_pseudoStyleRequest.pseudoId != NOPSEUDO)
+        if (!ruleData.canMatchPseudoElement() && m_pseudoStyleRequest.pseudoId != PseudoId::None)
             continue;
 
         if (m_selectorFilter && m_selectorFilter->fastRejectSelector(ruleData.descendantSelectorIdentifierHashes()))
index 4528a0e..2f63585 100644 (file)
@@ -95,7 +95,7 @@ private:
     const SelectorFilter* m_selectorFilter { nullptr };
 
     bool m_isPrintStyle { false };
-    PseudoStyleRequest m_pseudoStyleRequest { NOPSEUDO };
+    PseudoStyleRequest m_pseudoStyleRequest { PseudoId::None };
     SelectorChecker::Mode m_mode { SelectorChecker::Mode::ResolvingStyle };
     bool m_isMatchingSlottedPseudoElements { false };
     bool m_isMatchingHostPseudoClass { false };
index e33a3ab..354bfc2 100644 (file)
@@ -185,15 +185,15 @@ bool SelectorChecker::match(const CSSSelector& selector, const Element& element,
     MatchResult result = matchRecursively(checkingContext, context, pseudoIdSet, specificity);
     if (result.match != Match::SelectorMatches)
         return false;
-    if (checkingContext.pseudoId != NOPSEUDO && !pseudoIdSet.has(checkingContext.pseudoId))
+    if (checkingContext.pseudoId != PseudoId::None && !pseudoIdSet.has(checkingContext.pseudoId))
         return false;
 
-    if (checkingContext.pseudoId == NOPSEUDO && pseudoIdSet) {
-        PseudoIdSet publicPseudoIdSet = pseudoIdSet & PseudoIdSet::fromMask(PUBLIC_PSEUDOID_MASK);
+    if (checkingContext.pseudoId == PseudoId::None && pseudoIdSet) {
+        PseudoIdSet publicPseudoIdSet = pseudoIdSet & PseudoIdSet::fromMask(static_cast<unsigned>(PseudoId::PublicPseudoIdMask));
         if (checkingContext.resolvingMode == Mode::ResolvingStyle && publicPseudoIdSet)
             checkingContext.pseudoIDSet = publicPseudoIdSet;
 
-        // When ignoring virtual pseudo elements, the context's pseudo should also be NOPSEUDO but that does
+        // When ignoring virtual pseudo elements, the context's pseudo should also be PseudoId::None but that does
         // not cause a failure.
         return checkingContext.resolvingMode == Mode::CollectingRulesIgnoringVirtualPseudoElements || result.matchType == MatchType::Element;
     }
@@ -208,7 +208,7 @@ bool SelectorChecker::matchHostPseudoClass(const CSSSelector& selector, const El
     specificity = selector.simpleSelectorSpecificity();
 
     if (auto* selectorList = selector.selectorList()) {
-        LocalContext context(*selectorList->first(), element, VisitedMatchType::Enabled, NOPSEUDO);
+        LocalContext context(*selectorList->first(), element, VisitedMatchType::Enabled, PseudoId::None);
         context.inFunctionalPseudoClass = true;
         context.pseudoElementEffective = false;
         PseudoIdSet ignoreDynamicPseudo;
@@ -222,13 +222,13 @@ bool SelectorChecker::matchHostPseudoClass(const CSSSelector& selector, const El
 
 inline static bool hasScrollbarPseudoElement(const PseudoIdSet& dynamicPseudoIdSet)
 {
-    PseudoIdSet scrollbarIdSet = { SCROLLBAR, SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER };
+    PseudoIdSet scrollbarIdSet = { PseudoId::Scrollbar, PseudoId::ScrollbarThumb, PseudoId::ScrollbarButton, PseudoId::ScrollbarTrack, PseudoId::ScrollbarTrackPiece, PseudoId::ScrollbarCorner };
     if (dynamicPseudoIdSet & scrollbarIdSet)
         return true;
 
-    // RESIZER does not always have a scrollbar but it is a scrollbar-like pseudo element
+    // PseudoId::Resizer does not always have a scrollbar but it is a scrollbar-like pseudo element
     // because it can have more than one pseudo element.
-    return dynamicPseudoIdSet.has(RESIZER);
+    return dynamicPseudoIdSet.has(PseudoId::Resizer);
 }
 
 static SelectorChecker::LocalContext localContextForParent(const SelectorChecker::LocalContext& context)
@@ -293,7 +293,7 @@ SelectorChecker::MatchResult SelectorChecker::matchRecursively(CheckingContext&
                 return MatchResult::fails(Match::SelectorFailsCompletely);
 
             PseudoId pseudoId = CSSSelector::pseudoId(context.selector->pseudoElementType());
-            if (pseudoId != NOPSEUDO)
+            if (pseudoId != PseudoId::None)
                 dynamicPseudoIdSet.add(pseudoId);
             matchType = MatchType::VirtualPseudoElementOnly;
         }
@@ -312,14 +312,14 @@ SelectorChecker::MatchResult SelectorChecker::matchRecursively(CheckingContext&
 
     if (relation != CSSSelector::Subselector) {
         // Bail-out if this selector is irrelevant for the pseudoId
-        if (context.pseudoId != NOPSEUDO && !dynamicPseudoIdSet.has(context.pseudoId))
+        if (context.pseudoId != PseudoId::None && !dynamicPseudoIdSet.has(context.pseudoId))
             return MatchResult::fails(Match::SelectorFailsCompletely);
 
         // Disable :visited matching when we try to match anything else than an ancestors.
         if (!context.selector->hasDescendantOrChildRelation())
             nextContext.visitedMatchType = VisitedMatchType::Disabled;
 
-        nextContext.pseudoId = NOPSEUDO;
+        nextContext.pseudoId = PseudoId::None;
         // Virtual pseudo element is only effective in the rightmost fragment.
         nextContext.pseudoElementEffective = false;
         nextContext.isMatchElement = false;
@@ -413,7 +413,7 @@ SelectorChecker::MatchResult SelectorChecker::matchRecursively(CheckingContext&
             // We make an exception for scrollbar pseudo elements and allow a set of pseudo classes (but nothing else)
             // to follow the pseudo elements.
             nextContext.hasScrollbarPseudo = hasScrollbarPseudoElement(dynamicPseudoIdSet);
-            nextContext.hasSelectionPseudo = dynamicPseudoIdSet.has(SELECTION);
+            nextContext.hasSelectionPseudo = dynamicPseudoIdSet.has(PseudoId::Selection);
             if ((context.isMatchElement || checkingContext.resolvingMode == Mode::CollectingRules) && dynamicPseudoIdSet
                 && !nextContext.hasSelectionPseudo
                 && !(nextContext.hasScrollbarPseudo && nextContext.selector->match() == CSSSelector::PseudoClass))
index 60e9455..3dbb113 100644 (file)
@@ -79,7 +79,7 @@ public:
         { }
 
         const SelectorChecker::Mode resolvingMode;
-        PseudoId pseudoId { NOPSEUDO };
+        PseudoId pseudoId { PseudoId::None };
         RenderScrollbar* scrollbar { nullptr };
         ScrollbarPart scrollbarPart { NoPart };
         const ContainerNode* scope { nullptr };
index da83cc4..d52f602 100644 (file)
@@ -81,7 +81,7 @@ public:
     static String convertStringOrAuto(StyleResolver&, const CSSValue&);
     static String convertStringOrNone(StyleResolver&, const CSSValue&);
     static TextEmphasisPosition convertTextEmphasisPosition(StyleResolver&, const CSSValue&);
-    static ETextAlign convertTextAlign(StyleResolver&, const CSSValue&);
+    static TextAlignMode convertTextAlign(StyleResolver&, const CSSValue&);
     static RefPtr<ClipPathOperation> convertClipPath(StyleResolver&, const CSSValue&);
     static Resize convertResize(StyleResolver&, const CSSValue&);
     static int convertMarqueeRepetition(StyleResolver&, const CSSValue&);
@@ -502,7 +502,7 @@ inline TextEmphasisPosition StyleBuilderConverter::convertTextEmphasisPosition(S
     return position;
 }
 
-inline ETextAlign StyleBuilderConverter::convertTextAlign(StyleResolver& styleResolver, const CSSValue& value)
+inline TextAlignMode StyleBuilderConverter::convertTextAlign(StyleResolver& styleResolver, const CSSValue& value)
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     ASSERT(primitiveValue.isValueID());
@@ -511,10 +511,10 @@ inline ETextAlign StyleBuilderConverter::convertTextAlign(StyleResolver& styleRe
         return primitiveValue;
 
     auto* parentStyle = styleResolver.parentStyle();
-    if (parentStyle->textAlign() == TASTART)
-        return parentStyle->isLeftToRightDirection() ? LEFT : RIGHT;
-    if (parentStyle->textAlign() == TAEND)
-        return parentStyle->isLeftToRightDirection() ? RIGHT : LEFT;
+    if (parentStyle->textAlign() == TextAlignMode::Start)
+        return parentStyle->isLeftToRightDirection() ? TextAlignMode::Left : TextAlignMode::Right;
+    if (parentStyle->textAlign() == TextAlignMode::End)
+        return parentStyle->isLeftToRightDirection() ? TextAlignMode::Right : TextAlignMode::Left;
     return parentStyle->textAlign();
 }
 
@@ -532,7 +532,7 @@ inline RefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(StyleRes
         return nullptr;
     }
 
-    CSSBoxType referenceBox = BoxMissing;
+    CSSBoxType referenceBox = CSSBoxType::BoxMissing;
     RefPtr<ClipPathOperation> operation;
 
     for (auto& currentValue : downcast<CSSValueList>(value)) {
@@ -548,14 +548,14 @@ inline RefPtr<ClipPathOperation> StyleBuilderConverter::convertClipPath(StyleRes
                 || primitiveValue.valueID() == CSSValueFill
                 || primitiveValue.valueID() == CSSValueStroke
                 || primitiveValue.valueID() == CSSValueViewBox);
-            ASSERT(referenceBox == BoxMissing);
+            ASSERT(referenceBox == CSSBoxType::BoxMissing);
             referenceBox = primitiveValue;
         }
     }
     if (operation)
         downcast<ShapeClipPathOperation>(*operation).setReferenceBox(referenceBox);
     else {
-        ASSERT(referenceBox != BoxMissing);
+        ASSERT(referenceBox != CSSBoxType::BoxMissing);
         operation = BoxClipPathOperation::create(referenceBox);
     }
 
@@ -775,7 +775,7 @@ inline RefPtr<ShapeValue> StyleBuilderConverter::convertShapeValue(StyleResolver
         return ShapeValue::create(styleResolver.styleImage(value).releaseNonNull());
 
     RefPtr<BasicShape> shape;
-    CSSBoxType referenceBox = BoxMissing;
+    CSSBoxType referenceBox = CSSBoxType::BoxMissing;
     for (auto& currentValue : downcast<CSSValueList>(value)) {
         auto& primitiveValue = downcast<CSSPrimitiveValue>(currentValue.get());
         if (primitiveValue.isShape())
@@ -794,7 +794,7 @@ inline RefPtr<ShapeValue> StyleBuilderConverter::convertShapeValue(StyleResolver
     if (shape)
         return ShapeValue::create(shape.releaseNonNull(), referenceBox);
 
-    if (referenceBox != BoxMissing)
+    if (referenceBox != CSSBoxType::BoxMissing)
         return ShapeValue::create(referenceBox);
 
     ASSERT_NOT_REACHED();
@@ -923,7 +923,7 @@ inline bool StyleBuilderConverter::createGridTrackList(const CSSValue& value, Tr
             unsigned autoRepeatIndex = 0;
             CSSValueID autoRepeatID = downcast<CSSGridAutoRepeatValue>(currentValue.get()).autoRepeatID();
             ASSERT(autoRepeatID == CSSValueAutoFill || autoRepeatID == CSSValueAutoFit);
-            tracksData.m_autoRepeatType = autoRepeatID == CSSValueAutoFill ? AutoFill : AutoFit;
+            tracksData.m_autoRepeatType = autoRepeatID == CSSValueAutoFill ? AutoRepeatType::Fill : AutoRepeatType::Fit;
             for (auto& autoRepeatValue : downcast<CSSValueList>(currentValue.get())) {
                 if (is<CSSGridLineNamesValue>(autoRepeatValue)) {
                     createGridLineNamesList(autoRepeatValue.get(), autoRepeatIndex, tracksData.m_autoRepeatNamedGridLines, tracksData.m_autoRepeatOrderedNamedGridLines);
@@ -1078,7 +1078,7 @@ inline GridAutoFlow StyleBuilderConverter::convertGridAutoFlow(StyleResolver&, c
 inline CSSToLengthConversionData StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor(StyleResolver& styleResolver)
 {
     if (auto* frame = styleResolver.document().frame()) {
-        float textZoomFactor = styleResolver.style()->textZoom() != TextZoomReset ? frame->textZoomFactor() : 1.0f;
+        float textZoomFactor = styleResolver.style()->textZoom() != TextZoom::Reset ? frame->textZoomFactor() : 1.0f;
         return styleResolver.state().cssToLengthConversionData().copyWithAdjustedZoom(styleResolver.style()->effectiveZoom() * textZoomFactor);
     }
     return styleResolver.state().cssToLengthConversionData();
@@ -1468,9 +1468,9 @@ inline BreakBetween StyleBuilderConverter::convertPageBreakBetween(StyleResolver
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.valueID() == CSSValueAlways)
-        return PageBreakBetween;
+        return BreakBetween::Page;
     if (primitiveValue.valueID() == CSSValueAvoid)
-        return AvoidPageBreakBetween;
+        return BreakBetween::AvoidPage;
     return primitiveValue;
 }
 
@@ -1478,7 +1478,7 @@ inline BreakInside StyleBuilderConverter::convertPageBreakInside(StyleResolver&,
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.valueID() == CSSValueAvoid)
-        return AvoidPageBreakInside;
+        return BreakInside::AvoidPage;
     return primitiveValue;
 }
 
@@ -1486,9 +1486,9 @@ inline BreakBetween StyleBuilderConverter::convertColumnBreakBetween(StyleResolv
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.valueID() == CSSValueAlways)
-        return ColumnBreakBetween;
+        return BreakBetween::Column;
     if (primitiveValue.valueID() == CSSValueAvoid)
-        return AvoidColumnBreakBetween;
+        return BreakBetween::AvoidColumn;
     return primitiveValue;
 }
 
@@ -1496,7 +1496,7 @@ inline BreakInside StyleBuilderConverter::convertColumnBreakInside(StyleResolver
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.valueID() == CSSValueAvoid)
-        return AvoidColumnBreakInside;
+        return BreakInside::AvoidColumn;
     return primitiveValue;
 }
     
index f8dd0f0..6e5d5f7 100644 (file)
@@ -156,7 +156,7 @@ private:
 
     template <CSSPropertyID id>
     static void applyTextOrBoxShadowValue(StyleResolver&, CSSValue&);
-    static bool isValidDisplayValue(StyleResolver&, EDisplay);
+    static bool isValidDisplayValue(StyleResolver&, DisplayType);
 
     enum CounterBehavior {Increment = 0, Reset};
     template <CounterBehavior counterBehavior>
@@ -394,9 +394,9 @@ inline void StyleBuilderCustom::applyValueImageResolution(StyleResolver& styleRe
     for (auto& item : downcast<CSSValueList>(value)) {
         CSSPrimitiveValue& primitiveValue = downcast<CSSPrimitiveValue>(item.get());
         if (primitiveValue.valueID() == CSSValueFromImage)
-            source = ImageResolutionFromImage;
+            source = ImageResolutionSource::FromImage;
         else if (primitiveValue.valueID() == CSSValueSnap)
-            snap = ImageResolutionSnapPixels;
+            snap = ImageResolutionSnap::Pixels;
         else
             resolution = primitiveValue.doubleValue(CSSPrimitiveValue::CSS_DPPX);
     }
@@ -656,7 +656,7 @@ static inline float computeBaseSpecifiedFontSize(const Document& document, const
 {
     float result = style.specifiedFontSize();
     auto* frame = document.frame();
-    if (frame && style.textZoom() != TextZoomReset)
+    if (frame && style.textZoom() != TextZoom::Reset)
         result *= frame->textZoomFactor();
     result *= style.effectiveZoom();
     if (percentageAutosizingEnabled)
@@ -815,9 +815,9 @@ inline void StyleBuilderCustom::applyValueWebkitTextZoom(StyleResolver& styleRes
 {
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.valueID() == CSSValueNormal)
-        styleResolver.style()->setTextZoom(TextZoomNormal);
+        styleResolver.style()->setTextZoom(TextZoom::Normal);
     else if (primitiveValue.valueID() == CSSValueReset)
-        styleResolver.style()->setTextZoom(TextZoomReset);
+        styleResolver.style()->setTextZoom(TextZoom::Reset);
     styleResolver.state().setFontDirty(true);
 }
 
@@ -1004,23 +1004,23 @@ inline void StyleBuilderCustom::applyValueFontFamily(StyleResolver& styleResolve
     styleResolver.setFontDescription(WTFMove(fontDescription));
 }
 
-inline bool StyleBuilderCustom::isValidDisplayValue(StyleResolver& styleResolver, EDisplay display)
+inline bool StyleBuilderCustom::isValidDisplayValue(StyleResolver& styleResolver, DisplayType display)
 {
-    if (is<SVGElement>(styleResolver.element()) && styleResolver.style()->styleType() == NOPSEUDO)
-        return display == INLINE || display == BLOCK || display == NONE;
+    if (is<SVGElement>(styleResolver.element()) && styleResolver.style()->styleType() == PseudoId::None)
+        return display == DisplayType::Inline || display == DisplayType::Block || display == DisplayType::None;
     return true;
 }
 
 inline void StyleBuilderCustom::applyInheritDisplay(StyleResolver& styleResolver)
 {
-    EDisplay display = styleResolver.parentStyle()->display();
+    DisplayType display = styleResolver.parentStyle()->display();
     if (isValidDisplayValue(styleResolver, display))
         styleResolver.style()->setDisplay(display);
 }
 
 inline void StyleBuilderCustom::applyValueDisplay(StyleResolver& styleResolver, CSSValue& value)
 {
-    EDisplay display = downcast<CSSPrimitiveValue>(value);
+    DisplayType display = downcast<CSSPrimitiveValue>(value);
     if (isValidDisplayValue(styleResolver, display))
         styleResolver.style()->setDisplay(display);
 }
@@ -1118,8 +1118,8 @@ inline void StyleBuilderCustom::applyValueWebkitTextEmphasisStyle(StyleResolver&
 
     auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
     if (primitiveValue.isString()) {
-        styleResolver.style()->setTextEmphasisFill(TextEmphasisFillFilled);
-        styleResolver.style()->setTextEmphasisMark(TextEmphasisMarkCustom);
+        styleResolver.style()->setTextEmphasisFill(TextEmphasisFill::Filled);
+        styleResolver.style()->setTextEmphasisMark(TextEmphasisMark::Custom);
         styleResolver.style()->setTextEmphasisCustomMark(primitiveValue.stringValue());
         return;
     }
@@ -1128,9 +1128,9 @@ inline void StyleBuilderCustom::applyValueWebkitTextEmphasisStyle(StyleResolver&
 
     if (primitiveValue.valueID() == CSSValueFilled || primitiveValue.valueID() == CSSValueOpen) {
         styleResolver.style()->setTextEmphasisFill(primitiveValue);
-        styleResolver.style()->setTextEmphasisMark(TextEmphasisMarkAuto);
+        styleResolver.style()->setTextEmphasisMark(TextEmphasisMark::Auto);
     } else {
-        styleResolver.style()->setTextEmphasisFill(TextEmphasisFillFilled);
+        styleResolver.style()->setTextEmphasisFill(TextEmphasisFill::Filled);
         styleResolver.style()->setTextEmphasisMark(primitiveValue);
     }
 }
@@ -1219,13 +1219,13 @@ inline void StyleBuilderCustom::applyValueCursor(StyleResolver& styleResolver, C
 {
     styleResolver.style()->clearCursorList();
     if (is<CSSPrimitiveValue>(value)) {
-        ECursor cursor = downcast<CSSPrimitiveValue>(value);
+        CursorType cursor = downcast<CSSPrimitiveValue>(value);
         if (styleResolver.style()->cursor() != cursor)
             styleResolver.style()->setCursor(cursor);
         return;
     }
 
-    styleResolver.style()->setCursor(CursorAuto);
+    styleResolver.style()->setCursor(CursorType::Auto);
     auto& list = downcast<CSSValueList>(value);
     for (auto& item : list) {
         if (is<CSSCursorImageValue>(item)) {
@@ -1414,7 +1414,7 @@ inline void StyleBuilderCustom::applyValueContent(StyleResolver& styleResolver,
             didSet = true;
         } else if (contentValue.isAttr()) {
             // FIXME: Can a namespace be specified for an attr(foo)?
-            if (styleResolver.style()->styleType() == NOPSEUDO)
+            if (styleResolver.style()->styleType() == PseudoId::None)
                 styleResolver.style()->setHasAttrContent();
             else
                 const_cast<RenderStyle*>(styleResolver.parentStyle())->setHasAttrContent();
@@ -1426,10 +1426,10 @@ inline void StyleBuilderCustom::applyValueContent(StyleResolver& styleResolver,
             styleResolver.ruleSets().mutableFeatures().registerContentAttribute(attr.localName());
         } else if (contentValue.isCounter()) {
             auto* counterValue = contentValue.counterValue();
-            EListStyleType listStyleType = NoneListStyle;
+            ListStyleType listStyleType = ListStyleType::None;
             CSSValueID listStyleIdent = counterValue->listStyleIdent();
             if (listStyleIdent != CSSValueNone)
-                listStyleType = static_cast<EListStyleType>(listStyleIdent - CSSValueDisc);
+                listStyleType = static_cast<ListStyleType>(listStyleIdent - CSSValueDisc);
             auto counter = std::make_unique<CounterContent>(counterValue->identifier(), listStyleType, counterValue->separator());
             styleResolver.style()->setContent(WTFMove(counter), didSet);
             didSet = true;
@@ -1600,7 +1600,7 @@ inline float StyleBuilderCustom::smallerFontSize(float size)
 
 inline float StyleBuilderCustom::determineRubyTextSizeMultiplier(StyleResolver& styleResolver)
 {
-    if (styleResolver.style()->rubyPosition() != RubyPositionInterCharacter)
+    if (styleResolver.style()->rubyPosition() != RubyPosition::InterCharacter)
         return 0.5f;
 
     // FIXME: This hack is to ensure tone marks are the same size as
@@ -1810,7 +1810,7 @@ void StyleBuilderCustom::applyValueAlt(StyleResolver& styleResolver, CSSValue& v
         styleResolver.style()->setContentAltText(primitiveValue.stringValue());
     else if (primitiveValue.isAttr()) {
         // FIXME: Can a namespace be specified for an attr(foo)?
-        if (styleResolver.style()->styleType() == NOPSEUDO)
+        if (styleResolver.style()->styleType() == PseudoId::None)
             styleResolver.style()->setUnique();
         else
             const_cast<RenderStyle*>(styleResolver.parentStyle())->setUnique();
index b038ae7..51d1b3a 100644 (file)
@@ -359,11 +359,11 @@ ElementStyle StyleResolver::styleForElement(const Element& element, const Render
 
     if (element.isLink()) {
         style.setIsLink(true);
-        EInsideLink linkState = state.elementLinkState();
-        if (linkState != NotInsideLink) {
+        InsideLink linkState = state.elementLinkState();
+        if (linkState != InsideLink::NotInside) {
             bool forceVisited = InspectorInstrumentation::forcePseudoState(element, CSSSelector::PseudoClassVisited);
             if (forceVisited)
-                linkState = InsideVisitedLink;
+                linkState = InsideLink::InsideVisited;
         }
         style.setInsideLink(linkState);
     }
@@ -673,53 +673,53 @@ static void addIntrinsicMargins(RenderStyle& style)
     }
 }
 
-static EDisplay equivalentBlockDisplay(const RenderStyle& style, const Document& document)
+static DisplayType equivalentBlockDisplay(const RenderStyle& style, const Document& document)
 {
     switch (auto display = style.display()) {
-    case BLOCK:
-    case TABLE:
-    case BOX:
-    case FLEX:
-    case WEBKIT_FLEX:
-    case GRID:
+    case DisplayType::Block:
+    case DisplayType::Table:
+    case DisplayType::Box:
+    case DisplayType::Flex:
+    case DisplayType::WebKitFlex:
+    case DisplayType::Grid:
         return display;
 
-    case LIST_ITEM:
+    case DisplayType::ListItem:
         // It is a WinIE bug that floated list items lose their bullets, so we'll emulate the quirk, but only in quirks mode.
         if (document.inQuirksMode() && style.isFloating())
-            return BLOCK;
+            return DisplayType::Block;
         return display;
-    case INLINE_TABLE:
-        return TABLE;
-    case INLINE_BOX:
-        return BOX;
-    case INLINE_FLEX:
-    case WEBKIT_INLINE_FLEX:
-        return FLEX;
-    case INLINE_GRID:
-        return GRID;
-
-    case INLINE:
-    case COMPACT:
-    case INLINE_BLOCK:
-    case TABLE_ROW_GROUP:
-    case TABLE_HEADER_GROUP:
-    case TABLE_FOOTER_GROUP:
-    case TABLE_ROW:
-    case TABLE_COLUMN_GROUP:
-    case TABLE_COLUMN:
-    case TABLE_CELL:
-    case TABLE_CAPTION:
-        return BLOCK;
-    case CONTENTS:
+    case DisplayType::InlineTable:
+        return DisplayType::Table;
+    case DisplayType::InlineBox:
+        return DisplayType::Box;
+    case DisplayType::InlineFlex:
+    case DisplayType::WebKitInlineFlex:
+        return DisplayType::Flex;
+    case DisplayType::InlineGrid:
+        return DisplayType::Grid;
+
+    case DisplayType::Inline:
+    case DisplayType::Compact:
+    case DisplayType::InlineBlock:
+    case DisplayType::TableRowGroup:
+    case DisplayType::TableHeaderGroup:
+    case DisplayType::TableFooterGroup:
+    case DisplayType::TableRow:
+    case DisplayType::TableColumnGroup:
+    case DisplayType::TableColumn:
+    case DisplayType::TableCell:
+    case DisplayType::TableCaption:
+        return DisplayType::Block;
+    case DisplayType::Contents:
         ASSERT_NOT_REACHED();
-        return CONTENTS;
-    case NONE:
+        return DisplayType::Contents;
+    case DisplayType::None:
         ASSERT_NOT_REACHED();
-        return NONE;
+        return DisplayType::None;
     }
     ASSERT_NOT_REACHED();
-    return BLOCK;
+    return DisplayType::Block;
 }
 
 // CSS requires text-decoration to be reset at each DOM element for tables, 
@@ -727,8 +727,8 @@ static EDisplay equivalentBlockDisplay(const RenderStyle& style, const Document&
 // and absolute or relatively positioned elements.
 static bool doesNotInheritTextDecoration(const RenderStyle& style, const Element* element)
 {
-    return style.display() == TABLE || style.display() == INLINE_TABLE
-        || style.display() == INLINE_BLOCK || style.display() == INLINE_BOX || (element && isAtShadowBoundary(*element))
+    return style.display() == DisplayType::Table || style.display() == DisplayType::InlineTable
+        || style.display() == DisplayType::InlineBlock || style.display() == DisplayType::InlineBox || (element && isAtShadowBoundary(*element))
         || style.isFloating() || style.hasOutOfFlowPosition();
 }
 
@@ -742,9 +742,9 @@ static bool isScrollableOverflow(Overflow overflow)
 void StyleResolver::adjustStyleForInterCharacterRuby()
 {
     RenderStyle* style = m_state.style();
-    if (style->rubyPosition() != RubyPositionInterCharacter || !m_state.element() || !m_state.element()->hasTagName(rtTag))
+    if (style->rubyPosition() != RubyPosition::InterCharacter || !m_state.element() || !m_state.element()->hasTagName(rtTag))
         return;
-    style->setTextAlign(CENTER);
+    style->setTextAlign(TextAlignMode::Center);
     if (style->isHorizontalWritingMode())
         style->setWritingMode(LeftToRightWritingMode);
 }
@@ -796,20 +796,20 @@ static void adjustDisplayContentsStyle(RenderStyle& style, const Element* elemen
 {
     bool displayContentsEnabled = is<HTMLSlotElement>(element) || RuntimeEnabledFeatures::sharedFeatures().displayContentsEnabled();
     if (!displayContentsEnabled) {
-        style.setDisplay(INLINE);
+        style.setDisplay(DisplayType::Inline);
         return;
     }
     if (!element) {
-        if (style.styleType() != BEFORE && style.styleType() != AFTER)
-            style.setDisplay(NONE);
+        if (style.styleType() != PseudoId::Before && style.styleType() != PseudoId::After)
+            style.setDisplay(DisplayType::None);
         return;
     }
     if (element->document().documentElement() == element) {
-        style.setDisplay(BLOCK);
+        style.setDisplay(DisplayType::Block);
         return;
     }
     if (hasEffectiveDisplayNoneForDisplayContents(*element))
-        style.setDisplay(NONE);
+        style.setDisplay(DisplayType::None);
 }
 
 void StyleResolver::adjustSVGElementStyle(const SVGElement& svgElement, RenderStyle& style)
@@ -826,7 +826,7 @@ void StyleResolver::adjustSVGElementStyle(const SVGElement& svgElement, RenderSt
 
     // SVG text layout code expects us to be a block-level style element.
     if ((svgElement.hasTagName(SVGNames::foreignObjectTag) || svgElement.hasTagName(SVGNames::textTag)) && style.isDisplayInlineType())
-        style.setDisplay(BLOCK);
+        style.setDisplay(DisplayType::Block);
 }
 
 void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& parentStyle, const RenderStyle* parentBoxStyle, const Element* element)
@@ -839,10 +839,10 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
     // Cache our original display.
     style.setOriginalDisplay(style.display());
 
-    if (style.display() == CONTENTS)
+    if (style.display() == DisplayType::Contents)
         adjustDisplayContentsStyle(style, element);
 
-    if (style.display() != NONE && style.display() != CONTENTS) {
+    if (style.display() != DisplayType::None && style.display() != DisplayType::Contents) {
         if (element) {
             // If we have a <td> that specifies a float property, in quirks mode we just drop the float
             // property.
@@ -850,33 +850,33 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
             // these tags to retain their display types.
             if (document().inQuirksMode()) {
                 if (element->hasTagName(tdTag)) {
-                    style.setDisplay(TABLE_CELL);
+                    style.setDisplay(DisplayType::TableCell);
                     style.setFloating(Float::No);
                 } else if (is<HTMLTableElement>(*element))
-                    style.setDisplay(style.isDisplayInlineType() ? INLINE_TABLE : TABLE);
+                    style.setDisplay(style.isDisplayInlineType() ? DisplayType::InlineTable : DisplayType::Table);
             }
 
             if (element->hasTagName(tdTag) || element->hasTagName(thTag)) {
-                if (style.whiteSpace() == KHTML_NOWRAP) {
+                if (style.whiteSpace() == WhiteSpace::KHTMLNoWrap) {
                     // Figure out if we are really nowrapping or if we should just
                     // use normal instead. If the width of the cell is fixed, then
-                    // we don't actually use NOWRAP.
+                    // we don't actually use WhiteSpace::NoWrap.
                     if (style.width().isFixed())
-                        style.setWhiteSpace(NORMAL);
+                        style.setWhiteSpace(WhiteSpace::Normal);
                     else
-                        style.setWhiteSpace(NOWRAP);
+                        style.setWhiteSpace(WhiteSpace::NoWrap);
                 }
             }
 
             // Tables never support the -webkit-* values for text-align and will reset back to the default.
-            if (is<HTMLTableElement>(*element) && (style.textAlign() == WEBKIT_LEFT || style.textAlign() == WEBKIT_CENTER || style.textAlign() == WEBKIT_RIGHT))
-                style.setTextAlign(TASTART);
+            if (is<HTMLTableElement>(*element) && (style.textAlign() == TextAlignMode::WebKitLeft || style.textAlign() == TextAlignMode::WebKitCenter || style.textAlign() == TextAlignMode::WebKitRight))
+                style.setTextAlign(TextAlignMode::Start);
 
             // 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(PositionType::Static);
-                style.setDisplay(BLOCK);
+                style.setDisplay(DisplayType::Block);
             }
 
             // Ruby text does not support float or position. This might change with evolution of the specification.
@@ -890,10 +890,10 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
             // just a single declaration that sets the 'text-align' property to the value 'center'.
             // https://html.spec.whatwg.org/multipage/rendering.html#rendering
             if (element->hasTagName(thTag) && !style.hasExplicitlySetTextAlign() && parentStyle.textAlign() == RenderStyle::initialTextAlign())
-                style.setTextAlign(CENTER);
+                style.setTextAlign(TextAlignMode::Center);
 
             if (element->hasTagName(legendTag))
-                style.setDisplay(BLOCK);
+                style.setDisplay(DisplayType::Block);
         }
 
         // Absolute/fixed positioned elements, floating elements and the document element need block-like outside display.
@@ -902,28 +902,28 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
 
         // FIXME: Don't support this mutation for pseudo styles like first-letter or first-line, since it's not completely
         // clear how that should work.
-        if (style.display() == INLINE && style.styleType() == NOPSEUDO && style.writingMode() != parentStyle.writingMode())
-            style.setDisplay(INLINE_BLOCK);
+        if (style.display() == DisplayType::Inline && style.styleType() == PseudoId::None && style.writingMode() != parentStyle.writingMode())
+            style.setDisplay(DisplayType::InlineBlock);
 
         // After performing the display mutation, check table rows. We do not honor position:relative or position:sticky on
         // table rows or cells. This has been established for position:relative in CSS2.1 (and caused a crash in containingBlock()
         // on some sites).
-        if ((style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW_GROUP
-            || style.display() == TABLE_FOOTER_GROUP || style.display() == TABLE_ROW)
+        if ((style.display() == DisplayType::TableHeaderGroup || style.display() == DisplayType::TableRowGroup
+            || style.display() == DisplayType::TableFooterGroup || style.display() == DisplayType::TableRow)
             && 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.
-        if (style.display() == TABLE_COLUMN || style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_FOOTER_GROUP
-            || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_ROW || style.display() == TABLE_ROW_GROUP
-            || style.display() == TABLE_CELL)
+        if (style.display() == DisplayType::TableColumn || style.display() == DisplayType::TableColumnGroup || style.display() == DisplayType::TableFooterGroup
+            || style.display() == DisplayType::TableHeaderGroup || style.display() == DisplayType::TableRow || style.display() == DisplayType::TableRowGroup
+            || style.display() == DisplayType::TableCell)
             style.setWritingMode(parentStyle.writingMode());
 
         // FIXME: Since we don't support block-flow on flexible boxes yet, disallow setting
         // of block-flow to anything other than TopToBottomWritingMode.
         // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support.
-        if (style.writingMode() != TopToBottomWritingMode && (style.display() == BOX || style.display() == INLINE_BOX))
+        if (style.writingMode() != TopToBottomWritingMode && (style.display() == DisplayType::Box || style.display() == DisplayType::InlineBox))
             style.setWritingMode(TopToBottomWritingMode);
 
         // https://www.w3.org/TR/css-display/#transformations
@@ -979,8 +979,8 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
             bool isVertical = style.marqueeDirection() == MarqueeDirection::Up || style.marqueeDirection() == MarqueeDirection::Down;
             // Make horizontal marquees not wrap.
             if (!isVertical) {
-                style.setWhiteSpace(NOWRAP);
-                style.setTextAlign(TASTART);
+                style.setWhiteSpace(WhiteSpace::NoWrap);
+                style.setTextAlign(TextAlignMode::Start);
             }
             // Apparently this is the expected legacy behavior.
             if (isVertical && style.height().isAuto())
@@ -1010,8 +1010,8 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
 
     // 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.display() == DisplayType::Table || style.display() == DisplayType::InlineTable
+        || style.display() == DisplayType::TableRowGroup || style.display() == DisplayType::TableRow) {
         if (style.overflowX() != Overflow::Visible && style.overflowX() != Overflow::Hidden)
             style.setOverflowX(Overflow::Visible);
         if (style.overflowY() != Overflow::Visible && style.overflowY() != Overflow::Hidden)
@@ -1052,7 +1052,7 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par
         RenderTheme::singleton().adjustStyle(*this, style, element, m_state.hasUAAppearance(), m_state.borderData(), m_state.backgroundData(), m_state.backgroundColor());
 
     // If we have first-letter pseudo style, do not share this style.
-    if (style.hasPseudoStyle(FIRST_LETTER))
+    if (style.hasPseudoStyle(PseudoId::FirstLetter))
         style.setUnique();
 
     // FIXME: when dropping the -webkit prefix on transform-style, we should also have opacity < 1 cause flattening.
@@ -1112,7 +1112,7 @@ void StyleResolver::updateFont()
 
 Vector<RefPtr<StyleRule>> StyleResolver::styleRulesForElement(const Element* element, unsigned rulesToInclude)
 {
-    return pseudoStyleRulesForElement(element, NOPSEUDO, rulesToInclude);
+    return pseudoStyleRulesForElement(element, PseudoId::None, rulesToInclude);
 }
 
 Vector<RefPtr<StyleRule>> StyleResolver::pseudoStyleRulesForElement(const Element* element, PseudoId pseudoId, unsigned rulesToInclude)
@@ -1279,7 +1279,7 @@ static bool isCacheableInMatchedPropertiesCache(const Element& element, const Re
     if (&element == element.document().documentElement())
         return false;
     // content:attr() value depends on the element it is being applied to.
-    if (style->hasAttrContent() || (style->styleType() != NOPSEUDO && parentStyle->hasAttrContent()))
+    if (style->hasAttrContent() || (style->styleType() != PseudoId::None && parentStyle->hasAttrContent()))
         return false;
     if (style->hasAppearance())
         return false;
@@ -1339,7 +1339,7 @@ void StyleResolver::applyMatchedProperties(const MatchResult& matchResult, const
         // element context. This is fast and saves memory by reusing the style data structures.
         state.style()->copyNonInheritedFrom(*cacheItem->renderStyle);
         if (state.parentStyle()->inheritedDataShared(cacheItem->parentRenderStyle.get()) && !isAtShadowBoundary(element)) {
-            EInsideLink linkStatus = state.style()->insideLink();
+            InsideLink linkStatus = state.style()->insideLink();
             // If the cache item parent style has identical inherited properties to the current parent style then the
             // resulting style will be identical too. We copy the inherited properties over from the cache and are done.
             state.style()->inheritFrom(*cacheItem->renderStyle);
@@ -2237,7 +2237,7 @@ void StyleResolver::CascadedProperties::Property::apply(StyleResolver& resolver,
         resolver.applyProperty(id, cssValue[SelectorChecker::MatchDefault], SelectorChecker::MatchDefault, matchResult);
     }
 
-    if (state.style()->insideLink() == NotInsideLink)
+    if (state.style()->insideLink() == InsideLink::NotInside)
         return;
 
     if (cssValue[SelectorChecker::MatchLink]) {
index bc912db..9d225cf 100644 (file)
@@ -357,7 +357,7 @@ public:
         const RenderStyle* parentStyle() const { return m_parentStyle; }
         const RenderStyle* rootElementStyle() const { return m_rootElementStyle; }
 
-        EInsideLink elementLinkState() const { return m_elementLinkState; }
+        InsideLink elementLinkState() const { return m_elementLinkState; }
 
         void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegularStyle = isApply; }
         void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVisitedLinkStyle = isApply; }
@@ -409,7 +409,7 @@ public:
         std::unique_ptr<RenderStyle> m_ownedParentStyle;
         const RenderStyle* m_rootElementStyle { nullptr };
 
-        EInsideLink m_elementLinkState { NotInsideLink };
+        InsideLink m_elementLinkState { InsideLink::NotInside };
 
         bool m_applyPropertyToRegularStyle { true };
         bool m_applyPropertyToVisitedLinkStyle { false };
index b77081d..d79ad01 100644 (file)
@@ -960,7 +960,7 @@ static FunctionType constructFragmentsInternal(const CSSSelector* rootSelector,
             case CSSSelector::PseudoElementUnknown:
                 ASSERT_NOT_REACHED();
                 return FunctionType::CannotMatchAnything;
-            // FIXME: Support RESIZER, SELECTION etc.
+            // FIXME: Support PseudoId::Resizer, PseudoId::Selection etc.
             default:
                 // This branch includes custom pseudo elements.
                 return FunctionType::CannotCompile;
@@ -3762,14 +3762,14 @@ void SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudo
     ASSERT(m_selectorContext != SelectorContext::QuerySelector);
 
     // Make sure that the requested pseudoId equals to the pseudo element of the rightmost fragment.
-    // If the rightmost fragment doesn't have a pseudo element, the requested pseudoId need to be NOPSEUDO to succeed the matching.
-    // Otherwise, if the requested pseudoId is not NOPSEUDO, the requested pseudoId need to equal to the pseudo element of the rightmost fragment.
+    // If the rightmost fragment doesn't have a pseudo element, the requested pseudoId need to be PseudoId::None to succeed the matching.
+    // Otherwise, if the requested pseudoId is not PseudoId::None, the requested pseudoId need to equal to the pseudo element of the rightmost fragment.
     if (fragmentMatchesTheRightmostElement(fragment)) {
         if (!fragment.pseudoElementSelector)
-            failureCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(NOPSEUDO)));
+            failureCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(static_cast<unsigned>(PseudoId::None))));
         else {
-            Assembler::Jump skip = m_assembler.branch8(Assembler::Equal, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(NOPSEUDO));
-            failureCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(CSSSelector::pseudoId(fragment.pseudoElementSelector->pseudoElementType()))));
+            Assembler::Jump skip = m_assembler.branch8(Assembler::Equal, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(static_cast<unsigned>(PseudoId::None)));
+            failureCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(static_cast<unsigned>(CSSSelector::pseudoId(fragment.pseudoElementSelector->pseudoElementType())))));
             skip.link(&m_assembler);
         }
     }
@@ -3852,15 +3852,15 @@ void SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement(Assembler::J
 
     Assembler::JumpList successCases;
 
-    // When the requested pseudoId isn't NOPSEUDO, there's no need to mark the pseudo element style.
-    successCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(NOPSEUDO)));
+    // When the requested pseudoId isn't PseudoId::None, there's no need to mark the pseudo element style.
+    successCases.append(m_assembler.branch8(Assembler::NotEqual, Assembler::Address(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoId)), Assembler::TrustedImm32(static_cast<unsigned>(PseudoId::None))));
 
     // When resolving mode is CollectingRulesIgnoringVirtualPseudoElements, there's no need to mark the pseudo element style.
     successCases.append(branchOnResolvingModeWithCheckingContext(Assembler::Equal, SelectorChecker::Mode::CollectingRulesIgnoringVirtualPseudoElements, checkingContext));
 
     // When resolving mode is ResolvingStyle, mark the pseudo style for pseudo element.
     PseudoId dynamicPseudo = CSSSelector::pseudoId(fragment.pseudoElementSelector->pseudoElementType());
-    if (dynamicPseudo < FIRST_INTERNAL_PSEUDOID) {
+    if (dynamicPseudo < PseudoId::FirstInternalPseudoId) {
         failureCases.append(branchOnResolvingModeWithCheckingContext(Assembler::NotEqual, SelectorChecker::Mode::ResolvingStyle, checkingContext));
 
         Assembler::Address pseudoIDSetAddress(checkingContext, OBJECT_OFFSETOF(SelectorChecker::CheckingContext, pseudoIDSet));
@@ -3870,7 +3870,7 @@ void SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement(Assembler::J
     }
 
     // We have a pseudoElementSelector, we are not in CollectingRulesIgnoringVirtualPseudoElements so
-    // we must match that pseudo element. Since the context's pseudo selector is NOPSEUDO, we fail matching
+    // we must match that pseudo element. Since the context's pseudo selector is PseudoId::None, we fail matching
     // after the marking.
     failureCases.append(m_assembler.jump());
 
index a321e87..6af21a3 100644 (file)
@@ -2006,8 +2006,8 @@ void Document::updateLayoutIgnorePendingStylesheets(Document::RunPostLayoutTasks
 std::unique_ptr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets(Element& element, const RenderStyle* parentStyle, PseudoId pseudoElementSpecifier)
 {
     ASSERT(&element.document() == this);
-    ASSERT(!element.isPseudoElement() || !pseudoElementSpecifier);
-    ASSERT(!pseudoElementSpecifier || parentStyle);
+    ASSERT(!element.isPseudoElement() || pseudoElementSpecifier == PseudoId::None);
+    ASSERT(pseudoElementSpecifier == PseudoId::None || parentStyle);
 
     // On iOS request delegates called during styleForElement may result in re-entering WebKit and killing the style resolver.
     Style::PostResolutionCallbackDisabler disabler(*this);
@@ -2015,7 +2015,7 @@ std::unique_ptr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets
     SetForScope<bool> change(m_ignorePendingStylesheets, true);
     auto& resolver = element.styleResolver();
 
-    if (pseudoElementSpecifier)
+    if (pseudoElementSpecifier != PseudoId::None)
         return resolver.pseudoStyleForElement(element, PseudoStyleRequest(pseudoElementSpecifier), *parentStyle);
 
     auto elementStyle = resolver.styleForElement(element, parentStyle);
@@ -2133,7 +2133,7 @@ bool Document::isPageBoxVisible(int pageIndex)
 {
     updateStyleIfNeeded();
     std::unique_ptr<RenderStyle> pageStyle(styleScope().resolver().styleForPage(pageIndex));
-    return pageStyle->visibility() != HIDDEN; // display property doesn't apply to @page.
+    return pageStyle->visibility() != Visibility::Hidden; // display property doesn't apply to @page.
 }
 
 void Document::pageSizeAndMarginsInPixels(int pageIndex, IntSize& pageSize, int& marginTop, int& marginRight, int& marginBottom, int& marginLeft)
@@ -2566,7 +2566,7 @@ void Document::setVisuallyOrdered()
 {
     m_visuallyOrdered = true;
     if (renderView())
-        renderView()->mutableStyle().setRTLOrdering(VisualOrder);
+        renderView()->mutableStyle().setRTLOrdering(Order::Visual);
 }
 
 Ref<DocumentParser> Document::createParser()
index 06fb85d..9576e21 100644 (file)
@@ -579,7 +579,7 @@ public:
     };
     WEBCORE_EXPORT void updateLayoutIgnorePendingStylesheets(RunPostLayoutTasks = RunPostLayoutTasks::Asynchronously);
 
-    std::unique_ptr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element&, const RenderStyle* parentStyle, PseudoId = NOPSEUDO);
+    std::unique_ptr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element&, const RenderStyle* parentStyle, PseudoId = PseudoId::None);
 
     // Returns true if page box (margin boxes and page borders) is visible.
     WEBCORE_EXPORT bool isPageBoxVisible(int pageIndex);
index b1ff990..8ed05f3 100644 (file)
@@ -522,12 +522,12 @@ bool Element::isFocusable() const
         // Elements in canvas fallback content are not rendered, but they are allowed to be
         // focusable as long as their canvas is displayed and visible.
         if (auto* canvas = ancestorsOfType<HTMLCanvasElement>(*this).first())
-            return canvas->renderer() && canvas->renderer()->style().visibility() == VISIBLE;
+            return canvas->renderer() && canvas->renderer()->style().visibility() == Visibility::Visible;
     }
 
     // FIXME: Even if we are not visible, we might have a child that is visible.
     // Hyatt wants to fix that some day with a "has visible content" flag or the like.
-    if (!renderer() || renderer()->style().visibility() != VISIBLE)
+    if (!renderer() || renderer()->style().visibility() != Visibility::Visible)
         return false;
 
     return true;
@@ -1548,12 +1548,12 @@ bool Element::hasDisplayContents() const
         return false;
 
     const RenderStyle* style = elementRareData()->computedStyle();
-    return style && style->display() == CONTENTS;
+    return style && style->display() == DisplayType::Contents;
 }
 
 void Element::storeDisplayContentsStyle(std::unique_ptr<RenderStyle> style)
 {
-    ASSERT(style && style->display() == CONTENTS);
+    ASSERT(style && style->display() == DisplayType::Contents);
     ASSERT(!renderer() || isPseudoElement());
     ensureElementRareData().setComputedStyle(WTFMove(style));
 }
@@ -1669,7 +1669,7 @@ const AtomicString& Element::imageSourceURL() const
 
 bool Element::rendererIsNeeded(const RenderStyle& style)
 {
-    return style.display() != NONE && style.display() != CONTENTS;
+    return style.display() != DisplayType::None && style.display() != DisplayType::Contents;
 }
 
 RenderPtr<RenderElement> Element::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
@@ -2722,9 +2722,9 @@ void Element::willBecomeFullscreenElement()
 static PseudoElement* beforeOrAfterPseudoElement(Element& host, PseudoId pseudoElementSpecifier)
 {
     switch (pseudoElementSpecifier) {
-    case BEFORE:
+    case PseudoId::Before:
         return host.beforePseudoElement();
-    case AFTER:
+    case PseudoId::After:
         return host.afterPseudoElement();
     default:
         return nullptr;
@@ -2802,7 +2802,7 @@ const RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
     if (!style)
         style = &resolveComputedStyle();
 
-    if (pseudoElementSpecifier) {
+    if (pseudoElementSpecifier != PseudoId::None) {
         if (auto* cachedPseudoStyle = style->getCachedPseudoStyle(pseudoElementSpecifier))
             return cachedPseudoStyle;
         return &resolvePseudoElementStyle(pseudoElementSpecifier);
index dffdac7..c9806ab 100644 (file)
@@ -320,7 +320,7 @@ public:
     WEBCORE_EXPORT ExceptionOr<void> insertAdjacentHTML(const String& where, const String& html);
     WEBCORE_EXPORT ExceptionOr<void> insertAdjacentText(const String& where, const String& text);
 
-    const RenderStyle* computedStyle(PseudoId = NOPSEUDO) override;
+    const RenderStyle* computedStyle(PseudoId = PseudoId::None) override;
 
     bool needsStyleInvalidation() const;
 
index 4504e40..77364e4 100644 (file)
@@ -680,7 +680,7 @@ static Node::Editability computeEditabilityFromComputedStyle(const Node& startNo
         auto* style = node->isDocumentNode() ? node->renderStyle() : const_cast<Node*>(node)->computedStyle();
         if (!style)
             continue;
-        if (style->display() == NONE)
+        if (style->display() == DisplayType::None)
             continue;
 #if ENABLE(USERSELECT_ALL)
         // Elements with user-select: all style are considered atomic
index 87e5f97..5c27f6b 100644 (file)
@@ -202,10 +202,10 @@ public:
     bool isSVGElement() const { return getFlag(IsSVGFlag); }
     bool isMathMLElement() const { return getFlag(IsMathMLFlag); }
 
-    bool isPseudoElement() const { return pseudoId() != NOPSEUDO; }
-    bool isBeforePseudoElement() const { return pseudoId() == BEFORE; }
-    bool isAfterPseudoElement() const { return pseudoId() == AFTER; }
-    PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleResolveCallbacks()) ? customPseudoId() : NOPSEUDO; }
+    bool isPseudoElement() const { return pseudoId() != PseudoId::None; }
+    bool isBeforePseudoElement() const { return pseudoId() == PseudoId::Before; }
+    bool isAfterPseudoElement() const { return pseudoId() == PseudoId::After; }
+    PseudoId pseudoId() const { return (isElementNode() && hasCustomStyleResolveCallbacks()) ? customPseudoId() : PseudoId::None; }
 
     virtual bool isMediaControlElement() const { return false; }
     virtual bool isMediaControls() const { return false; }
@@ -432,7 +432,7 @@ public:
     // Wrapper for nodes that don't have a renderer, but still cache the style (like HTMLOptionElement).
     const RenderStyle* renderStyle() const;
 
-    virtual const RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO);
+    virtual const RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = PseudoId::None);
 
     enum class InsertedIntoAncestorResult {
         Done,
@@ -643,7 +643,7 @@ private:
     virtual PseudoId customPseudoId() const
     {
         ASSERT(hasCustomStyleResolveCallbacks());
-        return NOPSEUDO;
+        return PseudoId::None;
     }
 
     WEBCORE_EXPORT void removedLastRef();
index 0b0a518..e5238c7 100644 (file)
@@ -685,7 +685,7 @@ Position Position::upstream(EditingBoundaryCrossingRule rule) const
 
         // skip position in unrendered or invisible node
         RenderObject* renderer = currentNode.renderer();
-        if (!renderer || renderer->style().visibility() != VISIBLE)
+        if (!renderer || renderer->style().visibility() != Visibility::Visible)
             continue;
         ensureLineBoxesIfNeeded(*renderer);
         if (rule == CanCrossEditingBoundary && boundaryCrossed) {
@@ -820,7 +820,7 @@ Position Position::downstream(EditingBoundaryCrossingRule rule) const
 
         // skip position in unrendered or invisible node
         auto* renderer = currentNode.renderer();
-        if (!renderer || renderer->style().visibility() != VISIBLE)
+        if (!renderer || renderer->style().visibility() != Visibility::Visible)
             continue;
         ensureLineBoxesIfNeeded(*renderer);
         if (rule == CanCrossEditingBoundary && boundaryCrossed) {
@@ -995,7 +995,7 @@ bool Position::isCandidate() const
     if (!renderer)
         return false;
 
-    if (renderer->style().visibility() != VISIBLE)
+    if (renderer->style().visibility() != Visibility::Visible)
         return false;
 
     if (renderer->isBR()) {
@@ -1058,7 +1058,7 @@ bool Position::rendersInDifferentPosition(const Position& position) const
     if (!positionRenderer)
         return false;
 
-    if (renderer->style().visibility() != VISIBLE || positionRenderer->style().visibility() != VISIBLE)
+    if (renderer->style().visibility() != Visibility::Visible || positionRenderer->style().visibility() != Visibility::Visible)
         return false;
     
     if (deprecatedNode() == position.deprecatedNode()) {
index 2579f13..1a6b585 100644 (file)
@@ -152,7 +152,7 @@ bool PositionIterator::isCandidate() const
     if (!renderer)
         return false;
     
-    if (renderer->style().visibility() != VISIBLE)
+    if (renderer->style().visibility() != Visibility::Visible)
         return false;
 
     if (renderer->isBR())
index e82b447..782674b 100644 (file)
@@ -54,9 +54,9 @@ String PseudoElement::pseudoElementNameForEvents(PseudoId pseudoId)
     static NeverDestroyed<const String> after(MAKE_STATIC_STRING_IMPL("::after"));
     static NeverDestroyed<const String> before(MAKE_STATIC_STRING_IMPL("::before"));
     switch (pseudoId) {
-    case AFTER:
+    case PseudoId::After:
         return after;
-    case BEFORE:
+    case PseudoId::Before:
         return before;
     default:
         return emptyString();
@@ -68,7 +68,7 @@ PseudoElement::PseudoElement(Element& host, PseudoId pseudoId)
     , m_hostElement(&host)
     , m_pseudoId(pseudoId)
 {
-    ASSERT(pseudoId == BEFORE || pseudoId == AFTER);
+    ASSERT(pseudoId == PseudoId::Before || pseudoId == PseudoId::After);
     setHasCustomStyleResolveCallbacks();
 }
 
index d53cc73..43564c1 100644 (file)
@@ -85,18 +85,18 @@ void VisitedLinkState::invalidateStyleForLink(SharedStringHash linkHash)
     }
 }
 
-EInsideLink VisitedLinkState::determineLinkStateSlowCase(const Element& element)
+InsideLink VisitedLinkState::determineLinkStateSlowCase(const Element& element)
 {
     ASSERT(element.isLink());
 
     const AtomicString* attribute = linkAttribute(element);
     if (!attribute || attribute->isNull())
-        return NotInsideLink;
+        return InsideLink::NotInside;
 
     // An empty href refers to the document itself which is always visited. It is useful to check this explicitly so
     // that visited links can be tested in platform independent manner, without explicit support in the test harness.
     if (attribute->isEmpty())
-        return InsideVisitedLink;
+        return InsideLink::InsideVisited;
 
     SharedStringHash hash;
     if (is<HTMLAnchorElement>(element))
@@ -105,22 +105,22 @@ EInsideLink VisitedLinkState::determineLinkStateSlowCase(const Element& element)
         hash = computeVisitedLinkHash(element.document().baseURL(), *attribute);
 
     if (!hash)
-        return InsideUnvisitedLink;
+        return InsideLink::InsideUnvisited;
 
     Frame* frame = element.document().frame();
     if (!frame)
-        return InsideUnvisitedLink;
+        return InsideLink::InsideUnvisited;
 
     Page* page = frame->page();
     if (!page)
-        return InsideUnvisitedLink;
+        return InsideLink::InsideUnvisited;
 
     m_linksCheckedForVisitedState.add(hash);
 
     if (!page->visitedLinkStore().isLinkVisited(*page, hash, element.document().baseURL(), *attribute))
-        return InsideUnvisitedLink;
+        return InsideLink::InsideUnvisited;
 
-    return InsideVisitedLink;
+    return InsideLink::InsideVisited;
 }
 
 } // namespace WebCore
index cc9e5ec..ec6da21 100644 (file)
@@ -44,19 +44,19 @@ public:
 
     void invalidateStyleForAllLinks();
     void invalidateStyleForLink(SharedStringHash);
-    EInsideLink determineLinkState(const Element&);
+    InsideLink determineLinkState(const Element&);
 
 private:
-    EInsideLink determineLinkStateSlowCase(const Element&);
+    InsideLink determineLinkStateSlowCase(const Element&);
 
     Document& m_document;
     HashSet<SharedStringHash, SharedStringHashHash> m_linksCheckedForVisitedState;
 };
 
-inline EInsideLink VisitedLinkState::determineLinkState(const Element& element)
+inline InsideLink VisitedLinkState::determineLinkState(const Element& element)
 {
     if (!element.isLink())
-        return NotInsideLink;
+        return InsideLink::NotInside;
     return determineLinkStateSlowCase(element);
 }
 
index 3abc4d9..938d567 100644 (file)
@@ -456,7 +456,7 @@ static bool isSpecialHTMLElement(const Node* node)
     if (!renderer)
         return false;
 
-    if (renderer->style().display() == TABLE || renderer->style().display() == INLINE_TABLE)
+    if (renderer->style().display() == DisplayType::Table || renderer->style().display() == DisplayType::InlineTable)
         return true;
 
     if (renderer->style().isFloating())
@@ -933,7 +933,7 @@ Ref<Element> createTabSpanElement(Document& document)
 bool isNodeRendered(const Node& node)
 {
     auto* renderer = node.renderer();
-    return renderer && renderer->style().visibility() == VISIBLE;
+    return renderer && renderer->style().visibility() == Visibility::Visible;
 }
 
 unsigned numEnclosingMailBlockquotes(const Position& position)
index 0e9c36d..4ade6f4 100644 (file)
@@ -560,11 +560,11 @@ void TextIterator::advance()
 
 static bool hasVisibleTextNode(RenderText& renderer)
 {
-    if (renderer.style().visibility() == VISIBLE)
+    if (renderer.style().visibility() == Visibility::Visible)
         return true;
     if (is<RenderTextFragment>(renderer)) {
         if (auto firstLetter = downcast<RenderTextFragment>(renderer).firstLetter()) {
-            if (firstLetter->style().visibility() == VISIBLE)
+            if (firstLetter->style().visibility() == Visibility::Visible)
                 return true;
         }
     }
@@ -618,7 +618,7 @@ bool TextIterator::handleTextNode()
                 return false;
             }
         }
-        if (renderer.style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility))
+        if (renderer.style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility))
             return false;
         int rendererTextLength = rendererText.length();
         int end = (&textNode == m_endContainer) ? m_endOffset : INT_MAX;
@@ -632,7 +632,7 @@ bool TextIterator::handleTextNode()
     }
 
     if (const auto* layout = renderer.simpleLineLayout()) {
-        if (renderer.style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility))
+        if (renderer.style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility))
             return true;
         ASSERT(renderer.parent());
         ASSERT(is<RenderBlockFlow>(*renderer.parent()));
@@ -727,7 +727,7 @@ bool TextIterator::handleTextNode()
         handleTextNodeFirstLetter(downcast<RenderTextFragment>(renderer));
 
     if (!renderer.firstTextBox() && rendererText.length() && !shouldHandleFirstLetter) {
-        if (renderer.style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility))
+        if (renderer.style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility))
             return false;
         m_lastTextNodeEndedWithCollapsedSpace = true; // entire block is collapsed space
         return true;
@@ -753,7 +753,7 @@ void TextIterator::handleTextBox()
     Text& textNode = downcast<Text>(*m_node);
 
     auto& renderer = m_firstLetterText ? *m_firstLetterText : *textNode.renderer();
-    if (renderer.style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility)) {
+    if (renderer.style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility)) {
         m_textBox = nullptr;
         return;
     }
@@ -848,7 +848,7 @@ static inline RenderText* firstRenderTextInFirstLetter(RenderBoxModelObject* fir
 void TextIterator::handleTextNodeFirstLetter(RenderTextFragment& renderer)
 {
     if (auto* firstLetter = renderer.firstLetter()) {
-        if (firstLetter->style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility))
+        if (firstLetter->style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility))
             return;
         if (auto* firstLetterText = firstRenderTextInFirstLetter(firstLetter)) {
             m_handledFirstLetter = true;
@@ -867,7 +867,7 @@ bool TextIterator::handleReplacedElement()
         return false;
 
     auto& renderer = *m_node->renderer();
-    if (renderer.style().visibility() != VISIBLE && !(m_behavior & TextIteratorIgnoresStyleVisibility))
+    if (renderer.style().visibility() != Visibility::Visible && !(m_behavior & TextIteratorIgnoresStyleVisibility))
         return false;
 
     if (m_lastTextNodeEndedWithCollapsedSpace) {
@@ -1115,7 +1115,7 @@ bool TextIterator::shouldRepresentNodeOffsetZero()
     // If this node is unrendered or invisible the VisiblePosition checks below won't have much meaning.
     // Additionally, if the range we are iterating over contains huge sections of unrendered content, 
     // we would create VisiblePositions on every call to this function without this check.
-    if (!m_node->renderer() || m_node->renderer()->style().visibility() != VISIBLE
+    if (!m_node->renderer() || m_node->renderer()->style().visibility() != Visibility::Visible
         || (is<RenderBlockFlow>(*m_node->renderer()) && !downcast<RenderBlockFlow>(*m_node->renderer()).height() && !is<HTMLBodyElement>(*m_node)))
         return false;
 
@@ -1331,10 +1331,10 @@ void SimplifiedBackwardsTextIterator::advance()
         if (!m_handledNode && !(m_node == m_endContainer && !m_endOffset)) {
             auto* renderer = m_node->renderer();
             if (renderer && renderer->isText() && m_node->isTextNode()) {
-                if (renderer->style().visibility() == VISIBLE && m_offset > 0)
+                if (renderer->style().visibility() == Visibility::Visible && m_offset > 0)
                     m_handledNode = handleTextNode();
             } else if (renderer && (renderer->isImage() || renderer->isWidget())) {
-                if (renderer->style().visibility() == VISIBLE && m_offset > 0)
+                if (renderer->style().visibility() == Visibility::Visible && m_offset > 0)
                     m_handledNode = handleReplacedElement();
             } else
                 m_handledNode = handleNonTextNode();
index 29b36d6..2d3ad1f 100644 (file)
@@ -1181,7 +1181,7 @@ Node* findStartOfParagraph(Node* startNode, Node* highestRoot, Node* startBlock,
             continue;
         }
         const RenderStyle& style = r->style();
-        if (style.visibility() != VISIBLE) {
+        if (style.visibility() != Visibility::Visible) {
             n = NodeTraversal::previousPostOrder(*n, startBlock);
             continue;
         }
@@ -1243,7 +1243,7 @@ Node* findEndOfParagraph(Node* startNode, Node* highestRoot, Node* stayInsideBlo
             continue;
         }
         const RenderStyle& style = r->style();
-        if (style.visibility() != VISIBLE) {
+        if (style.visibility() != Visibility::Visible) {
             n = NodeTraversal::next(*n, stayInsideBlock);
             continue;
         }
index 5621355..6b378b2 100644 (file)
@@ -92,37 +92,36 @@ void Editor::setTextAlignmentForChangedBaseWritingDirection(WritingDirection dir
         return;
         
     const char *newValue = nullptr;
-    ETextAlign textAlign = *value;
+    TextAlignMode textAlign = *value;
     switch (textAlign) {
-        case TASTART:
-        case TAEND:
-        {
-            switch (direction) {
-                case NaturalWritingDirection:
-                    // no-op
-                    break;
-                case LeftToRightWritingDirection:
-                    newValue = "left";
-                    break;
-                case RightToLeftWritingDirection:
-                    newValue = "right";
-                    break;
-            }
-            break;
-        }
-        case LEFT:
-        case WEBKIT_LEFT:
-            newValue = "right";
+    case TextAlignMode::Start:
+    case TextAlignMode::End: {
+        switch (direction) {
+        case NaturalWritingDirection:
+            // no-op
             break;
-        case RIGHT:
-        case WEBKIT_RIGHT:
+        case LeftToRightWritingDirection:
             newValue = "left";
             break;
-        case CENTER:
-        case WEBKIT_CENTER:
-        case JUSTIFY:
-            // no-op
+        case RightToLeftWritingDirection:
+            newValue = "right";
             break;
+        }
+        break;
+    }
+    case TextAlignMode::Left:
+    case TextAlignMode::WebKitLeft:
+        newValue = "right";
+        break;
+    case TextAlignMode::Right:
+    case TextAlignMode::WebKitRight:
+        newValue = "left";
+        break;
+    case TextAlignMode::Center:
+    case TextAlignMode::WebKitCenter:
+    case TextAlignMode::Justify:
+        // no-op
+        break;
     }
 
     if (!newValue)
index e34c694..7503f07 100644 (file)
@@ -210,7 +210,7 @@ bool HTMLAreaElement::isMouseFocusable() const
 bool HTMLAreaElement::isFocusable() const
 {
     RefPtr<HTMLImageElement> image = imageElement();
-    if (!image || !image->renderer() || image->renderer()->style().visibility() != VISIBLE)
+    if (!image || !image->renderer() || image->renderer()->style().visibility() != Visibility::Visible)
         return false;
 
     return supportsFocus() && Element::tabIndex() >= 0;
index 9f17093..d0fe7d0 100644 (file)
@@ -116,11 +116,11 @@ bool HTMLFormElement::rendererIsNeeded(const RenderStyle& style)
     if (!parentIsTableElementPart)
         return true;
 
-    EDisplay display = style.display();
-    bool formIsTablePart = display == TABLE || display == INLINE_TABLE || display == TABLE_ROW_GROUP
-        || display == TABLE_HEADER_GROUP || display == TABLE_FOOTER_GROUP || display == TABLE_ROW
-        || display == TABLE_COLUMN_GROUP || display == TABLE_COLUMN || display == TABLE_CELL
-        || display == TABLE_CAPTION;
+    DisplayType display = style.display();
+    bool formIsTablePart = display == DisplayType::Table || display == DisplayType::InlineTable || display == DisplayType::TableRowGroup
+        || display == DisplayType::TableHeaderGroup || display == DisplayType::TableFooterGroup || display == DisplayType::TableRow
+        || display == DisplayType::TableColumnGroup || display == DisplayType::TableColumn || display == DisplayType::TableCell
+        || display == DisplayType::TableCaption;
 
     return formIsTablePart;
 }
index e5ffd81..7637317 100644 (file)
@@ -104,7 +104,7 @@ void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt
 
 bool HTMLIFrameElement::rendererIsNeeded(const RenderStyle& style)
 {
-    return isURLAllowed() && style.display() != NONE;
+    return isURLAllowed() && style.display() != DisplayType::None;
 }
 
 RenderPtr<RenderElement> HTMLIFrameElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition&)
index 848eda5..72c6fc7 100644 (file)
@@ -2060,13 +2060,13 @@ RenderStyle HTMLInputElement::createInnerTextStyle(const RenderStyle& style)
     textBlockStyle.inheritFrom(style);
     adjustInnerTextStyle(style, textBlockStyle);
 
-    textBlockStyle.setWhiteSpace(PRE);
+    textBlockStyle.setWhiteSpace(WhiteSpace::Pre);
     textBlockStyle.setOverflowWrap(OverflowWrap::Normal);
     textBlockStyle.setOverflowX(Overflow::Hidden);
     textBlockStyle.setOverflowY(Overflow::Hidden);
     textBlockStyle.setTextOverflow(shouldTruncateText(style) ? TextOverflow::Ellipsis : TextOverflow::Clip);
 
-    textBlockStyle.setDisplay(BLOCK);
+    textBlockStyle.setDisplay(DisplayType::Block);
 
     if (hasAutoFillStrongPasswordButton()) {
         textBlockStyle.setColor({ 0.0f, 0.0f, 0.0f, 0.6f });
index 58fee1d..7387dd0 100644 (file)
@@ -63,7 +63,7 @@ bool HTMLOptGroupElement::isFocusable() const
         return false;
     // Optgroup elements do not have a renderer.
     auto* style = const_cast<HTMLOptGroupElement&>(*this).computedStyle();
-    return style && style->display() != NONE;
+    return style && style->display() != DisplayType::None;
 }
 
 const AtomicString& HTMLOptGroupElement::formControlType() const
index 9f6dad2..980a2be 100644 (file)
@@ -93,7 +93,7 @@ bool HTMLOptionElement::isFocusable() const
         return false;
     // Option elements do not have a renderer.
     auto* style = const_cast<HTMLOptionElement&>(*this).computedStyle();
-    return style && style->display() != NONE;
+    return style && style->display() != DisplayType::None;
 }
 
 bool HTMLOptionElement::matchesDefaultPseudoClass() const
index 536d897..9cd2899 100644 (file)
@@ -551,7 +551,7 @@ RenderStyle HTMLTextAreaElement::createInnerTextStyle(const RenderStyle& style)
     auto textBlockStyle = RenderStyle::create();
     textBlockStyle.inheritFrom(style);
     adjustInnerTextStyle(style, textBlockStyle);
-    textBlockStyle.setDisplay(BLOCK);
+    textBlockStyle.setDisplay(DisplayType::Block);
 
 #if PLATFORM(IOS)
     // We're adding three extra pixels of padding to line textareas up with text fields.  
index 0adef0f..983bea0 100644 (file)
@@ -304,7 +304,7 @@ void HTMLTextFormControlElement::setSelectionRange(int start, int end, TextField
         auto* rendererTextControl = renderer();
 
         if (innerText && rendererTextControl) {
-            if (rendererTextControl->style().visibility() == HIDDEN || !innerText->renderBox() || !innerText->renderBox()->height()) {
+            if (rendererTextControl->style().visibility() == Visibility::Hidden || !innerText->renderBox() || !innerText->renderBox()->height()) {
                 cacheSelection(start, end, direction);
                 return;
             }
@@ -821,19 +821,19 @@ void HTMLTextFormControlElement::adjustInnerTextStyle(const RenderStyle& parentS
         // (which cannot have RTL directionality) will appear to the right of the masked characters. See <rdar://problem/7024375>.
         
         switch (textBlockStyle.textAlign()) {
-        case TASTART:
-        case JUSTIFY:
-            textBlockStyle.setTextAlign(RIGHT);
+        case TextAlignMode::Start:
+        case TextAlignMode::Justify:
+            textBlockStyle.setTextAlign(TextAlignMode::Right);
             break;
-        case TAEND:
-            textBlockStyle.setTextAlign(LEFT);
+        case TextAlignMode::End:
+            textBlockStyle.setTextAlign(TextAlignMode::Left);
             break;
-        case LEFT:
-        case RIGHT:
-        case CENTER:
-        case WEBKIT_LEFT:
-        case WEBKIT_RIGHT:
-        case WEBKIT_CENTER:
+        case TextAlignMode::Left:
+        case TextAlignMode::Right:
+        case TextAlignMode::Center:
+        case TextAlignMode::WebKitLeft:
+        case TextAlignMode::WebKitRight:
+        case TextAlignMode::WebKitCenter:
             break;
         }
 
index 03b1060..6f75202 100644 (file)
@@ -329,7 +329,7 @@ bool MediaElementSession::autoplayPermitted() const
         ALWAYS_LOG(LOGIDENTIFIER, "Returning FALSE because element has no renderer");
         return false;
     }
-    if (renderer->style().visibility() != VISIBLE) {
+    if (renderer->style().visibility() != Visibility::Visible) {
         ALWAYS_LOG(LOGIDENTIFIER, "Returning FALSE because element is not visible");
         return false;
     }
@@ -811,7 +811,7 @@ static bool isMainContentForPurposesOfAutoplay(const HTMLMediaElement& element)
     // Elements which are hidden by style, or have been scrolled out of view, cannot be main content.
     // But elements which have audio & video and are already playing should not stop playing because
     // they are scrolled off the page.
-    if (renderer->style().visibility() != VISIBLE)
+    if (renderer->style().visibility() != Visibility::Visible)
         return false;
     if (renderer->visibleInViewportState() != VisibleInViewportState::Yes && !element.isPlaying())
         return false;
index ce32131..8820f46 100644 (file)
@@ -53,9 +53,9 @@ Ref<RubyElement> RubyElement::create(Document& document)
 
 RenderPtr<RenderElement> RubyElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition& insertionPosition)
 {
-    if (style.display() == INLINE)
+    if (style.display() == DisplayType::Inline)
         return createRenderer<RenderRubyAsInline>(*this, WTFMove(style));
-    if (style.display() == BLOCK || style.display() == INLINE_BLOCK)
+    if (style.display() == DisplayType::Block || style.display() == DisplayType::InlineBlock)
         return createRenderer<RenderRubyAsBlock>(*this, WTFMove(style));
     return HTMLElement::createElementRenderer(WTFMove(style), insertionPosition);
 }
index d886bf2..3ecb70a 100644 (file)
@@ -56,7 +56,7 @@ Ref<RubyTextElement> RubyTextElement::create(Document& document)
 RenderPtr<RenderElement> RubyTextElement::createElementRenderer(RenderStyle&& style, const RenderTreePosition& insertionPosition)
 {
     // RenderRubyText requires its parent to be RenderRubyRun.
-    if (isRuby(insertionPosition.parent()) && style.display() == BLOCK)
+    if (isRuby(insertionPosition.parent()) && style.display() == DisplayType::Block)
         return createRenderer<RenderRubyText>(*this, WTFMove(style));
     return HTMLElement::createElementRenderer(WTFMove(style), insertionPosition);
 }
index b79792f..92d6138 100644 (file)
@@ -108,7 +108,7 @@ std::optional<ElementStyle> TextControlInnerElement::resolveCustomStyle(const Re
     newStyle->inheritFrom(*shadowHostStyle);
     newStyle->setFlexGrow(1);
     newStyle->setMinWidth(Length { 0, Fixed }); // Needed for correct shrinking.
-    newStyle->setDisplay(BLOCK);
+    newStyle->setDisplay(DisplayType::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(UserModify::ReadOnly);
@@ -197,7 +197,7 @@ std::optional<ElementStyle> TextControlPlaceholderElement::resolveCustomStyle(co
     auto style = resolveStyle(&parentStyle);
 
     auto& controlElement = downcast<HTMLTextFormControlElement>(*containingShadowRoot()->host());
-    style.renderStyle->setDisplay(controlElement.isPlaceholderVisible() ? BLOCK : NONE);
+    style.renderStyle->setDisplay(controlElement.isPlaceholderVisible() ? DisplayType::Block : DisplayType::None);
 
     if (is<HTMLInputElement>(controlElement)) {
         auto& inputElement = downcast<HTMLInputElement>(controlElement);
index e5c8902..d57a43f 100644 (file)
@@ -586,9 +586,9 @@ static RefPtr<Inspector::Protocol::OverlayTypes::ElementData> buildObjectForElem
     }
 
     if (node->isPseudoElement()) {
-        if (node->pseudoId() == BEFORE)
+        if (node->pseudoId() == PseudoId::Before)
             elementData->setPseudoElement("before");
-        else if (node->pseudoId() == AFTER)
+        else if (node->pseudoId() == PseudoId::After)
             elementData->setPseudoElement("after");
     }
 
index 3bf3183..67491d9 100644 (file)
@@ -438,7 +438,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString& errorString, int no
 
     Element* originalElement = element;
     PseudoId elementPseudoId = element->pseudoId();
-    if (elementPseudoId) {
+    if (elementPseudoId != PseudoId::None) {
         element = downcast<PseudoElement>(*element).hostElement();
         if (!element) {
             errorString = ASCIILiteral("Pseudo element has no parent");
@@ -455,7 +455,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString& errorString, int no
         // Pseudo elements.
         if (!includePseudo || *includePseudo) {
             auto pseudoElements = JSON::ArrayOf<Inspector::Protocol::CSS::PseudoIdMatches>::create();
-            for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < AFTER_LAST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) {
+            for (PseudoId pseudoId = PseudoId::FirstPublicPseudoId; pseudoId < PseudoId::AfterLastInternalPseudoId; pseudoId = static_cast<PseudoId>(static_cast<unsigned>(pseudoId) + 1)) {
                 auto matchedRules = styleResolver.pseudoStyleRulesForElement(element, pseudoId, StyleResolver::AllCSSRules);
                 if (!matchedRules.isEmpty()) {
                     auto matches = Inspector::Protocol::CSS::PseudoIdMatches::create()
@@ -477,7 +477,7 @@ void InspectorCSSAgent::getMatchedStylesForNode(ErrorString& errorString, int no
                 StyleResolver& parentStyleResolver = parentElement->styleResolver();
                 auto parentMatchedRules = parentStyleResolver.styleRulesForElement(parentElement, StyleResolver::AllCSSRules);
                 auto entry = Inspector::Protocol::CSS::InheritedStyleEntry::create()
-                    .setMatchedCSSRules(buildArrayForMatchedRuleList(parentMatchedRules, styleResolver, *parentElement, NOPSEUDO))
+                    .setMatchedCSSRules(buildArrayForMatchedRuleList(parentMatchedRules, styleResolver, *parentElement, PseudoId::None))
                     .release();
                 if (is<StyledElement>(*parentElement) && downcast<StyledElement>(*parentElement).cssomStyle().length()) {
                     auto& styleSheet = asInspectorStyleSheet(downcast<StyledElement>(*parentElement));
@@ -893,7 +893,7 @@ RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::RuleMatch>> InspectorCSSAgent::bu
     auto result = JSON::ArrayOf<Inspector::Protocol::CSS::RuleMatch>::create();
 
     SelectorChecker::CheckingContext context(SelectorChecker::Mode::CollectingRules);
-    context.pseudoId = pseudoId ? pseudoId : element.pseudoId();
+    context.pseudoId = pseudoId != PseudoId::None ? pseudoId : element.pseudoId();
     SelectorChecker selectorChecker(element.document());
 
     for (auto& matchedRule : matchedRules) {
index 6c87b56..ff84b7a 100644 (file)
@@ -1372,10 +1372,10 @@ static String documentBaseURLString(Document* document)
 static bool pseudoElementType(PseudoId pseudoId, Inspector::Protocol::DOM::PseudoType* type)
 {
     switch (pseudoId) {
-    case BEFORE:
+    case PseudoId::Before:
         *type = Inspector::Protocol::DOM::PseudoType::Before;
         return true;
-    case AFTER:
+    case PseudoId::After:
         *type = Inspector::Protocol::DOM::PseudoType::After;
         return true;
     default:
@@ -1500,7 +1500,7 @@ Ref<Inspector::Protocol::DOM::Node> InspectorDOMAgent::buildObjectForNode(Node*
         if (state != Inspector::Protocol::DOM::CustomElementState::Builtin)
             value->setCustomElementState(state);
 
-        if (element.pseudoId()) {
+        if (element.pseudoId() != PseudoId::None) {
             Inspector::Protocol::DOM::PseudoType pseudoType;
             if (pseudoElementType(element.pseudoId(), &pseudoType))
                 value->setPseudoType(pseudoType);
index 97baccb..b422c83 100644 (file)
@@ -191,9 +191,9 @@ Ref<Inspector::Protocol::LayerTree::Layer> InspectorLayerTreeAgent::buildObjectF
     if (isAnonymous && !renderer->isRenderView()) {
         layerObject->setIsAnonymous(true);
         const RenderStyle& style = renderer->style();
-        if (style.styleType() == FIRST_LETTER)
+        if (style.styleType() == PseudoId::FirstLetter)
             layerObject->setPseudoElement("first-letter");
-        else if (style.styleType() == FIRST_LINE)
+        else if (style.styleType() == PseudoId::FirstLine)
             layerObject->setPseudoElement("first-line");
     }
 
index dd50361..3cd55b0 100644 (file)
@@ -152,28 +152,28 @@ bool Box::isDescendantOf(Container& container) const
 
 bool Box::isInlineBlockBox() const
 {
-    return m_style.display() == INLINE_BLOCK;
+    return m_style.display() == DisplayType::InlineBlock;
 }
 
 bool Box::isBlockLevelBox() const
 {
     // Block level elements generate block level boxes.
     auto display = m_style.display();
-    return display == BLOCK || display == LIST_ITEM || display == TABLE;
+    return display == DisplayType::Block || display == DisplayType::ListItem || display == DisplayType::Table;
 }
 
 bool Box::isInlineLevelBox() const
 {
     // Inline level elements generate inline level boxes.
     auto display = m_style.display();
-    return display == INLINE || display == INLINE_BLOCK || display == INLINE_TABLE;
+    return display == DisplayType::Inline || display == DisplayType::InlineBlock || display == DisplayType::InlineTable;
 }
 
 bool Box::isBlockContainerBox() const
 {
     // Inline level elements generate inline level boxes.
     auto display = m_style.display();
-    return display == BLOCK || display == LIST_ITEM || display == INLINE_BLOCK || display == TABLE_CELL || display == TABLE_CAPTION; // TODO && !replaced element
+    return display == DisplayType::Block || display == DisplayType::ListItem || display == DisplayType::InlineBlock || display == DisplayType::TableCell || display == DisplayType::TableCaption; // TODO && !replaced element
 }
 
 bool Box::isInitialContainingBlock() const
index 8b3c6d1..a4f6331 100644 (file)
@@ -1410,7 +1410,7 @@ std::optional<Cursor> EventHandler::selectCursor(const HitTestResult& result, bo
     const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor();
 
 #if ENABLE(CURSOR_VISIBILITY)
-    if (style && style->cursorVisibility() == CursorVisibilityAutoHide)
+    if (style && style->cursorVisibility() == CursorVisibility::AutoHide)
         startAutoHideCursorTimer();
     else
         cancelAutoHideCursorTimer();
@@ -1473,8 +1473,8 @@ std::optional<Cursor> EventHandler::selectCursor(const HitTestResult& result, bo
         && !m_capturingMouseEventsElement)
         return iBeam;
 
-    switch (style ? style->cursor() : CursorAuto) {
-    case CursorAuto: {
+    switch (style ? style->cursor() : CursorType::Auto) {
+    case CursorType::Auto: {
         bool editable = node->hasEditableStyle();
 
         if (useHandCursor(node, result.isOverLink(), shiftKey))
@@ -1492,75 +1492,75 @@ std::optional<Cursor> EventHandler::selectCursor(const HitTestResult& result, bo
             return iBeam;
         return pointerCursor();
     }
-    case CursorDefault:
+    case CursorType::Default:
         return pointerCursor();
-    case CursorNone:
+    case CursorType::None:
         return noneCursor();
-    case CursorContextMenu:
+    case CursorType::ContextMenu:
         return contextMenuCursor();
-    case CursorHelp:
+    case CursorType::Help:
         return helpCursor();
-    case CursorPointer:
+    case CursorType::Pointer:
         return handCursor();
-    case CursorProgress:
+    case CursorType::Progress:
         return progressCursor();
-    case CursorWait:
+    case CursorType::Wait:
         return waitCursor();
-    case CursorCell:
+    case CursorType::Cell:
         return cellCursor();
-    case CursorCrosshair:
+    case CursorType::Crosshair:
         return crossCursor();
-    case CursorText:
+    case CursorType::Text:
         return iBeamCursor();
-    case CursorVerticalText:
+    case CursorType::VerticalText:
         return verticalTextCursor();
-    case CursorAlias:
+    case CursorType::Alias:
         return aliasCursor();
-    case CursorCopy:
+    case CursorType::Copy:
         return copyCursor();
-    case CursorMove:
+    case CursorType::Move:
         return moveCursor();
-    case CursorNoDrop:
+    case CursorType::NoDrop:
         return noDropCursor();
-    case CursorNotAllowed:
+    case CursorType::NotAllowed:
         return notAllowedCursor();
-    case CursorGrab:
+    case CursorType::Grab:
         return grabCursor();
-    case CursorGrabbing:
+    case CursorType::Grabbing:
         return grabbingCursor();
-    case CursorEResize:
+    case CursorType::EResize:
         return eastResizeCursor();
-    case CursorNResize:
+    case CursorType::NResize:
         return northResizeCursor();
-    case CursorNeResize:
+    case CursorType::NEResize:
         return northEastResizeCursor();
-    case CursorNwResize:
+    case CursorType::NWResize:
         return northWestResizeCursor();
-    case CursorSResize:
+    case CursorType::SResize:
         return southResizeCursor();
-    case CursorSeResize:
+    case CursorType::SEResize:
         return southEastResizeCursor();
-    case CursorSwResize:
+    case CursorType::SWResize:
         return southWestResizeCursor();
-    case CursorWResize:
+    case CursorType::WResize:
         return westResizeCursor();
-    case CursorEwResize:
+    case CursorType::EWResize:
         return eastWestResizeCursor();
-    case CursorNsResize:
+    case CursorType::NSResize:
         return northSouthResizeCursor();
-    case CursorNeswResize:
+    case CursorType::NESWResize:
         return northEastSouthWestResizeCursor();
-    case CursorNwseResize:
+    case CursorType::NWSEResize:
         return northWestSouthEastResizeCursor();
-    case CursorColResize:
+    case CursorType::ColumnResize:
         return columnResizeCursor();
-    case CursorRowResize:
+    case CursorType::RowResize:
         return rowResizeCursor();
-    case CursorAllScroll:
+    case CursorType::AllScroll:
         return moveCursor();
-    case CursorZoomIn:
+    case CursorType::ZoomIn:
         return zoomInCursor();
-    case CursorZoomOut:
+    case CursorType::ZoomOut:
         return zoomOutCursor();
     }
     return pointerCursor();
index 63bf386..2384861 100644 (file)
@@ -384,7 +384,7 @@ String Frame::searchForLabelsAboveCell(const JSC::Yarr::RegularExpression& regEx
         // search within the above cell we found for a match
         size_t lengthSearched = 0;    
         for (Text* textNode = TextNodeTraversal::firstWithin(*aboveCell); textNode; textNode = TextNodeTraversal::next(*textNode, aboveCell)) {
-            if (!textNode->renderer() || textNode->renderer()->style().visibility() != VISIBLE)
+            if (!textNode->renderer() || textNode->renderer()->style().visibility() != Visibility::Visible)
                 continue;
             // For each text chunk, run the regexp
             String nodeString = textNode->data();
@@ -441,7 +441,7 @@ String Frame::searchForLabelsBeforeElement(const Vector<String>& labels, Element
                 return result;
             }
             searchedCellAbove = true;
-        } else if (n->isTextNode() && n->renderer() && n->renderer()->style().visibility() == VISIBLE) {
+        } else if (n->isTextNode() && n->renderer() && n->renderer()->style().visibility() == Visibility::Visible) {
             // For each text chunk, run the regexp
             String nodeString = n->nodeValue();
             // add 100 for slop, to make it more likely that we'll search whole nodes
index 8e0d74b..a3128d7 100644 (file)
@@ -547,17 +547,17 @@ Ref<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
 
     // Try the <body> element first as a scrollbar source.
     HTMLElement* body = doc ? doc->bodyOrFrameset() : nullptr;
-    if (body && body->renderer() && body->renderer()->style().hasPseudoStyle(SCROLLBAR))
+    if (body && body->renderer() && body->renderer()->style().hasPseudoStyle(PseudoId::Scrollbar))
         return RenderScrollbar::createCustomScrollbar(*this, orientation, body);
     
     // If the <body> didn't have a custom style, then the root element might.
     Element* docElement = doc ? doc->documentElement() : nullptr;
-    if (docElement && docElement->renderer() && docElement->renderer()->style().hasPseudoStyle(SCROLLBAR))
+    if (docElement && docElement->renderer() && docElement->renderer()->style().hasPseudoStyle(PseudoId::Scrollbar))
         return RenderScrollbar::createCustomScrollbar(*this, orientation, docElement);
-        
+
     // If we have an owning iframe/frame element, then it can set the custom scrollbar also.
     RenderWidget* frameRenderer = frame().ownerRenderer();
-    if (frameRenderer && frameRenderer->style().hasPseudoStyle(SCROLLBAR))
+    if (frameRenderer && frameRenderer->style().hasPseudoStyle(PseudoId::Scrollbar))
         return RenderScrollbar::createCustomScrollbar(*this, orientation, nullptr, &frame());
     
     // Nobody set a custom style, so we just use a native scrollbar.
@@ -3619,7 +3619,7 @@ float FrameView::adjustScrollStepForFixedContent(float step, ScrollbarOrientatio
     float bottomObscuredArea = 0;
     for (const auto& positionedObject : *positionedObjects) {
         const RenderStyle& style = positionedObject->style();
-        if (style.position() != PositionType::Fixed || style.visibility() == HIDDEN || !style.opacity())
+        if (style.position() != PositionType::Fixed || style.visibility() == Visibility::Hidden || !style.opacity())
             continue;
 
         FloatQuad contentQuad = positionedObject->absoluteContentQuad();
@@ -3828,7 +3828,7 @@ void FrameView::updateScrollCorner()
         Element* body = doc ? doc->bodyOrFrameset() : nullptr;
         if (body && body->renderer()) {
             renderer = body->renderer();
-            cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), &renderer->style());
+            cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::ScrollbarCorner), &renderer->style());
         }
         
         if (!cornerStyle) {
@@ -3836,14 +3836,14 @@ void FrameView::updateScrollCorner()
             Element* docElement = doc ? doc->documentElement() : nullptr;
             if (docElement && docElement->renderer()) {
                 renderer = docElement->renderer();
-                cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), &renderer->style());
+                cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::ScrollbarCorner), &renderer->style());
             }
         }
         
         if (!cornerStyle) {
             // If we have an owning iframe/frame element, then it can set the custom scrollbar also.
             if (RenderWidget* renderer = frame().ownerRenderer())
-                cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), &renderer->style());
+                cornerStyle = renderer->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::ScrollbarCorner), &renderer->style());
         }
     }
 
index 94a61b3..8163d49 100644 (file)
@@ -100,7 +100,7 @@ double AnimationBase::duration() const
 
 bool AnimationBase::playStatePlaying() const
 {
-    return m_animation->playState() == AnimPlayStatePlaying;
+    return m_animation->playState() == AnimationPlayState::Playing;
 }
 
 bool AnimationBase::animationsMatch(const Animation& animation) const
@@ -552,7 +552,7 @@ void AnimationBase::fireAnimationEventsIfNeeded()
     }
 }
 
-void AnimationBase::updatePlayState(EAnimPlayState playState)
+void AnimationBase::updatePlayState(AnimationPlayState playState)
 {
     if (!m_compositeAnimation)
         return;
@@ -560,7 +560,7 @@ void AnimationBase::updatePlayState(EAnimPlayState playState)
     // When we get here, we can have one of 4 desired states: running, paused, suspended, paused & suspended.
     // The state machine can be in one of two states: running, paused.
     // Set the state machine to the desired state.
-    bool pause = playState == AnimPlayStatePaused || m_compositeAnimation->isSuspended();
+    bool pause = playState == AnimationPlayState::Paused || m_compositeAnimation->isSuspended();
 
     if (pause == paused() && !isNew())
         return;
index b4d3743..c07b8b5 100644 (file)
@@ -108,7 +108,7 @@ public:
     }
 
     // Called to change to or from paused state
-    void updatePlayState(EAnimPlayState);
+    void updatePlayState(AnimationPlayState);
     bool playStatePlaying() const;
 
     bool waitingToStart() const { return m_animationState == AnimationState::New || m_animationState == AnimationState::StartWaitTimer || m_animationState == AnimationState::PausedNew; }
index 8820d38..ac16ec5 100644 (file)
@@ -247,16 +247,16 @@ static inline RefPtr<StyleImage> blendFilter(const CSSPropertyBlendingClient* an
     return StyleGeneratedImage::create(WTFMove(result));
 }
 
-static inline EVisibility blendFunc(const CSSPropertyBlendingClient* anim, EVisibility from, EVisibility to, double progress)
+static inline Visibility blendFunc(const CSSPropertyBlendingClient* anim, Visibility from, Visibility to, double progress)
 {
     // Any non-zero result means we consider the object to be visible. Only at 0 do we consider the object to be
-    // invisible. The invisible value we use (HIDDEN vs. COLLAPSE) depends on the specified from/to values.
-    double fromVal = from == VISIBLE ? 1. : 0.;
-    double toVal = to == VISIBLE ? 1. : 0.;
+    // invisible. The invisible value we use (Visibility::Hidden vs. Visibility::Collapse) depends on the specified from/to values.
+    double fromVal = from == Visibility::Visible ? 1. : 0.;
+    double toVal = to == Visibility::Visible ? 1. : 0.;
     if (fromVal == toVal)
         return to;
     double result = blendFunc(anim, fromVal, toVal, progress);
-    return result > 0. ? VISIBLE : (to != VISIBLE ? to : from);
+    return result > 0. ? Visibility::Visible : (to != Visibility::Visible ? to : from);
 }
 
 static inline LengthBox blendFunc(const CSSPropertyBlendingClient* anim, const LengthBox& from, const LengthBox& to, double progress)
@@ -1552,7 +1552,7 @@ CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap()
         new LengthPropertyWrapper<LengthSize>(CSSPropertyBorderTopRightRadius, &RenderStyle::borderTopRightRadius, &RenderStyle::setBorderTopRightRadius),
         new LengthPropertyWrapper<LengthSize>(CSSPropertyBorderBottomLeftRadius, &RenderStyle::borderBottomLeftRadius, &RenderStyle::setBorderBottomLeftRadius),
         new LengthPropertyWrapper<LengthSize>(CSSPropertyBorderBottomRightRadius, &RenderStyle::borderBottomRightRadius, &RenderStyle::setBorderBottomRightRadius),
-        new PropertyWrapper<EVisibility>(CSSPropertyVisibility, &RenderStyle::visibility, &RenderStyle::setVisibility),
+        new PropertyWrapper<Visibility>(CSSPropertyVisibility, &RenderStyle::visibility, &RenderStyle::setVisibility),
         new PropertyWrapper<float>(CSSPropertyZoom, &RenderStyle::zoom, &RenderStyle::setZoomWithoutReturnValue),
 
         new LengthPropertyWrapper<LengthBox>(CSSPropertyClip, &RenderStyle::clip, &RenderStyle::setClip),
index 676fc68..1db6234 100644 (file)
@@ -170,7 +170,7 @@ void CompositeAnimation::updateTransitions(Element& element, const RenderStyle*
                     // Add the new transition
                     auto implicitAnimation = ImplicitAnimation::create(animation, prop, element, *this, modifiedCurrentStyle ? *modifiedCurrentStyle : *fromStyle);
                     if (m_suspended && implicitAnimation->hasStyle())
-                        implicitAnimation->updatePlayState(AnimPlayStatePaused);
+                        implicitAnimation->updatePlayState(AnimationPlayState::Paused);
 
                     LOG(Animations, "Created ImplicitAnimation %p on element %p for property %s duration %.2f delay %.2f", implicitAnimation.ptr(), &element, getPropertyName(prop), animation.duration(), animation.delay());
                     m_transitions.set(prop, WTFMove(implicitAnimation));
@@ -253,7 +253,7 @@ void CompositeAnimation::updateKeyframeAnimations(Element& element, const Render
                 LOG(Animations, "Creating KeyframeAnimation %p on element %p with keyframes %s, duration %.2f, delay %.2f, iterations %.2f", keyframeAnim.get(), &element, animation.name().utf8().data(), animation.duration(), animation.delay(), animation.iterationCount());
 
                 if (m_suspended) {
-                    keyframeAnim->updatePlayState(AnimPlayStatePaused);
+                    keyframeAnim->updatePlayState(AnimationPlayState::Paused);
                     LOG(Animations, "  (created in suspended/paused state)");
                 }
 #if !LOG_DISABLED
@@ -464,13 +464,13 @@ void CompositeAnimation::suspendAnimations()
     if (!m_keyframeAnimations.isEmpty()) {
         m_keyframeAnimations.checkConsistency();
         for (auto& animation : m_keyframeAnimations.values())
-            animation->updatePlayState(AnimPlayStatePaused);
+            animation->updatePlayState(AnimationPlayState::Paused);
     }
 
     if (!m_transitions.isEmpty()) {
         for (auto& transition : m_transitions.values()) {
             if (transition->hasStyle())
-                transition->updatePlayState(AnimPlayStatePaused);
+                transition->updatePlayState(AnimationPlayState::Paused);
         }
     }
 }
@@ -486,14 +486,14 @@ void CompositeAnimation::resumeAnimations()
         m_keyframeAnimations.checkConsistency();
         for (auto& animation : m_keyframeAnimations.values()) {
             if (animation->playStatePlaying())
-                animation->updatePlayState(AnimPlayStatePlaying);
+                animation->updatePlayState(AnimationPlayState::Playing);
         }
     }
 
     if (!m_transitions.isEmpty()) {
         for (auto& transition : m_transitions.values()) {
             if (transition->hasStyle())
-                transition->updatePlayState(AnimPlayStatePlaying);
+                transition->updatePlayState(AnimationPlayState::Playing);
         }
     }
 }
index 73a6f38..d0484de 100644 (file)
@@ -163,9 +163,9 @@ bool KeyframeAnimation::animate(CompositeAnimation& compositeAnimation, const Re
     
     // If we have not yet started, we will not have a valid start time, so just start the animation if needed.
     if (isNew()) {
-        if (m_animation->playState() == AnimPlayStatePlaying && !compositeAnimation.isSuspended())
+        if (m_animation->playState() == AnimationPlayState::Playing && !compositeAnimation.isSuspended())
             updateStateMachine(AnimationStateInput::StartAnimation, -1);
-        else if (m_animation->playState() == AnimPlayStatePaused)
+        else if (m_animation->playState() == AnimationPlayState::Paused)
             updateStateMachine(AnimationStateInput::PlayStatePaused, -1);
     }
 
index 3213c2b..aacad28 100644 (file)
@@ -418,7 +418,7 @@ Node* Frame::nodeRespondingToClickEvents(const FloatPoint& viewportLocation, Flo
                 pointerCursorStillValid = false;
 
             // If we haven't reached the body, and we are still paying attention to pointer cursors, and the node has a pointer cursor...
-            if (pointerCursorStillValid && node->renderStyle() && node->renderStyle()->cursor() == CursorPointer)
+            if (pointerCursorStillValid && node->renderStyle() && node->renderStyle()->cursor() == CursorType::Pointer)
                 pointerCursorNode = node;
             // We want the lowest unbroken chain of pointer cursors.
             else if (pointerCursorNode)
index 3594c12..10fcf88 100644 (file)
@@ -38,8 +38,8 @@ Animation::Animation()
     , m_trigger(initialTrigger())
 #endif
     , m_direction(initialDirection())
-    , m_fillMode(initialFillMode())
-    , m_playState(initialPlayState())
+    , m_fillMode(static_cast<unsigned>(initialFillMode()))
+    , m_playState(static_cast<unsigned>(initialPlayState()))
     , m_delaySet(false)
     , m_directionSet(false)
     , m_durationSet(false)
index f7b0eca..fa4b4cb 100644 (file)
@@ -84,7 +84,7 @@ public:
     void clearFillMode() { m_fillModeSet = false; }
     void clearIterationCount() { m_iterationCountSet = false; }
     void clearName() { m_nameSet = false; }
-    void clearPlayState() { m_playStateSet = AnimPlayStatePlaying; }
+    void clearPlayState() { m_playStateSet = false; }
     void clearProperty() { m_propertySet = false; }
     void clearTimingFunction() { m_timingFunctionSet = false; }
 #if ENABLE(CSS_ANIMATIONS_LEVEL_2)
@@ -109,7 +109,12 @@ public:
 
     double delay() const { return m_delay; }
 
-    enum AnimationMode { AnimateAll, AnimateNone, AnimateSingleProperty, AnimateUnknownProperty };
+    enum AnimationMode {
+        AnimateAll,
+        AnimateNone,
+        AnimateSingleProperty,
+        AnimateUnknownProperty
+    };
 
     enum AnimationDirection {
         AnimationDirectionNormal,
@@ -117,10 +122,11 @@ public:
         AnimationDirectionReverse,
         AnimationDirectionAlternateReverse
     };
+
     AnimationDirection direction() const { return static_cast<AnimationDirection>(m_direction); }
     bool directionIsForwards() const { return m_direction == AnimationDirectionNormal || m_direction == AnimationDirectionAlternate; }
 
-    unsigned fillMode() const { return m_fillMode; }
+    AnimationFillMode fillMode() const { return static_cast<AnimationFillMode>(m_fillMode); }
 
     double duration() const { return m_duration; }
 
@@ -128,7 +134,7 @@ public:
     double iterationCount() const { return m_iterationCount; }
     const String& name() const { return m_name; }
     Style::ScopeOrdinal nameStyleScopeOrdinal() const { return m_nameStyleScopeOrdinal; }
-    EAnimPlayState playState() const { return static_cast<EAnimPlayState>(m_playState); }
+    AnimationPlayState playState() const { return static_cast<AnimationPlayState>(m_playState); }
     CSSPropertyID property() const { return m_property; }
     const String& unknownProperty() const { return m_unknownProperty; }
     TimingFunction* timingFunction() const { return m_timingFunction.get(); }
@@ -140,7 +146,7 @@ public:
     void setDelay(double c) { m_delay = c; m_delaySet = true; }
     void setDirection(AnimationDirection d) { m_direction = d; m_directionSet = true; }
     void setDuration(double d) { ASSERT(d >= 0); m_duration = d; m_durationSet = true; }
-    void setFillMode(unsigned f) { m_fillMode = f; m_fillModeSet = true; }
+    void setFillMode(AnimationFillMode f) { m_fillMode = static_cast<unsigned>(f); m_fillModeSet = true; }
     void setIterationCount(double c) { m_iterationCount = c; m_iterationCountSet = true; }
     void setName(const String& name, Style::ScopeOrdinal scope = Style::ScopeOrdinal::Element)
     {
@@ -148,7 +154,7 @@ public:
         m_nameStyleScopeOrdinal = scope;
         m_nameSet = true;
     }
-    void setPlayState(EAnimPlayState d) { m_playState = d; m_playStateSet = true; }
+    void setPlayState(AnimationPlayState d) { m_playState = static_cast<unsigned>(d); m_playStateSet = true; }
     void setProperty(CSSPropertyID t) { m_property = t; m_propertySet = true; }
     void setUnknownProperty(const String& property) { m_unknownProperty = property; }
     void setTimingFunction(RefPtr<TimingFunction>&& function) { m_timingFunction = WTFMove(function); m_timingFunctionSet = true; }
@@ -168,8 +174,8 @@ public:
     bool operator==(const Animation& o) const { return animationsMatch(o); }
     bool operator!=(const Animation& o) const { return !(*this == o); }
 
-    bool fillsBackwards() const { return m_fillModeSet && (m_fillMode == AnimationFillModeBackwards || m_fillMode == AnimationFillModeBoth); }
-    bool fillsForwards() const { return m_fillModeSet && (m_fillMode == AnimationFillModeForwards || m_fillMode == AnimationFillModeBoth); }
+    bool fillsBackwards() const { return m_fillModeSet && (fillMode() == AnimationFillMode::Backwards || fillMode() == AnimationFillMode::Both);&n