WebKit Bugzilla
Attachment 341130 Details for
Bug 185901
: Modernize RenderStyleConstants.h - Part 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185901-20180523143045.patch (text/plain), 657.54 KB, created by
Sam Weinig
on 2018-05-23 14:30:46 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sam Weinig
Created:
2018-05-23 14:30:46 PDT
Size:
657.54 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 232123) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,803 @@ >+2018-05-22 Sam Weinig <sam@webkit.org> >+ >+ Modernize RenderStyleConstants.h - Part 2 >+ https://bugs.webkit.org/show_bug.cgi?id=185901 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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): >+ * accessibility/AccessibilityTable.cpp: >+ (WebCore::AccessibilityTable::isDataTable const): >+ * 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/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-23 Chris Dumez <cdumez@apple.com> > > RenderLayer::scrollRectToVisible() should not propagate a subframe's scroll to its cross-origin parent >Index: Source/WebCore/accessibility/AXObjectCache.cpp >=================================================================== >--- Source/WebCore/accessibility/AXObjectCache.cpp (revision 232123) >+++ Source/WebCore/accessibility/AXObjectCache.cpp (working copy) >@@ -286,7 +286,7 @@ bool AXObjectCache::isNodeVisible(Node* > 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: Source/WebCore/accessibility/AccessibilityList.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityList.cpp (revision 232123) >+++ Source/WebCore/accessibility/AccessibilityList.cpp (working copy) >@@ -163,7 +163,7 @@ AccessibilityRole AccessibilityList::det > > // 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: Source/WebCore/accessibility/AccessibilityMediaControls.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityMediaControls.cpp (revision 232123) >+++ Source/WebCore/accessibility/AccessibilityMediaControls.cpp (working copy) >@@ -176,7 +176,7 @@ String AccessibilityMediaControl::helpTe > > 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> AccessibilityMe > > 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: Source/WebCore/accessibility/AccessibilityObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityObject.cpp (revision 232123) >+++ Source/WebCore/accessibility/AccessibilityObject.cpp (working copy) >@@ -3275,7 +3275,7 @@ bool AccessibilityObject::isDOMHidden() > 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: Source/WebCore/accessibility/AccessibilityRenderObject.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityRenderObject.cpp (revision 232123) >+++ Source/WebCore/accessibility/AccessibilityRenderObject.cpp (working copy) >@@ -1144,7 +1144,7 @@ AccessibilityObjectInclusion Accessibili > 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::isUnvisi > 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::isVisite > 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) >Index: Source/WebCore/accessibility/AccessibilityTable.cpp >=================================================================== >--- Source/WebCore/accessibility/AccessibilityTable.cpp (revision 232123) >+++ Source/WebCore/accessibility/AccessibilityTable.cpp (working copy) >@@ -262,7 +262,7 @@ bool AccessibilityTable::isDataTable() c > 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: Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp >=================================================================== >--- Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (revision 232123) >+++ Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (working copy) >@@ -143,22 +143,22 @@ static AtkAttributeSet* getAttributeSetF > } > > 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"); > } > >Index: Source/WebCore/animation/AnimationTimeline.cpp >=================================================================== >--- Source/WebCore/animation/AnimationTimeline.cpp (revision 232123) >+++ Source/WebCore/animation/AnimationTimeline.cpp (working copy) >@@ -144,7 +144,7 @@ void AnimationTimeline::updateCSSAnimati > 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::updateCSSTransit > 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: Source/WebCore/animation/CSSAnimation.cpp >=================================================================== >--- Source/WebCore/animation/CSSAnimation.cpp (revision 232123) >+++ Source/WebCore/animation/CSSAnimation.cpp (working copy) >@@ -55,16 +55,16 @@ void CSSAnimation::syncPropertiesWithBac > 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::syncPropertiesWithBac > 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: Source/WebCore/animation/DeclarativeAnimation.cpp >=================================================================== >--- Source/WebCore/animation/DeclarativeAnimation.cpp (revision 232123) >+++ Source/WebCore/animation/DeclarativeAnimation.cpp (working copy) >@@ -67,7 +67,7 @@ void DeclarativeAnimation::initialize(co > setTimeline(&target.document().timeline()); > downcast<KeyframeEffectReadOnly>(effect())->computeDeclarativeAnimationBlendingKeyframes(oldStyle, newStyle); > syncPropertiesWithBackingAnimation(); >- if (backingAnimation().playState() == AnimPlayStatePlaying) >+ if (backingAnimation().playState() == AnimationPlayState::Playing) > play(); > else > pause(); >Index: Source/WebCore/animation/KeyframeEffectReadOnly.cpp >=================================================================== >--- Source/WebCore/animation/KeyframeEffectReadOnly.cpp (revision 232123) >+++ Source/WebCore/animation/KeyframeEffectReadOnly.cpp (working copy) >@@ -1265,16 +1265,16 @@ Ref<const Animation> KeyframeEffectReadO > 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: Source/WebCore/css/CSSComputedStyleDeclaration.cpp >=================================================================== >--- Source/WebCore/css/CSSComputedStyleDeclaration.cpp (revision 232123) >+++ Source/WebCore/css/CSSComputedStyleDeclaration.cpp (working copy) >@@ -1780,15 +1780,15 @@ static Ref<CSSValue> renderTextDecoratio > 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 positionOffsetValueIsRendere > > 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::styledE > 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* compute > 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( > > 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: > 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: > 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: > 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: > 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: > 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: > 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: > 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: > 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: Source/WebCore/css/CSSComputedStyleDeclaration.h >=================================================================== >--- Source/WebCore/css/CSSComputedStyleDeclaration.h (revision 232123) >+++ Source/WebCore/css/CSSComputedStyleDeclaration.h (working copy) >@@ -51,8 +51,8 @@ enum AdjustPixelValuesForComputedStyle { > > 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: Source/WebCore/css/CSSPrimitiveValueMappings.h >=================================================================== >--- Source/WebCore/css/CSSPrimitiveValueMappings.h (revision 232123) >+++ Source/WebCore/css/CSSPrimitiveValueMappings.h (working copy) >@@ -1073,45 +1073,45 @@ template<> inline CSSPrimitiveValue::ope > 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::ope > 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::CSS > { > 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::ope > 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; >+ return DisplayType::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; >+ 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::ope > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::ope > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::ope > > 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::ope > 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::ope > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::ope > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::ope > > 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::CSS > { > 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::ope > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > > 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::CSS > { > 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::ope > { > 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::ope > > 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::CSS > { > 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: Source/WebCore/css/CSSSelector.cpp >=================================================================== >--- Source/WebCore/css/CSSSelector.cpp (revision 232123) >+++ Source/WebCore/css/CSSSelector.cpp (working copy) >@@ -270,31 +270,31 @@ PseudoId CSSSelector::pseudoId(PseudoEle > { > 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(PseudoEle > 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: Source/WebCore/css/CSSToStyleMap.cpp >=================================================================== >--- Source/WebCore/css/CSSToStyleMap.cpp (revision 232123) >+++ Source/WebCore/css/CSSToStyleMap.cpp (working copy) >@@ -363,16 +363,16 @@ void CSSToStyleMap::mapAnimationFillMode > > 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::mapAnimationPlayStat > 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: Source/WebCore/css/CSSValueKeywords.in >=================================================================== >--- Source/WebCore/css/CSSValueKeywords.in (revision 232123) >+++ Source/WebCore/css/CSSValueKeywords.in (working copy) >@@ -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: Source/WebCore/css/ElementRuleCollector.cpp >=================================================================== >--- Source/WebCore/css/ElementRuleCollector.cpp (revision 232123) >+++ Source/WebCore/css/ElementRuleCollector.cpp (working copy) >@@ -140,7 +140,7 @@ inline void ElementRuleCollector::addEle > 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::ruleMa > // 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::ruleMa > 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::collectMatchi > 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: Source/WebCore/css/ElementRuleCollector.h >=================================================================== >--- Source/WebCore/css/ElementRuleCollector.h (revision 232123) >+++ Source/WebCore/css/ElementRuleCollector.h (working copy) >@@ -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: Source/WebCore/css/SelectorChecker.cpp >=================================================================== >--- Source/WebCore/css/SelectorChecker.cpp (revision 232123) >+++ Source/WebCore/css/SelectorChecker.cpp (working copy) >@@ -185,15 +185,15 @@ bool SelectorChecker::match(const CSSSel > 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::matchHostPseudoCla > 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::matchHostPseudoCla > > 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 SelectorChe > 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 SelectorChe > > 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 SelectorChe > // 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: Source/WebCore/css/SelectorChecker.h >=================================================================== >--- Source/WebCore/css/SelectorChecker.h (revision 232123) >+++ Source/WebCore/css/SelectorChecker.h (working copy) >@@ -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: Source/WebCore/css/StyleBuilderConverter.h >=================================================================== >--- Source/WebCore/css/StyleBuilderConverter.h (revision 232123) >+++ Source/WebCore/css/StyleBuilderConverter.h (working copy) >@@ -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 StyleBuilder > 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: > 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> StyleBu > 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> StyleBu > || 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> StyleBuilderCo > 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> StyleBuilderCo > 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::creat > 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 StyleBuilderConverte > 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 StyleBuilderConverte > { > 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 > { > auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > if (primitiveValue.valueID() == CSSValueAvoid) >- return AvoidPageBreakInside; >+ return BreakInside::AvoidPage; > return primitiveValue; > } > >@@ -1486,9 +1486,9 @@ inline BreakBetween StyleBuilderConverte > { > 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 > { > auto& primitiveValue = downcast<CSSPrimitiveValue>(value); > if (primitiveValue.valueID() == CSSValueAvoid) >- return AvoidColumnBreakInside; >+ return BreakInside::AvoidColumn; > return primitiveValue; > } > >Index: Source/WebCore/css/StyleBuilderCustom.h >=================================================================== >--- Source/WebCore/css/StyleBuilderCustom.h (revision 232123) >+++ Source/WebCore/css/StyleBuilderCustom.h (working copy) >@@ -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::applyVal > 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 computeBaseSpecified > { > 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::applyVal > { > 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::applyVal > styleResolver.setFontDescription(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::applyVal > > 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::applyVal > > 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::applyVal > { > 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::applyVal > 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::applyVal > 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::smaller > > 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(S > 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: Source/WebCore/css/StyleResolver.cpp >=================================================================== >--- Source/WebCore/css/StyleResolver.cpp (revision 232123) >+++ Source/WebCore/css/StyleResolver.cpp (working copy) >@@ -359,11 +359,11 @@ ElementStyle StyleResolver::styleForElem > > 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(RenderSt > } > } > >-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(c > // 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(Overflo > 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(R > { > 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::adjustSVGElementStyl > > // 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(Re > // 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(Re > // 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(Re > // 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(Re > > // 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(Re > 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(Re > > // 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(Re > 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 isCacheableInMatchedProperti > 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::applyMatchedProperti > // 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:: > 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: Source/WebCore/css/StyleResolver.h >=================================================================== >--- Source/WebCore/css/StyleResolver.h (revision 232123) >+++ Source/WebCore/css/StyleResolver.h (working copy) >@@ -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: Source/WebCore/cssjit/SelectorCompiler.cpp >=================================================================== >--- Source/WebCore/cssjit/SelectorCompiler.cpp (revision 232123) >+++ Source/WebCore/cssjit/SelectorCompiler.cpp (working copy) >@@ -960,7 +960,7 @@ static FunctionType constructFragmentsIn > 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::generateRequ > 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::generateMark > > 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::generateMark > } > > // 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: Source/WebCore/dom/Document.cpp >=================================================================== >--- Source/WebCore/dom/Document.cpp (revision 232123) >+++ Source/WebCore/dom/Document.cpp (working copy) >@@ -2006,8 +2006,8 @@ void Document::updateLayoutIgnorePending > 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::s > 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 page > { > 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: Source/WebCore/dom/Document.h >=================================================================== >--- Source/WebCore/dom/Document.h (revision 232123) >+++ Source/WebCore/dom/Document.h (working copy) >@@ -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: Source/WebCore/dom/Element.cpp >=================================================================== >--- Source/WebCore/dom/Element.cpp (revision 232123) >+++ Source/WebCore/dom/Element.cpp (working copy) >@@ -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::imageSource > > 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::willBecomeFullscreenElemen > 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::computedStyl > if (!style) > style = &resolveComputedStyle(); > >- if (pseudoElementSpecifier) { >+ if (pseudoElementSpecifier != PseudoId::None) { > if (auto* cachedPseudoStyle = style->getCachedPseudoStyle(pseudoElementSpecifier)) > return cachedPseudoStyle; > return &resolvePseudoElementStyle(pseudoElementSpecifier); >Index: Source/WebCore/dom/Element.h >=================================================================== >--- Source/WebCore/dom/Element.h (revision 232123) >+++ Source/WebCore/dom/Element.h (working copy) >@@ -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: Source/WebCore/dom/Node.cpp >=================================================================== >--- Source/WebCore/dom/Node.cpp (revision 232123) >+++ Source/WebCore/dom/Node.cpp (working copy) >@@ -680,7 +680,7 @@ static Node::Editability computeEditabil > 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: Source/WebCore/dom/Node.h >=================================================================== >--- Source/WebCore/dom/Node.h (revision 232123) >+++ Source/WebCore/dom/Node.h (working copy) >@@ -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: Source/WebCore/dom/Position.cpp >=================================================================== >--- Source/WebCore/dom/Position.cpp (revision 232123) >+++ Source/WebCore/dom/Position.cpp (working copy) >@@ -685,7 +685,7 @@ Position Position::upstream(EditingBound > > // 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(EditingBou > > // 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::rendersInDifferentPositio > 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: Source/WebCore/dom/PositionIterator.cpp >=================================================================== >--- Source/WebCore/dom/PositionIterator.cpp (revision 232123) >+++ Source/WebCore/dom/PositionIterator.cpp (working copy) >@@ -152,7 +152,7 @@ bool PositionIterator::isCandidate() con > if (!renderer) > return false; > >- if (renderer->style().visibility() != VISIBLE) >+ if (renderer->style().visibility() != Visibility::Visible) > return false; > > if (renderer->isBR()) >Index: Source/WebCore/dom/PseudoElement.cpp >=================================================================== >--- Source/WebCore/dom/PseudoElement.cpp (revision 232123) >+++ Source/WebCore/dom/PseudoElement.cpp (working copy) >@@ -54,9 +54,9 @@ String PseudoElement::pseudoElementNameF > 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& ho > , m_hostElement(&host) > , m_pseudoId(pseudoId) > { >- ASSERT(pseudoId == BEFORE || pseudoId == AFTER); >+ ASSERT(pseudoId == PseudoId::Before || pseudoId == PseudoId::After); > setHasCustomStyleResolveCallbacks(); > } > >Index: Source/WebCore/dom/VisitedLinkState.cpp >=================================================================== >--- Source/WebCore/dom/VisitedLinkState.cpp (revision 232123) >+++ Source/WebCore/dom/VisitedLinkState.cpp (working copy) >@@ -85,18 +85,18 @@ void VisitedLinkState::invalidateStyleFo > } > } > >-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::determineL > 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: Source/WebCore/dom/VisitedLinkState.h >=================================================================== >--- Source/WebCore/dom/VisitedLinkState.h (revision 232123) >+++ Source/WebCore/dom/VisitedLinkState.h (working copy) >@@ -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: Source/WebCore/editing/Editing.cpp >=================================================================== >--- Source/WebCore/editing/Editing.cpp (revision 232123) >+++ Source/WebCore/editing/Editing.cpp (working copy) >@@ -456,7 +456,7 @@ static bool isSpecialHTMLElement(const N > 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(Docume > 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: Source/WebCore/editing/TextIterator.cpp >=================================================================== >--- Source/WebCore/editing/TextIterator.cpp (revision 232123) >+++ Source/WebCore/editing/TextIterator.cpp (working copy) >@@ -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* firstRenderTex > 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::shouldRepresentNodeOf > // 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::ad > 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: Source/WebCore/editing/VisibleUnits.cpp >=================================================================== >--- Source/WebCore/editing/VisibleUnits.cpp (revision 232123) >+++ Source/WebCore/editing/VisibleUnits.cpp (working copy) >@@ -1181,7 +1181,7 @@ Node* findStartOfParagraph(Node* startNo > 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 > continue; > } > const RenderStyle& style = r->style(); >- if (style.visibility() != VISIBLE) { >+ if (style.visibility() != Visibility::Visible) { > n = NodeTraversal::next(*n, stayInsideBlock); > continue; > } >Index: Source/WebCore/editing/ios/EditorIOS.mm >=================================================================== >--- Source/WebCore/editing/ios/EditorIOS.mm (revision 232123) >+++ Source/WebCore/editing/ios/EditorIOS.mm (working copy) >@@ -92,37 +92,36 @@ void Editor::setTextAlignmentForChangedB > 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: Source/WebCore/html/HTMLAreaElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLAreaElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLAreaElement.cpp (working copy) >@@ -210,7 +210,7 @@ bool HTMLAreaElement::isMouseFocusable() > 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: Source/WebCore/html/HTMLFormElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLFormElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLFormElement.cpp (working copy) >@@ -116,11 +116,11 @@ bool HTMLFormElement::rendererIsNeeded(c > 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: Source/WebCore/html/HTMLIFrameElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLIFrameElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLIFrameElement.cpp (working copy) >@@ -104,7 +104,7 @@ void HTMLIFrameElement::parseAttribute(c > > 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: Source/WebCore/html/HTMLInputElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLInputElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLInputElement.cpp (working copy) >@@ -2060,13 +2060,13 @@ RenderStyle HTMLInputElement::createInne > 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: Source/WebCore/html/HTMLOptGroupElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLOptGroupElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLOptGroupElement.cpp (working copy) >@@ -63,7 +63,7 @@ bool HTMLOptGroupElement::isFocusable() > 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: Source/WebCore/html/HTMLOptionElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLOptionElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLOptionElement.cpp (working copy) >@@ -93,7 +93,7 @@ bool HTMLOptionElement::isFocusable() co > 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: Source/WebCore/html/HTMLTextAreaElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLTextAreaElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLTextAreaElement.cpp (working copy) >@@ -551,7 +551,7 @@ RenderStyle HTMLTextAreaElement::createI > 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: Source/WebCore/html/HTMLTextFormControlElement.cpp >=================================================================== >--- Source/WebCore/html/HTMLTextFormControlElement.cpp (revision 232123) >+++ Source/WebCore/html/HTMLTextFormControlElement.cpp (working copy) >@@ -304,7 +304,7 @@ void HTMLTextFormControlElement::setSele > 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::adjustI > // (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: Source/WebCore/html/MediaElementSession.cpp >=================================================================== >--- Source/WebCore/html/MediaElementSession.cpp (revision 232123) >+++ Source/WebCore/html/MediaElementSession.cpp (working copy) >@@ -329,7 +329,7 @@ bool MediaElementSession::autoplayPermit > 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 isMainContentForPurposesOfAu > // 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: Source/WebCore/html/RubyElement.cpp >=================================================================== >--- Source/WebCore/html/RubyElement.cpp (revision 232123) >+++ Source/WebCore/html/RubyElement.cpp (working copy) >@@ -53,9 +53,9 @@ Ref<RubyElement> RubyElement::create(Doc > > 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: Source/WebCore/html/RubyTextElement.cpp >=================================================================== >--- Source/WebCore/html/RubyTextElement.cpp (revision 232123) >+++ Source/WebCore/html/RubyTextElement.cpp (working copy) >@@ -56,7 +56,7 @@ Ref<RubyTextElement> RubyTextElement::cr > 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: Source/WebCore/html/shadow/TextControlInnerElements.cpp >=================================================================== >--- Source/WebCore/html/shadow/TextControlInnerElements.cpp (revision 232123) >+++ Source/WebCore/html/shadow/TextControlInnerElements.cpp (working copy) >@@ -108,7 +108,7 @@ std::optional<ElementStyle> TextControlI > 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> TextControlP > 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: Source/WebCore/inspector/InspectorOverlay.cpp >=================================================================== >--- Source/WebCore/inspector/InspectorOverlay.cpp (revision 232123) >+++ Source/WebCore/inspector/InspectorOverlay.cpp (working copy) >@@ -586,9 +586,9 @@ static RefPtr<Inspector::Protocol::Overl > } > > 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: Source/WebCore/inspector/agents/InspectorCSSAgent.cpp >=================================================================== >--- Source/WebCore/inspector/agents/InspectorCSSAgent.cpp (revision 232123) >+++ Source/WebCore/inspector/agents/InspectorCSSAgent.cpp (working copy) >@@ -438,7 +438,7 @@ void InspectorCSSAgent::getMatchedStyles > > 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::getMatchedStyles > // 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::getMatchedStyles > 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 > 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: Source/WebCore/inspector/agents/InspectorDOMAgent.cpp >=================================================================== >--- Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (revision 232123) >+++ Source/WebCore/inspector/agents/InspectorDOMAgent.cpp (working copy) >@@ -1372,10 +1372,10 @@ static String documentBaseURLString(Docu > 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> Insp > 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: Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp >=================================================================== >--- Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp (revision 232123) >+++ Source/WebCore/inspector/agents/InspectorLayerTreeAgent.cpp (working copy) >@@ -191,9 +191,9 @@ Ref<Inspector::Protocol::LayerTree::Laye > 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: Source/WebCore/layout/layouttree/LayoutBox.cpp >=================================================================== >--- Source/WebCore/layout/layouttree/LayoutBox.cpp (revision 232123) >+++ Source/WebCore/layout/layouttree/LayoutBox.cpp (working copy) >@@ -152,28 +152,28 @@ bool Box::isDescendantOf(Container& cont > > 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: Source/WebCore/page/EventHandler.cpp >=================================================================== >--- Source/WebCore/page/EventHandler.cpp (revision 232123) >+++ Source/WebCore/page/EventHandler.cpp (working copy) >@@ -1410,7 +1410,7 @@ std::optional<Cursor> EventHandler::sele > 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::sele > && !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::sele > 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: Source/WebCore/page/Frame.cpp >=================================================================== >--- Source/WebCore/page/Frame.cpp (revision 232123) >+++ Source/WebCore/page/Frame.cpp (working copy) >@@ -384,7 +384,7 @@ String Frame::searchForLabelsAboveCell(c > // 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::searchForLabelsBeforeEleme > 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: Source/WebCore/page/FrameView.cpp >=================================================================== >--- Source/WebCore/page/FrameView.cpp (revision 232123) >+++ Source/WebCore/page/FrameView.cpp (working copy) >@@ -547,17 +547,17 @@ Ref<Scrollbar> FrameView::createScrollba > > // 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::adjustScrollStepForFixe > 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: Source/WebCore/page/animation/AnimationBase.cpp >=================================================================== >--- Source/WebCore/page/animation/AnimationBase.cpp (revision 232123) >+++ Source/WebCore/page/animation/AnimationBase.cpp (working copy) >@@ -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::fireAnimationEventsI > } > } > >-void AnimationBase::updatePlayState(EAnimPlayState playState) >+void AnimationBase::updatePlayState(AnimationPlayState playState) > { > if (!m_compositeAnimation) > return; >@@ -560,7 +560,7 @@ void AnimationBase::updatePlayState(EAni > // 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: Source/WebCore/page/animation/AnimationBase.h >=================================================================== >--- Source/WebCore/page/animation/AnimationBase.h (revision 232123) >+++ Source/WebCore/page/animation/AnimationBase.h (working copy) >@@ -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: Source/WebCore/page/animation/CSSPropertyAnimation.cpp >=================================================================== >--- Source/WebCore/page/animation/CSSPropertyAnimation.cpp (revision 232123) >+++ Source/WebCore/page/animation/CSSPropertyAnimation.cpp (working copy) >@@ -247,16 +247,16 @@ static inline RefPtr<StyleImage> blendFi > 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::CSSPrope > 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: Source/WebCore/page/animation/CompositeAnimation.cpp >=================================================================== >--- Source/WebCore/page/animation/CompositeAnimation.cpp (revision 232123) >+++ Source/WebCore/page/animation/CompositeAnimation.cpp (working copy) >@@ -170,7 +170,7 @@ void CompositeAnimation::updateTransitio > // 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::updateKeyframeA > 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::suspendAnimatio > 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::resumeAnimation > 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: Source/WebCore/page/animation/KeyframeAnimation.cpp >=================================================================== >--- Source/WebCore/page/animation/KeyframeAnimation.cpp (revision 232123) >+++ Source/WebCore/page/animation/KeyframeAnimation.cpp (working copy) >@@ -163,9 +163,9 @@ bool KeyframeAnimation::animate(Composit > > // 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: Source/WebCore/page/ios/FrameIOS.mm >=================================================================== >--- Source/WebCore/page/ios/FrameIOS.mm (revision 232123) >+++ Source/WebCore/page/ios/FrameIOS.mm (working copy) >@@ -418,7 +418,7 @@ Node* Frame::nodeRespondingToClickEvents > 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: Source/WebCore/platform/animation/Animation.cpp >=================================================================== >--- Source/WebCore/platform/animation/Animation.cpp (revision 232123) >+++ Source/WebCore/platform/animation/Animation.cpp (working copy) >@@ -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: Source/WebCore/platform/animation/Animation.h >=================================================================== >--- Source/WebCore/platform/animation/Animation.h (revision 232123) >+++ Source/WebCore/platform/animation/Animation.h (working copy) >@@ -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); } >+ bool fillsForwards() const { return m_fillModeSet && (fillMode() == AnimationFillMode::Forwards || fillMode() == AnimationFillMode::Both); } > > private: > WEBCORE_EXPORT Animation(); >@@ -212,10 +218,10 @@ public: > static double initialDelay() { return 0; } > static AnimationDirection initialDirection() { return AnimationDirectionNormal; } > static double initialDuration() { return 0; } >- static unsigned initialFillMode() { return AnimationFillModeNone; } >+ static AnimationFillMode initialFillMode() { return AnimationFillMode::None; } > static double initialIterationCount() { return 1.0; } > static const String& initialName(); >- static EAnimPlayState initialPlayState() { return AnimPlayStatePlaying; } >+ static AnimationPlayState initialPlayState() { return AnimationPlayState::Playing; } > static CSSPropertyID initialProperty() { return CSSPropertyInvalid; } > static Ref<TimingFunction> initialTimingFunction() { return CubicBezierTimingFunction::create(); } > #if ENABLE(CSS_ANIMATIONS_LEVEL_2) >Index: Source/WebCore/platform/graphics/GraphicsTypes.h >=================================================================== >--- Source/WebCore/platform/graphics/GraphicsTypes.h (revision 232123) >+++ Source/WebCore/platform/graphics/GraphicsTypes.h (working copy) >@@ -86,15 +86,40 @@ enum InterpolationQuality { > InterpolationHigh > }; > >-enum LineCap { ButtCap, RoundCap, SquareCap }; >+enum LineCap { >+ ButtCap, >+ RoundCap, >+ SquareCap >+}; > >-enum LineJoin { MiterJoin, RoundJoin, BevelJoin }; >+enum LineJoin { >+ MiterJoin, >+ RoundJoin, >+ BevelJoin >+}; > >-enum HorizontalAlignment { AlignLeft, AlignRight, AlignHCenter }; >+enum HorizontalAlignment { >+ AlignLeft, >+ AlignRight, >+ AlignHCenter >+}; > >-enum TextBaseline { AlphabeticTextBaseline, TopTextBaseline, MiddleTextBaseline, BottomTextBaseline, IdeographicTextBaseline, HangingTextBaseline }; >+enum TextBaseline { >+ AlphabeticTextBaseline, >+ TopTextBaseline, >+ MiddleTextBaseline, >+ BottomTextBaseline, >+ IdeographicTextBaseline, >+ HangingTextBaseline >+}; > >-enum TextAlign { StartTextAlign, EndTextAlign, LeftTextAlign, CenterTextAlign, RightTextAlign }; >+enum TextAlign { >+ StartTextAlign, >+ EndTextAlign, >+ LeftTextAlign, >+ CenterTextAlign, >+ RightTextAlign >+}; > > enum RenderingMode { > Unaccelerated, >@@ -112,12 +137,6 @@ String blendModeName(BlendMode); > bool parseBlendMode(const String&, BlendMode&); > bool parseCompositeAndBlendOperator(const String&, CompositeOperator&, BlendMode&); > >-String textAlignName(TextAlign); >-bool parseTextAlign(const String&, TextAlign&); >- >-String textBaselineName(TextBaseline); >-bool parseTextBaseline(const String&, TextBaseline&); >- > WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, BlendMode); > WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, CompositeOperator); > WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, WindRule); >Index: Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >=================================================================== >--- Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (revision 232123) >+++ Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (working copy) >@@ -3187,16 +3187,16 @@ void GraphicsLayerCA::setupAnimation(Pla > > PlatformCAAnimation::FillModeType fillMode = PlatformCAAnimation::NoFillMode; > switch (anim->fillMode()) { >- case AnimationFillModeNone: >+ case AnimationFillMode::None: > fillMode = PlatformCAAnimation::Forwards; // Use "forwards" rather than "removed" because the style system will remove the animation when it is finished. This avoids a flash. > break; >- case AnimationFillModeBackwards: >+ case AnimationFillMode::Backwards: > fillMode = PlatformCAAnimation::Both; // Use "both" rather than "backwards" because the style system will remove the animation when it is finished. This avoids a flash. > break; >- case AnimationFillModeForwards: >+ case AnimationFillMode::Forwards: > fillMode = PlatformCAAnimation::Forwards; > break; >- case AnimationFillModeBoth: >+ case AnimationFillMode::Both: > fillMode = PlatformCAAnimation::Both; > break; > } >Index: Source/WebCore/platform/ios/wak/WAKWindow.mm >=================================================================== >--- Source/WebCore/platform/ios/wak/WAKWindow.mm (revision 232123) >+++ Source/WebCore/platform/ios/wak/WAKWindow.mm (working copy) >@@ -682,7 +682,7 @@ - (void)dumpTiles > CGRect savedFrozenVisibleRect = _frozenVisibleRect; > NSLog(@"================="); > if (!CGRectIsNull(_frozenVisibleRect)) { >- NSLog(@"VISIBLE RECT IS CACHED: [%6.1f %6.1f %6.1f %6.1f]", _frozenVisibleRect.origin.x, _frozenVisibleRect.origin.y, _frozenVisibleRect.size.width, _frozenVisibleRect.size.height); >+ NSLog(@"Visibility::Visible RECT IS CACHED: [%6.1f %6.1f %6.1f %6.1f]", _frozenVisibleRect.origin.x, _frozenVisibleRect.origin.y, _frozenVisibleRect.size.width, _frozenVisibleRect.size.height); > _frozenVisibleRect = CGRectNull; > } > CGRect visibleRect = [self visibleRect]; >Index: Source/WebCore/platform/mac/WebCoreNSURLExtras.mm >=================================================================== >--- Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (revision 232123) >+++ Source/WebCore/platform/mac/WebCoreNSURLExtras.mm (working copy) >@@ -177,8 +177,8 @@ static BOOL isLookalikeCharacter(std::op > case 0x233F: /* APL FUNCTIONAL SYMBOL SLASH BAR */ > case 0x23AE: /* INTEGRAL EXTENSION */ > case 0x244A: /* OCR DOUBLE BACKSLASH */ >- case 0x2571: /* BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT */ >- case 0x2572: /* BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT */ >+ case 0x2571: /* DisplayType::Box DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT */ >+ case 0x2572: /* DisplayType::Box DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT */ > case 0x29F6: /* SOLIDUS WITH OVERBAR */ > case 0x29F8: /* BIG SOLIDUS */ > case 0x2AFB: /* TRIPLE SOLIDUS BINARY RELATION */ >Index: Source/WebCore/rendering/ClipPathOperation.h >=================================================================== >--- Source/WebCore/rendering/ClipPathOperation.h (revision 232123) >+++ Source/WebCore/rendering/ClipPathOperation.h (working copy) >@@ -120,7 +120,7 @@ private: > explicit ShapeClipPathOperation(Ref<BasicShape>&& shape) > : ClipPathOperation(Shape) > , m_shape(WTFMove(shape)) >- , m_referenceBox(BoxMissing) >+ , m_referenceBox(CSSBoxType::BoxMissing) > { > } > >Index: Source/WebCore/rendering/InlineBox.h >=================================================================== >--- Source/WebCore/rendering/InlineBox.h (revision 232123) >+++ Source/WebCore/rendering/InlineBox.h (working copy) >@@ -241,7 +241,7 @@ public: > void invalidateParentChildList(); > #endif > >- bool visibleToHitTesting() const { return renderer().style().visibility() == VISIBLE && renderer().style().pointerEvents() != PE_NONE; } >+ bool visibleToHitTesting() const { return renderer().style().visibility() == Visibility::Visible && renderer().style().pointerEvents() != PointerEvents::None; } > > const RenderStyle& lineStyle() const { return m_bitfields.firstLine() ? renderer().firstLineStyle() : renderer().style(); } > >Index: Source/WebCore/rendering/InlineFlowBox.cpp >=================================================================== >--- Source/WebCore/rendering/InlineFlowBox.cpp (revision 232123) >+++ Source/WebCore/rendering/InlineFlowBox.cpp (working copy) >@@ -129,7 +129,7 @@ void InlineFlowBox::addToLine(InlineBox* > || (parentStyle.verticalAlign() != VerticalAlign::Baseline && !isRootInlineBox()) || childStyle.verticalAlign() != VerticalAlign::Baseline) > shouldClearDescendantsHaveSameLineHeightAndBaseline = true; > } >- if (childStyle.hasTextCombine() || childStyle.textEmphasisMark() != TextEmphasisMarkNone) >+ if (childStyle.hasTextCombine() || childStyle.textEmphasisMark() != TextEmphasisMark::None) > shouldClearDescendantsHaveSameLineHeightAndBaseline = true; > } else { > if (child->renderer().isLineBreak()) { >@@ -156,7 +156,7 @@ void InlineFlowBox::addToLine(InlineBox* > const RenderStyle& childStyle = child->lineStyle(); > if (child->behavesLikeText()) { > const RenderStyle* childStyle = &child->lineStyle(); >- if (childStyle->letterSpacing() < 0 || childStyle->textShadow() || childStyle->textEmphasisMark() != TextEmphasisMarkNone || childStyle->hasPositiveStrokeWidth()) >+ if (childStyle->letterSpacing() < 0 || childStyle->textShadow() || childStyle->textEmphasisMark() != TextEmphasisMark::None || childStyle->hasPositiveStrokeWidth()) > child->clearKnownToHaveNoOverflow(); > } else if (child->renderer().isReplaced()) { > const RenderBox& box = downcast<RenderBox>(child->renderer()); >@@ -684,7 +684,7 @@ void InlineFlowBox::placeBoxesInBlockDir > // Treat the leading on the first and last lines of ruby runs as not being part of the overall lineTop/lineBottom. > // Really this is a workaround hack for the fact that ruby should have been done as line layout and not done using > // inline-block. >- if (renderer().style().isFlippedLinesWritingMode() == (child->renderer().style().rubyPosition() == RubyPositionAfter)) >+ if (renderer().style().isFlippedLinesWritingMode() == (child->renderer().style().rubyPosition() == RubyPosition::After)) > hasAnnotationsBefore = true; > else > hasAnnotationsAfter = true; >@@ -895,7 +895,7 @@ inline void InlineFlowBox::addTextBoxVis > int rightGlyphOverflow = strokeOverflow + rightGlyphEdge; > > bool emphasisMarkIsAbove; >- if (lineStyle.textEmphasisMark() != TextEmphasisMarkNone && textBox.emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkIsAbove)) { >+ if (lineStyle.textEmphasisMark() != TextEmphasisMark::None && textBox.emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkIsAbove)) { > int emphasisMarkHeight = lineStyle.fontCascade().emphasisMarkHeight(lineStyle.textEmphasisMarkString()); > if (emphasisMarkIsAbove == !lineStyle.isFlippedLinesWritingMode()) > topGlyphOverflow = std::min(topGlyphOverflow, -emphasisMarkHeight); >@@ -1155,7 +1155,7 @@ void InlineFlowBox::paint(PaintInfo& pai > if (paintInfo.phase == PaintPhaseOutline || paintInfo.phase == PaintPhaseSelfOutline) { > // Add ourselves to the paint info struct's list of inlines that need to paint their > // outlines. >- if (renderer().style().visibility() == VISIBLE && renderer().hasOutline() && !isRootInlineBox()) { >+ if (renderer().style().visibility() == Visibility::Visible && renderer().hasOutline() && !isRootInlineBox()) { > RenderInline& inlineFlow = downcast<RenderInline>(renderer()); > > RenderBlock* containingBlock = nullptr; >@@ -1335,7 +1335,7 @@ static LayoutRect clipRectForNinePieceIm > > void InlineFlowBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground) >+ if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseForeground) > return; > > LayoutRect frameRect(this->frameRect()); >@@ -1407,7 +1407,7 @@ void InlineFlowBox::paintBoxDecorations( > > void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) >+ if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseMask) > return; > > LayoutRect frameRect(this->frameRect()); >@@ -1552,7 +1552,7 @@ LayoutUnit InlineFlowBox::computeOverAnn > if (is<InlineFlowBox>(*child)) > result = std::max(result, downcast<InlineFlowBox>(*child).computeOverAnnotationAdjustment(allowedPosition)); > >- if (child->renderer().isReplaced() && is<RenderRubyRun>(child->renderer()) && child->renderer().style().rubyPosition() == RubyPositionBefore) { >+ if (child->renderer().isReplaced() && is<RenderRubyRun>(child->renderer()) && child->renderer().style().rubyPosition() == RubyPosition::Before) { > auto& rubyRun = downcast<RenderRubyRun>(child->renderer()); > RenderRubyText* rubyText = rubyRun.rubyText(); > if (!rubyText) >@@ -1576,7 +1576,7 @@ LayoutUnit InlineFlowBox::computeOverAnn > if (is<InlineTextBox>(*child)) { > const RenderStyle& childLineStyle = child->lineStyle(); > bool emphasisMarkIsAbove; >- if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove) && emphasisMarkIsAbove) { >+ if (childLineStyle.textEmphasisMark() != TextEmphasisMark::None && downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove) && emphasisMarkIsAbove) { > if (!childLineStyle.isFlippedLinesWritingMode()) { > int topOfEmphasisMark = child->logicalTop() - childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString()); > result = std::max(result, allowedPosition - topOfEmphasisMark); >@@ -1600,7 +1600,7 @@ LayoutUnit InlineFlowBox::computeUnderAn > if (is<InlineFlowBox>(*child)) > result = std::max(result, downcast<InlineFlowBox>(*child).computeUnderAnnotationAdjustment(allowedPosition)); > >- if (child->renderer().isReplaced() && is<RenderRubyRun>(child->renderer()) && child->renderer().style().rubyPosition() == RubyPositionAfter) { >+ if (child->renderer().isReplaced() && is<RenderRubyRun>(child->renderer()) && child->renderer().style().rubyPosition() == RubyPosition::After) { > auto& rubyRun = downcast<RenderRubyRun>(child->renderer()); > RenderRubyText* rubyText = rubyRun.rubyText(); > if (!rubyText) >@@ -1625,7 +1625,7 @@ LayoutUnit InlineFlowBox::computeUnderAn > const RenderStyle& childLineStyle = child->lineStyle(); > bool emphasisMarkIsAbove; > downcast<InlineTextBox>(*child).emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove); >- if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone && !emphasisMarkIsAbove) { >+ if (childLineStyle.textEmphasisMark() != TextEmphasisMark::None && !emphasisMarkIsAbove) { > if (!childLineStyle.isFlippedLinesWritingMode()) { > LayoutUnit bottomOfEmphasisMark = child->logicalBottom() + childLineStyle.fontCascade().emphasisMarkHeight(childLineStyle.textEmphasisMarkString()); > result = std::max(result, bottomOfEmphasisMark - allowedPosition); >@@ -1655,7 +1655,7 @@ void InlineFlowBox::collectLeafBoxesInLo > leafBoxesInLogicalOrder.append(leaf); > } > >- if (renderer().style().rtlOrdering() == VisualOrder) >+ if (renderer().style().rtlOrdering() == Order::Visual) > return; > > // Reverse of reordering of the line (L2 according to Bidi spec): >Index: Source/WebCore/rendering/InlineFlowBox.h >=================================================================== >--- Source/WebCore/rendering/InlineFlowBox.h (revision 232123) >+++ Source/WebCore/rendering/InlineFlowBox.h (working copy) >@@ -62,7 +62,7 @@ public: > // an invisible marker exists. The side effect of having an invisible marker is that the quirks mode behavior of shrinking lines with no > // text children must not apply. This change also means that gaps will exist between image bullet list items. Even when the list bullet > // is an image, the line is still considered to be immune from the quirk. >- m_hasTextChildren = renderer.style().display() == LIST_ITEM; >+ m_hasTextChildren = renderer.style().display() == DisplayType::ListItem; > m_hasTextDescendants = m_hasTextChildren; > } > >Index: Source/WebCore/rendering/InlineTextBox.cpp >=================================================================== >--- Source/WebCore/rendering/InlineTextBox.cpp (revision 232123) >+++ Source/WebCore/rendering/InlineTextBox.cpp (working copy) >@@ -361,7 +361,7 @@ static inline bool emphasisPositionHasNe > bool InlineTextBox::emphasisMarkExistsAndIsAbove(const RenderStyle& style, bool& above) const > { > // This function returns true if there are text emphasis marks and they are suppressed by ruby text. >- if (style.textEmphasisMark() == TextEmphasisMarkNone) >+ if (style.textEmphasisMark() == TextEmphasisMark::None) > return false; > > TextEmphasisPosition emphasisPosition = style.textEmphasisPosition(); >@@ -434,7 +434,7 @@ static MarkedText createMarkedTextFromSe > > void InlineTextBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit /*lineTop*/, LayoutUnit /*lineBottom*/) > { >- if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != VISIBLE >+ if (isLineBreak() || !paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != Visibility::Visible > || m_truncation == cFullTruncation || paintInfo.phase == PaintPhaseOutline || !m_len) > return; > >@@ -1235,7 +1235,7 @@ float InlineTextBox::positionForOffset(u > TextRun InlineTextBox::createTextRun(bool ignoreCombinedText, bool ignoreHyphen) const > { > const auto& style = lineStyle(); >- TextRun textRun { text(ignoreCombinedText, ignoreHyphen), textPos(), expansion(), expansionBehavior(), direction(), dirOverride() || style.rtlOrdering() == VisualOrder, !renderer().canUseSimpleFontCodePath() }; >+ TextRun textRun { text(ignoreCombinedText, ignoreHyphen), textPos(), expansion(), expansionBehavior(), direction(), dirOverride() || style.rtlOrdering() == Order::Visual, !renderer().canUseSimpleFontCodePath() }; > textRun.setTabSize(!style.collapseWhiteSpace(), style.tabSize()); > return textRun; > } >Index: Source/WebCore/rendering/PointerEventsHitRules.cpp >=================================================================== >--- Source/WebCore/rendering/PointerEventsHitRules.cpp (revision 232123) >+++ Source/WebCore/rendering/PointerEventsHitRules.cpp (working copy) >@@ -22,7 +22,7 @@ > > namespace WebCore { > >-PointerEventsHitRules::PointerEventsHitRules(EHitTesting hitTesting, const HitTestRequest& request, EPointerEvents pointerEvents) >+PointerEventsHitRules::PointerEventsHitRules(EHitTesting hitTesting, const HitTestRequest& request, PointerEvents pointerEvents) > : requireVisible(false) > , requireFill(false) > , requireStroke(false) >@@ -30,78 +30,78 @@ PointerEventsHitRules::PointerEventsHitR > , canHitFill(false) > { > if (request.svgClipContent()) >- pointerEvents = PE_FILL; >+ pointerEvents = PointerEvents::Fill; > > if (hitTesting == SVG_PATH_HITTESTING) { > switch (pointerEvents) > { >- case PE_VISIBLE_PAINTED: >- case PE_AUTO: // "auto" is like "visiblePainted" when in SVG content >+ case PointerEvents::VisiblePainted: >+ case PointerEvents::Auto: // "auto" is like "visiblePainted" when in SVG content > requireFill = true; > requireStroke = true; > FALLTHROUGH; >- case PE_VISIBLE: >+ case PointerEvents::Visible: > requireVisible = true; > canHitFill = true; > canHitStroke = true; > break; >- case PE_VISIBLE_FILL: >+ case PointerEvents::VisibleFill: > requireVisible = true; > canHitFill = true; > break; >- case PE_VISIBLE_STROKE: >+ case PointerEvents::VisibleStroke: > requireVisible = true; > canHitStroke = true; > break; >- case PE_PAINTED: >+ case PointerEvents::Painted: > requireFill = true; > requireStroke = true; > FALLTHROUGH; >- case PE_ALL: >+ case PointerEvents::All: > canHitFill = true; > canHitStroke = true; > break; >- case PE_FILL: >+ case PointerEvents::Fill: > canHitFill = true; > break; >- case PE_STROKE: >+ case PointerEvents::Stroke: > canHitStroke = true; > break; >- case PE_NONE: >+ case PointerEvents::None: > // nothing to do here, defaults are all false. > break; > } > } else { > switch (pointerEvents) > { >- case PE_VISIBLE_PAINTED: >- case PE_AUTO: // "auto" is like "visiblePainted" when in SVG content >+ case PointerEvents::VisiblePainted: >+ case PointerEvents::Auto: // "auto" is like "visiblePainted" when in SVG content > requireVisible = true; > requireFill = true; > requireStroke = true; > canHitFill = true; > canHitStroke = true; > break; >- case PE_VISIBLE_FILL: >- case PE_VISIBLE_STROKE: >- case PE_VISIBLE: >+ case PointerEvents::VisibleFill: >+ case PointerEvents::VisibleStroke: >+ case PointerEvents::Visible: > requireVisible = true; > canHitFill = true; > canHitStroke = true; > break; >- case PE_PAINTED: >+ case PointerEvents::Painted: > requireFill = true; > requireStroke = true; > canHitFill = true; > canHitStroke = true; > break; >- case PE_FILL: >- case PE_STROKE: >- case PE_ALL: >+ case PointerEvents::Fill: >+ case PointerEvents::Stroke: >+ case PointerEvents::All: > canHitFill = true; > canHitStroke = true; > break; >- case PE_NONE: >+ case PointerEvents::None: > // nothing to do here, defaults are all false. > break; > } >Index: Source/WebCore/rendering/PointerEventsHitRules.h >=================================================================== >--- Source/WebCore/rendering/PointerEventsHitRules.h (revision 232123) >+++ Source/WebCore/rendering/PointerEventsHitRules.h (working copy) >@@ -32,7 +32,7 @@ public: > SVG_TEXT_HITTESTING > }; > >- PointerEventsHitRules(EHitTesting, const HitTestRequest&, EPointerEvents); >+ PointerEventsHitRules(EHitTesting, const HitTestRequest&, PointerEvents); > > bool requireVisible; > bool requireFill; >Index: Source/WebCore/rendering/RenderBlock.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlock.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderBlock.cpp (working copy) >@@ -760,7 +760,7 @@ LayoutUnit RenderBlock::computeStartPosi > > LayoutUnit startOff = startOffsetForLineInFragment(blockOffset, DoNotIndentText, fragment, logicalHeightForChild(child)); > >- if (style().textAlign() != WEBKIT_CENTER && !child.style().marginStartUsing(&style()).isAuto()) { >+ if (style().textAlign() != TextAlignMode::WebKitCenter && !child.style().marginStartUsing(&style()).isAuto()) { > if (childMarginStart < 0) > startOff += childMarginStart; > newPosition = std::max(newPosition, startOff); // Let the float sit in the child's margin if it can fit. >@@ -1109,7 +1109,7 @@ void RenderBlock::paint(PaintInfo& paint > // z-index. We paint after we painted the background/border, so that the scrollbars will > // sit above the background/border. > if ((phase == PaintPhaseBlockBackground || phase == PaintPhaseChildBlockBackground) && hasOverflowClip() && layer() >- && style().visibility() == VISIBLE && paintInfo.shouldPaintWithinRoot(*this) && !paintInfo.paintRootBackgroundOnly()) >+ && style().visibility() == Visibility::Visible && paintInfo.shouldPaintWithinRoot(*this) && !paintInfo.paintRootBackgroundOnly()) > layer()->paintOverflowControls(paintInfo.context(), roundedIntPoint(adjustedPaintOffset), snappedIntRect(paintInfo.rect)); > } > >@@ -1219,7 +1219,7 @@ void RenderBlock::paintObject(PaintInfo& > PaintPhase paintPhase = paintInfo.phase; > > // 1. paint background, borders etc >- if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style().visibility() == VISIBLE) { >+ if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style().visibility() == Visibility::Visible) { > if (hasVisibleBoxDecorations()) > paintBoxDecorations(paintInfo, paintOffset); > } >@@ -1228,12 +1228,12 @@ void RenderBlock::paintObject(PaintInfo& > if (paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground || paintPhase == PaintPhaseSelection) > paintExcludedChildrenInBorder(paintInfo, paintOffset); > >- if (paintPhase == PaintPhaseMask && style().visibility() == VISIBLE) { >+ if (paintPhase == PaintPhaseMask && style().visibility() == Visibility::Visible) { > paintMask(paintInfo, paintOffset); > return; > } > >- if (paintPhase == PaintPhaseClippingMask && style().visibility() == VISIBLE) { >+ if (paintPhase == PaintPhaseClippingMask && style().visibility() == Visibility::Visible) { > paintClippingMask(paintInfo, paintOffset); > return; > } >@@ -1249,7 +1249,7 @@ void RenderBlock::paintObject(PaintInfo& > // Column rules need to account for scrolling and clipping. > // FIXME: Clipping of column rules does not work. We will need a separate paint phase for column rules I suspect in order to get > // clipping correct (since it has to paint as background but is still considered "contents"). >- if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style().visibility() == VISIBLE) >+ if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && style().visibility() == Visibility::Visible) > paintColumnRules(paintInfo, scrolledOffset); > > // Done with backgrounds, borders and column rules. >@@ -1271,13 +1271,13 @@ void RenderBlock::paintObject(PaintInfo& > paintFloats(paintInfo, scrolledOffset, paintPhase == PaintPhaseSelection || paintPhase == PaintPhaseTextClip); > > // 5. paint outline. >- if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style().visibility() == VISIBLE) >+ if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style().visibility() == Visibility::Visible) > paintOutline(paintInfo, LayoutRect(paintOffset, size())); > > // 6. paint continuation outlines. > if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseChildOutlines)) { > RenderInline* inlineCont = inlineContinuation(); >- if (inlineCont && inlineCont->hasOutline() && inlineCont->style().visibility() == VISIBLE) { >+ if (inlineCont && inlineCont->hasOutline() && inlineCont->style().visibility() == Visibility::Visible) { > RenderInline* inlineRenderer = downcast<RenderInline>(inlineCont->element()->renderer()); > RenderBlock* containingBlock = this->containingBlock(); > >@@ -1373,7 +1373,7 @@ bool RenderBlock::shouldPaintSelectionGa > if (settings().selectionPaintingWithoutSelectionGapsEnabled()) > return false; > >- return selectionState() != SelectionNone && style().visibility() == VISIBLE && isSelectionRoot(); >+ return selectionState() != SelectionNone && style().visibility() == Visibility::Visible && isSelectionRoot(); > } > > bool RenderBlock::isSelectionRoot() const >@@ -1866,7 +1866,7 @@ LayoutUnit RenderBlock::adjustLogicalLef > if (applyTextIndent && style().isLeftToRightDirection()) > left += textIndentOffset(); > >- if (style().lineAlign() == LineAlignNone) >+ if (style().lineAlign() == LineAlign::None) > return left; > > // Push in our left offset so that it is aligned with the character grid. >@@ -1906,7 +1906,7 @@ LayoutUnit RenderBlock::adjustLogicalRig > if (applyTextIndent && !style().isLeftToRightDirection()) > right -= textIndentOffset(); > >- if (style().lineAlign() == LineAlignNone) >+ if (style().lineAlign() == LineAlign::None) > return right; > > // Push in our right offset so that it is aligned with the character grid. >@@ -2134,7 +2134,7 @@ VisiblePosition RenderBlock::positionFor > > static inline bool isChildHitTestCandidate(const RenderBox& box) > { >- return box.height() && box.style().visibility() == VISIBLE && !box.isOutOfFlowPositioned() && !box.isInFlowRenderFragmentedFlow(); >+ return box.height() && box.style().visibility() == Visibility::Visible && !box.isOutOfFlowPositioned() && !box.isInFlowRenderFragmentedFlow(); > } > > // Valid candidates in a FragmentedFlow must be rendered by the fragment. >@@ -2258,7 +2258,7 @@ void RenderBlock::computePreferredLogica > void RenderBlock::computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const > { > const RenderStyle& styleToUse = style(); >- bool nowrap = styleToUse.whiteSpace() == NOWRAP; >+ bool nowrap = styleToUse.whiteSpace() == WhiteSpace::NoWrap; > > RenderObject* child = firstChild(); > RenderBlock* containingBlock = this->containingBlock(); >@@ -2550,7 +2550,7 @@ RenderBlock* RenderBlock::firstLineBlock > RenderBlock* firstLineBlock = const_cast<RenderBlock*>(this); > bool hasPseudo = false; > while (true) { >- hasPseudo = firstLineBlock->style().hasPseudoStyle(FIRST_LINE); >+ hasPseudo = firstLineBlock->style().hasPseudoStyle(PseudoId::FirstLine); > if (hasPseudo) > break; > RenderElement* parentBlock = firstLineBlock->parent(); >@@ -2570,7 +2570,7 @@ static inline RenderBlock* findFirstLett > { > RenderBlock* firstLetterBlock = start; > while (true) { >- bool canHaveFirstLetterRenderer = firstLetterBlock->style().hasPseudoStyle(FIRST_LETTER) >+ bool canHaveFirstLetterRenderer = firstLetterBlock->style().hasPseudoStyle(PseudoId::FirstLetter) > && firstLetterBlock->canHaveGeneratedChildren() > && isRenderBlockFlowOrRenderButton(*firstLetterBlock); > if (canHaveFirstLetterRenderer) >@@ -2595,7 +2595,7 @@ void RenderBlock::getFirstLetter(RenderO > return; > > // Don't recur >- if (style().styleType() == FIRST_LETTER) >+ if (style().styleType() == PseudoId::FirstLetter) > return; > > // FIXME: We need to destroy the first-letter object if it is no longer the first child. Need to find >@@ -2620,7 +2620,7 @@ void RenderBlock::getFirstLetter(RenderO > if (is<RenderListMarker>(current)) > firstLetter = current.nextSibling(); > else if (current.isFloatingOrOutOfFlowPositioned()) { >- if (current.style().styleType() == FIRST_LETTER) { >+ if (current.style().styleType() == PseudoId::FirstLetter) { > firstLetter = current.firstChild(); > break; > } >@@ -2629,7 +2629,7 @@ void RenderBlock::getFirstLetter(RenderO > break; > else if (current.isFlexibleBoxIncludingDeprecated() || current.isRenderGrid()) > firstLetter = current.nextSibling(); >- else if (current.style().hasPseudoStyle(FIRST_LETTER) && current.canHaveGeneratedChildren()) { >+ else if (current.style().hasPseudoStyle(PseudoId::FirstLetter) && current.canHaveGeneratedChildren()) { > // We found a lower-level node with first-letter, which supersedes the higher-level style > firstLetterContainer = ¤t; > firstLetter = current.firstChild(); >@@ -2868,14 +2868,14 @@ void RenderBlock::addFocusRingRects(Vect > inlineContinuation->addFocusRingRects(rects, flooredLayoutPoint(LayoutPoint(additionalOffset + inlineContinuation->containingBlock()->location() - location())), paintContainer); > } > >-RenderPtr<RenderBlock> RenderBlock::createAnonymousBlockWithStyleAndDisplay(Document& document, const RenderStyle& style, EDisplay display) >+RenderPtr<RenderBlock> RenderBlock::createAnonymousBlockWithStyleAndDisplay(Document& document, const RenderStyle& style, DisplayType display) > { > // FIXME: Do we need to convert all our inline displays to block-type in the anonymous logic ? > RenderPtr<RenderBlock> newBox; >- if (display == FLEX || display == INLINE_FLEX) >- newBox = createRenderer<RenderFlexibleBox>(document, RenderStyle::createAnonymousStyleWithDisplay(style, FLEX)); >+ if (display == DisplayType::Flex || display == DisplayType::InlineFlex) >+ newBox = createRenderer<RenderFlexibleBox>(document, RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::Flex)); > else >- newBox = createRenderer<RenderBlockFlow>(document, RenderStyle::createAnonymousStyleWithDisplay(style, BLOCK)); >+ newBox = createRenderer<RenderBlockFlow>(document, RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::Block)); > > newBox->initializeStyle(); > return newBox; >@@ -2930,9 +2930,9 @@ bool RenderBlock::childBoxIsUnsplittable > RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow(); > bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks(); > bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->pageLogicalHeight(); >- return child.isUnsplittableForPagination() || child.style().breakInside() == AvoidBreakInside >- || (checkColumnBreaks && child.style().breakInside() == AvoidColumnBreakInside) >- || (checkPageBreaks && child.style().breakInside() == AvoidPageBreakInside); >+ return child.isUnsplittableForPagination() || child.style().breakInside() == BreakInside::Avoid >+ || (checkColumnBreaks && child.style().breakInside() == BreakInside::AvoidColumn) >+ || (checkPageBreaks && child.style().breakInside() == BreakInside::AvoidPage); > } > > void RenderBlock::computeFragmentRangeForBoxChild(const RenderBox& box) const >@@ -3096,7 +3096,7 @@ const char* RenderBlock::renderName() co > TextRun RenderBlock::constructTextRun(StringView stringView, const RenderStyle& style, ExpansionBehavior expansion, TextRunFlags flags) > { > TextDirection textDirection = LTR; >- bool directionalOverride = style.rtlOrdering() == VisualOrder; >+ bool directionalOverride = style.rtlOrdering() == Order::Visual; > if (flags != DefaultTextRunFlags) { > if (flags & RespectDirection) > textDirection = style.direction(); >@@ -3231,10 +3231,10 @@ void RenderBlock::layoutExcludedChildren > LayoutUnit logicalLeft; > if (style().isLeftToRightDirection()) { > switch (legend.style().textAlign()) { >- case CENTER: >+ case TextAlignMode::Center: > logicalLeft = (logicalWidth() - logicalWidthForChild(legend)) / 2; > break; >- case RIGHT: >+ case TextAlignMode::Right: > logicalLeft = logicalWidth() - borderEnd() - paddingEnd() - logicalWidthForChild(legend); > break; > default: >@@ -3243,10 +3243,10 @@ void RenderBlock::layoutExcludedChildren > } > } else { > switch (legend.style().textAlign()) { >- case LEFT: >+ case TextAlignMode::Left: > logicalLeft = borderStart() + paddingStart(); > break; >- case CENTER: { >+ case TextAlignMode::Center: { > // Make sure that the extra pixel goes to the end side in RTL (since it went to the end side > // in LTR). > LayoutUnit centeredWidth = logicalWidth() - logicalWidthForChild(legend); >Index: Source/WebCore/rendering/RenderBlock.h >=================================================================== >--- Source/WebCore/rendering/RenderBlock.h (revision 232123) >+++ Source/WebCore/rendering/RenderBlock.h (working copy) >@@ -186,8 +186,8 @@ public: > void addContinuationWithOutline(RenderInline*); > bool paintsContinuationOutline(RenderInline*); > >- static RenderPtr<RenderBlock> createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, EDisplay = BLOCK); >- RenderPtr<RenderBlock> createAnonymousBlock(EDisplay = BLOCK) const; >+ static RenderPtr<RenderBlock> createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, DisplayType = DisplayType::Block); >+ RenderPtr<RenderBlock> createAnonymousBlock(DisplayType = DisplayType::Block) const; > > RenderPtr<RenderBox> createAnonymousBoxWithSameTypeAs(const RenderBox&) const override; > >@@ -418,7 +418,7 @@ protected: > void blockWillBeDestroyed(); > > private: >- static RenderPtr<RenderBlock> createAnonymousBlockWithStyleAndDisplay(Document&, const RenderStyle&, EDisplay); >+ static RenderPtr<RenderBlock> createAnonymousBlockWithStyleAndDisplay(Document&, const RenderStyle&, DisplayType); > > // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow > virtual LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit, LayoutUnit fixedOffset, LayoutUnit) const { return fixedOffset; }; >@@ -525,7 +525,7 @@ LayoutUnit blockDirectionOffset(RenderBl > LayoutUnit inlineDirectionOffset(RenderBlock& rootBlock, const LayoutSize& offsetFromRootBlock); > VisiblePosition positionForPointRespectingEditingBoundaries(RenderBlock&, RenderBox&, const LayoutPoint&); > >-inline RenderPtr<RenderBlock> RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, EDisplay display) >+inline RenderPtr<RenderBlock> RenderBlock::createAnonymousWithParentRendererAndDisplay(const RenderBox& parent, DisplayType display) > { > return createAnonymousBlockWithStyleAndDisplay(parent.document(), parent.style(), display); > } >@@ -535,7 +535,7 @@ inline RenderPtr<RenderBox> RenderBlock: > return createAnonymousBlockWithStyleAndDisplay(document(), renderer.style(), style().display()); > } > >-inline RenderPtr<RenderBlock> RenderBlock::createAnonymousBlock(EDisplay display) const >+inline RenderPtr<RenderBlock> RenderBlock::createAnonymousBlock(DisplayType display) const > { > return createAnonymousBlockWithStyleAndDisplay(document(), style(), display); > } >Index: Source/WebCore/rendering/RenderBlockFlow.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlockFlow.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderBlockFlow.cpp (working copy) >@@ -418,7 +418,7 @@ bool RenderBlockFlow::willCreateColumns( > if (!firstChild()) > return false; > >- if (style().styleType() != NOPSEUDO) >+ if (style().styleType() != PseudoId::None) > return false; > > // If overflow-y is set to paged-x or paged-y on the body or html element, we'll handle the paginating in the RenderView instead. >@@ -568,7 +568,7 @@ void RenderBlockFlow::layoutBlock(bool r > // FIXME: This repaint logic should be moved into a separate helper function! > // Repaint with our new bounds if they are different from our old bounds. > bool didFullRepaint = repainter.repaintAfterLayout(); >- if (!didFullRepaint && repaintLogicalTop != repaintLogicalBottom && (styleToUse.visibility() == VISIBLE || enclosingLayer()->hasVisibleContent())) { >+ if (!didFullRepaint && repaintLogicalTop != repaintLogicalBottom && (styleToUse.visibility() == Visibility::Visible || enclosingLayer()->hasVisibleContent())) { > // FIXME: We could tighten up the left and right invalidation points if we let layoutInlineChildren fill them in based off the particular lines > // it had to lay out. We wouldn't need the hasOverflowClip() hack in that case either. > LayoutUnit repaintLogicalLeft = logicalLeftVisualOverflow(); >@@ -1501,7 +1501,7 @@ LayoutUnit RenderBlockFlow::applyBeforeB > bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks(); > bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->pageLogicalHeight(); // FIXME: Once columns can print we have to check this. > bool checkFragmentBreaks = false; >- bool checkBeforeAlways = (checkColumnBreaks && child.style().breakBefore() == ColumnBreakBetween) >+ bool checkBeforeAlways = (checkColumnBreaks && child.style().breakBefore() == BreakBetween::Column) > || (checkPageBreaks && alwaysPageBreak(child.style().breakBefore())); > if (checkBeforeAlways && inNormalFlow(child) && hasNextPage(logicalOffset, IncludePageBoundary)) { > if (checkColumnBreaks) { >@@ -1526,7 +1526,7 @@ LayoutUnit RenderBlockFlow::applyAfterBr > bool checkColumnBreaks = fragmentedFlow && fragmentedFlow->shouldCheckColumnBreaks(); > bool checkPageBreaks = !checkColumnBreaks && view().frameView().layoutContext().layoutState()->pageLogicalHeight(); // FIXME: Once columns can print we have to check this. > bool checkFragmentBreaks = false; >- bool checkAfterAlways = (checkColumnBreaks && child.style().breakAfter() == ColumnBreakBetween) >+ bool checkAfterAlways = (checkColumnBreaks && child.style().breakAfter() == BreakBetween::Column) > || (checkPageBreaks && alwaysPageBreak(child.style().breakAfter())); > if (checkAfterAlways && inNormalFlow(child) && hasNextPage(logicalOffset, IncludePageBoundary)) { > LayoutUnit marginOffset = marginInfo.canCollapseWithMarginBefore() ? LayoutUnit() : marginInfo.margin(); >@@ -1854,7 +1854,7 @@ LayoutUnit RenderBlockFlow::adjustForUns > if (!hasUniformPageLogicalHeight && !pushToNextPageWithMinimumLogicalHeight(remainingLogicalHeight, logicalOffset, childLogicalHeight)) > return logicalOffset; > auto result = logicalOffset + remainingLogicalHeight; >- bool isInitialLetter = child.isFloating() && child.style().styleType() == FIRST_LETTER && child.style().initialLetterDrop() > 0; >+ bool isInitialLetter = child.isFloating() && child.style().styleType() == PseudoId::FirstLetter && child.style().initialLetterDrop() > 0; > if (isInitialLetter) { > // Increase our logical height to ensure that lines all get pushed along with the letter. > setLogicalHeight(logicalOffset + remainingLogicalHeight); >@@ -2035,7 +2035,7 @@ void RenderBlockFlow::styleDidChange(Sty > void RenderBlockFlow::updateStylesForColumnChildren() > { > for (auto* child = firstChildBox(); child && (child->isInFlowRenderFragmentedFlow() || child->isRenderMultiColumnSet()); child = child->nextSiblingBox()) >- child->setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK)); >+ child->setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), DisplayType::Block)); > } > > void RenderBlockFlow::styleWillChange(StyleDifference diff, const RenderStyle& newStyle) >@@ -2345,7 +2345,7 @@ void RenderBlockFlow::computeLogicalLoca > LayoutUnit floatLogicalLeft; > > bool insideFragmentedFlow = enclosingFragmentedFlow(); >- bool isInitialLetter = childBox.style().styleType() == FIRST_LETTER && childBox.style().initialLetterDrop() > 0; >+ bool isInitialLetter = childBox.style().styleType() == PseudoId::FirstLetter && childBox.style().initialLetterDrop() > 0; > > if (isInitialLetter) { > int letterClearance = lowestInitialLetterLogicalBottom() - logicalTopOffset; >@@ -2615,7 +2615,7 @@ LayoutUnit RenderBlockFlow::lowestInitia > auto end = floatingObjectSet.end(); > for (auto it = floatingObjectSet.begin(); it != end; ++it) { > const auto& floatingObject = *it->get(); >- if (floatingObject.isPlaced() && floatingObject.renderer().style().styleType() == FIRST_LETTER && floatingObject.renderer().style().initialLetterDrop() > 0) >+ if (floatingObject.isPlaced() && floatingObject.renderer().style().styleType() == PseudoId::FirstLetter && floatingObject.renderer().style().initialLetterDrop() > 0) > lowestFloatBottom = std::max(lowestFloatBottom, logicalBottomForFloat(floatingObject)); > } > return lowestFloatBottom; >@@ -2907,7 +2907,7 @@ bool RenderBlockFlow::hitTestInlineChild > > void RenderBlockFlow::adjustForBorderFit(LayoutUnit x, LayoutUnit& left, LayoutUnit& right) const > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > // We don't deal with relative positioning. Our assumption is that you shrink to fit the lines without accounting >@@ -2926,7 +2926,7 @@ void RenderBlockFlow::adjustForBorderFit > if (!obj->isFloatingOrOutOfFlowPositioned()) { > if (is<RenderBlockFlow>(*obj) && !obj->hasOverflowClip()) > downcast<RenderBlockFlow>(*obj).adjustForBorderFit(x + obj->x(), left, right); >- else if (obj->style().visibility() == VISIBLE) { >+ else if (obj->style().visibility() == Visibility::Visible) { > // We are a replaced element or some kind of non-block-flow object. > left = std::min(left, x + obj->x()); > right = std::max(right, x + obj->x() + obj->width()); >@@ -2953,7 +2953,7 @@ void RenderBlockFlow::adjustForBorderFit > > void RenderBlockFlow::fitBorderToLinesIfNeeded() > { >- if (style().borderFit() == BorderFitBorder || hasOverrideContentLogicalWidth()) >+ if (style().borderFit() == BorderFit::Border || hasOverrideContentLogicalWidth()) > return; > > // Walk any normal flow lines to snugly fit. >@@ -3153,7 +3153,7 @@ RootInlineBox* RenderBlockFlow::lineAtIn > { > ASSERT(i >= 0); > >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return nullptr; > > if (childrenInline()) { >@@ -3176,7 +3176,7 @@ RootInlineBox* RenderBlockFlow::lineAtIn > > int RenderBlockFlow::lineCount(const RootInlineBox* stopRootInlineBox, bool* found) const > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return 0; > > int count = 0; >@@ -3214,7 +3214,7 @@ int RenderBlockFlow::lineCount(const Roo > > static int getHeightForLineCount(const RenderBlockFlow& block, int lineCount, bool includeEdgeBorderPadding, bool forward, int& count) > { >- if (block.style().visibility() != VISIBLE) >+ if (block.style().visibility() != Visibility::Visible) > return -1; > > // FIXME: Orthogonal writing modes don't work here, but it's not even clear how they should behave anyway. >@@ -3264,7 +3264,7 @@ int RenderBlockFlow::logicalHeightExclud > > void RenderBlockFlow::clearTruncation() > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > if (childrenInline() && hasMarkupTruncation()) { >@@ -3323,7 +3323,7 @@ RenderText* RenderBlockFlow::findClosest > if (!block->childrenInline()) { > // Look among our immediate children for an alternate box that contains the point. > for (RenderBox* child = block->firstChildBox(); child; child = child->nextSiblingBox()) { >- if (!child->height() || child->style().visibility() != WebCore::VISIBLE || child->isFloatingOrOutOfFlowPositioned()) >+ if (!child->height() || child->style().visibility() != WebCore::Visibility::Visible || child->isFloatingOrOutOfFlowPositioned()) > continue; > float top = child->y(); > >@@ -3707,7 +3707,7 @@ static inline bool resizeTextPermitted(c > > int RenderBlockFlow::lineCountForTextAutosizing() > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return 0; > if (childrenInline()) > return lineCount(); >@@ -3888,7 +3888,7 @@ void RenderBlockFlow::setComputedColumnC > return; > multiColumnFlow()->setColumnCountAndWidth(count, width); > multiColumnFlow()->setProgressionIsInline(style().hasInlineColumnAxis()); >- multiColumnFlow()->setProgressionIsReversed(style().columnProgression() == ReverseColumnProgression); >+ multiColumnFlow()->setProgressionIsReversed(style().columnProgression() == ColumnProgression::Reverse); > } > > void RenderBlockFlow::updateColumnProgressionFromStyle(RenderStyle& style) >@@ -3905,7 +3905,7 @@ void RenderBlockFlow::updateColumnProgre > } > > bool oldProgressionIsReversed = multiColumnFlow()->progressionIsReversed(); >- bool newProgressionIsReversed = style.columnProgression() == ReverseColumnProgression; >+ bool newProgressionIsReversed = style.columnProgression() == ColumnProgression::Reverse; > if (oldProgressionIsReversed != newProgressionIsReversed) { > multiColumnFlow()->setProgressionIsReversed(newProgressionIsReversed); > needsLayout = true; >@@ -3933,7 +3933,7 @@ unsigned RenderBlockFlow::computedColumn > bool RenderBlockFlow::isTopLayoutOverflowAllowed() const > { > bool hasTopOverflow = RenderBlock::isTopLayoutOverflowAllowed(); >- if (!multiColumnFlow() || style().columnProgression() == NormalColumnProgression) >+ if (!multiColumnFlow() || style().columnProgression() == ColumnProgression::Normal) > return hasTopOverflow; > > if (!(isHorizontalWritingMode() ^ !style().hasInlineColumnAxis())) >@@ -3945,7 +3945,7 @@ bool RenderBlockFlow::isTopLayoutOverflo > bool RenderBlockFlow::isLeftLayoutOverflowAllowed() const > { > bool hasLeftOverflow = RenderBlock::isLeftLayoutOverflowAllowed(); >- if (!multiColumnFlow() || style().columnProgression() == NormalColumnProgression) >+ if (!multiColumnFlow() || style().columnProgression() == ColumnProgression::Normal) > return hasLeftOverflow; > > if (isHorizontalWritingMode() ^ !style().hasInlineColumnAxis()) >Index: Source/WebCore/rendering/RenderBlockFlow.h >=================================================================== >--- Source/WebCore/rendering/RenderBlockFlow.h (revision 232123) >+++ Source/WebCore/rendering/RenderBlockFlow.h (working copy) >@@ -532,7 +532,7 @@ public: > RootInlineBox* createAndAppendRootInlineBox(); > > LayoutUnit startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot shouldIndentText); >- virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; >+ virtual TextAlignMode textAlignmentForLine(bool endsWithSoftBreak) const; > virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } > RootInlineBox* constructLine(BidiRunList<BidiRun>&, const LineInfo&); > >@@ -548,7 +548,7 @@ private: > void computeInlineDirectionPositionsForLine(RootInlineBox*, const LineInfo&, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&, WordMeasurements&); > void updateRubyForJustifiedText(RenderRubyRun&, BidiRun&, const Vector<unsigned, 16>& expansionOpportunities, unsigned& expansionOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth, size_t& expansionIndex); > void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun* trailingSpaceRun, const Vector<unsigned, 16>& expansionOpportunities, unsigned expansionOpportunityCount, float totalLogicalWidth, float availableLogicalWidth); >- BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const LineInfo&, ETextAlign, float& logicalLeft, >+ BidiRun* computeInlineDirectionPositionsForSegment(RootInlineBox*, const LineInfo&, TextAlignMode, float& logicalLeft, > float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache&, WordMeasurements&); > void computeBlockDirectionPositionsForLine(RootInlineBox*, BidiRun*, GlyphOverflowAndFallbackFontsMap&, VerticalPositionCache&); > BidiRun* handleTrailingSpaces(BidiRunList<BidiRun>&, BidiContext*); >@@ -575,7 +575,7 @@ private: > // page/column that has a different available line width than the old one. Used to know when you have to dirty a > // line, i.e., that it can't be re-used. > bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFragmentedFlow*) const; >- void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount); >+ void updateLogicalWidthForAlignment(const TextAlignMode&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount); > // END METHODS DEFINED IN RenderBlockLineLayout > > void computeInlinePreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const; >Index: Source/WebCore/rendering/RenderBlockLineLayout.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBlockLineLayout.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderBlockLineLayout.cpp (working copy) >@@ -306,7 +306,7 @@ RootInlineBox* RenderBlockFlow::construc > parentBox->addToLine(box); > } > >- bool visuallyOrdered = r->renderer().style().rtlOrdering() == VisualOrder; >+ bool visuallyOrdered = r->renderer().style().rtlOrdering() == Order::Visual; > box->setBidiLevel(r->level()); > > if (is<InlineTextBox>(*box)) { >@@ -342,42 +342,42 @@ RootInlineBox* RenderBlockFlow::construc > return lastRootBox(); > } > >-ETextAlign RenderBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const >+TextAlignMode RenderBlockFlow::textAlignmentForLine(bool endsWithSoftBreak) const > { >- ETextAlign alignment = style().textAlign(); >+ TextAlignMode alignment = style().textAlign(); > #if ENABLE(CSS3_TEXT) > TextJustify textJustify = style().textJustify(); >- if (alignment == JUSTIFY && textJustify == TextJustifyNone) >- return style().direction() == LTR ? LEFT : RIGHT; >+ if (alignment == TextAlignMode::Justify && textJustify == TextJustify::None) >+ return style().direction() == LTR ? TextAlignMode::Left : TextAlignMode::Right; > #endif > > if (endsWithSoftBreak) > return alignment; > > #if !ENABLE(CSS3_TEXT) >- return (alignment == JUSTIFY) ? TASTART : alignment; >+ return (alignment == TextAlignMode::Justify) ? TextAlignMode::Start : alignment; > #else >- if (alignment != JUSTIFY) >+ if (alignment != TextAlignMode::Justify) > return alignment; > > TextAlignLast alignmentLast = style().textAlignLast(); > switch (alignmentLast) { >- case TextAlignLastStart: >- return TASTART; >- case TextAlignLastEnd: >- return TAEND; >- case TextAlignLastLeft: >- return LEFT; >- case TextAlignLastRight: >- return RIGHT; >- case TextAlignLastCenter: >- return CENTER; >- case TextAlignLastJustify: >- return JUSTIFY; >- case TextAlignLastAuto: >- if (textJustify == TextJustifyDistribute) >- return JUSTIFY; >- return TASTART; >+ case TextAlignLast::Start: >+ return TextAlignMode::Start; >+ case TextAlignLast::End: >+ return TextAlignMode::End; >+ case TextAlignLast::Left: >+ return TextAlignMode::Left; >+ case TextAlignLast::Right: >+ return TextAlignMode::Right; >+ case TextAlignLast::Center: >+ return TextAlignMode::Center; >+ case TextAlignLast::Justify: >+ return TextAlignMode::Justify; >+ case TextAlignLast::Auto: >+ if (textJustify == TextJustify::Distribute) >+ return TextAlignMode::Justify; >+ return TextAlignMode::Start; > } > return alignment; > #endif >@@ -614,7 +614,7 @@ void RenderBlockFlow::computeExpansionFo > } > } > >-void RenderBlockFlow::updateLogicalWidthForAlignment(const ETextAlign& textAlign, const RootInlineBox* rootInlineBox, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount) >+void RenderBlockFlow::updateLogicalWidthForAlignment(const TextAlignMode& textAlign, const RootInlineBox* rootInlineBox, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount) > { > TextDirection direction; > if (rootInlineBox && style().unicodeBidi() == Plaintext) >@@ -627,19 +627,19 @@ void RenderBlockFlow::updateLogicalWidth > // objects horizontally. The total width of the line can be increased if we end up > // justifying text. > switch (textAlign) { >- case LEFT: >- case WEBKIT_LEFT: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: > updateLogicalWidthForLeftAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > break; >- case RIGHT: >- case WEBKIT_RIGHT: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: > updateLogicalWidthForRightAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > break; >- case CENTER: >- case WEBKIT_CENTER: >+ case TextAlignMode::Center: >+ case TextAlignMode::WebKitCenter: > updateLogicalWidthForCenterAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > break; >- case JUSTIFY: >+ case TextAlignMode::Justify: > adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth); > if (expansionOpportunityCount) { > if (trailingSpaceRun) { >@@ -649,13 +649,13 @@ void RenderBlockFlow::updateLogicalWidth > break; > } > FALLTHROUGH; >- case TASTART: >+ case TextAlignMode::Start: > if (direction == LTR) > updateLogicalWidthForLeftAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > else > updateLogicalWidthForRightAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > break; >- case TAEND: >+ case TextAlignMode::End: > if (direction == LTR) > updateLogicalWidthForRightAlignedBlock(style().isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); > else >@@ -675,7 +675,7 @@ static void updateLogicalInlinePositions > > void RenderBlockFlow::computeInlineDirectionPositionsForLine(RootInlineBox* lineBox, const LineInfo& lineInfo, BidiRun* firstRun, BidiRun* trailingSpaceRun, bool reachedEnd, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache, WordMeasurements& wordMeasurements) > { >- ETextAlign textAlign = textAlignmentForLine(!reachedEnd && !lineBox->endsWithBreak()); >+ TextAlignMode textAlign = textAlignmentForLine(!reachedEnd && !lineBox->endsWithBreak()); > > // CSS 2.1: "'Text-indent' only affects a line if it is the first formatted line of an element. For example, the first line of an anonymous block > // box is only affected if it is the first child of its parent element." >@@ -702,7 +702,7 @@ void RenderBlockFlow::computeInlineDirec > lineBox->placeBoxesInInlineDirection(lineLogicalLeft, needsWordSpacing); > } > >-static inline ExpansionBehavior expansionBehaviorForInlineTextBox(RenderBlockFlow& block, InlineTextBox& textBox, BidiRun* previousRun, BidiRun* nextRun, ETextAlign textAlign, bool isAfterExpansion) >+static inline ExpansionBehavior expansionBehaviorForInlineTextBox(RenderBlockFlow& block, InlineTextBox& textBox, BidiRun* previousRun, BidiRun* nextRun, TextAlignMode textAlign, bool isAfterExpansion) > { > // Tatechuyoko is modeled as the Object Replacement Character (U+FFFC), which can never have expansion opportunities inside nor intrinsically adjacent to it. > if (textBox.renderer().style().textCombine() == TextCombine::Horizontal) >@@ -711,7 +711,7 @@ static inline ExpansionBehavior expansio > ExpansionBehavior result = 0; > bool setLeadingExpansion = false; > bool setTrailingExpansion = false; >- if (textAlign == JUSTIFY) { >+ if (textAlign == TextAlignMode::Justify) { > // If the next box is ruby, and we're justifying, and the first box in the ruby base has a leading expansion, and we are a text box, then force a trailing expansion. > if (nextRun && is<RenderRubyRun>(nextRun->renderer()) && downcast<RenderRubyRun>(nextRun->renderer()).rubyBase() && nextRun->renderer().style().collapseWhiteSpace()) { > auto& rubyBase = *downcast<RenderRubyRun>(nextRun->renderer()).rubyBase(); >@@ -825,7 +825,7 @@ static bool isLastInFlowRun(BidiRun& run > return true; > } > >-BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBox* lineBox, const LineInfo& lineInfo, ETextAlign textAlign, float& logicalLeft, >+BidiRun* RenderBlockFlow::computeInlineDirectionPositionsForSegment(RootInlineBox* lineBox, const LineInfo& lineInfo, TextAlignMode textAlign, float& logicalLeft, > float& availableLogicalWidth, BidiRun* firstRun, BidiRun* trailingSpaceRun, GlyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& verticalPositionCache, > WordMeasurements& wordMeasurements) > { >@@ -882,7 +882,7 @@ BidiRun* RenderBlockFlow::computeInlineD > canHangPunctuationAtEnd = false; > } > >- if (textAlign == JUSTIFY && run != trailingSpaceRun) >+ if (textAlign == TextAlignMode::Justify && run != trailingSpaceRun) > computeExpansionOpportunities(*this, textBox, previousRun, run->next(), renderText.stringView(run->m_start, run->m_stop), run->box()->direction()); > > if (unsigned length = renderText.text().length()) { >@@ -897,7 +897,7 @@ BidiRun* RenderBlockFlow::computeInlineD > } else { > canHangPunctuationAtStart = false; > bool encounteredJustifiedRuby = false; >- if (is<RenderRubyRun>(run->renderer()) && textAlign == JUSTIFY && run != trailingSpaceRun && downcast<RenderRubyRun>(run->renderer()).rubyBase()) { >+ if (is<RenderRubyRun>(run->renderer()) && textAlign == TextAlignMode::Justify && run != trailingSpaceRun && downcast<RenderRubyRun>(run->renderer()).rubyBase()) { > auto* rubyBase = downcast<RenderRubyRun>(run->renderer()).rubyBase(); > if (rubyBase->firstRootBox() && !rubyBase->firstRootBox()->nextRootBox() && run->renderer().style().collapseWhiteSpace()) { > rubyBase->setIsAfterExpansion(isAfterExpansion); >@@ -940,7 +940,7 @@ BidiRun* RenderBlockFlow::computeInlineD > } > > if (is<RenderRubyBase>(*this) && !expansionOpportunityCount) >- textAlign = CENTER; >+ textAlign = TextAlignMode::Center; > > updateLogicalWidthForAlignment(textAlign, lineBox, trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth, expansionOpportunityCount); > >@@ -1378,7 +1378,7 @@ void RenderBlockFlow::layoutRunsAndFloat > if (lastRootBox()) > lastRootBox()->setLineBreakInfo(end.renderer(), end.offset(), resolver.status()); > } else { >- VisualDirectionOverride override = (styleToUse.rtlOrdering() == VisualOrder ? (styleToUse.direction() == LTR ? VisualLeftToRightOverride : VisualRightToLeftOverride) : NoVisualOverride); >+ VisualDirectionOverride override = (styleToUse.rtlOrdering() == Order::Visual ? (styleToUse.direction() == LTR ? VisualLeftToRightOverride : VisualRightToLeftOverride) : NoVisualOverride); > > if (isNewUBAParagraph && styleToUse.unicodeBidi() == Plaintext && !resolver.context()->parent()) { > TextDirection direction = styleToUse.direction(); >@@ -1763,7 +1763,7 @@ void RenderBlockFlow::checkFloatInCleanL > floatBoxOnCleanLine.height() + floatBoxOnCleanLine.verticalMarginExtent()); > > // We have to reset the cap-height alignment done by the first-letter floats when initial-letter is set, so just always treat first-letter floats as dirty. >- if (originalFloatRect.size() == newSize && (floatBoxOnCleanLine.style().styleType() != FIRST_LETTER || !floatBoxOnCleanLine.style().initialLetterDrop())) >+ if (originalFloatRect.size() == newSize && (floatBoxOnCleanLine.style().styleType() != PseudoId::FirstLetter || !floatBoxOnCleanLine.style().initialLetterDrop())) > return; > > LayoutUnit floatTop = isHorizontalWritingMode() ? originalFloatRect.y() : originalFloatRect.x(); >@@ -2089,7 +2089,7 @@ void RenderBlockFlow::addOverflowFromInl > > void RenderBlockFlow::deleteEllipsisLineBoxes() > { >- ETextAlign textAlign = style().textAlign(); >+ TextAlignMode textAlign = style().textAlign(); > bool ltr = style().isLeftToRightDirection(); > IndentTextOrNot shouldIndentText = IndentText; > for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { >@@ -2126,7 +2126,7 @@ void RenderBlockFlow::checkLinesForTextO > // check the left edge of the line box to see if it is less > // Include the scrollbar for overflow blocks, which means we want to use "contentWidth()" > bool ltr = style().isLeftToRightDirection(); >- ETextAlign textAlign = style().textAlign(); >+ TextAlignMode textAlign = style().textAlign(); > bool firstLine = true; > for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) { > IndentTextOrNot shouldIndentText = firstLine ? IndentText : DoNotIndentText; >@@ -2214,18 +2214,18 @@ bool RenderBlockFlow::positionNewFloatOn > > LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, IndentTextOrNot shouldIndentText) > { >- ETextAlign textAlign = style().textAlign(); >+ TextAlignMode textAlign = style().textAlign(); > bool shouldApplyIndentText = false; > switch (textAlign) { >- case LEFT: >- case WEBKIT_LEFT: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: > shouldApplyIndentText = style().isLeftToRightDirection(); > break; >- case RIGHT: >- case WEBKIT_RIGHT: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: > shouldApplyIndentText = !style().isLeftToRightDirection(); > break; >- case TASTART: >+ case TextAlignMode::Start: > shouldApplyIndentText = true; > break; > default: >@@ -2235,7 +2235,7 @@ LayoutUnit RenderBlockFlow::startAligned > // https://bugs.webkit.org/show_bug.cgi?id=124522 > // This quirk is for legacy content that doesn't work properly with the center positioning scheme > // being honored (e.g., epubs). >- if (shouldApplyIndentText || settings().useLegacyTextAlignPositionedElementBehavior()) // FIXME: Handle TAEND here >+ if (shouldApplyIndentText || settings().useLegacyTextAlignPositionedElementBehavior()) // FIXME: Handle TextAlignMode::End here > return startOffsetForLine(position, shouldIndentText); > > // updateLogicalWidthForAlignment() handles the direction of the block so no need to consider it here >Index: Source/WebCore/rendering/RenderBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBox.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderBox.cpp (working copy) >@@ -940,13 +940,13 @@ void RenderBox::panScroll(const IntPoint > > bool RenderBox::hasVerticalScrollbarWithAutoBehavior() const > { >- bool overflowScrollActsLikeAuto = style().overflowY() == Overflow::Scroll && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ bool overflowScrollActsLikeAuto = style().overflowY() == Overflow::Scroll && !style().hasPseudoStyle(PseudoId::Scrollbar) && ScrollbarTheme::theme().usesOverlayScrollbars(); > return hasOverflowClip() && (style().overflowY() == Overflow::Auto || style().overflowY() == Overflow::Overlay || overflowScrollActsLikeAuto); > } > > bool RenderBox::hasHorizontalScrollbarWithAutoBehavior() const > { >- bool overflowScrollActsLikeAuto = style().overflowX() == Overflow::Scroll && !style().hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ bool overflowScrollActsLikeAuto = style().overflowX() == Overflow::Scroll && !style().hasPseudoStyle(PseudoId::Scrollbar) && ScrollbarTheme::theme().usesOverlayScrollbars(); > return hasOverflowClip() && (style().overflowX() == Overflow::Auto || style().overflowX() == Overflow::Overlay || overflowScrollActsLikeAuto); > } > >@@ -1398,7 +1398,7 @@ static bool isCandidateForOpaquenessTest > const RenderStyle& childStyle = childBox.style(); > if (childStyle.position() != PositionType::Static && childBox.containingBlock() != childBox.parent()) > return false; >- if (childStyle.visibility() != VISIBLE) >+ if (childStyle.visibility() != Visibility::Visible) > return false; > if (childStyle.shapeOutside()) > return false; >@@ -1492,7 +1492,7 @@ bool RenderBox::backgroundHasOpaqueTopLa > > void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask || paintInfo.context().paintingDisabled()) >+ if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseMask || paintInfo.context().paintingDisabled()) > return; > > LayoutRect paintRect = LayoutRect(paintOffset, size()); >@@ -1502,7 +1502,7 @@ void RenderBox::paintMask(PaintInfo& pai > > void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context().paintingDisabled()) >+ if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseClippingMask || paintInfo.context().paintingDisabled()) > return; > > LayoutRect paintRect = LayoutRect(paintOffset, size()); >@@ -2065,7 +2065,7 @@ void RenderBox::dirtyLineBoxes(bool full > void RenderBox::positionLineBox(InlineElementBox& box) > { > if (isOutOfFlowPositioned()) { >- // Cache the x position only if we were an INLINE type originally. >+ // Cache the x position only if we were an DisplayType::Inline type originally. > bool wasInline = style().isOriginalDisplayInlineType(); > if (wasInline) { > // The value is cached in the xPos of the box. We only need this value if >@@ -2106,7 +2106,7 @@ void RenderBox::deleteLineBoxWrapper() > > LayoutRect RenderBox::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const > { >- if (style().visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent()) >+ if (style().visibility() != Visibility::Visible && !enclosingLayer()->hasVisibleContent()) > return LayoutRect(); > LayoutRect r = visualOverflowRect(); > // FIXME: layoutDelta needs to be applied in parts before/after transforms and >@@ -2312,7 +2312,7 @@ void RenderBox::computeLogicalWidthInFra > // width. Use the width from the style context. > // FIXME: Account for block-flow in flexible boxes. > // https://bugs.webkit.org/show_bug.cgi?id=46418 >- if (hasOverrideContentLogicalWidth() && (isRubyRun() || style().borderFit() == BorderFitLines || (parent()->isFlexibleBoxIncludingDeprecated()))) { >+ if (hasOverrideContentLogicalWidth() && (isRubyRun() || style().borderFit() == BorderFit::Lines || (parent()->isFlexibleBoxIncludingDeprecated()))) { > computedValues.m_extent = overrideContentLogicalWidth() + borderAndPaddingLogicalWidth(); > return; > } >@@ -2580,7 +2580,7 @@ void RenderBox::computeInlineDirectionMa > > // Case One: The object is being centered in the containing block's available logical width. > if ((marginStartLength.isAuto() && marginEndLength.isAuto() && childWidth < containerWidth) >- || (!marginStartLength.isAuto() && !marginEndLength.isAuto() && containingBlock.style().textAlign() == WEBKIT_CENTER)) { >+ || (!marginStartLength.isAuto() && !marginEndLength.isAuto() && containingBlock.style().textAlign() == TextAlignMode::WebKitCenter)) { > // Other browsers center the margin box for align=center elements so we match them here. > LayoutUnit marginStartWidth = minimumValueForLength(marginStartLength, containerWidth); > LayoutUnit marginEndWidth = minimumValueForLength(marginEndLength, containerWidth); >@@ -2598,8 +2598,8 @@ void RenderBox::computeInlineDirectionMa > } > > // Case Three: The object is being pushed to the end of the containing block's available logical width. >- bool pushToEndFromTextAlign = !marginEndLength.isAuto() && ((!containingBlockStyle.isLeftToRightDirection() && containingBlockStyle.textAlign() == WEBKIT_LEFT) >- || (containingBlockStyle.isLeftToRightDirection() && containingBlockStyle.textAlign() == WEBKIT_RIGHT)); >+ bool pushToEndFromTextAlign = !marginEndLength.isAuto() && ((!containingBlockStyle.isLeftToRightDirection() && containingBlockStyle.textAlign() == TextAlignMode::WebKitLeft) >+ || (containingBlockStyle.isLeftToRightDirection() && containingBlockStyle.textAlign() == TextAlignMode::WebKitRight)); > if ((marginStartLength.isAuto() || pushToEndFromTextAlign) && childWidth < containerWidth) { > marginEnd = valueForLength(marginEndLength, containerWidth); > marginStart = containerWidth - childWidth - marginEnd; >@@ -2857,7 +2857,7 @@ bool RenderBox::skipContainingBlockForPe > // objects, such as table-cells and flexboxes, will be treated as if they were > // non-anonymous. > if (containingBlock.isAnonymous()) >- return containingBlock.style().display() == BLOCK || containingBlock.style().display() == INLINE_BLOCK; >+ return containingBlock.style().display() == DisplayType::Block || containingBlock.style().display() == DisplayType::InlineBlock; > > // For quirks mode, we skip most auto-height containing blocks when computing > // percentages. >@@ -4386,7 +4386,7 @@ VisiblePosition RenderBox::positionForPo > } > > if ((!renderer.firstChild() && !renderer.isInline() && !is<RenderBlockFlow>(renderer)) >- || renderer.style().visibility() != VISIBLE) >+ || renderer.style().visibility() != Visibility::Visible) > continue; > > LayoutUnit top = renderer.borderTop() + renderer.paddingTop() + (is<RenderTableRow>(*this) ? LayoutUnit() : renderer.y()); >@@ -4634,7 +4634,7 @@ bool RenderBox::isUnsplittableForPaginat > return isReplaced() > || hasUnsplittableScrollingOverflow() > || (parent() && isWritingModeRoot()) >- || (isFloating() && style().styleType() == FIRST_LETTER && style().initialLetterDrop() > 0); >+ || (isFloating() && style().styleType() == PseudoId::FirstLetter && style().initialLetterDrop() > 0); > } > > LayoutUnit RenderBox::lineHeight(bool /*firstLine*/, LineDirectionMode direction, LinePositionMode /*linePositionMode*/) const >Index: Source/WebCore/rendering/RenderBoxModelObject.cpp >=================================================================== >--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy) >@@ -2580,23 +2580,23 @@ LayoutRect RenderBoxModelObject::localCa > CaretAlignment alignment = alignLeft; > > switch (currentStyle.textAlign()) { >- case LEFT: >- case WEBKIT_LEFT: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: > break; >- case CENTER: >- case WEBKIT_CENTER: >+ case TextAlignMode::Center: >+ case TextAlignMode::WebKitCenter: > alignment = alignCenter; > break; >- case RIGHT: >- case WEBKIT_RIGHT: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: > alignment = alignRight; > break; >- case JUSTIFY: >- case TASTART: >+ case TextAlignMode::Justify: >+ case TextAlignMode::Start: > if (!currentStyle.isLeftToRightDirection()) > alignment = alignRight; > break; >- case TAEND: >+ case TextAlignMode::End: > if (currentStyle.isLeftToRightDirection()) > alignment = alignRight; > break; >Index: Source/WebCore/rendering/RenderBoxModelObject.h >=================================================================== >--- Source/WebCore/rendering/RenderBoxModelObject.h (revision 232123) >+++ Source/WebCore/rendering/RenderBoxModelObject.h (working copy) >@@ -271,7 +271,7 @@ protected: > DecodingMode decodingModeForImageDraw(const Image&, const PaintInfo&) const; > > public: >- // For RenderBlocks and RenderInlines with m_style->styleType() == FIRST_LETTER, this tracks their remaining text fragments >+ // For RenderBlocks and RenderInlines with m_style->styleType() == PseudoId::FirstLetter, this tracks their remaining text fragments > RenderTextFragment* firstLetterRemainingText() const; > void setFirstLetterRemainingText(RenderTextFragment&); > void clearFirstLetterRemainingText(); >Index: Source/WebCore/rendering/RenderCounter.cpp >=================================================================== >--- Source/WebCore/rendering/RenderCounter.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderCounter.cpp (working copy) >@@ -140,14 +140,14 @@ static std::optional<CounterPlan> planCo > auto& style = renderer.style(); > > switch (style.styleType()) { >- case NOPSEUDO: >+ case PseudoId::None: > // Sometimes elements have more then one renderer. Only the first one gets the counter > // LayoutTests/http/tests/css/counter-crash.html > if (generatingElement->renderer() != &renderer) > return std::nullopt; > break; >- case BEFORE: >- case AFTER: >+ case PseudoId::Before: >+ case PseudoId::After: > break; > default: > return std::nullopt; // Counters are forbidden from all other pseudo elements. >@@ -384,7 +384,7 @@ String RenderCounter::originalText() con > if (!beforeAfterContainer->isAnonymous() && !beforeAfterContainer->isPseudoElement()) > return String(); // RenderCounters are restricted to before and after pseudo elements > PseudoId containerStyle = beforeAfterContainer->style().styleType(); >- if ((containerStyle == BEFORE) || (containerStyle == AFTER)) >+ if ((containerStyle == PseudoId::Before) || (containerStyle == PseudoId::After)) > break; > beforeAfterContainer = beforeAfterContainer->parent(); > } >Index: Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (working copy) >@@ -147,7 +147,7 @@ static LayoutUnit marginWidthForChild(Re > static bool childDoesNotAffectWidthOrFlexing(RenderObject* child) > { > // Positioned children and collapsed children don't affect the min/max width. >- return child->isOutOfFlowPositioned() || child->style().visibility() == COLLAPSE; >+ return child->isOutOfFlowPositioned() || child->style().visibility() == Visibility::Collapse; > } > > static LayoutUnit contentWidthForChild(RenderBox* child) >@@ -483,7 +483,7 @@ void RenderDeprecatedFlexibleBox::layout > > LayoutSize& childLayoutDelta = childLayoutDeltas[childIndex++]; > >- if (child->style().visibility() == COLLAPSE) { >+ if (child->style().visibility() == Visibility::Collapse) { > // visibility: collapsed children do not participate in our positioning. > // But we need to lay them out. > layoutChildIfNeededApplyingDelta(child, childLayoutDelta); >@@ -577,7 +577,7 @@ void RenderDeprecatedFlexibleBox::layout > > // Now distribute the space to objects. > for (RenderBox* child = iterator.first(); child && spaceAvailableThisPass && totalFlex; child = iterator.next()) { >- if (child->style().visibility() == COLLAPSE) >+ if (child->style().visibility() == Visibility::Collapse) > continue; > > if (allowedChildFlex(child, expanding, i)) { >@@ -727,7 +727,7 @@ void RenderDeprecatedFlexibleBox::layout > > LayoutSize& childLayoutDelta = childLayoutDeltas[childIndex++]; > >- if (child->style().visibility() == COLLAPSE) { >+ if (child->style().visibility() == Visibility::Collapse) { > // visibility: collapsed children do not participate in our positioning. > // But we need to lay them down. > layoutChildIfNeededApplyingDelta(child, childLayoutDelta); >Index: Source/WebCore/rendering/RenderDetailsMarker.cpp >=================================================================== >--- Source/WebCore/rendering/RenderDetailsMarker.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderDetailsMarker.cpp (working copy) >@@ -118,7 +118,7 @@ Path RenderDetailsMarker::getPath(const > > void RenderDetailsMarker::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (paintInfo.phase != PaintPhaseForeground || style().visibility() != VISIBLE) { >+ if (paintInfo.phase != PaintPhaseForeground || style().visibility() != Visibility::Visible) { > RenderBlockFlow::paint(paintInfo, paintOffset); > return; > } >Index: Source/WebCore/rendering/RenderElement.cpp >=================================================================== >--- Source/WebCore/rendering/RenderElement.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderElement.cpp (working copy) >@@ -151,49 +151,49 @@ RenderPtr<RenderElement> RenderElement:: > } > > switch (style.display()) { >- case NONE: >- case CONTENTS: >+ case DisplayType::None: >+ case DisplayType::Contents: > return nullptr; >- case INLINE: >+ case DisplayType::Inline: > if (creationType == CreateAllRenderers) > return createRenderer<RenderInline>(element, WTFMove(style)); > FALLTHROUGH; // Fieldsets should make a block flow if display:inline is set. >- case BLOCK: >- case INLINE_BLOCK: >- case COMPACT: >+ case DisplayType::Block: >+ case DisplayType::InlineBlock: >+ case DisplayType::Compact: > return createRenderer<RenderBlockFlow>(element, WTFMove(style)); >- case LIST_ITEM: >+ case DisplayType::ListItem: > return createRenderer<RenderListItem>(element, WTFMove(style)); >- case FLEX: >- case INLINE_FLEX: >- case WEBKIT_FLEX: >- case WEBKIT_INLINE_FLEX: >+ case DisplayType::Flex: >+ case DisplayType::InlineFlex: >+ case DisplayType::WebKitFlex: >+ case DisplayType::WebKitInlineFlex: > return createRenderer<RenderFlexibleBox>(element, WTFMove(style)); >- case GRID: >- case INLINE_GRID: >+ case DisplayType::Grid: >+ case DisplayType::InlineGrid: > return createRenderer<RenderGrid>(element, WTFMove(style)); >- case BOX: >- case INLINE_BOX: >+ case DisplayType::Box: >+ case DisplayType::InlineBox: > return createRenderer<RenderDeprecatedFlexibleBox>(element, WTFMove(style)); > default: { > if (creationType == OnlyCreateBlockAndFlexboxRenderers) > return createRenderer<RenderBlockFlow>(element, WTFMove(style)); > switch (style.display()) { >- case TABLE: >- case INLINE_TABLE: >+ case DisplayType::Table: >+ case DisplayType::InlineTable: > return createRenderer<RenderTable>(element, WTFMove(style)); >- case TABLE_CELL: >+ case DisplayType::TableCell: > return createRenderer<RenderTableCell>(element, WTFMove(style)); >- case TABLE_CAPTION: >+ case DisplayType::TableCaption: > return createRenderer<RenderTableCaption>(element, WTFMove(style)); >- case TABLE_ROW_GROUP: >- case TABLE_HEADER_GROUP: >- case TABLE_FOOTER_GROUP: >+ case DisplayType::TableRowGroup: >+ case DisplayType::TableHeaderGroup: >+ case DisplayType::TableFooterGroup: > return createRenderer<RenderTableSection>(element, WTFMove(style)); >- case TABLE_ROW: >+ case DisplayType::TableRow: > return createRenderer<RenderTableRow>(element, WTFMove(style)); >- case TABLE_COLUMN_GROUP: >- case TABLE_COLUMN: >+ case DisplayType::TableColumnGroup: >+ case DisplayType::TableColumn: > return createRenderer<RenderTableCol>(element, WTFMove(style)); > default: > break; >@@ -215,7 +215,7 @@ std::unique_ptr<RenderStyle> RenderEleme > RenderBlock* firstLineBlock = rendererForFirstLineStyle.firstLineBlock(); > if (!firstLineBlock) > return nullptr; >- auto* firstLineStyle = firstLineBlock->getCachedPseudoStyle(FIRST_LINE, &style()); >+ auto* firstLineStyle = firstLineBlock->getCachedPseudoStyle(PseudoId::FirstLine, &style()); > if (!firstLineStyle) > return nullptr; > return RenderStyle::clonePtr(*firstLineStyle); >@@ -237,7 +237,7 @@ std::unique_ptr<RenderStyle> RenderEleme > return nullptr; > > auto style = composedTreeParentElement->styleResolver().styleForElement(*composedTreeParentElement, &parentStyle).renderStyle; >- ASSERT(style->display() == CONTENTS); >+ ASSERT(style->display() == DisplayType::Contents); > > // We act as if there was an unstyled <span> around the text node. Only styling happens via inheritance. > auto firstLineStyle = RenderStyle::createPtr(); >@@ -650,7 +650,7 @@ void RenderElement::propagateStyleToAnon > { > // FIXME: We could save this call when the change only affected non-inherited properties. > for (auto& elementChild : childrenOfType<RenderElement>(*this)) { >- if (!elementChild.isAnonymous() || elementChild.style().styleType() != NOPSEUDO) >+ if (!elementChild.isAnonymous() || elementChild.style().styleType() != PseudoId::None) > continue; > > if (propagationType == PropagateToBlockChildrenOnly && !is<RenderBlock>(elementChild)) >@@ -724,9 +724,9 @@ void RenderElement::styleWillChange(Styl > // Keep layer hierarchy visibility bits up to date if visibility changes. > if (m_style.visibility() != newStyle.visibility()) { > if (RenderLayer* layer = enclosingLayer()) { >- if (newStyle.visibility() == VISIBLE) >+ if (newStyle.visibility() == Visibility::Visible) > layer->setHasVisibleContent(); >- else if (layer->hasVisibleContent() && (this == &layer->renderer() || layer->renderer().style().visibility() != VISIBLE)) { >+ else if (layer->hasVisibleContent() && (this == &layer->renderer() || layer->renderer().style().visibility() != Visibility::Visible)) { > layer->dirtyVisibleContentStatus(); > if (diff > StyleDifference::RepaintLayer) > repaint(); >@@ -751,7 +751,7 @@ void RenderElement::styleWillChange(Styl > setFloating(false); > clearPositionedState(); > } >- if (newStyle.hasPseudoStyle(FIRST_LINE) || oldStyle->hasPseudoStyle(FIRST_LINE)) >+ if (newStyle.hasPseudoStyle(PseudoId::FirstLine) || oldStyle->hasPseudoStyle(PseudoId::FirstLine)) > invalidateCachedFirstLineStyle(); > > setHorizontalWritingMode(true); >@@ -853,7 +853,7 @@ void RenderElement::insertedIntoTree() > > // If |this| is visible but this object was not, tell the layer it has some visible content > // that needs to be drawn and layer visibility optimization can't be used >- if (parent()->style().visibility() != VISIBLE && style().visibility() == VISIBLE && !hasLayer()) { >+ if (parent()->style().visibility() != Visibility::Visible && style().visibility() == Visibility::Visible && !hasLayer()) { > if (!layer) > layer = parent()->enclosingLayer(); > if (layer) >@@ -867,7 +867,7 @@ void RenderElement::willBeRemovedFromTre > { > // If we remove a visible child from an invisible parent, we don't know the layer visibility any more. > RenderLayer* layer = nullptr; >- if (parent()->style().visibility() != VISIBLE && style().visibility() == VISIBLE && !hasLayer()) { >+ if (parent()->style().visibility() != Visibility::Visible && style().visibility() == Visibility::Visible && !hasLayer()) { > if ((layer = parent()->enclosingLayer())) > layer->dirtyVisibleContentStatus(); > } >@@ -1079,7 +1079,7 @@ bool RenderElement::repaintAfterLayoutIf > > bool fullRepaint = selfNeedsLayout(); > // Presumably a background or a border exists if border-fit:lines was specified. >- if (!fullRepaint && style().borderFit() == BorderFitLines) >+ if (!fullRepaint && style().borderFit() == BorderFit::Lines) > fullRepaint = true; > if (!fullRepaint) { > // This ASSERT fails due to animations. See https://bugs.webkit.org/show_bug.cgi?id=37048 >@@ -1208,7 +1208,7 @@ bool RenderElement::isVisibleInDocumentR > { > if (document().activeDOMObjectsAreSuspended()) > return false; >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return false; > if (view().frameView().isOffscreen()) > return false; >@@ -1320,7 +1320,7 @@ bool RenderElement::repaintForPausedImag > > const RenderStyle* RenderElement::getCachedPseudoStyle(PseudoId pseudo, const RenderStyle* parentStyle) const > { >- if (pseudo < FIRST_INTERNAL_PSEUDOID && !style().hasPseudoStyle(pseudo)) >+ if (pseudo < PseudoId::FirstInternalPseudoId && !style().hasPseudoStyle(pseudo)) > return nullptr; > > RenderStyle* cachedStyle = style().getCachedPseudoStyle(pseudo); >@@ -1335,7 +1335,7 @@ const RenderStyle* RenderElement::getCac > > std::unique_ptr<RenderStyle> RenderElement::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, const RenderStyle* parentStyle, const RenderStyle* ownStyle) const > { >- if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style().hasPseudoStyle(pseudoStyleRequest.pseudoId)) >+ if (pseudoStyleRequest.pseudoId < PseudoId::FirstInternalPseudoId && !ownStyle && !style().hasPseudoStyle(pseudoStyleRequest.pseudoId)) > return nullptr; > > if (!parentStyle) { >@@ -1384,11 +1384,11 @@ std::unique_ptr<RenderStyle> RenderEleme > if (ShadowRoot* root = element()->containingShadowRoot()) { > if (root->mode() == ShadowRootMode::UserAgent) { > if (Element* shadowHost = element()->shadowHost()) >- return shadowHost->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); >+ return shadowHost->renderer()->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::Selection)); > } > } > >- return getUncachedPseudoStyle(PseudoStyleRequest(SELECTION)); >+ return getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::Selection)); > } > > Color RenderElement::selectionForegroundColor() const >Index: Source/WebCore/rendering/RenderElement.h >=================================================================== >--- Source/WebCore/rendering/RenderElement.h (revision 232123) >+++ Source/WebCore/rendering/RenderElement.h (working copy) >@@ -140,7 +140,7 @@ public: > bool isTransparent() const { return style().opacity() < 1.0f; } > float opacity() const { return style().opacity(); } > >- bool visibleToHitTesting() const { return style().visibility() == VISIBLE && style().pointerEvents() != PE_NONE; } >+ bool visibleToHitTesting() const { return style().visibility() == Visibility::Visible && style().pointerEvents() != PointerEvents::None; } > > bool hasBackground() const { return style().hasBackground(); } > bool hasMask() const { return style().hasMask(); } >Index: Source/WebCore/rendering/RenderFileUploadControl.cpp >=================================================================== >--- Source/WebCore/rendering/RenderFileUploadControl.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderFileUploadControl.cpp (working copy) >@@ -114,7 +114,7 @@ int RenderFileUploadControl::maxFilename > > void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > // Push a clip. >Index: Source/WebCore/rendering/RenderFullScreen.cpp >=================================================================== >--- Source/WebCore/rendering/RenderFullScreen.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderFullScreen.cpp (working copy) >@@ -71,7 +71,7 @@ static RenderStyle createFullScreenStyle > fullscreenStyle.setFontDescription({ }); > fullscreenStyle.fontCascade().update(nullptr); > >- fullscreenStyle.setDisplay(FLEX); >+ fullscreenStyle.setDisplay(DisplayType::Flex); > fullscreenStyle.setJustifyContentPosition(ContentPosition::Center); > fullscreenStyle.setAlignItemsPosition(ItemPosition::Center); > fullscreenStyle.setFlexDirection(FlexDirection::Column); >Index: Source/WebCore/rendering/RenderGrid.cpp >=================================================================== >--- Source/WebCore/rendering/RenderGrid.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderGrid.cpp (working copy) >@@ -524,8 +524,8 @@ unsigned RenderGrid::computeAutoRepeatTr > std::unique_ptr<OrderedTrackIndexSet> RenderGrid::computeEmptyTracksForAutoRepeat(Grid& grid, GridTrackSizingDirection direction) const > { > bool isRowAxis = direction == ForColumns; >- if ((isRowAxis && style().gridAutoRepeatColumnsType() != AutoFit) >- || (!isRowAxis && style().gridAutoRepeatRowsType() != AutoFit)) >+ if ((isRowAxis && style().gridAutoRepeatColumnsType() != AutoRepeatType::Fit) >+ || (!isRowAxis && style().gridAutoRepeatRowsType() != AutoRepeatType::Fit)) > return nullptr; > > std::unique_ptr<OrderedTrackIndexSet> emptyTrackIndexes; >Index: Source/WebCore/rendering/RenderImage.cpp >=================================================================== >--- Source/WebCore/rendering/RenderImage.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderImage.cpp (working copy) >@@ -297,7 +297,7 @@ void RenderImage::repaintOrMarkForLayout > { > #if ENABLE(CSS_IMAGE_RESOLUTION) > double scale = style().imageResolution(); >- if (style().imageResolutionSnap() == ImageResolutionSnapPixels) >+ if (style().imageResolutionSnap() == ImageResolutionSnap::Pixels) > scale = roundForImpreciseConversion<int>(scale); > if (scale <= 0) > scale = 1; >Index: Source/WebCore/rendering/RenderInline.cpp >=================================================================== >--- Source/WebCore/rendering/RenderInline.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderInline.cpp (working copy) >@@ -74,7 +74,7 @@ void RenderInline::willBeDestroyed() > { > #if !ASSERT_DISABLED > // Make sure we do not retain "this" in the continuation outline table map of our containing blocks. >- if (parent() && style().visibility() == VISIBLE && hasOutline()) { >+ if (parent() && style().visibility() == Visibility::Visible && hasOutline()) { > bool containingBlockPaintsContinuationOutline = continuation() || isContinuation(); > if (containingBlockPaintsContinuationOutline) { > if (RenderBlock* cb = containingBlock()) { >@@ -148,7 +148,7 @@ static void updateStyleOfAnonymousBlockC > RenderInline* continuation = block.inlineContinuation(); > if (oldStyle->hasInFlowPosition() && inFlowPositionedInlineAncestor(continuation)) > continue; >- auto blockStyle = RenderStyle::createAnonymousStyleWithDisplay(block.style(), BLOCK); >+ auto blockStyle = RenderStyle::createAnonymousStyleWithDisplay(block.style(), DisplayType::Block); > blockStyle.setPosition(newStyle->position()); > block.setStyle(WTFMove(blockStyle)); > } >@@ -211,7 +211,7 @@ void RenderInline::updateAlwaysCreateLin > bool alwaysCreateLineBoxes = (parentRenderInline && parentRenderInline->alwaysCreateLineBoxes()) > || (parentRenderInline && parentStyle->verticalAlign() != VerticalAlign::Baseline) > || style().verticalAlign() != VerticalAlign::Baseline >- || style().textEmphasisMark() != TextEmphasisMarkNone >+ || style().textEmphasisMark() != TextEmphasisMark::None > || (checkFonts && (!parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(style().fontCascade().fontMetrics()) > || parentStyle->lineHeight() != style().lineHeight())); > >@@ -818,7 +818,7 @@ LayoutRect RenderInline::linesVisualOver > LayoutRect RenderInline::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const > { > // Only first-letter renderers are allowed in here during layout. They mutate the tree triggering repaints. >- ASSERT(!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || style().styleType() == FIRST_LETTER || hasSelfPaintingLayer()); >+ ASSERT(!view().frameView().layoutContext().isPaintOffsetCacheEnabled() || style().styleType() == PseudoId::FirstLetter || hasSelfPaintingLayer()); > > if (!firstLineBoxIncludingCulling() && !continuation()) > return LayoutRect(); >@@ -1387,7 +1387,7 @@ void RenderInline::paintOutlineForLine(G > void RenderInline::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions) > { > // Convert the style regions to absolute coordinates. >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > const Vector<StyleDashboardRegion>& styleRegions = style().dashboardRegions(); >Index: Source/WebCore/rendering/RenderLayer.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayer.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderLayer.cpp (working copy) >@@ -335,7 +335,7 @@ RenderLayer::RenderLayer(RenderLayerMode > > if (!renderer().firstChild()) { > m_visibleContentStatusDirty = false; >- m_hasVisibleContent = renderer().style().visibility() == VISIBLE; >+ m_hasVisibleContent = renderer().style().visibility() == Visibility::Visible; > } > > if (Element* element = renderer().element()) { >@@ -1264,14 +1264,14 @@ void RenderLayer::updateDescendantDepend > } > > if (m_visibleContentStatusDirty) { >- if (renderer().style().visibility() == VISIBLE) >+ if (renderer().style().visibility() == Visibility::Visible) > m_hasVisibleContent = true; > else { > // layer may be hidden but still have some visible content, check for this > m_hasVisibleContent = false; > RenderObject* r = renderer().firstChild(); > while (r) { >- if (r->style().visibility() == VISIBLE && !r->hasLayer()) { >+ if (r->style().visibility() == Visibility::Visible && !r->hasLayer()) { > m_hasVisibleContent = true; > break; > } >@@ -3148,7 +3148,7 @@ Ref<Scrollbar> RenderLayer::createScroll > RefPtr<Scrollbar> widget; > ASSERT(rendererForScrollbar(renderer())); > auto& actualRenderer = *rendererForScrollbar(renderer()); >- bool hasCustomScrollbarStyle = is<RenderBox>(actualRenderer) && downcast<RenderBox>(actualRenderer).style().hasPseudoStyle(SCROLLBAR); >+ bool hasCustomScrollbarStyle = is<RenderBox>(actualRenderer) && downcast<RenderBox>(actualRenderer).style().hasPseudoStyle(PseudoId::Scrollbar); > if (hasCustomScrollbarStyle) > widget = RenderScrollbar::createCustomScrollbar(*this, orientation, downcast<RenderBox>(actualRenderer).element()); > else { >@@ -3466,14 +3466,14 @@ bool RenderLayer::hasVerticalOverflow() > static bool styleRequiresScrollbar(const RenderStyle& style, ScrollbarOrientation axis) > { > Overflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >- bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(PseudoId::Scrollbar) && ScrollbarTheme::theme().usesOverlayScrollbars(); > return overflow == Overflow::Scroll && !overflowScrollActsLikeAuto; > } > > static bool styleDefinesAutomaticScrollbar(const RenderStyle& style, ScrollbarOrientation axis) > { > Overflow overflow = axis == ScrollbarOrientation::HorizontalScrollbar ? style.overflowX() : style.overflowY(); >- bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(SCROLLBAR) && ScrollbarTheme::theme().usesOverlayScrollbars(); >+ bool overflowScrollActsLikeAuto = overflow == Overflow::Scroll && !style.hasPseudoStyle(PseudoId::Scrollbar) && ScrollbarTheme::theme().usesOverlayScrollbars(); > return overflow == Overflow::Auto || overflow == Overflow::Overlay || overflowScrollActsLikeAuto; > } > >@@ -4094,23 +4094,23 @@ static inline LayoutRect computeReferenc > LayoutRect referenceBox; > const auto& box = downcast<RenderBox>(renderer); > switch (clippingPath.referenceBox()) { >- case ContentBox: >+ case CSSBoxType::ContentBox: > referenceBox = box.contentBoxRect(); > referenceBox.move(offsetFromRoot); > break; >- case PaddingBox: >+ case CSSBoxType::PaddingBox: > referenceBox = box.paddingBoxRect(); > referenceBox.move(offsetFromRoot); > break; > // FIXME: Support margin-box. Use bounding client rect for now. > // https://bugs.webkit.org/show_bug.cgi?id=127984 >- case MarginBox: >+ case CSSBoxType::MarginBox: > // fill, stroke, view-box compute to border-box for HTML elements. >- case Fill: >- case Stroke: >- case ViewBox: >- case BorderBox: >- case BoxMissing: >+ case CSSBoxType::Fill: >+ case CSSBoxType::Stroke: >+ case CSSBoxType::ViewBox: >+ case CSSBoxType::BorderBox: >+ case CSSBoxType::BoxMissing: > referenceBox = box.borderBoxRect(); > referenceBox.move(offsetFromRoot); > break; >@@ -6041,7 +6041,7 @@ bool RenderLayer::backgroundIsKnownToBeO > > // We can't use hasVisibleContent(), because that will be true if our renderer is hidden, but some child > // is visible and that child doesn't cover the entire rect. >- if (renderer().style().visibility() != VISIBLE) >+ if (renderer().style().visibility() != Visibility::Visible) > return false; > > if (paintsWithFilters() && renderer().style().filter().hasFilterThatAffectsOpacity()) >@@ -6730,7 +6730,7 @@ void RenderLayer::updateScrollableAreaSe > void RenderLayer::updateScrollCornerStyle() > { > RenderElement* actualRenderer = rendererForScrollbar(renderer()); >- auto corner = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), &actualRenderer->style()) : nullptr; >+ auto corner = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::ScrollbarCorner), &actualRenderer->style()) : nullptr; > > if (!corner) { > clearScrollCorner(); >@@ -6757,7 +6757,7 @@ void RenderLayer::clearScrollCorner() > void RenderLayer::updateResizerStyle() > { > RenderElement* actualRenderer = rendererForScrollbar(renderer()); >- auto resizer = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(RESIZER), &actualRenderer->style()) : nullptr; >+ auto resizer = renderer().hasOverflowClip() ? actualRenderer->getUncachedPseudoStyle(PseudoStyleRequest(PseudoId::Resizer), &actualRenderer->style()) : nullptr; > > if (!resizer) { > clearResizer(); >Index: Source/WebCore/rendering/RenderLayerBacking.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerBacking.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderLayerBacking.cpp (working copy) >@@ -1239,8 +1239,8 @@ void RenderLayerBacking::updateAfterDesc > > m_graphicsLayer->setContentsVisible(m_owningLayer.hasVisibleContent() || hasVisibleNonCompositedDescendants()); > if (m_scrollingLayer) { >- m_scrollingLayer->setContentsVisible(renderer().style().visibility() == VISIBLE); >- m_scrollingLayer->setUserInteractionEnabled(renderer().style().pointerEvents() != PE_NONE); >+ m_scrollingLayer->setContentsVisible(renderer().style().visibility() == Visibility::Visible); >+ m_scrollingLayer->setUserInteractionEnabled(renderer().style().pointerEvents() != PointerEvents::None); > } > } > >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -512,8 +512,8 @@ static bool scrollbarHasDisplayNone(Scro > if (!scrollbar || !scrollbar->isCustomScrollbar()) > return false; > >- std::unique_ptr<RenderStyle> scrollbarStyle = static_cast<RenderScrollbar*>(scrollbar)->getScrollbarPseudoStyle(ScrollbarBGPart, SCROLLBAR); >- return scrollbarStyle && scrollbarStyle->display() == NONE; >+ std::unique_ptr<RenderStyle> scrollbarStyle = static_cast<RenderScrollbar*>(scrollbar)->getScrollbarPseudoStyle(ScrollbarBGPart, PseudoId::Scrollbar); >+ return scrollbarStyle && scrollbarStyle->display() == DisplayType::None; > } > > // FIXME: Can we make |layer| const RenderLayer&? >@@ -2432,7 +2432,7 @@ bool RenderLayerCompositor::requiresComp > m_reevaluateCompositingAfterLayout = true; > > auto& pluginRenderer = downcast<RenderWidget>(renderer); >- if (pluginRenderer.style().visibility() != VISIBLE) >+ if (pluginRenderer.style().visibility() != Visibility::Visible) > return false; > > // If we can't reliably know the size of the plugin yet, don't change compositing state. >@@ -2450,7 +2450,7 @@ bool RenderLayerCompositor::requiresComp > return false; > > auto& frameRenderer = downcast<RenderWidget>(renderer); >- if (frameRenderer.style().visibility() != VISIBLE) >+ if (frameRenderer.style().visibility() != Visibility::Visible) > return false; > > if (!frameRenderer.requiresAcceleratedCompositing()) >Index: Source/WebCore/rendering/RenderListBox.cpp >=================================================================== >--- Source/WebCore/rendering/RenderListBox.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderListBox.cpp (working copy) >@@ -310,7 +310,7 @@ void RenderListBox::paintItem(PaintInfo& > > void RenderListBox::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > if (paintInfo.phase == PaintPhaseForeground) { >@@ -386,17 +386,17 @@ void RenderListBox::paintScrollbar(Paint > > static LayoutSize itemOffsetForAlignment(TextRun textRun, const RenderStyle* itemStyle, FontCascade itemFont, LayoutRect itemBoudingBox) > { >- ETextAlign actualAlignment = itemStyle->textAlign(); >- // FIXME: Firefox doesn't respect JUSTIFY. Should we? >- // FIXME: Handle TAEND here >- if (actualAlignment == TASTART || actualAlignment == JUSTIFY) >- actualAlignment = itemStyle->isLeftToRightDirection() ? LEFT : RIGHT; >+ TextAlignMode actualAlignment = itemStyle->textAlign(); >+ // FIXME: Firefox doesn't respect TextAlignMode::Justify. Should we? >+ // FIXME: Handle TextAlignMode::End here >+ if (actualAlignment == TextAlignMode::Start || actualAlignment == TextAlignMode::Justify) >+ actualAlignment = itemStyle->isLeftToRightDirection() ? TextAlignMode::Left : TextAlignMode::Right; > > LayoutSize offset = LayoutSize(0, itemFont.fontMetrics().ascent()); >- if (actualAlignment == RIGHT || actualAlignment == WEBKIT_RIGHT) { >+ if (actualAlignment == TextAlignMode::Right || actualAlignment == TextAlignMode::WebKitRight) { > float textWidth = itemFont.width(textRun); > offset.setWidth(itemBoudingBox.width() - textWidth - optionsSpacingHorizontal); >- } else if (actualAlignment == CENTER || actualAlignment == WEBKIT_CENTER) { >+ } else if (actualAlignment == TextAlignMode::Center || actualAlignment == TextAlignMode::WebKitCenter) { > float textWidth = itemFont.width(textRun); > offset.setWidth((itemBoudingBox.width() - textWidth) / 2); > } else >@@ -411,7 +411,7 @@ void RenderListBox::paintItemForeground( > > auto& itemStyle = *listItemElement->computedStyle(); > >- if (itemStyle.visibility() == HIDDEN) >+ if (itemStyle.visibility() == Visibility::Hidden) > return; > > String itemText; >@@ -465,7 +465,7 @@ void RenderListBox::paintItemBackground( > backColor = itemStyle.visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor); > > // Draw the background for this list box item >- if (itemStyle.visibility() == HIDDEN) >+ if (itemStyle.visibility() == Visibility::Hidden) > return; > > LayoutRect itemRect = itemBoundingBoxRect(paintOffset, listIndex); >@@ -914,7 +914,7 @@ void RenderListBox::logMockScrollAnimato > Ref<Scrollbar> RenderListBox::createScrollbar() > { > RefPtr<Scrollbar> widget; >- bool hasCustomScrollbarStyle = style().hasPseudoStyle(SCROLLBAR); >+ bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar); > if (hasCustomScrollbarStyle) > widget = RenderScrollbar::createCustomScrollbar(*this, VerticalScrollbar, &selectElement()); > else { >Index: Source/WebCore/rendering/RenderListItem.cpp >=================================================================== >--- Source/WebCore/rendering/RenderListItem.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderListItem.cpp (working copy) >@@ -71,7 +71,7 @@ RenderStyle RenderListItem::computeMarke > fontDescription.setVariantNumericSpacing(FontVariantNumericSpacing::TabularNumbers); > parentStyle.setFontDescription(fontDescription); > parentStyle.fontCascade().update(&document().fontSelector()); >- if (auto markerStyle = getCachedPseudoStyle(MARKER, &parentStyle)) >+ if (auto markerStyle = getCachedPseudoStyle(PseudoId::Marker, &parentStyle)) > return RenderStyle::clone(*markerStyle); > auto markerStyle = RenderStyle::create(); > markerStyle.inheritFrom(parentStyle); >Index: Source/WebCore/rendering/RenderListMarker.cpp >=================================================================== >--- Source/WebCore/rendering/RenderListMarker.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderListMarker.cpp (working copy) >@@ -405,197 +405,197 @@ static NEVER_INLINE void toCJKIdeographi > builder.append(characters, length); > } > >-static EListStyleType effectiveListMarkerType(EListStyleType type, int value) >+static ListStyleType effectiveListMarkerType(ListStyleType type, int value) > { > // Note, the following switch statement has been explicitly grouped > // by list-style-type ordinal range. > switch (type) { >- case ArabicIndic: >- case Bengali: >- case BinaryListStyle: >- case Cambodian: >- case Circle: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Disc: >- case Gujarati: >- case Gurmukhi: >- case Kannada: >- case Khmer: >- case Lao: >- case LowerHexadecimal: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case NoneListStyle: >- case Octal: >- case Oriya: >- case Persian: >- case Square: >- case Telugu: >- case Thai: >- case Tibetan: >- case UpperHexadecimal: >- case Urdu: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Bengali: >+ case ListStyleType::Binary: >+ case ListStyleType::Cambodian: >+ case ListStyleType::Circle: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Disc: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Kannada: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::None: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Persian: >+ case ListStyleType::Square: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::Urdu: > return type; // Can represent all ordinals. >- case Armenian: >- return (value < 1 || value > 99999999) ? DecimalListStyle : type; >- case CJKIdeographic: >- return (value < 0) ? DecimalListStyle : type; >- case Georgian: >- return (value < 1 || value > 19999) ? DecimalListStyle : type; >- case Hebrew: >- return (value < 0 || value > 999999) ? DecimalListStyle : type; >- case LowerRoman: >- case UpperRoman: >- return (value < 1 || value > 3999) ? DecimalListStyle : type; >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case Asterisks: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Footnotes: >- case Hangul: >- case HangulConsonant: >- case Hiragana: >- case HiraganaIroha: >- case Katakana: >- case KatakanaIroha: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerLatin: >- case LowerNorwegian: >- case Oromo: >- case Sidama: >- case Somali: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperLatin: >- case UpperNorwegian: >- return (value < 1) ? DecimalListStyle : type; >+ case ListStyleType::Armenian: >+ return (value < 1 || value > 99999999) ? ListStyleType::Decimal : type; >+ case ListStyleType::CJKIdeographic: >+ return (value < 0) ? ListStyleType::Decimal : type; >+ case ListStyleType::Georgian: >+ return (value < 1 || value > 19999) ? ListStyleType::Decimal : type; >+ case ListStyleType::Hebrew: >+ return (value < 0 || value > 999999) ? ListStyleType::Decimal : type; >+ case ListStyleType::LowerRoman: >+ case ListStyleType::UpperRoman: >+ return (value < 1 || value > 3999) ? ListStyleType::Decimal : type; >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::Asterisks: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Footnotes: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::Oromo: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ return (value < 1) ? ListStyleType::Decimal : type; > } > > ASSERT_NOT_REACHED(); > return type; > } > >-static UChar listMarkerSuffix(EListStyleType type, int value) >+static UChar listMarkerSuffix(ListStyleType type, int value) > { > // If the list-style-type cannot represent |value| because it's outside its > // ordinal range then we fall back to some list style that can represent |value|. >- EListStyleType effectiveType = effectiveListMarkerType(type, value); >+ ListStyleType effectiveType = effectiveListMarkerType(type, value); > > // Note, the following switch statement has been explicitly > // grouped by list-style-type suffix. > switch (effectiveType) { >- case Asterisks: >- case Circle: >- case Disc: >- case Footnotes: >- case NoneListStyle: >- case Square: >+ case ListStyleType::Asterisks: >+ case ListStyleType::Circle: >+ case ListStyleType::Disc: >+ case ListStyleType::Footnotes: >+ case ListStyleType::None: >+ case ListStyleType::Square: > return ' '; >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Oromo: >- case Sidama: >- case Somali: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Oromo: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: > return ethiopicPrefaceColon; >- case Armenian: >- case ArabicIndic: >- case Bengali: >- case BinaryListStyle: >- case Cambodian: >- case CJKIdeographic: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Georgian: >- case Gujarati: >- case Gurmukhi: >- case Hangul: >- case HangulConsonant: >- case Hebrew: >- case Hiragana: >- case HiraganaIroha: >- case Kannada: >- case Katakana: >- case KatakanaIroha: >- case Khmer: >- case Lao: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerHexadecimal: >- case LowerLatin: >- case LowerNorwegian: >- case LowerRoman: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case Octal: >- case Oriya: >- case Persian: >- case Telugu: >- case Thai: >- case Tibetan: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperHexadecimal: >- case UpperLatin: >- case UpperNorwegian: >- case UpperRoman: >- case Urdu: >+ case ListStyleType::Armenian: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Bengali: >+ case ListStyleType::Binary: >+ case ListStyleType::Cambodian: >+ case ListStyleType::CJKIdeographic: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Georgian: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hebrew: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Kannada: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::LowerRoman: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Persian: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ case ListStyleType::UpperRoman: >+ case ListStyleType::Urdu: > return '.'; > } > >@@ -603,518 +603,518 @@ static UChar listMarkerSuffix(EListStyle > return '.'; > } > >-String listMarkerText(EListStyleType type, int value) >+String listMarkerText(ListStyleType type, int value) > { > StringBuilder builder; > > // If the list-style-type, say hebrew, cannot represent |value| because it's outside > // its ordinal range then we fallback to some list style that can represent |value|. > switch (effectiveListMarkerType(type, value)) { >- case NoneListStyle: >- return emptyString(); >+ case ListStyleType::None: >+ return emptyString(); > >- case Asterisks: { >- static const LChar asterisksSymbols[1] = { 0x2A }; >- toSymbolic(builder, value, asterisksSymbols); >- break; >- } >- // We use the same characters for text security. >- // See RenderText::setInternalString. >- case Circle: >- builder.append(whiteBullet); >- break; >- case Disc: >- builder.append(bullet); >- break; >- case Footnotes: { >- static const UChar footnotesSymbols[4] = { 0x002A, 0x2051, 0x2020, 0x2021 }; >- toSymbolic(builder, value, footnotesSymbols); >- break; >- } >- case Square: >- // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE >- // instead, but I think this looks better. >- builder.append(blackSquare); >- break; >- >- case DecimalListStyle: >- builder.appendNumber(value); >- break; >+ case ListStyleType::Asterisks: { >+ static const LChar asterisksSymbols[1] = { 0x2A }; >+ toSymbolic(builder, value, asterisksSymbols); >+ break; >+ } >+ // We use the same characters for text security. >+ // See RenderText::setInternalString. >+ case ListStyleType::Circle: >+ builder.append(whiteBullet); >+ break; >+ case ListStyleType::Disc: >+ builder.append(bullet); >+ break; >+ case ListStyleType::Footnotes: { >+ static const UChar footnotesSymbols[4] = { 0x002A, 0x2051, 0x2020, 0x2021 }; >+ toSymbolic(builder, value, footnotesSymbols); >+ break; >+ } >+ case ListStyleType::Square: >+ // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE >+ // instead, but I think this looks better. >+ builder.append(blackSquare); >+ break; > >- case DecimalLeadingZero: >- if (value < -9 || value > 9) { >- builder.appendNumber(value); >- break; >- } >- if (value < 0) { >- builder.appendLiteral("-0"); >- builder.appendNumber(-value); // -01 to -09 >- break; >- } >- builder.append('0'); >- builder.appendNumber(value); // 00 to 09 >- break; >+ case ListStyleType::Decimal: >+ builder.appendNumber(value); >+ break; > >- case ArabicIndic: { >- static const UChar arabicIndicNumerals[10] = { >- 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 >- }; >- toNumeric(builder, value, arabicIndicNumerals); >+ case ListStyleType::DecimalLeadingZero: >+ if (value < -9 || value > 9) { >+ builder.appendNumber(value); > break; > } >- >- case BinaryListStyle: { >- static const LChar binaryNumerals[2] = { '0', '1' }; >- toNumeric(builder, value, binaryNumerals); >+ if (value < 0) { >+ builder.appendLiteral("-0"); >+ builder.appendNumber(-value); // -01 to -09 > break; > } >+ builder.append('0'); >+ builder.appendNumber(value); // 00 to 09 >+ break; > >- case Bengali: { >- static const UChar bengaliNumerals[10] = { >- 0x09E6, 0x09E7, 0x09E8, 0x09E9, 0x09EA, 0x09EB, 0x09EC, 0x09ED, 0x09EE, 0x09EF >- }; >- toNumeric(builder, value, bengaliNumerals); >- break; >- } >+ case ListStyleType::ArabicIndic: { >+ static const UChar arabicIndicNumerals[10] = { >+ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669 >+ }; >+ toNumeric(builder, value, arabicIndicNumerals); >+ break; >+ } > >- case Cambodian: >- case Khmer: { >- static const UChar khmerNumerals[10] = { >- 0x17E0, 0x17E1, 0x17E2, 0x17E3, 0x17E4, 0x17E5, 0x17E6, 0x17E7, 0x17E8, 0x17E9 >- }; >- toNumeric(builder, value, khmerNumerals); >- break; >- } >- case Devanagari: { >- static const UChar devanagariNumerals[10] = { >- 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 0x096F >- }; >- toNumeric(builder, value, devanagariNumerals); >- break; >- } >- case Gujarati: { >- static const UChar gujaratiNumerals[10] = { >- 0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 0x0AEF >- }; >- toNumeric(builder, value, gujaratiNumerals); >- break; >- } >- case Gurmukhi: { >- static const UChar gurmukhiNumerals[10] = { >- 0x0A66, 0x0A67, 0x0A68, 0x0A69, 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 0x0A6E, 0x0A6F >- }; >- toNumeric(builder, value, gurmukhiNumerals); >- break; >- } >- case Kannada: { >- static const UChar kannadaNumerals[10] = { >- 0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 0x0CEE, 0x0CEF >- }; >- toNumeric(builder, value, kannadaNumerals); >- break; >- } >- case LowerHexadecimal: { >- static const LChar lowerHexadecimalNumerals[16] = { >- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' >- }; >- toNumeric(builder, value, lowerHexadecimalNumerals); >- break; >- } >- case Lao: { >- static const UChar laoNumerals[10] = { >- 0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 0x0ED8, 0x0ED9 >- }; >- toNumeric(builder, value, laoNumerals); >- break; >- } >- case Malayalam: { >- static const UChar malayalamNumerals[10] = { >- 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A, 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F >- }; >- toNumeric(builder, value, malayalamNumerals); >- break; >- } >- case Mongolian: { >- static const UChar mongolianNumerals[10] = { >- 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819 >- }; >- toNumeric(builder, value, mongolianNumerals); >- break; >- } >- case Myanmar: { >- static const UChar myanmarNumerals[10] = { >- 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049 >- }; >- toNumeric(builder, value, myanmarNumerals); >- break; >- } >- case Octal: { >- static const LChar octalNumerals[8] = { >- '0', '1', '2', '3', '4', '5', '6', '7' >- }; >- toNumeric(builder, value, octalNumerals); >- break; >- } >- case Oriya: { >- static const UChar oriyaNumerals[10] = { >- 0x0B66, 0x0B67, 0x0B68, 0x0B69, 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D, 0x0B6E, 0x0B6F >- }; >- toNumeric(builder, value, oriyaNumerals); >- break; >- } >- case Persian: >- case Urdu: { >- static const UChar urduNumerals[10] = { >- 0x06F0, 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, 0x06F9 >- }; >- toNumeric(builder, value, urduNumerals); >- break; >- } >- case Telugu: { >- static const UChar teluguNumerals[10] = { >- 0x0C66, 0x0C67, 0x0C68, 0x0C69, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C6F >- }; >- toNumeric(builder, value, teluguNumerals); >- break; >- } >- case Tibetan: { >- static const UChar tibetanNumerals[10] = { >- 0x0F20, 0x0F21, 0x0F22, 0x0F23, 0x0F24, 0x0F25, 0x0F26, 0x0F27, 0x0F28, 0x0F29 >- }; >- toNumeric(builder, value, tibetanNumerals); >- break; >- } >- case Thai: { >- static const UChar thaiNumerals[10] = { >- 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59 >- }; >- toNumeric(builder, value, thaiNumerals); >- break; >- } >- case UpperHexadecimal: { >- static const LChar upperHexadecimalNumerals[16] = { >- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' >- }; >- toNumeric(builder, value, upperHexadecimalNumerals); >- break; >- } >+ case ListStyleType::Binary: { >+ static const LChar binaryNumerals[2] = { '0', '1' }; >+ toNumeric(builder, value, binaryNumerals); >+ break; >+ } > >- case LowerAlpha: >- case LowerLatin: { >- static const LChar lowerLatinAlphabet[26] = { >- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', >- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' >- }; >- toAlphabetic(builder, value, lowerLatinAlphabet); >- break; >- } >- case UpperAlpha: >- case UpperLatin: { >- static const LChar upperLatinAlphabet[26] = { >- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', >- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' >- }; >- toAlphabetic(builder, value, upperLatinAlphabet); >- break; >- } >- case LowerGreek: { >- static const UChar lowerGreekAlphabet[24] = { >- 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, >- 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, >- 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9 >- }; >- toAlphabetic(builder, value, lowerGreekAlphabet); >- break; >- } >+ case ListStyleType::Bengali: { >+ static const UChar bengaliNumerals[10] = { >+ 0x09E6, 0x09E7, 0x09E8, 0x09E9, 0x09EA, 0x09EB, 0x09EC, 0x09ED, 0x09EE, 0x09EF >+ }; >+ toNumeric(builder, value, bengaliNumerals); >+ break; >+ } > >- case Hiragana: { >- // FIXME: This table comes from the CSS3 draft, and is probably >- // incorrect, given the comments in that draft. >- static const UChar hiraganaAlphabet[48] = { >- 0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D, 0x304F, >- 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D, 0x305F, >- 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B, 0x306C, 0x306D, >- 0x306E, 0x306F, 0x3072, 0x3075, 0x3078, 0x307B, 0x307E, 0x307F, >- 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, 0x3089, 0x308A, >- 0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093 >- }; >- toAlphabetic(builder, value, hiraganaAlphabet); >- break; >- } >- case HiraganaIroha: { >- // FIXME: This table comes from the CSS3 draft, and is probably >- // incorrect, given the comments in that draft. >- static const UChar hiraganaIrohaAlphabet[47] = { >- 0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068, 0x3061, >- 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B, 0x3088, 0x305F, >- 0x308C, 0x305D, 0x3064, 0x306D, 0x306A, 0x3089, 0x3080, 0x3046, >- 0x3090, 0x306E, 0x304A, 0x304F, 0x3084, 0x307E, 0x3051, 0x3075, >- 0x3053, 0x3048, 0x3066, 0x3042, 0x3055, 0x304D, 0x3086, 0x3081, >- 0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059 >- }; >- toAlphabetic(builder, value, hiraganaIrohaAlphabet); >- break; >- } >- case Katakana: { >- // FIXME: This table comes from the CSS3 draft, and is probably >- // incorrect, given the comments in that draft. >- static const UChar katakanaAlphabet[48] = { >- 0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD, 0x30AF, >- 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB, 0x30BD, 0x30BF, >- 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA, 0x30CB, 0x30CC, 0x30CD, >- 0x30CE, 0x30CF, 0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30DE, 0x30DF, >- 0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9, 0x30EA, >- 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3 >- }; >- toAlphabetic(builder, value, katakanaAlphabet); >- break; >- } >- case KatakanaIroha: { >- // FIXME: This table comes from the CSS3 draft, and is probably >- // incorrect, given the comments in that draft. >- static const UChar katakanaIrohaAlphabet[47] = { >- 0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8, 0x30C1, >- 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB, 0x30E8, 0x30BF, >- 0x30EC, 0x30BD, 0x30C4, 0x30CD, 0x30CA, 0x30E9, 0x30E0, 0x30A6, >- 0x30F0, 0x30CE, 0x30AA, 0x30AF, 0x30E4, 0x30DE, 0x30B1, 0x30D5, >- 0x30B3, 0x30A8, 0x30C6, 0x30A2, 0x30B5, 0x30AD, 0x30E6, 0x30E1, >- 0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9 >- }; >- toAlphabetic(builder, value, katakanaIrohaAlphabet); >- break; >- } >+ case ListStyleType::Cambodian: >+ case ListStyleType::Khmer: { >+ static const UChar khmerNumerals[10] = { >+ 0x17E0, 0x17E1, 0x17E2, 0x17E3, 0x17E4, 0x17E5, 0x17E6, 0x17E7, 0x17E8, 0x17E9 >+ }; >+ toNumeric(builder, value, khmerNumerals); >+ break; >+ } >+ case ListStyleType::Devanagari: { >+ static const UChar devanagariNumerals[10] = { >+ 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 0x096F >+ }; >+ toNumeric(builder, value, devanagariNumerals); >+ break; >+ } >+ case ListStyleType::Gujarati: { >+ static const UChar gujaratiNumerals[10] = { >+ 0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 0x0AEF >+ }; >+ toNumeric(builder, value, gujaratiNumerals); >+ break; >+ } >+ case ListStyleType::Gurmukhi: { >+ static const UChar gurmukhiNumerals[10] = { >+ 0x0A66, 0x0A67, 0x0A68, 0x0A69, 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 0x0A6E, 0x0A6F >+ }; >+ toNumeric(builder, value, gurmukhiNumerals); >+ break; >+ } >+ case ListStyleType::Kannada: { >+ static const UChar kannadaNumerals[10] = { >+ 0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 0x0CEE, 0x0CEF >+ }; >+ toNumeric(builder, value, kannadaNumerals); >+ break; >+ } >+ case ListStyleType::LowerHexadecimal: { >+ static const LChar lowerHexadecimalNumerals[16] = { >+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' >+ }; >+ toNumeric(builder, value, lowerHexadecimalNumerals); >+ break; >+ } >+ case ListStyleType::Lao: { >+ static const UChar laoNumerals[10] = { >+ 0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 0x0ED8, 0x0ED9 >+ }; >+ toNumeric(builder, value, laoNumerals); >+ break; >+ } >+ case ListStyleType::Malayalam: { >+ static const UChar malayalamNumerals[10] = { >+ 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A, 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F >+ }; >+ toNumeric(builder, value, malayalamNumerals); >+ break; >+ } >+ case ListStyleType::Mongolian: { >+ static const UChar mongolianNumerals[10] = { >+ 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819 >+ }; >+ toNumeric(builder, value, mongolianNumerals); >+ break; >+ } >+ case ListStyleType::Myanmar: { >+ static const UChar myanmarNumerals[10] = { >+ 0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049 >+ }; >+ toNumeric(builder, value, myanmarNumerals); >+ break; >+ } >+ case ListStyleType::Octal: { >+ static const LChar octalNumerals[8] = { >+ '0', '1', '2', '3', '4', '5', '6', '7' >+ }; >+ toNumeric(builder, value, octalNumerals); >+ break; >+ } >+ case ListStyleType::Oriya: { >+ static const UChar oriyaNumerals[10] = { >+ 0x0B66, 0x0B67, 0x0B68, 0x0B69, 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D, 0x0B6E, 0x0B6F >+ }; >+ toNumeric(builder, value, oriyaNumerals); >+ break; >+ } >+ case ListStyleType::Persian: >+ case ListStyleType::Urdu: { >+ static const UChar urduNumerals[10] = { >+ 0x06F0, 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, 0x06F9 >+ }; >+ toNumeric(builder, value, urduNumerals); >+ break; >+ } >+ case ListStyleType::Telugu: { >+ static const UChar teluguNumerals[10] = { >+ 0x0C66, 0x0C67, 0x0C68, 0x0C69, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C6F >+ }; >+ toNumeric(builder, value, teluguNumerals); >+ break; >+ } >+ case ListStyleType::Tibetan: { >+ static const UChar tibetanNumerals[10] = { >+ 0x0F20, 0x0F21, 0x0F22, 0x0F23, 0x0F24, 0x0F25, 0x0F26, 0x0F27, 0x0F28, 0x0F29 >+ }; >+ toNumeric(builder, value, tibetanNumerals); >+ break; >+ } >+ case ListStyleType::Thai: { >+ static const UChar thaiNumerals[10] = { >+ 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59 >+ }; >+ toNumeric(builder, value, thaiNumerals); >+ break; >+ } >+ case ListStyleType::UpperHexadecimal: { >+ static const LChar upperHexadecimalNumerals[16] = { >+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' >+ }; >+ toNumeric(builder, value, upperHexadecimalNumerals); >+ break; >+ } > >- case Afar: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAaEr: { >- static const UChar ethiopicHalehameAaErAlphabet[18] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1260, 0x1270, 0x1290, >- 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, 0x1308, 0x1338, 0x1348 >- }; >- toAlphabetic(builder, value, ethiopicHalehameAaErAlphabet); >- break; >- } >- case Amharic: >- case EthiopicHalehameAmEt: { >- static const UChar ethiopicHalehameAmEtAlphabet[33] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, >- 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, >- 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, >- 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicHalehameAmEtAlphabet); >- break; >- } >- case AmharicAbegede: >- case EthiopicAbegedeAmEt: { >- static const UChar ethiopicAbegedeAmEtAlphabet[33] = { >- 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >- 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >- 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1228, 0x1230, 0x1238, >- 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicAbegedeAmEtAlphabet); >- break; >- } >- case CjkEarthlyBranch: { >- static const UChar cjkEarthlyBranchAlphabet[12] = { >- 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 0x5348, 0x672A, 0x7533, >- 0x9149, 0x620C, 0x4EA5 >- }; >- toAlphabetic(builder, value, cjkEarthlyBranchAlphabet); >- break; >- } >- case CjkHeavenlyStem: { >- static const UChar cjkHeavenlyStemAlphabet[10] = { >- 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC, >- 0x7678 >- }; >- toAlphabetic(builder, value, cjkHeavenlyStemAlphabet); >- break; >- } >- case Ethiopic: >- case EthiopicHalehameGez: { >- static const UChar ethiopicHalehameGezAlphabet[26] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1240, 0x1260, >- 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8, >- 0x12F0, 0x1308, 0x1320, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicHalehameGezAlphabet); >- break; >- } >- case EthiopicAbegede: >- case EthiopicAbegedeGez: { >- static const UChar ethiopicAbegedeGezAlphabet[26] = { >- 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1200, 0x12C8, 0x12D8, 0x1210, 0x1320, >- 0x12E8, 0x12A8, 0x1208, 0x1218, 0x1290, 0x1220, 0x12D0, 0x1348, 0x1338, >- 0x1240, 0x1228, 0x1230, 0x1270, 0x1280, 0x1340, 0x1330, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicAbegedeGezAlphabet); >- break; >- } >- case HangulConsonant: { >- static const UChar hangulConsonantAlphabet[14] = { >- 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 0x3147, 0x3148, >- 0x314A, 0x314B, 0x314C, 0x314D, 0x314E >- }; >- toAlphabetic(builder, value, hangulConsonantAlphabet); >- break; >- } >- case Hangul: { >- static const UChar hangulAlphabet[14] = { >- 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 0xC544, 0xC790, >- 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558 >- }; >- toAlphabetic(builder, value, hangulAlphabet); >- break; >- } >- case Oromo: >- case EthiopicHalehameOmEt: { >- static const UChar ethiopicHalehameOmEtAlphabet[25] = { >- 0x1200, 0x1208, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, 0x1270, >- 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, 0x12F8, >- 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348 >- }; >- toAlphabetic(builder, value, ethiopicHalehameOmEtAlphabet); >- break; >- } >- case Sidama: >- case EthiopicHalehameSidEt: { >- static const UChar ethiopicHalehameSidEtAlphabet[26] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >- 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, >- 0x12F8, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348 >- }; >- toAlphabetic(builder, value, ethiopicHalehameSidEtAlphabet); >- break; >- } >- case Somali: >- case EthiopicHalehameSoEt: { >- static const UChar ethiopicHalehameSoEtAlphabet[22] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >- 0x1270, 0x1290, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, >- 0x1300, 0x1308, 0x1338, 0x1348 >- }; >- toAlphabetic(builder, value, ethiopicHalehameSoEtAlphabet); >- break; >- } >- case Tigre: >- case EthiopicHalehameTig: { >- static const UChar ethiopicHalehameTigAlphabet[27] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >- 0x1270, 0x1278, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8, >- 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicHalehameTigAlphabet); >- break; >- } >- case TigrinyaEr: >- case EthiopicHalehameTiEr: { >- static const UChar ethiopicHalehameTiErAlphabet[31] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250, >- 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, >- 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, >- 0x1330, 0x1338, 0x1348, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicHalehameTiErAlphabet); >- break; >- } >- case TigrinyaErAbegede: >- case EthiopicAbegedeTiEr: { >- static const UChar ethiopicAbegedeTiErAlphabet[31] = { >- 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >- 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >- 0x1298, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, 0x1238, >- 0x1270, 0x1278, 0x1330, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicAbegedeTiErAlphabet); >- break; >- } >- case TigrinyaEt: >- case EthiopicHalehameTiEt: { >- static const UChar ethiopicHalehameTiEtAlphabet[34] = { >- 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, >- 0x1250, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, >- 0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, >- 0x1320, 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicHalehameTiEtAlphabet); >- break; >- } >- case TigrinyaEtAbegede: >- case EthiopicAbegedeTiEt: { >- static const UChar ethiopicAbegedeTiEtAlphabet[34] = { >- 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >- 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >- 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, >- 0x1238, 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350 >- }; >- toAlphabetic(builder, value, ethiopicAbegedeTiEtAlphabet); >- break; >- } >- case UpperGreek: { >- static const UChar upperGreekAlphabet[24] = { >- 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, >- 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, 0x03A3, >- 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9 >- }; >- toAlphabetic(builder, value, upperGreekAlphabet); >- break; >- } >- case LowerNorwegian: { >- static const LChar lowerNorwegianAlphabet[29] = { >- 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, >- 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, >- 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xE6, >- 0xF8, 0xE5 >- }; >- toAlphabetic(builder, value, lowerNorwegianAlphabet); >- break; >- } >- case UpperNorwegian: { >- static const LChar upperNorwegianAlphabet[29] = { >- 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, >- 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, >- 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xC6, >- 0xD8, 0xC5 >- }; >- toAlphabetic(builder, value, upperNorwegianAlphabet); >- break; >- } >- case CJKIdeographic: { >- static const UChar traditionalChineseInformalTable[16] = { >- 0x842C, 0x5104, 0x5146, >- 0x5341, 0x767E, 0x5343, >- 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, >- 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D >- }; >- toCJKIdeographic(builder, value, traditionalChineseInformalTable); >- break; >- } >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerLatin: { >+ static const LChar lowerLatinAlphabet[26] = { >+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', >+ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' >+ }; >+ toAlphabetic(builder, value, lowerLatinAlphabet); >+ break; >+ } >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperLatin: { >+ static const LChar upperLatinAlphabet[26] = { >+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', >+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' >+ }; >+ toAlphabetic(builder, value, upperLatinAlphabet); >+ break; >+ } >+ case ListStyleType::LowerGreek: { >+ static const UChar lowerGreekAlphabet[24] = { >+ 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, >+ 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, >+ 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9 >+ }; >+ toAlphabetic(builder, value, lowerGreekAlphabet); >+ break; >+ } > >- case LowerRoman: >- toRoman(builder, value, false); >- break; >- case UpperRoman: >- toRoman(builder, value, true); >- break; >+ case ListStyleType::Hiragana: { >+ // FIXME: This table comes from the CSS3 draft, and is probably >+ // incorrect, given the comments in that draft. >+ static const UChar hiraganaAlphabet[48] = { >+ 0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D, 0x304F, >+ 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D, 0x305F, >+ 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B, 0x306C, 0x306D, >+ 0x306E, 0x306F, 0x3072, 0x3075, 0x3078, 0x307B, 0x307E, 0x307F, >+ 0x3080, 0x3081, 0x3082, 0x3084, 0x3086, 0x3088, 0x3089, 0x308A, >+ 0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093 >+ }; >+ toAlphabetic(builder, value, hiraganaAlphabet); >+ break; >+ } >+ case ListStyleType::HiraganaIroha: { >+ // FIXME: This table comes from the CSS3 draft, and is probably >+ // incorrect, given the comments in that draft. >+ static const UChar hiraganaIrohaAlphabet[47] = { >+ 0x3044, 0x308D, 0x306F, 0x306B, 0x307B, 0x3078, 0x3068, 0x3061, >+ 0x308A, 0x306C, 0x308B, 0x3092, 0x308F, 0x304B, 0x3088, 0x305F, >+ 0x308C, 0x305D, 0x3064, 0x306D, 0x306A, 0x3089, 0x3080, 0x3046, >+ 0x3090, 0x306E, 0x304A, 0x304F, 0x3084, 0x307E, 0x3051, 0x3075, >+ 0x3053, 0x3048, 0x3066, 0x3042, 0x3055, 0x304D, 0x3086, 0x3081, >+ 0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059 >+ }; >+ toAlphabetic(builder, value, hiraganaIrohaAlphabet); >+ break; >+ } >+ case ListStyleType::Katakana: { >+ // FIXME: This table comes from the CSS3 draft, and is probably >+ // incorrect, given the comments in that draft. >+ static const UChar katakanaAlphabet[48] = { >+ 0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30AB, 0x30AD, 0x30AF, >+ 0x30B1, 0x30B3, 0x30B5, 0x30B7, 0x30B9, 0x30BB, 0x30BD, 0x30BF, >+ 0x30C1, 0x30C4, 0x30C6, 0x30C8, 0x30CA, 0x30CB, 0x30CC, 0x30CD, >+ 0x30CE, 0x30CF, 0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30DE, 0x30DF, >+ 0x30E0, 0x30E1, 0x30E2, 0x30E4, 0x30E6, 0x30E8, 0x30E9, 0x30EA, >+ 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3 >+ }; >+ toAlphabetic(builder, value, katakanaAlphabet); >+ break; >+ } >+ case ListStyleType::KatakanaIroha: { >+ // FIXME: This table comes from the CSS3 draft, and is probably >+ // incorrect, given the comments in that draft. >+ static const UChar katakanaIrohaAlphabet[47] = { >+ 0x30A4, 0x30ED, 0x30CF, 0x30CB, 0x30DB, 0x30D8, 0x30C8, 0x30C1, >+ 0x30EA, 0x30CC, 0x30EB, 0x30F2, 0x30EF, 0x30AB, 0x30E8, 0x30BF, >+ 0x30EC, 0x30BD, 0x30C4, 0x30CD, 0x30CA, 0x30E9, 0x30E0, 0x30A6, >+ 0x30F0, 0x30CE, 0x30AA, 0x30AF, 0x30E4, 0x30DE, 0x30B1, 0x30D5, >+ 0x30B3, 0x30A8, 0x30C6, 0x30A2, 0x30B5, 0x30AD, 0x30E6, 0x30E1, >+ 0x30DF, 0x30B7, 0x30F1, 0x30D2, 0x30E2, 0x30BB, 0x30B9 >+ }; >+ toAlphabetic(builder, value, katakanaIrohaAlphabet); >+ break; >+ } > >- case Armenian: >- case UpperArmenian: >- // CSS3 says "armenian" means "lower-armenian". >- // But the CSS2.1 test suite contains uppercase test results for "armenian", >- // so we'll match the test suite. >- toArmenian(builder, value, true); >- break; >- case LowerArmenian: >- toArmenian(builder, value, false); >- break; >- case Georgian: >- toGeorgian(builder, value); >- break; >- case Hebrew: >- toHebrew(builder, value); >- break; >+ case ListStyleType::Afar: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAaEr: { >+ static const UChar ethiopicHalehameAaErAlphabet[18] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1260, 0x1270, 0x1290, >+ 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, 0x1308, 0x1338, 0x1348 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameAaErAlphabet); >+ break; >+ } >+ case ListStyleType::Amharic: >+ case ListStyleType::EthiopicHalehameAmEt: { >+ static const UChar ethiopicHalehameAmEtAlphabet[33] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, >+ 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, >+ 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, >+ 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameAmEtAlphabet); >+ break; >+ } >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: { >+ static const UChar ethiopicAbegedeAmEtAlphabet[33] = { >+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >+ 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1228, 0x1230, 0x1238, >+ 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicAbegedeAmEtAlphabet); >+ break; >+ } >+ case ListStyleType::CjkEarthlyBranch: { >+ static const UChar cjkEarthlyBranchAlphabet[12] = { >+ 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 0x5348, 0x672A, 0x7533, >+ 0x9149, 0x620C, 0x4EA5 >+ }; >+ toAlphabetic(builder, value, cjkEarthlyBranchAlphabet); >+ break; >+ } >+ case ListStyleType::CjkHeavenlyStem: { >+ static const UChar cjkHeavenlyStemAlphabet[10] = { >+ 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC, >+ 0x7678 >+ }; >+ toAlphabetic(builder, value, cjkHeavenlyStemAlphabet); >+ break; >+ } >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicHalehameGez: { >+ static const UChar ethiopicHalehameGezAlphabet[26] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1240, 0x1260, >+ 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8, >+ 0x12F0, 0x1308, 0x1320, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameGezAlphabet); >+ break; >+ } >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeGez: { >+ static const UChar ethiopicAbegedeGezAlphabet[26] = { >+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1200, 0x12C8, 0x12D8, 0x1210, 0x1320, >+ 0x12E8, 0x12A8, 0x1208, 0x1218, 0x1290, 0x1220, 0x12D0, 0x1348, 0x1338, >+ 0x1240, 0x1228, 0x1230, 0x1270, 0x1280, 0x1340, 0x1330, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicAbegedeGezAlphabet); >+ break; >+ } >+ case ListStyleType::HangulConsonant: { >+ static const UChar hangulConsonantAlphabet[14] = { >+ 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 0x3147, 0x3148, >+ 0x314A, 0x314B, 0x314C, 0x314D, 0x314E >+ }; >+ toAlphabetic(builder, value, hangulConsonantAlphabet); >+ break; >+ } >+ case ListStyleType::Hangul: { >+ static const UChar hangulAlphabet[14] = { >+ 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 0xC544, 0xC790, >+ 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558 >+ }; >+ toAlphabetic(builder, value, hangulAlphabet); >+ break; >+ } >+ case ListStyleType::Oromo: >+ case ListStyleType::EthiopicHalehameOmEt: { >+ static const UChar ethiopicHalehameOmEtAlphabet[25] = { >+ 0x1200, 0x1208, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, 0x1270, >+ 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, 0x12F8, >+ 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameOmEtAlphabet); >+ break; >+ } >+ case ListStyleType::Sidama: >+ case ListStyleType::EthiopicHalehameSidEt: { >+ static const UChar ethiopicHalehameSidEtAlphabet[26] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >+ 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12C8, 0x12E8, 0x12F0, >+ 0x12F8, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameSidEtAlphabet); >+ break; >+ } >+ case ListStyleType::Somali: >+ case ListStyleType::EthiopicHalehameSoEt: { >+ static const UChar ethiopicHalehameSoEtAlphabet[22] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >+ 0x1270, 0x1290, 0x12A0, 0x12A8, 0x12B8, 0x12C8, 0x12D0, 0x12E8, 0x12F0, >+ 0x1300, 0x1308, 0x1338, 0x1348 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameSoEtAlphabet); >+ break; >+ } >+ case ListStyleType::Tigre: >+ case ListStyleType::EthiopicHalehameTig: { >+ static const UChar ethiopicHalehameTigAlphabet[27] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, >+ 0x1270, 0x1278, 0x1290, 0x12A0, 0x12A8, 0x12C8, 0x12D0, 0x12D8, 0x12E8, >+ 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, 0x1338, 0x1330, 0x1348, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameTigAlphabet); >+ break; >+ } >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::EthiopicHalehameTiEr: { >+ static const UChar ethiopicHalehameTiErAlphabet[31] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250, >+ 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, 0x12B8, 0x12C8, >+ 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, 0x1320, 0x1328, >+ 0x1330, 0x1338, 0x1348, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameTiErAlphabet); >+ break; >+ } >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::EthiopicAbegedeTiEr: { >+ static const UChar ethiopicAbegedeTiErAlphabet[31] = { >+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >+ 0x1298, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, 0x1238, >+ 0x1270, 0x1278, 0x1330, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicAbegedeTiErAlphabet); >+ break; >+ } >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::EthiopicHalehameTiEt: { >+ static const UChar ethiopicHalehameTiEtAlphabet[34] = { >+ 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, >+ 0x1250, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, 0x1298, 0x12A0, 0x12A8, >+ 0x12B8, 0x12C8, 0x12D0, 0x12D8, 0x12E0, 0x12E8, 0x12F0, 0x1300, 0x1308, >+ 0x1320, 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicHalehameTiEtAlphabet); >+ break; >+ } >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::EthiopicAbegedeTiEt: { >+ static const UChar ethiopicAbegedeTiEtAlphabet[34] = { >+ 0x12A0, 0x1260, 0x1308, 0x12F0, 0x1300, 0x1200, 0x12C8, 0x12D8, 0x12E0, >+ 0x1210, 0x1320, 0x1328, 0x12E8, 0x12A8, 0x12B8, 0x1208, 0x1218, 0x1290, >+ 0x1298, 0x1220, 0x12D0, 0x1348, 0x1338, 0x1240, 0x1250, 0x1228, 0x1230, >+ 0x1238, 0x1270, 0x1278, 0x1280, 0x1340, 0x1330, 0x1350 >+ }; >+ toAlphabetic(builder, value, ethiopicAbegedeTiEtAlphabet); >+ break; >+ } >+ case ListStyleType::UpperGreek: { >+ static const UChar upperGreekAlphabet[24] = { >+ 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, >+ 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03A1, 0x03A3, >+ 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9 >+ }; >+ toAlphabetic(builder, value, upperGreekAlphabet); >+ break; >+ } >+ case ListStyleType::LowerNorwegian: { >+ static const LChar lowerNorwegianAlphabet[29] = { >+ 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, >+ 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, >+ 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0xE6, >+ 0xF8, 0xE5 >+ }; >+ toAlphabetic(builder, value, lowerNorwegianAlphabet); >+ break; >+ } >+ case ListStyleType::UpperNorwegian: { >+ static const LChar upperNorwegianAlphabet[29] = { >+ 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, >+ 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, >+ 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0xC6, >+ 0xD8, 0xC5 >+ }; >+ toAlphabetic(builder, value, upperNorwegianAlphabet); >+ break; >+ } >+ case ListStyleType::CJKIdeographic: { >+ static const UChar traditionalChineseInformalTable[16] = { >+ 0x842C, 0x5104, 0x5146, >+ 0x5341, 0x767E, 0x5343, >+ 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, >+ 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D >+ }; >+ toCJKIdeographic(builder, value, traditionalChineseInformalTable); >+ break; >+ } >+ >+ case ListStyleType::LowerRoman: >+ toRoman(builder, value, false); >+ break; >+ case ListStyleType::UpperRoman: >+ toRoman(builder, value, true); >+ break; >+ >+ case ListStyleType::Armenian: >+ case ListStyleType::UpperArmenian: >+ // CSS3 says "armenian" means "lower-armenian". >+ // But the CSS2.1 test suite contains uppercase test results for "armenian", >+ // so we'll match the test suite. >+ toArmenian(builder, value, true); >+ break; >+ case ListStyleType::LowerArmenian: >+ toArmenian(builder, value, false); >+ break; >+ case ListStyleType::Georgian: >+ toGeorgian(builder, value); >+ break; >+ case ListStyleType::Hebrew: >+ toHebrew(builder, value); >+ break; > } > > return builder.toString(); >@@ -1186,7 +1186,7 @@ void RenderListMarker::paint(PaintInfo& > if (paintInfo.phase != PaintPhaseForeground) > return; > >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > LayoutPoint boxOrigin(paintOffset + location()); >@@ -1227,98 +1227,98 @@ void RenderListMarker::paint(PaintInfo& > context.setStrokeThickness(1.0f); > context.setFillColor(color); > >- EListStyleType type = style().listStyleType(); >+ ListStyleType type = style().listStyleType(); > switch (type) { >- case Disc: >- context.drawEllipse(markerRect); >- return; >- case Circle: >- context.setFillColor(Color::transparent); >- context.drawEllipse(markerRect); >- return; >- case Square: >- context.drawRect(markerRect); >- return; >- case NoneListStyle: >- return; >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case ArabicIndic: >- case Armenian: >- case BinaryListStyle: >- case Bengali: >- case Cambodian: >- case CJKIdeographic: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Georgian: >- case Gujarati: >- case Gurmukhi: >- case Hangul: >- case HangulConsonant: >- case Hebrew: >- case Hiragana: >- case HiraganaIroha: >- case Kannada: >- case Katakana: >- case KatakanaIroha: >- case Khmer: >- case Lao: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerHexadecimal: >- case LowerLatin: >- case LowerNorwegian: >- case LowerRoman: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case Octal: >- case Oriya: >- case Oromo: >- case Persian: >- case Sidama: >- case Somali: >- case Telugu: >- case Thai: >- case Tibetan: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperHexadecimal: >- case UpperLatin: >- case UpperNorwegian: >- case UpperRoman: >- case Urdu: >- case Asterisks: >- case Footnotes: >- break; >+ case ListStyleType::Disc: >+ context.drawEllipse(markerRect); >+ return; >+ case ListStyleType::Circle: >+ context.setFillColor(Color::transparent); >+ context.drawEllipse(markerRect); >+ return; >+ case ListStyleType::Square: >+ context.drawRect(markerRect); >+ return; >+ case ListStyleType::None: >+ return; >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Armenian: >+ case ListStyleType::Binary: >+ case ListStyleType::Bengali: >+ case ListStyleType::Cambodian: >+ case ListStyleType::CJKIdeographic: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Georgian: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hebrew: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Kannada: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::LowerRoman: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Oromo: >+ case ListStyleType::Persian: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ case ListStyleType::UpperRoman: >+ case ListStyleType::Urdu: >+ case ListStyleType::Asterisks: >+ case ListStyleType::Footnotes: >+ break; > } > if (m_text.isEmpty()) > return; >@@ -1340,7 +1340,7 @@ void RenderListMarker::paint(PaintInfo& > FloatPoint textOrigin = FloatPoint(markerRect.x(), markerRect.y() + style().fontMetrics().ascent()); > textOrigin = roundPointToDevicePixels(LayoutPoint(textOrigin), document().deviceScaleFactor(), style().isLeftToRightDirection()); > >- if (type == Asterisks || type == Footnotes) >+ if (type == ListStyleType::Asterisks || type == ListStyleType::Footnotes) > context.drawText(font, textRun, textOrigin); > else { > const UChar suffix = listMarkerSuffix(type, m_listItem.value()); >@@ -1448,92 +1448,92 @@ void RenderListMarker::updateContent() > return; > } > >- EListStyleType type = style().listStyleType(); >+ ListStyleType type = style().listStyleType(); > switch (type) { >- case NoneListStyle: >+ case ListStyleType::None: > break; >- case Circle: >- case Disc: >- case Square: >+ case ListStyleType::Circle: >+ case ListStyleType::Disc: >+ case ListStyleType::Square: > m_text = listMarkerText(type, 0); // value is ignored for these types > break; >- case Asterisks: >- case Footnotes: >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case ArabicIndic: >- case Armenian: >- case BinaryListStyle: >- case Bengali: >- case Cambodian: >- case CJKIdeographic: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Georgian: >- case Gujarati: >- case Gurmukhi: >- case Hangul: >- case HangulConsonant: >- case Hebrew: >- case Hiragana: >- case HiraganaIroha: >- case Kannada: >- case Katakana: >- case KatakanaIroha: >- case Khmer: >- case Lao: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerHexadecimal: >- case LowerLatin: >- case LowerNorwegian: >- case LowerRoman: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case Octal: >- case Oriya: >- case Oromo: >- case Persian: >- case Sidama: >- case Somali: >- case Telugu: >- case Thai: >- case Tibetan: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperHexadecimal: >- case UpperLatin: >- case UpperNorwegian: >- case UpperRoman: >- case Urdu: >+ case ListStyleType::Asterisks: >+ case ListStyleType::Footnotes: >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Armenian: >+ case ListStyleType::Binary: >+ case ListStyleType::Bengali: >+ case ListStyleType::Cambodian: >+ case ListStyleType::CJKIdeographic: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Georgian: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hebrew: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Kannada: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::LowerRoman: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Oromo: >+ case ListStyleType::Persian: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ case ListStyleType::UpperRoman: >+ case ListStyleType::Urdu: > m_text = listMarkerText(type, m_listItem.value()); > break; > } >@@ -1555,106 +1555,106 @@ void RenderListMarker::computePreferredL > const FontCascade& font = style().fontCascade(); > > LayoutUnit logicalWidth = 0; >- EListStyleType type = style().listStyleType(); >+ ListStyleType type = style().listStyleType(); > switch (type) { >- case NoneListStyle: >- break; >- case Asterisks: >- case Footnotes: { >+ case ListStyleType::None: >+ break; >+ case ListStyleType::Asterisks: >+ case ListStyleType::Footnotes: { >+ TextRun run = RenderBlock::constructTextRun(m_text, style()); >+ logicalWidth = font.width(run); // no suffix for these types >+ } >+ break; >+ case ListStyleType::Circle: >+ case ListStyleType::Disc: >+ case ListStyleType::Square: >+ logicalWidth = (font.fontMetrics().ascent() * 2 / 3 + 1) / 2 + 2; >+ break; >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Armenian: >+ case ListStyleType::Binary: >+ case ListStyleType::Bengali: >+ case ListStyleType::Cambodian: >+ case ListStyleType::CJKIdeographic: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Georgian: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hebrew: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Kannada: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::LowerRoman: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Oromo: >+ case ListStyleType::Persian: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ case ListStyleType::UpperRoman: >+ case ListStyleType::Urdu: >+ if (m_text.isEmpty()) >+ logicalWidth = 0; >+ else { > TextRun run = RenderBlock::constructTextRun(m_text, style()); >- logicalWidth = font.width(run); // no suffix for these types >+ LayoutUnit itemWidth = font.width(run); >+ UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' }; >+ LayoutUnit suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style())); >+ logicalWidth = itemWidth + suffixSpaceWidth; > } >- break; >- case Circle: >- case Disc: >- case Square: >- logicalWidth = (font.fontMetrics().ascent() * 2 / 3 + 1) / 2 + 2; >- break; >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case ArabicIndic: >- case Armenian: >- case BinaryListStyle: >- case Bengali: >- case Cambodian: >- case CJKIdeographic: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Georgian: >- case Gujarati: >- case Gurmukhi: >- case Hangul: >- case HangulConsonant: >- case Hebrew: >- case Hiragana: >- case HiraganaIroha: >- case Kannada: >- case Katakana: >- case KatakanaIroha: >- case Khmer: >- case Lao: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerHexadecimal: >- case LowerLatin: >- case LowerNorwegian: >- case LowerRoman: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case Octal: >- case Oriya: >- case Oromo: >- case Persian: >- case Sidama: >- case Somali: >- case Telugu: >- case Thai: >- case Tibetan: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperHexadecimal: >- case UpperLatin: >- case UpperNorwegian: >- case UpperRoman: >- case Urdu: >- if (m_text.isEmpty()) >- logicalWidth = 0; >- else { >- TextRun run = RenderBlock::constructTextRun(m_text, style()); >- LayoutUnit itemWidth = font.width(run); >- UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' }; >- LayoutUnit suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style())); >- logicalWidth = itemWidth + suffixSpaceWidth; >- } >- break; >+ break; > } > > m_minPreferredLogicalWidth = logicalWidth; >@@ -1676,9 +1676,9 @@ void RenderListMarker::updateMargins() > if (isImage()) > marginEnd = cMarkerPadding; > else switch (style().listStyleType()) { >- case Disc: >- case Circle: >- case Square: >+ case ListStyleType::Disc: >+ case ListStyleType::Circle: >+ case ListStyleType::Square: > marginStart = -1; > marginEnd = fontMetrics.ascent() - minPreferredLogicalWidth() + 1; > break; >@@ -1692,15 +1692,15 @@ void RenderListMarker::updateMargins() > else { > int offset = fontMetrics.ascent() * 2 / 3; > switch (style().listStyleType()) { >- case Disc: >- case Circle: >- case Square: >- marginStart = -offset - cMarkerPadding - 1; >- break; >- case NoneListStyle: >- break; >- default: >- marginStart = m_text.isEmpty() ? LayoutUnit() : -minPreferredLogicalWidth() - offset / 2; >+ case ListStyleType::Disc: >+ case ListStyleType::Circle: >+ case ListStyleType::Square: >+ marginStart = -offset - cMarkerPadding - 1; >+ break; >+ case ListStyleType::None: >+ break; >+ default: >+ marginStart = m_text.isEmpty() ? LayoutUnit() : -minPreferredLogicalWidth() - offset / 2; > } > } > marginEnd = -marginStart - minPreferredLogicalWidth(); >@@ -1710,15 +1710,15 @@ void RenderListMarker::updateMargins() > else { > int offset = fontMetrics.ascent() * 2 / 3; > switch (style().listStyleType()) { >- case Disc: >- case Circle: >- case Square: >- marginEnd = offset + cMarkerPadding + 1 - minPreferredLogicalWidth(); >- break; >- case NoneListStyle: >- break; >- default: >- marginEnd = m_text.isEmpty() ? 0 : offset / 2; >+ case ListStyleType::Disc: >+ case ListStyleType::Circle: >+ case ListStyleType::Square: >+ marginEnd = offset + cMarkerPadding + 1 - minPreferredLogicalWidth(); >+ break; >+ case ListStyleType::None: >+ break; >+ default: >+ marginEnd = m_text.isEmpty() ? 0 : offset / 2; > } > } > marginStart = -marginEnd - minPreferredLogicalWidth(); >@@ -1746,7 +1746,7 @@ int RenderListMarker::baselinePosition(F > > String RenderListMarker::suffix() const > { >- EListStyleType type = style().listStyleType(); >+ ListStyleType type = style().listStyleType(); > const UChar suffix = listMarkerSuffix(type, m_listItem.value()); > > if (suffix == ' ') >@@ -1767,7 +1767,7 @@ String RenderListMarker::suffix() const > > bool RenderListMarker::isInside() const > { >- return m_listItem.notInList() || style().listStylePosition() == INSIDE; >+ return m_listItem.notInList() || style().listStylePosition() == ListStylePosition::Inside; > } > > FloatRect RenderListMarker::getRelativeMarkerRect() >@@ -1776,110 +1776,110 @@ FloatRect RenderListMarker::getRelativeM > return FloatRect(0, 0, m_image->imageSize(this, style().effectiveZoom()).width(), m_image->imageSize(this, style().effectiveZoom()).height()); > > FloatRect relativeRect; >- EListStyleType type = style().listStyleType(); >+ ListStyleType type = style().listStyleType(); > switch (type) { >- case Asterisks: >- case Footnotes: { >- const FontCascade& font = style().fontCascade(); >- TextRun run = RenderBlock::constructTextRun(m_text, style()); >- relativeRect = FloatRect(0, 0, font.width(run), font.fontMetrics().height()); >- break; >- } >- case Disc: >- case Circle: >- case Square: { >- // FIXME: Are these particular rounding rules necessary? >- const FontMetrics& fontMetrics = style().fontMetrics(); >- int ascent = fontMetrics.ascent(); >- int bulletWidth = (ascent * 2 / 3 + 1) / 2; >- relativeRect = FloatRect(1, 3 * (ascent - ascent * 2 / 3) / 2, bulletWidth, bulletWidth); >- break; >- } >- case NoneListStyle: >+ case ListStyleType::Asterisks: >+ case ListStyleType::Footnotes: { >+ const FontCascade& font = style().fontCascade(); >+ TextRun run = RenderBlock::constructTextRun(m_text, style()); >+ relativeRect = FloatRect(0, 0, font.width(run), font.fontMetrics().height()); >+ break; >+ } >+ case ListStyleType::Disc: >+ case ListStyleType::Circle: >+ case ListStyleType::Square: { >+ // FIXME: Are these particular rounding rules necessary? >+ const FontMetrics& fontMetrics = style().fontMetrics(); >+ int ascent = fontMetrics.ascent(); >+ int bulletWidth = (ascent * 2 / 3 + 1) / 2; >+ relativeRect = FloatRect(1, 3 * (ascent - ascent * 2 / 3) / 2, bulletWidth, bulletWidth); >+ break; >+ } >+ case ListStyleType::None: >+ return FloatRect(); >+ case ListStyleType::Afar: >+ case ListStyleType::Amharic: >+ case ListStyleType::AmharicAbegede: >+ case ListStyleType::ArabicIndic: >+ case ListStyleType::Armenian: >+ case ListStyleType::Binary: >+ case ListStyleType::Bengali: >+ case ListStyleType::Cambodian: >+ case ListStyleType::CJKIdeographic: >+ case ListStyleType::CjkEarthlyBranch: >+ case ListStyleType::CjkHeavenlyStem: >+ case ListStyleType::DecimalLeadingZero: >+ case ListStyleType::Decimal: >+ case ListStyleType::Devanagari: >+ case ListStyleType::Ethiopic: >+ case ListStyleType::EthiopicAbegede: >+ case ListStyleType::EthiopicAbegedeAmEt: >+ case ListStyleType::EthiopicAbegedeGez: >+ case ListStyleType::EthiopicAbegedeTiEr: >+ case ListStyleType::EthiopicAbegedeTiEt: >+ case ListStyleType::EthiopicHalehameAaEr: >+ case ListStyleType::EthiopicHalehameAaEt: >+ case ListStyleType::EthiopicHalehameAmEt: >+ case ListStyleType::EthiopicHalehameGez: >+ case ListStyleType::EthiopicHalehameOmEt: >+ case ListStyleType::EthiopicHalehameSidEt: >+ case ListStyleType::EthiopicHalehameSoEt: >+ case ListStyleType::EthiopicHalehameTiEr: >+ case ListStyleType::EthiopicHalehameTiEt: >+ case ListStyleType::EthiopicHalehameTig: >+ case ListStyleType::Georgian: >+ case ListStyleType::Gujarati: >+ case ListStyleType::Gurmukhi: >+ case ListStyleType::Hangul: >+ case ListStyleType::HangulConsonant: >+ case ListStyleType::Hebrew: >+ case ListStyleType::Hiragana: >+ case ListStyleType::HiraganaIroha: >+ case ListStyleType::Kannada: >+ case ListStyleType::Katakana: >+ case ListStyleType::KatakanaIroha: >+ case ListStyleType::Khmer: >+ case ListStyleType::Lao: >+ case ListStyleType::LowerAlpha: >+ case ListStyleType::LowerArmenian: >+ case ListStyleType::LowerGreek: >+ case ListStyleType::LowerHexadecimal: >+ case ListStyleType::LowerLatin: >+ case ListStyleType::LowerNorwegian: >+ case ListStyleType::LowerRoman: >+ case ListStyleType::Malayalam: >+ case ListStyleType::Mongolian: >+ case ListStyleType::Myanmar: >+ case ListStyleType::Octal: >+ case ListStyleType::Oriya: >+ case ListStyleType::Oromo: >+ case ListStyleType::Persian: >+ case ListStyleType::Sidama: >+ case ListStyleType::Somali: >+ case ListStyleType::Telugu: >+ case ListStyleType::Thai: >+ case ListStyleType::Tibetan: >+ case ListStyleType::Tigre: >+ case ListStyleType::TigrinyaEr: >+ case ListStyleType::TigrinyaErAbegede: >+ case ListStyleType::TigrinyaEt: >+ case ListStyleType::TigrinyaEtAbegede: >+ case ListStyleType::UpperAlpha: >+ case ListStyleType::UpperArmenian: >+ case ListStyleType::UpperGreek: >+ case ListStyleType::UpperHexadecimal: >+ case ListStyleType::UpperLatin: >+ case ListStyleType::UpperNorwegian: >+ case ListStyleType::UpperRoman: >+ case ListStyleType::Urdu: >+ if (m_text.isEmpty()) > return FloatRect(); >- case Afar: >- case Amharic: >- case AmharicAbegede: >- case ArabicIndic: >- case Armenian: >- case BinaryListStyle: >- case Bengali: >- case Cambodian: >- case CJKIdeographic: >- case CjkEarthlyBranch: >- case CjkHeavenlyStem: >- case DecimalLeadingZero: >- case DecimalListStyle: >- case Devanagari: >- case Ethiopic: >- case EthiopicAbegede: >- case EthiopicAbegedeAmEt: >- case EthiopicAbegedeGez: >- case EthiopicAbegedeTiEr: >- case EthiopicAbegedeTiEt: >- case EthiopicHalehameAaEr: >- case EthiopicHalehameAaEt: >- case EthiopicHalehameAmEt: >- case EthiopicHalehameGez: >- case EthiopicHalehameOmEt: >- case EthiopicHalehameSidEt: >- case EthiopicHalehameSoEt: >- case EthiopicHalehameTiEr: >- case EthiopicHalehameTiEt: >- case EthiopicHalehameTig: >- case Georgian: >- case Gujarati: >- case Gurmukhi: >- case Hangul: >- case HangulConsonant: >- case Hebrew: >- case Hiragana: >- case HiraganaIroha: >- case Kannada: >- case Katakana: >- case KatakanaIroha: >- case Khmer: >- case Lao: >- case LowerAlpha: >- case LowerArmenian: >- case LowerGreek: >- case LowerHexadecimal: >- case LowerLatin: >- case LowerNorwegian: >- case LowerRoman: >- case Malayalam: >- case Mongolian: >- case Myanmar: >- case Octal: >- case Oriya: >- case Oromo: >- case Persian: >- case Sidama: >- case Somali: >- case Telugu: >- case Thai: >- case Tibetan: >- case Tigre: >- case TigrinyaEr: >- case TigrinyaErAbegede: >- case TigrinyaEt: >- case TigrinyaEtAbegede: >- case UpperAlpha: >- case UpperArmenian: >- case UpperGreek: >- case UpperHexadecimal: >- case UpperLatin: >- case UpperNorwegian: >- case UpperRoman: >- case Urdu: >- if (m_text.isEmpty()) >- return FloatRect(); >- const FontCascade& font = style().fontCascade(); >- TextRun run = RenderBlock::constructTextRun(m_text, style()); >- float itemWidth = font.width(run); >- UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' }; >- float suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style())); >- relativeRect = FloatRect(0, 0, itemWidth + suffixSpaceWidth, font.fontMetrics().height()); >+ const FontCascade& font = style().fontCascade(); >+ TextRun run = RenderBlock::constructTextRun(m_text, style()); >+ float itemWidth = font.width(run); >+ UChar suffixSpace[2] = { listMarkerSuffix(type, m_listItem.value()), ' ' }; >+ float suffixSpaceWidth = font.width(RenderBlock::constructTextRun(suffixSpace, 2, style())); >+ relativeRect = FloatRect(0, 0, itemWidth + suffixSpaceWidth, font.fontMetrics().height()); > } > > if (!style().isHorizontalWritingMode()) { >Index: Source/WebCore/rendering/RenderListMarker.h >=================================================================== >--- Source/WebCore/rendering/RenderListMarker.h (revision 232123) >+++ Source/WebCore/rendering/RenderListMarker.h (working copy) >@@ -28,7 +28,7 @@ namespace WebCore { > > class RenderListItem; > >-String listMarkerText(EListStyleType, int value); >+String listMarkerText(ListStyleType, int value); > > // Used to render the list item's marker. > // The RenderListMarker always has to be a child of a RenderListItem. >Index: Source/WebCore/rendering/RenderMediaControlElements.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMediaControlElements.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderMediaControlElements.cpp (working copy) >@@ -53,7 +53,7 @@ void RenderMediaVolumeSliderContainer::l > { > RenderBlockFlow::layout(); > >- if (style().display() == NONE || !is<RenderBox>(nextSibling())) >+ if (style().display() == DisplayType::None || !is<RenderBox>(nextSibling())) > return; > > RenderBox& buttonBox = downcast<RenderBox>(*nextSibling()); >@@ -98,7 +98,7 @@ RenderTextTrackContainerElement::RenderT > void RenderTextTrackContainerElement::layout() > { > RenderBlockFlow::layout(); >- if (style().display() == NONE) >+ if (style().display() == DisplayType::None) > return; > > ASSERT(mediaControlElementType(element()) == MediaTextTrackDisplayContainer); >Index: Source/WebCore/rendering/RenderMenuList.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMenuList.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderMenuList.cpp (working copy) >@@ -127,12 +127,12 @@ void RenderMenuList::adjustInnerStyle() > if (document().page()->chrome().selectItemWritingDirectionIsNatural()) { > // Items in the popup will not respect the CSS text-align and direction properties, > // so we must adjust our own style to match. >- innerStyle.setTextAlign(LEFT); >+ innerStyle.setTextAlign(TextAlignMode::Left); > TextDirection direction = (m_buttonText && m_buttonText->text().defaultWritingDirection() == U_RIGHT_TO_LEFT) ? RTL : LTR; > innerStyle.setDirection(direction); > #if PLATFORM(IOS) > } else if (document().page()->chrome().selectItemAlignmentFollowsMenuWritingDirection()) { >- innerStyle.setTextAlign(style().direction() == LTR ? LEFT : RIGHT); >+ innerStyle.setTextAlign(style().direction() == LTR ? TextAlignMode::Left : TextAlignMode::Right); > TextDirection direction; > EUnicodeBidi unicodeBidi; > if (multiple() && selectedOptionCount(*this) != 1) { >@@ -153,7 +153,7 @@ void RenderMenuList::adjustInnerStyle() > } else if (m_optionStyle && document().page()->chrome().selectItemAlignmentFollowsMenuWritingDirection()) { > if ((m_optionStyle->direction() != innerStyle.direction() || m_optionStyle->unicodeBidi() != innerStyle.unicodeBidi())) > m_innerBlock->setNeedsLayoutAndPrefWidthsRecalc(); >- innerStyle.setTextAlign(style().isLeftToRightDirection() ? LEFT : RIGHT); >+ innerStyle.setTextAlign(style().isLeftToRightDirection() ? TextAlignMode::Left : TextAlignMode::Right); > innerStyle.setDirection(m_optionStyle->direction()); > innerStyle.setUnicodeBidi(m_optionStyle->unicodeBidi()); > } >@@ -507,8 +507,8 @@ PopupMenuStyle RenderMenuList::itemStyle > getItemBackgroundColor(listIndex, itemBackgroundColor, itemHasCustomBackgroundColor); > > auto& style = *element->computedStyle(); >- return PopupMenuStyle(style.visitedDependentColorWithColorFilter(CSSPropertyColor), itemBackgroundColor, style.fontCascade(), style.visibility() == VISIBLE, >- style.display() == NONE, true, style.textIndent(), style.direction(), isOverride(style.unicodeBidi()), >+ return PopupMenuStyle(style.visitedDependentColorWithColorFilter(CSSPropertyColor), itemBackgroundColor, style.fontCascade(), style.visibility() == Visibility::Visible, >+ style.display() == DisplayType::None, true, style.textIndent(), style.direction(), isOverride(style.unicodeBidi()), > itemHasCustomBackgroundColor ? PopupMenuStyle::CustomBackgroundColor : PopupMenuStyle::DefaultBackgroundColor); > } > >@@ -546,7 +546,7 @@ PopupMenuStyle RenderMenuList::menuStyle > const RenderStyle& styleToUse = m_innerBlock ? m_innerBlock->style() : style(); > IntRect absBounds = absoluteBoundingBoxRectIgnoringTransforms(); > return PopupMenuStyle(styleToUse.visitedDependentColorWithColorFilter(CSSPropertyColor), styleToUse.visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor), >- styleToUse.fontCascade(), styleToUse.visibility() == VISIBLE, styleToUse.display() == NONE, >+ styleToUse.fontCascade(), styleToUse.visibility() == Visibility::Visible, styleToUse.display() == DisplayType::None, > style().hasAppearance() && style().appearance() == MenulistPart, styleToUse.textIndent(), > style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::DefaultBackgroundColor, > PopupMenuStyle::SelectPopup, theme().popupMenuSize(styleToUse, absBounds)); >@@ -559,7 +559,7 @@ HostWindow* RenderMenuList::hostWindow() > > Ref<Scrollbar> RenderMenuList::createScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize) > { >- bool hasCustomScrollbarStyle = style().hasPseudoStyle(SCROLLBAR); >+ bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar); > if (hasCustomScrollbarStyle) > return RenderScrollbar::createCustomScrollbar(scrollableArea, orientation, &selectElement()); > return Scrollbar::createNativeScrollbar(scrollableArea, orientation, controlSize); >Index: Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp >=================================================================== >--- Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp (working copy) >@@ -39,7 +39,7 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(RenderMultiC > > RenderPtr<RenderMultiColumnSpannerPlaceholder> RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlow& fragmentedFlow, RenderBox& spanner, const RenderStyle& parentStyle) > { >- auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK); >+ auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parentStyle, DisplayType::Block); > newStyle.setClear(Clear::Both); // We don't want floats in the row preceding the spanner to continue on the other side. > auto placeholder = createRenderer<RenderMultiColumnSpannerPlaceholder>(fragmentedFlow, spanner, WTFMove(newStyle)); > placeholder->initializeStyle(); >Index: Source/WebCore/rendering/RenderObject.cpp >=================================================================== >--- Source/WebCore/rendering/RenderObject.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderObject.cpp (working copy) >@@ -1574,7 +1574,7 @@ int RenderObject::innerLineHeight() cons > void RenderObject::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions) > { > // Convert the style regions to absolute coordinates. >- if (style().visibility() != VISIBLE || !is<RenderBox>(*this)) >+ if (style().visibility() != Visibility::Visible || !is<RenderBox>(*this)) > return; > > auto& box = downcast<RenderBox>(*this); >Index: Source/WebCore/rendering/RenderObject.h >=================================================================== >--- Source/WebCore/rendering/RenderObject.h (revision 232123) >+++ Source/WebCore/rendering/RenderObject.h (working copy) >@@ -407,9 +407,9 @@ public: > { > // This function is kept in sync with anonymous block creation conditions in > // RenderBlock::createAnonymousBlock(). This includes creating an anonymous >- // RenderBlock having a BLOCK or BOX display. Other classes such as RenderTextFragment >+ // RenderBlock having a DisplayType::Block or DisplayType::Box display. Other classes such as RenderTextFragment > // are not RenderBlocks and will return false. See https://bugs.webkit.org/show_bug.cgi?id=56709. >- return isAnonymous() && (style().display() == BLOCK || style().display() == BOX) && style().styleType() == NOPSEUDO && isRenderBlock() && !isListMarker() && !isRenderFragmentedFlow() && !isRenderMultiColumnSet() && !isRenderView() >+ return isAnonymous() && (style().display() == DisplayType::Block || style().display() == DisplayType::Box) && style().styleType() == PseudoId::None && isRenderBlock() && !isListMarker() && !isRenderFragmentedFlow() && !isRenderMultiColumnSet() && !isRenderView() > #if ENABLE(FULLSCREEN_API) > && !isRenderFullScreen() > && !isRenderFullScreenPlaceholder() >@@ -1023,7 +1023,7 @@ inline bool RenderObject::isBeforeConten > // Text nodes don't have their own styles, so ignore the style on a text node. > if (isText()) > return false; >- if (style().styleType() != BEFORE) >+ if (style().styleType() != PseudoId::Before) > return false; > return true; > } >@@ -1033,7 +1033,7 @@ inline bool RenderObject::isAfterContent > // Text nodes don't have their own styles, so ignore the style on a text node. > if (isText()) > return false; >- if (style().styleType() != AFTER) >+ if (style().styleType() != PseudoId::After) > return false; > return true; > } >Index: Source/WebCore/rendering/RenderReplaced.cpp >=================================================================== >--- Source/WebCore/rendering/RenderReplaced.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderReplaced.cpp (working copy) >@@ -242,7 +242,7 @@ bool RenderReplaced::shouldPaint(PaintIn > return false; > > // if we're invisible or haven't received a layout yet, then just bail. >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return false; > > LayoutPoint adjustedPaintOffset = paintOffset + location(); >@@ -667,7 +667,7 @@ bool RenderReplaced::isSelected() const > > LayoutRect RenderReplaced::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const > { >- if (style().visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent()) >+ if (style().visibility() != Visibility::Visible && !enclosingLayer()->hasVisibleContent()) > return LayoutRect(); > > // The selectionRect can project outside of the overflowRect, so take their union >Index: Source/WebCore/rendering/RenderRubyBase.cpp >=================================================================== >--- Source/WebCore/rendering/RenderRubyBase.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderRubyBase.cpp (working copy) >@@ -60,9 +60,9 @@ RenderRubyRun* RenderRubyBase::rubyRun() > return downcast<RenderRubyRun>(parent()); > } > >-ETextAlign RenderRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) const >+TextAlignMode RenderRubyBase::textAlignmentForLine(bool /* endsWithSoftBreak */) const > { >- return JUSTIFY; >+ return TextAlignMode::Justify; > } > > void RenderRubyBase::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const >Index: Source/WebCore/rendering/RenderRubyBase.h >=================================================================== >--- Source/WebCore/rendering/RenderRubyBase.h (revision 232123) >+++ Source/WebCore/rendering/RenderRubyBase.h (working copy) >@@ -62,7 +62,7 @@ public: > private: > bool isRubyBase() const override { return true; } > bool isChildAllowed(const RenderObject&, const RenderStyle&) const override; >- ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override; >+ TextAlignMode textAlignmentForLine(bool endsWithSoftBreak) const override; > void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const override; > > float m_initialOffset; >Index: Source/WebCore/rendering/RenderRubyRun.cpp >=================================================================== >--- Source/WebCore/rendering/RenderRubyRun.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderRubyRun.cpp (working copy) >@@ -99,8 +99,8 @@ bool RenderRubyRun::isChildAllowed(const > > RenderPtr<RenderRubyBase> RenderRubyRun::createRubyBase() const > { >- auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK); >- newStyle.setTextAlign(CENTER); // FIXME: use WEBKIT_CENTER? >+ auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(style(), DisplayType::Block); >+ newStyle.setTextAlign(TextAlignMode::Center); // FIXME: use TextAlignMode::WebKitCenter? > auto renderer = createRenderer<RenderRubyBase>(document(), WTFMove(newStyle)); > renderer->initializeStyle(); > return renderer; >@@ -109,7 +109,7 @@ RenderPtr<RenderRubyBase> RenderRubyRun: > RenderPtr<RenderRubyRun> RenderRubyRun::staticCreateRubyRun(const RenderObject* parentRuby) > { > ASSERT(isRuby(parentRuby)); >- auto renderer = createRenderer<RenderRubyRun>(parentRuby->document(), RenderStyle::createAnonymousStyleWithDisplay(parentRuby->style(), INLINE_BLOCK)); >+ auto renderer = createRenderer<RenderRubyRun>(parentRuby->document(), RenderStyle::createAnonymousStyleWithDisplay(parentRuby->style(), DisplayType::InlineBlock)); > renderer->initializeStyle(); > return renderer; > } >@@ -142,7 +142,7 @@ void RenderRubyRun::layoutBlock(bool rel > // Since the extra relayout in RenderBlockFlow::updateRubyForJustifiedText() causes the size of the RenderRubyText/RenderRubyBase > // dependent on the line's current expansion, whenever we relayout the RenderRubyRun, we need to relayout the RenderRubyBase/RenderRubyText as well. > // FIXME: We should take the expansion opportunities into account if possible. >- relayoutChildren = style().textAlign() == JUSTIFY; >+ relayoutChildren = style().textAlign() == TextAlignMode::Justify; > } > > RenderBlockFlow::layoutBlock(relayoutChildren, pageHeight); >@@ -163,7 +163,7 @@ void RenderRubyRun::layoutBlock(bool rel > lastLineRubyTextBottom = rootBox->logicalBottomLayoutOverflow(); > } > >- if (isHorizontalWritingMode() && rt->style().rubyPosition() == RubyPositionInterCharacter) { >+ if (isHorizontalWritingMode() && rt->style().rubyPosition() == RubyPosition::InterCharacter) { > // Bopomofo. We need to move the RenderRubyText over to the right side and center it > // vertically relative to the base. > const FontCascade& font = style().fontCascade(); >@@ -183,7 +183,7 @@ void RenderRubyRun::layoutBlock(bool rel > LayoutUnit extent = lastLineBottom - firstLineTop; > rt->setY(firstLineTop + (extent - rt->height()) / 2); > } >- } else if (style().isFlippedLinesWritingMode() == (style().rubyPosition() == RubyPositionAfter)) { >+ } else if (style().isFlippedLinesWritingMode() == (style().rubyPosition() == RubyPosition::After)) { > LayoutUnit firstLineTop = 0; > if (RenderRubyBase* rb = rubyBase()) { > RootInlineBox* rootBox = rb->firstRootBox(); >Index: Source/WebCore/rendering/RenderRubyText.cpp >=================================================================== >--- Source/WebCore/rendering/RenderRubyText.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderRubyText.cpp (working copy) >@@ -57,20 +57,20 @@ bool RenderRubyText::isChildAllowed(cons > return child.isInline(); > } > >-ETextAlign RenderRubyText::textAlignmentForLine(bool endsWithSoftBreak) const >+TextAlignMode RenderRubyText::textAlignmentForLine(bool endsWithSoftBreak) const > { >- ETextAlign textAlign = style().textAlign(); >+ TextAlignMode textAlign = style().textAlign(); > // FIXME: This check is bogus since user can set the initial value. > if (textAlign != RenderStyle::initialTextAlign()) > return RenderBlockFlow::textAlignmentForLine(endsWithSoftBreak); > > // The default behavior is to allow ruby text to expand if it is shorter than the ruby base. >- return JUSTIFY; >+ return TextAlignMode::Justify; > } > > void RenderRubyText::adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const > { >- ETextAlign textAlign = style().textAlign(); >+ TextAlignMode textAlign = style().textAlign(); > // FIXME: This check is bogus since user can set the initial value. > if (textAlign != RenderStyle::initialTextAlign()) > return RenderBlockFlow::adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, logicalWidth); >Index: Source/WebCore/rendering/RenderRubyText.h >=================================================================== >--- Source/WebCore/rendering/RenderRubyText.h (revision 232123) >+++ Source/WebCore/rendering/RenderRubyText.h (working copy) >@@ -54,7 +54,7 @@ private: > > bool avoidsFloats() const override; > >- ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override; >+ TextAlignMode textAlignmentForLine(bool endsWithSoftBreak) const override; > void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const override; > }; > >Index: Source/WebCore/rendering/RenderScrollbar.cpp >=================================================================== >--- Source/WebCore/rendering/RenderScrollbar.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderScrollbar.cpp (working copy) >@@ -188,22 +188,22 @@ static PseudoId pseudoForScrollbarPart(S > case ForwardButtonStartPart: > case BackButtonEndPart: > case ForwardButtonEndPart: >- return SCROLLBAR_BUTTON; >+ return PseudoId::ScrollbarButton; > case BackTrackPart: > case ForwardTrackPart: >- return SCROLLBAR_TRACK_PIECE; >+ return PseudoId::ScrollbarTrackPiece; > case ThumbPart: >- return SCROLLBAR_THUMB; >+ return PseudoId::ScrollbarThumb; > case TrackBGPart: >- return SCROLLBAR_TRACK; >+ return PseudoId::ScrollbarTrack; > case ScrollbarBGPart: >- return SCROLLBAR; >+ return PseudoId::Scrollbar; > case NoPart: > case AllParts: > break; > } > ASSERT_NOT_REACHED(); >- return SCROLLBAR; >+ return PseudoId::Scrollbar; > } > > void RenderScrollbar::updateScrollbarPart(ScrollbarPart partType) >@@ -212,9 +212,9 @@ void RenderScrollbar::updateScrollbarPar > return; > > std::unique_ptr<RenderStyle> partStyle = getScrollbarPseudoStyle(partType, pseudoForScrollbarPart(partType)); >- bool needRenderer = partStyle && partStyle->display() != NONE; >+ bool needRenderer = partStyle && partStyle->display() != DisplayType::None; > >- if (needRenderer && partStyle->display() != BLOCK) { >+ if (needRenderer && partStyle->display() != DisplayType::Block) { > // See if we are a button that should not be visible according to OS settings. > ScrollbarButtonsPlacement buttonsPlacement = theme().buttonsPlacement(); > switch (partType) { >Index: Source/WebCore/rendering/RenderSearchField.cpp >=================================================================== >--- Source/WebCore/rendering/RenderSearchField.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderSearchField.cpp (working copy) >@@ -185,7 +185,7 @@ void RenderSearchField::updateCancelButt > return; > > const RenderStyle& curStyle = cancelButtonRenderer->style(); >- EVisibility buttonVisibility = visibilityForCancelButton(); >+ Visibility buttonVisibility = visibilityForCancelButton(); > if (curStyle.visibility() == buttonVisibility) > return; > >@@ -194,9 +194,9 @@ void RenderSearchField::updateCancelButt > cancelButtonRenderer->setStyle(WTFMove(cancelButtonStyle)); > } > >-EVisibility RenderSearchField::visibilityForCancelButton() const >+Visibility RenderSearchField::visibilityForCancelButton() const > { >- return (style().visibility() == HIDDEN || inputElement().value().isEmpty()) ? HIDDEN : VISIBLE; >+ return (style().visibility() == Visibility::Hidden || inputElement().value().isEmpty()) ? Visibility::Hidden : Visibility::Visible; > } > > const AtomicString& RenderSearchField::autosaveName() const >@@ -270,8 +270,8 @@ PopupMenuStyle RenderSearchField::itemSt > > PopupMenuStyle RenderSearchField::menuStyle() const > { >- return PopupMenuStyle(style().visitedDependentColorWithColorFilter(CSSPropertyColor), style().visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor), style().fontCascade(), style().visibility() == VISIBLE, >- style().display() == NONE, true, style().textIndent(), style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::CustomBackgroundColor); >+ return PopupMenuStyle(style().visitedDependentColorWithColorFilter(CSSPropertyColor), style().visitedDependentColorWithColorFilter(CSSPropertyBackgroundColor), style().fontCascade(), style().visibility() == Visibility::Visible, >+ style().display() == DisplayType::None, true, style().textIndent(), style().direction(), isOverride(style().unicodeBidi()), PopupMenuStyle::CustomBackgroundColor); > } > > int RenderSearchField::clientInsetLeft() const >@@ -359,7 +359,7 @@ HostWindow* RenderSearchField::hostWindo > > Ref<Scrollbar> RenderSearchField::createScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize) > { >- bool hasCustomScrollbarStyle = style().hasPseudoStyle(SCROLLBAR); >+ bool hasCustomScrollbarStyle = style().hasPseudoStyle(PseudoId::Scrollbar); > if (hasCustomScrollbarStyle) > return RenderScrollbar::createCustomScrollbar(scrollableArea, orientation, &inputElement()); > return Scrollbar::createNativeScrollbar(scrollableArea, orientation, controlSize); >Index: Source/WebCore/rendering/RenderSearchField.h >=================================================================== >--- Source/WebCore/rendering/RenderSearchField.h (revision 232123) >+++ Source/WebCore/rendering/RenderSearchField.h (working copy) >@@ -51,7 +51,7 @@ private: > void willBeDestroyed() override; > LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override; > void updateFromElement() override; >- EVisibility visibilityForCancelButton() const; >+ Visibility visibilityForCancelButton() const; > const AtomicString& autosaveName() const; > > // PopupMenuClient methods >Index: Source/WebCore/rendering/RenderTable.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTable.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTable.cpp (working copy) >@@ -141,7 +141,7 @@ void RenderTable::willInsertTableColumn( > void RenderTable::willInsertTableSection(RenderTableSection& child, RenderObject* beforeChild) > { > switch (child.style().display()) { >- case TABLE_HEADER_GROUP: >+ case DisplayType::TableHeaderGroup: > resetSectionPointerIfNotBefore(m_head, beforeChild); > if (!m_head) > m_head = makeWeakPtr(child); >@@ -151,14 +151,14 @@ void RenderTable::willInsertTableSection > m_firstBody = makeWeakPtr(child); > } > break; >- case TABLE_FOOTER_GROUP: >+ case DisplayType::TableFooterGroup: > resetSectionPointerIfNotBefore(m_foot, beforeChild); > if (!m_foot) { > m_foot = makeWeakPtr(child); > break; > } > FALLTHROUGH; >- case TABLE_ROW_GROUP: >+ case DisplayType::TableRowGroup: > resetSectionPointerIfNotBefore(m_firstBody, beforeChild); > if (!m_firstBody) > m_firstBody = makeWeakPtr(child); >@@ -356,8 +356,8 @@ void RenderTable::layoutCaptions(BottomC > return; > // FIXME: Collapse caption margin. > for (unsigned i = 0; i < m_captions.size(); ++i) { >- if ((bottomCaptionLayoutPhase == BottomCaptionLayoutPhase::Yes && m_captions[i]->style().captionSide() != CAPBOTTOM) >- || (bottomCaptionLayoutPhase == BottomCaptionLayoutPhase::No && m_captions[i]->style().captionSide() == CAPBOTTOM)) >+ if ((bottomCaptionLayoutPhase == BottomCaptionLayoutPhase::Yes && m_captions[i]->style().captionSide() != CaptionSide::Bottom) >+ || (bottomCaptionLayoutPhase == BottomCaptionLayoutPhase::No && m_captions[i]->style().captionSide() == CaptionSide::Bottom)) > continue; > layoutCaption(*m_captions[i]); > } >@@ -425,7 +425,7 @@ void RenderTable::layout() > LayoutUnit totalSectionLogicalHeight = 0; > LayoutUnit oldTableLogicalTop = 0; > for (unsigned i = 0; i < m_captions.size(); i++) { >- if (m_captions[i]->style().captionSide() == CAPBOTTOM) >+ if (m_captions[i]->style().captionSide() == CaptionSide::Bottom) > continue; > oldTableLogicalTop += m_captions[i]->logicalHeight() + m_captions[i]->marginBefore() + m_captions[i]->marginAfter(); > } >@@ -668,7 +668,7 @@ void RenderTable::paint(PaintInfo& paint > void RenderTable::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { > PaintPhase paintPhase = paintInfo.phase; >- if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasVisibleBoxDecorations() && style().visibility() == VISIBLE) >+ if ((paintPhase == PaintPhaseBlockBackground || paintPhase == PaintPhaseChildBlockBackground) && hasVisibleBoxDecorations() && style().visibility() == Visibility::Visible) > paintBoxDecorations(paintInfo, paintOffset); > > if (paintPhase == PaintPhaseMask) { >@@ -695,7 +695,7 @@ void RenderTable::paintObject(PaintInfo& > } > } > >- if (collapseBorders() && paintPhase == PaintPhaseChildBlockBackground && style().visibility() == VISIBLE) { >+ if (collapseBorders() && paintPhase == PaintPhaseChildBlockBackground && style().visibility() == Visibility::Visible) { > recalcCollapsedBorders(); > // Using our cached sorted styles, we then do individual passes, > // painting each style of border from lowest precedence to highest precedence. >@@ -712,7 +712,7 @@ void RenderTable::paintObject(PaintInfo& > } > > // Paint outline. >- if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style().visibility() == VISIBLE) >+ if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && hasOutline() && style().visibility() == Visibility::Visible) > paintOutline(paintInfo, LayoutRect(paintOffset, size())); > } > >@@ -720,7 +720,7 @@ void RenderTable::adjustBorderBoxRectFor > { > for (unsigned i = 0; i < m_captions.size(); i++) { > LayoutUnit captionLogicalHeight = m_captions[i]->logicalHeight() + m_captions[i]->marginBefore() + m_captions[i]->marginAfter(); >- bool captionIsBefore = (m_captions[i]->style().captionSide() != CAPBOTTOM) ^ style().isFlippedBlocksWritingMode(); >+ bool captionIsBefore = (m_captions[i]->style().captionSide() != CaptionSide::Bottom) ^ style().isFlippedBlocksWritingMode(); > if (style().isHorizontalWritingMode()) { > rect.setHeight(rect.height() - captionLogicalHeight); > if (captionIsBefore) >@@ -755,7 +755,7 @@ void RenderTable::paintBoxDecorations(Pa > > void RenderTable::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) >+ if (style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseMask) > return; > > LayoutRect rect(paintOffset, size()); >@@ -1013,11 +1013,11 @@ void RenderTable::recalcSections() const > for (RenderObject* child = firstChild(); child; child = nextSibling) { > nextSibling = child->nextSibling(); > switch (child->style().display()) { >- case TABLE_COLUMN: >- case TABLE_COLUMN_GROUP: >+ case DisplayType::TableColumn: >+ case DisplayType::TableColumnGroup: > m_hasColElements = true; > break; >- case TABLE_HEADER_GROUP: >+ case DisplayType::TableHeaderGroup: > if (is<RenderTableSection>(*child)) { > RenderTableSection& section = downcast<RenderTableSection>(*child); > if (!m_head) >@@ -1027,7 +1027,7 @@ void RenderTable::recalcSections() const > section.recalcCellsIfNeeded(); > } > break; >- case TABLE_FOOTER_GROUP: >+ case DisplayType::TableFooterGroup: > if (is<RenderTableSection>(*child)) { > RenderTableSection& section = downcast<RenderTableSection>(*child); > if (!m_foot) >@@ -1037,7 +1037,7 @@ void RenderTable::recalcSections() const > section.recalcCellsIfNeeded(); > } > break; >- case TABLE_ROW_GROUP: >+ case DisplayType::TableRowGroup: > if (is<RenderTableSection>(*child)) { > RenderTableSection& section = downcast<RenderTableSection>(*child); > if (!m_firstBody) >@@ -1528,7 +1528,7 @@ bool RenderTable::nodeAtPoint(const HitT > > RenderPtr<RenderTable> RenderTable::createTableWithStyle(Document& document, const RenderStyle& style) > { >- auto table = createRenderer<RenderTable>(document, RenderStyle::createAnonymousStyleWithDisplay(style, style.display() == INLINE ? INLINE_TABLE : TABLE)); >+ auto table = createRenderer<RenderTable>(document, RenderStyle::createAnonymousStyleWithDisplay(style, style.display() == DisplayType::Inline ? DisplayType::InlineTable : DisplayType::Table)); > table->initializeStyle(); > return table; > } >Index: Source/WebCore/rendering/RenderTableCell.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableCell.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTableCell.cpp (working copy) >@@ -420,7 +420,7 @@ static inline void markCellDirtyWhenColl > > void RenderTableCell::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- ASSERT(style().display() == TABLE_CELL); >+ ASSERT(style().display() == DisplayType::TableCell); > ASSERT(!row() || row()->rowIndexWasSet()); > > RenderBlockFlow::styleDidChange(diff, oldStyle); >@@ -1198,7 +1198,7 @@ void RenderTableCell::paintCollapsedBord > { > ASSERT(paintInfo.phase == PaintPhaseCollapsedTableBorders); > >- if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != VISIBLE) >+ if (!paintInfo.shouldPaintWithinRoot(*this) || style().visibility() != Visibility::Visible) > return; > > LayoutRect localRepaintRect = paintInfo.rect; >@@ -1271,11 +1271,11 @@ void RenderTableCell::paintBackgroundsBe > if (!backgroundObject) > return; > >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > return; > > RenderTable* tableElt = table(); >- if (!tableElt->collapseBorders() && style().emptyCells() == HIDE && !firstChild()) >+ if (!tableElt->collapseBorders() && style().emptyCells() == EmptyCell::Hide && !firstChild()) > return; > > LayoutPoint adjustedPaintOffset = paintOffset; >@@ -1305,7 +1305,7 @@ void RenderTableCell::paintBoxDecoration > return; > > RenderTable* table = this->table(); >- if (!table->collapseBorders() && style().emptyCells() == HIDE && !firstChild()) >+ if (!table->collapseBorders() && style().emptyCells() == EmptyCell::Hide && !firstChild()) > return; > > LayoutRect paintRect = LayoutRect(paintOffset, frameRect().size()); >@@ -1326,11 +1326,11 @@ void RenderTableCell::paintBoxDecoration > > void RenderTableCell::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset) > { >- if (style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseMask) >+ if (style().visibility() != Visibility::Visible || paintInfo.phase != PaintPhaseMask) > return; > > RenderTable* tableElt = table(); >- if (!tableElt->collapseBorders() && style().emptyCells() == HIDE && !firstChild()) >+ if (!tableElt->collapseBorders() && style().emptyCells() == EmptyCell::Hide && !firstChild()) > return; > > LayoutRect paintRect = LayoutRect(paintOffset, frameRect().size()); >@@ -1370,7 +1370,7 @@ void RenderTableCell::scrollbarsChanged( > > RenderPtr<RenderTableCell> RenderTableCell::createTableCellWithStyle(Document& document, const RenderStyle& style) > { >- auto cell = createRenderer<RenderTableCell>(document, RenderStyle::createAnonymousStyleWithDisplay(style, TABLE_CELL)); >+ auto cell = createRenderer<RenderTableCell>(document, RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::TableCell)); > cell->initializeStyle(); > return cell; > } >Index: Source/WebCore/rendering/RenderTableCol.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableCol.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTableCol.cpp (working copy) >@@ -82,7 +82,7 @@ void RenderTableCol::updateFromElement() > HTMLTableColElement& tc = static_cast<HTMLTableColElement&>(element()); > m_span = tc.span(); > } else >- m_span = !(hasInitializedStyle() && style().display() == TABLE_COLUMN_GROUP); >+ m_span = !(hasInitializedStyle() && style().display() == DisplayType::TableColumnGroup); > if (m_span != oldSpan && hasInitializedStyle() && parent()) > setNeedsLayoutAndPrefWidthsRecalc(); > } >@@ -102,7 +102,7 @@ void RenderTableCol::willBeRemovedFromTr > bool RenderTableCol::isChildAllowed(const RenderObject& child, const RenderStyle& style) const > { > // We cannot use isTableColumn here as style() may return 0. >- return style.display() == TABLE_COLUMN && child.isRenderTableCol(); >+ return style.display() == DisplayType::TableColumn && child.isRenderTableCol(); > } > > bool RenderTableCol::canHaveChildren() const >Index: Source/WebCore/rendering/RenderTableCol.h >=================================================================== >--- Source/WebCore/rendering/RenderTableCol.h (revision 232123) >+++ Source/WebCore/rendering/RenderTableCol.h (working copy) >@@ -44,8 +44,8 @@ public: > void setSpan(unsigned span) { m_span = span; } > > bool isTableColumnGroupWithColumnChildren() const { return firstChild(); } >- bool isTableColumn() const { return style().display() == TABLE_COLUMN; } >- bool isTableColumnGroup() const { return style().display() == TABLE_COLUMN_GROUP; } >+ bool isTableColumn() const { return style().display() == DisplayType::TableColumn; } >+ bool isTableColumnGroup() const { return style().display() == DisplayType::TableColumnGroup; } > > RenderTableCol* enclosingColumnGroup() const; > RenderTableCol* enclosingColumnGroupIfAdjacentBefore() const; >Index: Source/WebCore/rendering/RenderTableRow.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableRow.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTableRow.cpp (working copy) >@@ -74,7 +74,7 @@ static bool borderWidthChanged(const Ren > > void RenderTableRow::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) > { >- ASSERT(style().display() == TABLE_ROW); >+ ASSERT(style().display() == DisplayType::TableRow); > > RenderBox::styleDidChange(diff, oldStyle); > propagateStyleToAnonymousChildren(PropagateToAllChildren); >@@ -201,7 +201,7 @@ void RenderTableRow::paintOutlineForRowI > { > LayoutPoint adjustedPaintOffset = paintOffset + location(); > PaintPhase paintPhase = paintInfo.phase; >- if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style().visibility() == VISIBLE) >+ if ((paintPhase == PaintPhaseOutline || paintPhase == PaintPhaseSelfOutline) && style().visibility() == Visibility::Visible) > paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size())); > } > >@@ -227,7 +227,7 @@ void RenderTableRow::imageChanged(Wrappe > > RenderPtr<RenderTableRow> RenderTableRow::createTableRowWithStyle(Document& document, const RenderStyle& style) > { >- auto row = createRenderer<RenderTableRow>(document, RenderStyle::createAnonymousStyleWithDisplay(style, TABLE_ROW)); >+ auto row = createRenderer<RenderTableRow>(document, RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::TableRow)); > row->initializeStyle(); > return row; > } >Index: Source/WebCore/rendering/RenderTableSection.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTableSection.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTableSection.cpp (working copy) >@@ -168,10 +168,10 @@ void RenderTableSection::addCell(RenderT > > // ### mozilla still seems to do the old HTML way, even for strict DTD > // (see the annotation on table cell layouting in the CSS specs and the testcase below: >- // <TABLE border> >+ // <DisplayType::Table border> > // <TR><TD>1 <TD rowspan="2">2 <TD>3 <TD>4 > // <TR><TD colspan="2">5 >- // </TABLE> >+ // </DisplayType::Table> > while (m_cCol < nCols && (cellAt(insertionRow, m_cCol).hasCells() || cellAt(insertionRow, m_cCol).inColSpan)) > m_cCol++; > >@@ -916,7 +916,7 @@ void RenderTableSection::paint(PaintInfo > if (pushedClip) > popContentsClip(paintInfo, phase, adjustedPaintOffset); > >- if ((phase == PaintPhaseOutline || phase == PaintPhaseSelfOutline) && style().visibility() == VISIBLE) >+ if ((phase == PaintPhaseOutline || phase == PaintPhaseSelfOutline) && style().visibility() == Visibility::Visible) > paintOutline(paintInfo, LayoutRect(adjustedPaintOffset, size())); > } > >@@ -1551,7 +1551,7 @@ CollapsedBorderValue RenderTableSection: > > RenderPtr<RenderTableSection> RenderTableSection::createTableSectionWithStyle(Document& document, const RenderStyle& style) > { >- auto section = createRenderer<RenderTableSection>(document, RenderStyle::createAnonymousStyleWithDisplay(style, TABLE_ROW_GROUP)); >+ auto section = createRenderer<RenderTableSection>(document, RenderStyle::createAnonymousStyleWithDisplay(style, DisplayType::TableRowGroup)); > section->initializeStyle(); > return section; > } >Index: Source/WebCore/rendering/RenderText.cpp >=================================================================== >--- Source/WebCore/rendering/RenderText.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderText.cpp (working copy) >@@ -271,7 +271,7 @@ void RenderText::styleDidChange(StyleDif > if (!oldStyle || oldStyle->fontCascade() != newStyle.fontCascade()) > m_canUseSimplifiedTextMeasuring = computeCanUseSimplifiedTextMeasuring(); > >- ETextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TTNONE; >+ TextTransform oldTransform = oldStyle ? oldStyle->textTransform() : TextTransform::None; > TextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TextSecurity::None; > if (needsResetText || oldTransform != newStyle.textTransform() || oldSecurity != newStyle.textSecurity()) > RenderText::setText(originalText(), true); >@@ -808,7 +808,7 @@ void RenderText::computePreferredLogical > float maxWordWidth = std::numeric_limits<float>::max(); > unsigned minimumPrefixLength = 0; > unsigned minimumSuffixLength = 0; >- if (style.hyphens() == HyphensAuto && canHyphenate(style.locale())) { >+ if (style.hyphens() == Hyphens::Auto && canHyphenate(style.locale())) { > maxWordWidth = 0; > > // Map 'hyphenate-limit-{before,after}: auto;' to 2. >@@ -865,7 +865,7 @@ void RenderText::computePreferredLogical > ASSERT(lastWordBoundary == i); > lastWordBoundary++; > continue; >- } else if (c == softHyphen && style.hyphens() != HyphensNone) { >+ } else if (c == softHyphen && style.hyphens() != Hyphens::None) { > ASSERT(i >= lastWordBoundary); > currMaxWidth += widthFromCache(font, lastWordBoundary, i - lastWordBoundary, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow, style); > if (!firstGlyphLeftOverflow) >@@ -877,7 +877,7 @@ void RenderText::computePreferredLogical > bool hasBreak = breakAll || isBreakable(breakIterator, i, nextBreakable, breakNBSP, canUseLineBreakShortcut, keepAllWords); > bool betweenWords = true; > unsigned j = i; >- while (c != '\n' && !isSpaceAccordingToStyle(c, style) && c != '\t' && (c != softHyphen || style.hyphens() == HyphensNone)) { >+ while (c != '\n' && !isSpaceAccordingToStyle(c, style) && c != '\t' && (c != softHyphen || style.hyphens() == Hyphens::None)) { > j++; > if (j == length) > break; >@@ -902,7 +902,7 @@ void RenderText::computePreferredLogical > w = widthFromCache(font, i, wordLen + 1, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow, style) - wordTrailingSpaceWidth.value(); > else { > w = widthFromCache(font, i, wordLen, leadWidth + currMaxWidth, &fallbackFonts, &glyphOverflow, style); >- if (c == softHyphen && style.hyphens() != HyphensNone) >+ if (c == softHyphen && style.hyphens() != Hyphens::None) > currMinWidth = hyphenWidth(*this, font); > } > >@@ -1005,7 +1005,7 @@ void RenderText::computePreferredLogical > if (!style.autoWrap()) > m_minWidth = m_maxWidth; > >- if (style.whiteSpace() == PRE) { >+ if (style.whiteSpace() == WhiteSpace::Pre) { > if (firstLine) > m_beginMinWidth = m_maxWidth; > m_endMinWidth = currMaxWidth; >@@ -1137,13 +1137,13 @@ LayoutUnit RenderText::topOfFirstText() > String applyTextTransform(const RenderStyle& style, const String& text, UChar previousCharacter) > { > switch (style.textTransform()) { >- case TTNONE: >+ case TextTransform::None: > return text; >- case CAPITALIZE: >+ case TextTransform::Capitalize: > return capitalize(text, previousCharacter); // FIXME: Need to take locale into account. >- case UPPERCASE: >+ case TextTransform::Uppercase: > return text.convertToUppercaseWithLocale(style.locale()); >- case LOWERCASE: >+ case TextTransform::Lowercase: > return text.convertToLowercaseWithLocale(style.locale()); > } > ASSERT_NOT_REACHED(); >Index: Source/WebCore/rendering/RenderTextFragment.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTextFragment.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTextFragment.cpp (working copy) >@@ -74,7 +74,7 @@ void RenderTextFragment::styleDidChange( > RenderText::styleDidChange(diff, oldStyle); > > if (RenderBlock* block = blockForAccompanyingFirstLetter()) >- block->mutableStyle().removeCachedPseudoStyle(FIRST_LETTER); >+ block->mutableStyle().removeCachedPseudoStyle(PseudoId::FirstLetter); > } > > void RenderTextFragment::setText(const String& newText, bool force) >@@ -110,7 +110,7 @@ RenderBlock* RenderTextFragment::blockFo > for (auto& block : ancestorsOfType<RenderBlock>(*m_firstLetter)) { > if (is<RenderMultiColumnFlow>(block)) > break; >- if (block.style().hasPseudoStyle(FIRST_LETTER) && block.canHaveChildren()) >+ if (block.style().hasPseudoStyle(PseudoId::FirstLetter) && block.canHaveChildren()) > return █ > } > return nullptr; >Index: Source/WebCore/rendering/RenderTheme.cpp >=================================================================== >--- Source/WebCore/rendering/RenderTheme.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderTheme.cpp (working copy) >@@ -79,13 +79,13 @@ void RenderTheme::adjustStyle(StyleResol > { > // Force inline and table display styles to be inline-block (except for table- which is block) > ControlPart part = style.appearance(); >- if (style.display() == INLINE || style.display() == INLINE_TABLE || style.display() == TABLE_ROW_GROUP >- || style.display() == TABLE_HEADER_GROUP || style.display() == TABLE_FOOTER_GROUP >- || style.display() == TABLE_ROW || style.display() == TABLE_COLUMN_GROUP || style.display() == TABLE_COLUMN >- || style.display() == TABLE_CELL || style.display() == TABLE_CAPTION) >- style.setDisplay(INLINE_BLOCK); >- else if (style.display() == COMPACT || style.display() == LIST_ITEM || style.display() == TABLE) >- style.setDisplay(BLOCK); >+ if (style.display() == DisplayType::Inline || style.display() == DisplayType::InlineTable || style.display() == DisplayType::TableRowGroup >+ || style.display() == DisplayType::TableHeaderGroup || style.display() == DisplayType::TableFooterGroup >+ || style.display() == DisplayType::TableRow || style.display() == DisplayType::TableColumnGroup || style.display() == DisplayType::TableColumn >+ || style.display() == DisplayType::TableCell || style.display() == DisplayType::TableCaption) >+ style.setDisplay(DisplayType::InlineBlock); >+ else if (style.display() == DisplayType::Compact || style.display() == DisplayType::ListItem || style.display() == DisplayType::Table) >+ style.setDisplay(DisplayType::Block); > > if (UAHasAppearance && isControlStyled(style, border, background, backgroundColor)) { > switch (part) { >@@ -154,7 +154,7 @@ void RenderTheme::adjustStyle(StyleResol > > // Whitespace > if (Theme::singleton().controlRequiresPreWhiteSpace(part)) >- style.setWhiteSpace(PRE); >+ style.setWhiteSpace(WhiteSpace::Pre); > > // Width / Height > // The width and height here are affected by the zoom. >Index: Source/WebCore/rendering/RenderThemeMac.mm >=================================================================== >--- Source/WebCore/rendering/RenderThemeMac.mm (revision 232123) >+++ Source/WebCore/rendering/RenderThemeMac.mm (working copy) >@@ -1324,7 +1324,7 @@ void RenderThemeMac::adjustMenuListStyle > style.setHeight(Length(Auto)); > > // White-space is locked to pre >- style.setWhiteSpace(PRE); >+ style.setWhiteSpace(WhiteSpace::Pre); > > // Set the foreground color to black or gray when we have the aqua look. > Color c = Color::darkGray; >Index: Source/WebCore/rendering/RenderThemeWin.cpp >=================================================================== >--- Source/WebCore/rendering/RenderThemeWin.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderThemeWin.cpp (working copy) >@@ -782,7 +782,7 @@ void RenderThemeWin::adjustMenuListButto > style.setLineHeight(RenderStyle::initialLineHeight()); > > // White-space is locked to pre >- style.setWhiteSpace(PRE); >+ style.setWhiteSpace(WhiteSpace::Pre); > } > > bool RenderThemeWin::paintMenuListButtonDecorations(const RenderBox& renderer, const PaintInfo& paintInfo, const FloatRect& rect) >Index: Source/WebCore/rendering/RenderView.cpp >=================================================================== >--- Source/WebCore/rendering/RenderView.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderView.cpp (working copy) >@@ -394,7 +394,7 @@ RenderElement* RenderView::rendererForRo > static inline bool rendererObscuresBackground(const RenderElement& rootElement) > { > auto& style = rootElement.style(); >- if (style.visibility() != VISIBLE || style.opacity() != 1 || style.hasTransform()) >+ if (style.visibility() != Visibility::Visible || style.opacity() != 1 || style.hasTransform()) > return false; > > if (style.hasBorderRadius()) >Index: Source/WebCore/rendering/RenderWidget.cpp >=================================================================== >--- Source/WebCore/rendering/RenderWidget.cpp (revision 232123) >+++ Source/WebCore/rendering/RenderWidget.cpp (working copy) >@@ -187,7 +187,7 @@ void RenderWidget::setWidget(RefPtr<Widg > return; > } > >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > m_widget->hide(); > else { > m_widget->show(); >@@ -210,7 +210,7 @@ void RenderWidget::styleDidChange(StyleD > { > RenderReplaced::styleDidChange(diff, oldStyle); > if (m_widget) { >- if (style().visibility() != VISIBLE) >+ if (style().visibility() != Visibility::Visible) > m_widget->hide(); > else > m_widget->show(); >Index: Source/WebCore/rendering/RootInlineBox.cpp >=================================================================== >--- Source/WebCore/rendering/RootInlineBox.cpp (revision 232123) >+++ Source/WebCore/rendering/RootInlineBox.cpp (working copy) >@@ -160,7 +160,7 @@ float RootInlineBox::placeEllipsisBox(bo > > void RootInlineBox::paintEllipsisBox(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom) const > { >- if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(renderer()) && renderer().style().visibility() == VISIBLE >+ if (hasEllipsisBox() && paintInfo.shouldPaintWithinRoot(renderer()) && renderer().style().visibility() == Visibility::Visible > && paintInfo.phase == PaintPhaseForeground) > ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom); > } >@@ -335,7 +335,7 @@ LayoutUnit RootInlineBox::lineSnapAdjust > { > // If our block doesn't have snapping turned on, do nothing. > // FIXME: Implement bounds snapping. >- if (blockFlow().style().lineSnap() == LineSnapNone) >+ if (blockFlow().style().lineSnap() == LineSnap::None) > return 0; > > // Get the current line grid and offset. >@@ -382,7 +382,7 @@ LayoutUnit RootInlineBox::lineSnapAdjust > firstTextTop = pageLogicalTop + lineGridBox->logicalTop() - lineGrid->borderAndPaddingBefore() + lineGridPaginationOrigin; > } > >- if (blockFlow().style().lineSnap() == LineSnapContain) { >+ if (blockFlow().style().lineSnap() == LineSnap::Contain) { > // Compute the desired offset from the text-top of a grid line. > // Look at our height (logicalHeight()). > // Look at the total available height. It's going to be (textBottom - textTop) + (n-1)*(multiple with leading) >@@ -460,7 +460,7 @@ GapRects RootInlineBox::lineSelectionGap > logicalRect.move(renderer().isHorizontalWritingMode() ? offsetFromRootBlock : LayoutSize(offsetFromRootBlock.height(), offsetFromRootBlock.width())); > LayoutRect gapRect = rootBlock.logicalRectToPhysicalRect(rootBlockPhysicalPosition, logicalRect); > if (isPreviousBoxSelected && gapRect.width() > 0 && gapRect.height() > 0) { >- if (paintInfo && box->parent()->renderer().style().visibility() == VISIBLE) >+ if (paintInfo && box->parent()->renderer().style().visibility() == Visibility::Visible) > paintInfo->context().fillRect(gapRect, box->parent()->renderer().selectionBackgroundColor()); > // VisibleSelection may be non-contiguous, see comment above. > result.uniteCenter(gapRect); >@@ -498,20 +498,20 @@ IntRect RootInlineBox::computeCaretRect( > > bool rightAligned = false; > switch (blockStyle.textAlign()) { >- case RIGHT: >- case WEBKIT_RIGHT: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: > rightAligned = true; > break; >- case LEFT: >- case WEBKIT_LEFT: >- case CENTER: >- case WEBKIT_CENTER: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: >+ case TextAlignMode::Center: >+ case TextAlignMode::WebKitCenter: > break; >- case JUSTIFY: >- case TASTART: >+ case TextAlignMode::Justify: >+ case TextAlignMode::Start: > rightAligned = !blockStyle.isLeftToRightDirection(); > break; >- case TAEND: >+ case TextAlignMode::End: > rightAligned = blockStyle.isLeftToRightDirection(); > break; > } >Index: Source/WebCore/rendering/SimpleLineLayout.cpp >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayout.cpp (revision 232123) >+++ Source/WebCore/rendering/SimpleLineLayout.cpp (working copy) >@@ -163,7 +163,7 @@ static AvoidanceReasonFlags canUseForFon > std::optional<float> lineHeightConstraint; > if (style.lineBoxContain() & LineBoxContainGlyphs) > lineHeightConstraint = lineHeightFromFlow(flow).toFloat(); >- bool flowIsJustified = style.textAlign() == JUSTIFY; >+ bool flowIsJustified = style.textAlign() == TextAlignMode::Justify; > for (const auto& textRenderer : childrenOfType<RenderText>(flow)) { > // FIXME: Do not return until after checking all children. > if (textRenderer.text().isEmpty()) >@@ -215,25 +215,25 @@ static AvoidanceReasonFlags canUseForSty > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineBreak, reasons, includeReasons); > if (style.unicodeBidi() != UBNormal) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonNormalUnicodeBiDi, reasons, includeReasons); >- if (style.rtlOrdering() != LogicalOrder) >+ if (style.rtlOrdering() != Order::Logical) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasRTLOrdering, reasons, includeReasons); >- if (style.lineAlign() != LineAlignNone) >+ if (style.lineAlign() != LineAlign::None) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineAlignEdges, reasons, includeReasons); >- if (style.lineSnap() != LineSnapNone) >+ if (style.lineSnap() != LineSnap::None) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineSnap, reasons, includeReasons); >- if (style.textEmphasisFill() != TextEmphasisFillFilled || style.textEmphasisMark() != TextEmphasisMarkNone) >+ if (style.textEmphasisFill() != TextEmphasisFill::Filled || style.textEmphasisMark() != TextEmphasisMark::None) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextEmphasisFillOrMark, reasons, includeReasons); > if (style.textShadow()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextShadow, reasons, includeReasons); >- if (style.hasPseudoStyle(FIRST_LINE)) >+ if (style.hasPseudoStyle(PseudoId::FirstLine)) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLine, reasons, includeReasons); >- if (style.hasPseudoStyle(FIRST_LETTER)) >+ if (style.hasPseudoStyle(PseudoId::FirstLetter)) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasPseudoFirstLetter, reasons, includeReasons); > if (style.hasTextCombine()) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextCombine, reasons, includeReasons); > if (style.backgroundClip() == FillBox::Text) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasTextFillBox, reasons, includeReasons); >- if (style.borderFit() == BorderFitLines) >+ if (style.borderFit() == BorderFit::Lines) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasBorderFitLines, reasons, includeReasons); > if (style.lineBreak() != LineBreak::Auto) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoLineBreak, reasons, includeReasons); >@@ -243,7 +243,7 @@ static AvoidanceReasonFlags canUseForSty > if (style.trailingWord() != TrailingWord::Auto) > SET_REASON_AND_RETURN_IF_NEEDED(FlowHasNonAutoTrailingWord, reasons, includeReasons); > #endif >- if (style.hyphens() == HyphensAuto) { >+ if (style.hyphens() == Hyphens::Auto) { > auto textReasons = canUseForText(style.hyphenString(), style.fontCascade(), std::nullopt, false, includeReasons); > if (textReasons != NoReason) > SET_REASON_AND_RETURN_IF_NEEDED(textReasons, reasons, includeReasons); >@@ -355,23 +355,23 @@ bool canUseFor(const RenderBlockFlow& fl > return canUseForWithReason(flow, IncludeReasons::First) == NoReason; > } > >-static float computeLineLeft(ETextAlign textAlign, float availableWidth, float committedWidth, float logicalLeftOffset) >+static float computeLineLeft(TextAlignMode textAlign, float availableWidth, float committedWidth, float logicalLeftOffset) > { > float remainingWidth = availableWidth - committedWidth; > float left = logicalLeftOffset; > switch (textAlign) { >- case LEFT: >- case WEBKIT_LEFT: >- case TASTART: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: >+ case TextAlignMode::Start: > return left; >- case RIGHT: >- case WEBKIT_RIGHT: >- case TAEND: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: >+ case TextAlignMode::End: > return left + std::max<float>(remainingWidth, 0); >- case CENTER: >- case WEBKIT_CENTER: >+ case TextAlignMode::Center: >+ case TextAlignMode::WebKitCenter: > return left + std::max<float>(remainingWidth / 2, 0); >- case JUSTIFY: >+ case TextAlignMode::Justify: > ASSERT_NOT_REACHED(); > break; > } >@@ -606,7 +606,7 @@ static void updateLineConstrains(const R > line.setLogicalLeftOffset(flow.logicalLeftOffsetForLine(height, DoNotIndentText, logicalHeight) + (shouldApplyTextIndent && isFirstLine ? flow.textIndentOffset() : LayoutUnit(0))); > float logicalRightOffset = flow.logicalRightOffsetForLine(height, DoNotIndentText, logicalHeight); > line.setAvailableWidth(std::max<float>(0, logicalRightOffset - line.logicalLeftOffset())); >- if (style.textAlign == JUSTIFY) >+ if (style.textAlign == TextAlignMode::Justify) > line.setNeedsAllFragments(); > numberOfPrecedingLinesWithHyphen = (previousLine.isEmpty() || !previousLine.lastFragment().hasHyphen()) ? 0 : numberOfPrecedingLinesWithHyphen + 1; > if (style.hyphenLimitLines && numberOfPrecedingLinesWithHyphen >= *style.hyphenLimitLines) >@@ -791,7 +791,7 @@ static bool createLineRuns(LineState& li > if (fragment.isLineBreak()) { > // Add the new line fragment only if there's nothing on the line. (otherwise the extra new line character would show up at the end of the content.) > if (line.isEmpty() || fragment.type() == TextFragmentIterator::TextFragment::HardLineBreak) { >- if (style.textAlign == RIGHT || style.textAlign == WEBKIT_RIGHT) >+ if (style.textAlign == TextAlignMode::Right || style.textAlign == TextAlignMode::WebKitRight) > line.removeTrailingWhitespace(runs); > line.appendFragmentAndCreateRunIfNeeded(fragment, runs); > } >@@ -903,12 +903,12 @@ static void justifyRuns(const LineState& > } > } > >-static ETextAlign textAlignForLine(const TextFragmentIterator::Style& style, bool lastLine) >+static TextAlignMode textAlignForLine(const TextFragmentIterator::Style& style, bool lastLine) > { >- // Fallback to LEFT (START) alignment for non-collapsable content and for the last line before a forced break or the end of the block. >+ // Fallback to TextAlignMode::Left (START) alignment for non-collapsable content and for the last line before a forced break or the end of the block. > auto textAlign = style.textAlign; >- if (textAlign == JUSTIFY && (!style.collapseWhitespace || lastLine)) >- textAlign = LEFT; >+ if (textAlign == TextAlignMode::Justify && (!style.collapseWhitespace || lastLine)) >+ textAlign = TextAlignMode::Left; > return textAlign; > } > >@@ -925,7 +925,7 @@ static void closeLineEndingAndAdjustRuns > auto firstRunIndex = lastRunIndexOfPreviousLine ? lastRunIndexOfPreviousLine.value() + 1 : 0; > auto lineLogicalLeft = line.logicalLeftOffset(); > auto textAlign = textAlignForLine(style, lastLineInFlow || (line.lastFragment().isValid() && line.lastFragment().type() == TextFragmentIterator::TextFragment::HardLineBreak)); >- if (textAlign == JUSTIFY) >+ if (textAlign == TextAlignMode::Justify) > justifyRuns(line, runs, firstRunIndex); > else > lineLogicalLeft = computeLineLeft(textAlign, line.availableWidth(), line.width(), line.logicalLeftOffset()); >Index: Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (revision 232123) >+++ Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp (working copy) >@@ -80,7 +80,7 @@ void paintFlow(const RenderBlockFlow& fl > return; > > auto& style = flow.style(); >- if (style.visibility() != VISIBLE) >+ if (style.visibility() != Visibility::Visible) > return; > > TextPainter textPainter(paintInfo.context()); >@@ -143,7 +143,7 @@ bool hitTestFlow(const RenderBlockFlow& > return false; > > auto& style = flow.style(); >- if (style.visibility() != VISIBLE || style.pointerEvents() == PE_NONE) >+ if (style.visibility() != Visibility::Visible || style.pointerEvents() == PointerEvents::None) > return false; > > LayoutRect rangeRect = locationInContainer.boundingBox(); >Index: Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp (revision 232123) >+++ Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp (working copy) >@@ -48,7 +48,7 @@ TextFragmentIterator::Style::Style(const > , keepAllWordsForCJK(style.wordBreak() == WordBreak::KeepAll) > , wordSpacing(font.wordSpacing()) > , tabWidth(collapseWhitespace ? 0 : style.tabSize()) >- , shouldHyphenate(style.hyphens() == HyphensAuto && canHyphenate(style.locale())) >+ , shouldHyphenate(style.hyphens() == Hyphens::Auto && canHyphenate(style.locale())) > , hyphenStringWidth(shouldHyphenate ? (useSimplifiedTextMeasuring ? font.widthForSimpleText(style.hyphenString()) : font.width(TextRun(String(style.hyphenString())))) : 0) > , hyphenLimitBefore(style.hyphenationLimitBefore() < 0 ? 2 : style.hyphenationLimitBefore()) > , hyphenLimitAfter(style.hyphenationLimitAfter() < 0 ? 2 : style.hyphenationLimitAfter()) >Index: Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h >=================================================================== >--- Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h (revision 232123) >+++ Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h (working copy) >@@ -106,7 +106,7 @@ public: > explicit Style(const RenderStyle&, bool useSimplifiedTextMeasuring); > > const FontCascade& font; >- ETextAlign textAlign; >+ TextAlignMode textAlign; > bool hasKerningOrLigatures; > bool collapseWhitespace; > bool preserveNewline; >Index: Source/WebCore/rendering/TextDecorationPainter.cpp >=================================================================== >--- Source/WebCore/rendering/TextDecorationPainter.cpp (revision 232123) >+++ Source/WebCore/rendering/TextDecorationPainter.cpp (working copy) >@@ -221,19 +221,19 @@ static StrokeStyle textDecorationStyleTo > { > StrokeStyle strokeStyle = SolidStroke; > switch (decorationStyle) { >- case TextDecorationStyleSolid: >+ case TextDecorationStyle::Solid: > strokeStyle = SolidStroke; > break; >- case TextDecorationStyleDouble: >+ case TextDecorationStyle::Double: > strokeStyle = DoubleStroke; > break; >- case TextDecorationStyleDotted: >+ case TextDecorationStyle::Dotted: > strokeStyle = DottedStroke; > break; >- case TextDecorationStyleDashed: >+ case TextDecorationStyle::Dashed: > strokeStyle = DashedStroke; > break; >- case TextDecorationStyleWavy: >+ case TextDecorationStyle::Wavy: > strokeStyle = WavyStroke; > break; > } >@@ -252,7 +252,7 @@ TextDecorationPainter::TextDecorationPai > , m_decorations { OptionSet<TextDecoration>::fromRaw(decorations) } > , m_wavyOffset { wavyOffsetFromDecoration() } > , m_isPrinting { renderer.document().printing() } >- , m_styles { styles ? *WTFMove(styles) : stylesForRenderer(renderer, decorations, isFirstLine, NOPSEUDO) } >+ , m_styles { styles ? *WTFMove(styles) : stylesForRenderer(renderer, decorations, isFirstLine, PseudoId::None) } > , m_lineStyle { isFirstLine ? renderer.firstLineStyle() : renderer.style() } > { > } >@@ -273,21 +273,21 @@ void TextDecorationPainter::paintTextDec > > auto strokeStyle = textDecorationStyleToStrokeStyle(style); > >- if (style == TextDecorationStyleWavy) >+ if (style == TextDecorationStyle::Wavy) > strokeWavyTextDecoration(m_context, start, end, textDecorationThickness, m_lineStyle.computedFontPixelSize()); > else if (decoration == TextDecorationUnderline || decoration == TextDecorationOverline) { > #if ENABLE(CSS3_TEXT_DECORATION_SKIP_INK) > if ((m_lineStyle.textDecorationSkip() == TextDecorationSkipInk || m_lineStyle.textDecorationSkip() == TextDecorationSkipAuto) && m_isHorizontal) { > if (!m_context.paintingDisabled()) >- drawSkipInkUnderline(m_context, *m_font, textRun, textOrigin, localOrigin, offset, m_width, m_isPrinting, style == TextDecorationStyleDouble, strokeStyle); >+ drawSkipInkUnderline(m_context, *m_font, textRun, textOrigin, localOrigin, offset, m_width, m_isPrinting, style == TextDecorationStyle::Double, strokeStyle); > } else > // FIXME: Need to support text-decoration-skip: none. > #endif >- m_context.drawLineForText(start, m_width, m_isPrinting, style == TextDecorationStyleDouble, strokeStyle); >+ m_context.drawLineForText(start, m_width, m_isPrinting, style == TextDecorationStyle::Double, strokeStyle); > > } else { > ASSERT(decoration == TextDecorationLineThrough); >- m_context.drawLineForText(start, m_width, m_isPrinting, style == TextDecorationStyleDouble, strokeStyle); >+ m_context.drawLineForText(start, m_width, m_isPrinting, style == TextDecorationStyle::Double, strokeStyle); > } > }; > >@@ -336,13 +336,13 @@ void TextDecorationPainter::paintTextDec > // These decorations should match the visual overflows computed in visualOverflowForDecorations(). > if (m_decorations.contains(TextDecorationUnderline)) { > int offset = computeUnderlineOffset(m_lineStyle.textUnderlinePosition(), m_lineStyle.fontMetrics(), m_inlineTextBox, textDecorationThickness); >- float wavyOffset = m_styles.underlineStyle == TextDecorationStyleWavy ? m_wavyOffset : 0; >+ float wavyOffset = m_styles.underlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; > FloatPoint start = localOrigin + FloatSize(0, offset + wavyOffset); > FloatPoint end = localOrigin + FloatSize(m_width, offset + wavyOffset); > paintDecoration(TextDecorationUnderline, m_styles.underlineStyle, m_styles.underlineColor, start, end, offset); > } > if (m_decorations.contains(TextDecorationOverline)) { >- float wavyOffset = m_styles.overlineStyle == TextDecorationStyleWavy ? m_wavyOffset : 0; >+ float wavyOffset = m_styles.overlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; > FloatPoint start = localOrigin - FloatSize(0, wavyOffset); > FloatPoint end = localOrigin + FloatSize(m_width, -wavyOffset); > paintDecoration(TextDecorationOverline, m_styles.overlineStyle, m_styles.overlineColor, start, end, 0); >@@ -401,7 +401,7 @@ static void collectStylesForRenderer(Tex > }; > > auto styleForRenderer = [&] (const RenderObject& renderer) -> const RenderStyle& { >- if (pseudoId != NOPSEUDO && renderer.style().hasPseudoStyle(pseudoId)) { >+ if (pseudoId != PseudoId::None && renderer.style().hasPseudoStyle(pseudoId)) { > if (is<RenderText>(renderer)) > return *downcast<RenderText>(renderer).getCachedPseudoStyle(pseudoId); > return *downcast<RenderElement>(renderer).getCachedPseudoStyle(pseudoId); >Index: Source/WebCore/rendering/TextDecorationPainter.h >=================================================================== >--- Source/WebCore/rendering/TextDecorationPainter.h (revision 232123) >+++ Source/WebCore/rendering/TextDecorationPainter.h (working copy) >@@ -67,7 +67,7 @@ public: > TextDecorationStyle linethroughStyle; > }; > // FIXME: Make requestedDecorations an OptionSet<TextDecoration>. See <https://bugs.webkit.org/show_bug.cgi?id=176844>. >- static Styles stylesForRenderer(const RenderObject&, unsigned requestedDecorations, bool firstLineStyle = false, PseudoId = NOPSEUDO); >+ static Styles stylesForRenderer(const RenderObject&, unsigned requestedDecorations, bool firstLineStyle = false, PseudoId = PseudoId::None); > > private: > GraphicsContext& m_context; >Index: Source/WebCore/rendering/line/BreakingContext.h >=================================================================== >--- Source/WebCore/rendering/line/BreakingContext.h (revision 232123) >+++ Source/WebCore/rendering/line/BreakingContext.h (working copy) >@@ -111,8 +111,8 @@ public: > , m_renderTextInfo(inRenderTextInfo) > , m_lastFloatFromPreviousLine(inLastFloatFromPreviousLine) > , m_width(lineWidth) >- , m_currWS(NORMAL) >- , m_lastWS(NORMAL) >+ , m_currWS(WhiteSpace::Normal) >+ , m_lastWS(WhiteSpace::Normal) > , m_preservesNewline(false) > , m_atStart(true) > , m_ignoringSpaces(false) >@@ -161,7 +161,7 @@ public: > > void clearLineBreakIfFitsOnLine(bool ignoringTrailingSpace = false) > { >- if (m_width.fitsOnLine(ignoringTrailingSpace) || m_lastWS == NOWRAP || m_hangsAtEnd) >+ if (m_width.fitsOnLine(ignoringTrailingSpace) || m_lastWS == WhiteSpace::NoWrap || m_hangsAtEnd) > m_lineBreakHistory.clear(); > m_hangsAtEnd = false; > } >@@ -268,13 +268,13 @@ private: > > LineWidth m_width; > >- EWhiteSpace m_currWS; >- EWhiteSpace m_lastWS; >+ WhiteSpace m_currWS; >+ WhiteSpace m_lastWS; > > bool m_preservesNewline; > bool m_atStart; > >- // This variable is used only if whitespace isn't set to PRE, and it tells us whether >+ // This variable is used only if whitespace isn't set to WhiteSpace::Pre, and it tells us whether > // or not we are currently ignoring whitespace. > bool m_ignoringSpaces; > >@@ -365,7 +365,7 @@ inline void BreakingContext::handleBR(Cl > // If we were preceded by collapsing space and are in a right-aligned container we need to ensure the space gets > // collapsed away so that it doesn't push the text out from the container's right-hand edge. > // FIXME: Do this regardless of the container's alignment - will require rebaselining a lot of test results. >- else if (m_ignoringSpaces && (m_blockStyle.textAlign() == RIGHT || m_blockStyle.textAlign() == WEBKIT_RIGHT)) >+ else if (m_ignoringSpaces && (m_blockStyle.textAlign() == TextAlignMode::Right || m_blockStyle.textAlign() == TextAlignMode::WebKitRight)) > m_lineWhitespaceCollapsingState.stopIgnoringSpaces(InlineIterator(0, m_current.renderer(), m_current.offset())); > > if (!m_lineInfo.isEmpty()) >@@ -437,7 +437,7 @@ inline void BreakingContext::handleOutOf > if (!isInlineType) > m_block.setStaticInlinePositionForChild(box, m_block.logicalHeight(), m_block.startOffsetForContent(m_block.logicalHeight())); > else { >- // If our original display was an INLINE type, then we can determine our static y position now. >+ // If our original display was an DisplayType::Inline type, then we can determine our static y position now. > box.layer()->setStaticBlockPosition(m_block.logicalHeight()); > } > >@@ -762,7 +762,7 @@ inline bool BreakingContext::handleText( > const RenderStyle& style = lineStyle(renderText, m_lineInfo); > const FontCascade& font = style.fontCascade(); > bool isFixedPitch = font.isFixedPitch(); >- bool canHyphenate = style.hyphens() == HyphensAuto && WebCore::canHyphenate(style.locale()); >+ bool canHyphenate = style.hyphens() == Hyphens::Auto && WebCore::canHyphenate(style.locale()); > bool canHangPunctuationAtStart = style.hangingPunctuation() & FirstHangingPunctuation; > bool canHangPunctuationAtEnd = style.hangingPunctuation() & LastHangingPunctuation; > bool canHangStopOrCommaAtLineEnd = style.hangingPunctuation() & AllowEndHangingPunctuation; >@@ -778,7 +778,7 @@ inline bool BreakingContext::handleText( > bool breakNBSP = m_autoWrap && m_currentStyle->nbspMode() == NBSPMode::Space; > // Auto-wrapping text should wrap in the middle of a word only if it could not wrap before the word, > // which is only possible if the word is the first thing on the line. >- bool breakWords = m_currentStyle->breakWords() && ((m_autoWrap && (!m_width.committedWidth() && !m_width.hasCommittedReplaced())) || m_currWS == PRE); >+ bool breakWords = m_currentStyle->breakWords() && ((m_autoWrap && (!m_width.committedWidth() && !m_width.hasCommittedReplaced())) || m_currWS == WhiteSpace::Pre); > bool midWordBreak = false; > bool breakAll = m_currentStyle->wordBreak() == WordBreak::BreakAll && m_autoWrap; > bool keepAllWords = m_currentStyle->wordBreak() == WordBreak::KeepAll; >@@ -830,7 +830,7 @@ inline bool BreakingContext::handleText( > if (!m_collapseWhiteSpace || !m_currentCharacterIsSpace) > m_lineInfo.setEmpty(false, &m_block, &m_width); > >- if (c == softHyphen && m_autoWrap && !hyphenWidth && style.hyphens() != HyphensNone) { >+ if (c == softHyphen && m_autoWrap && !hyphenWidth && style.hyphens() != Hyphens::None) { > hyphenWidth = measureHyphenWidth(renderText, font, &fallbackFonts); > m_width.addUncommittedWidth(hyphenWidth); > } >@@ -839,7 +839,7 @@ inline bool BreakingContext::handleText( > > m_currentCharacterIsWS = m_currentCharacterIsSpace || (breakNBSP && c == noBreakSpace); > >- if ((breakAll || breakWords) && !midWordBreak && (!m_currentCharacterIsSpace || style.whiteSpace() != PRE_WRAP)) { >+ if ((breakAll || breakWords) && !midWordBreak && (!m_currentCharacterIsSpace || style.whiteSpace() != WhiteSpace::PreWrap)) { > wrapW += charWidth; > bool midWordBreakIsBeforeSurrogatePair = U16_IS_LEAD(c) && U16_IS_TRAIL(renderText.characterAt(m_current.offset() + 1)); > charWidth = textWidth(renderText, m_current.offset(), midWordBreakIsBeforeSurrogatePair ? 2 : 1, font, m_width.committedWidth() + wrapW, isFixedPitch, m_collapseWhiteSpace, fallbackFonts, textLayout); >@@ -847,8 +847,8 @@ inline bool BreakingContext::handleText( > } > > std::optional<unsigned> nextBreakablePosition = m_current.nextBreakablePosition(); >- bool betweenWords = c == '\n' || (m_currWS != PRE && !m_atStart && isBreakable(m_renderTextInfo.lineBreakIterator, m_current.offset(), nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, keepAllWords) >- && (style.hyphens() != HyphensNone || (m_current.previousInSameNode() != softHyphen))); >+ bool betweenWords = c == '\n' || (m_currWS != WhiteSpace::Pre && !m_atStart && isBreakable(m_renderTextInfo.lineBreakIterator, m_current.offset(), nextBreakablePosition, breakNBSP, canUseLineBreakShortcut, keepAllWords) >+ && (style.hyphens() != Hyphens::None || (m_current.previousInSameNode() != softHyphen))); > m_current.setNextBreakablePosition(nextBreakablePosition); > > if (canHangStopOrCommaAtLineEnd && renderText.isHangableStopOrComma(c) && m_width.fitsOnLine()) { >@@ -947,7 +947,7 @@ inline bool BreakingContext::handleText( > wordMeasurement.endOffset = m_lineBreakHistory.offset(); > } > // Check if the last breaking position is a soft-hyphen. >- if (!hyphenated && style.hyphens() != HyphensNone) { >+ if (!hyphenated && style.hyphens() != Hyphens::None) { > std::optional<unsigned> lastBreakingPositon; > const RenderObject* rendererAtBreakingPosition = nullptr; > if (m_lineBreakHistory.offset() || m_lineBreakHistory.nextBreakablePosition()) { >@@ -1071,7 +1071,7 @@ inline bool BreakingContext::handleText( > // Spaces after right-aligned text and before a line-break get collapsed away completely so that the trailing > // space doesn't seem to push the text out from the right-hand edge. > // FIXME: Do this regardless of the container's alignment - will require rebaselining a lot of test results. >- if (m_nextObject && m_startOfIgnoredSpaces.offset() && m_nextObject->isBR() && (m_blockStyle.textAlign() == RIGHT || m_blockStyle.textAlign() == WEBKIT_RIGHT)) { >+ if (m_nextObject && m_startOfIgnoredSpaces.offset() && m_nextObject->isBR() && (m_blockStyle.textAlign() == TextAlignMode::Right || m_blockStyle.textAlign() == TextAlignMode::WebKitRight)) { > m_startOfIgnoredSpaces.setOffset(m_startOfIgnoredSpaces.offset() - 1); > // If there's just a single trailing space start ignoring it now so it collapses away. > if (m_current.offset() == renderText.text().length() - 1) >@@ -1130,7 +1130,7 @@ inline bool BreakingContext::handleText( > }); > } > >- if (!hyphenated && m_lineBreakHistory.previousInSameNode() == softHyphen && style.hyphens() != HyphensNone) { >+ if (!hyphenated && m_lineBreakHistory.previousInSameNode() == softHyphen && style.hyphens() != Hyphens::None) { > hyphenated = true; > m_atEnd = true; > } >@@ -1147,7 +1147,7 @@ inline bool textBeginsWithBreakablePosit > inline bool BreakingContext::canBreakAtThisPosition() > { > // If we are no-wrap and have found a line-breaking opportunity already then we should take it. >- if (m_width.committedWidth() && !m_width.fitsOnLine(m_currentCharacterIsSpace) && m_currWS == NOWRAP) >+ if (m_width.committedWidth() && !m_width.fitsOnLine(m_currentCharacterIsSpace) && m_currWS == WhiteSpace::NoWrap) > return true; > > // Avoid breaking on empty inlines. >@@ -1257,7 +1257,7 @@ inline InlineIterator BreakingContext::h > if (m_lineBreakHistory.current() == m_resolver.position()) { > if (!m_lineBreakHistory.renderer() || !m_lineBreakHistory.renderer()->isBR()) { > // we just add as much as possible >- if (m_blockStyle.whiteSpace() == PRE && !m_current.offset()) { >+ if (m_blockStyle.whiteSpace() == WhiteSpace::Pre && !m_current.offset()) { > if (m_lastObject) > commitLineBreakAtCurrentWidth(*m_lastObject, m_lastObject->isText() ? m_lastObject->length() : 0); > else >Index: Source/WebCore/rendering/line/LineInlineHeaders.h >=================================================================== >--- Source/WebCore/rendering/line/LineInlineHeaders.h (revision 232123) >+++ Source/WebCore/rendering/line/LineInlineHeaders.h (working copy) >@@ -68,7 +68,7 @@ inline bool shouldCollapseWhiteSpace(con > // If a space (U+0020) at the end of a line has 'white-space' set to 'normal', 'nowrap', or 'pre-line', it is also removed. > // If spaces (U+0020) or tabs (U+0009) at the end of a line have 'white-space' set to 'pre-wrap', UAs may visually collapse them. > return style->collapseWhiteSpace() >- || (whitespacePosition == TrailingWhitespace && style->whiteSpace() == PRE_WRAP && (!lineInfo.isEmpty() || !lineInfo.previousLineBrokeCleanly())); >+ || (whitespacePosition == TrailingWhitespace && style->whiteSpace() == WhiteSpace::PreWrap && (!lineInfo.isEmpty() || !lineInfo.previousLineBrokeCleanly())); > } > > inline bool skipNonBreakingSpace(const InlineIterator& it, const LineInfo& lineInfo) >Index: Source/WebCore/rendering/line/LineWidth.cpp >=================================================================== >--- Source/WebCore/rendering/line/LineWidth.cpp (revision 232123) >+++ Source/WebCore/rendering/line/LineWidth.cpp (working copy) >@@ -76,7 +76,7 @@ static bool newFloatShrinksLine(const Fl > > // initial-letter float always shrinks the first line. > const auto& style = newFloat.renderer().style(); >- if (isFirstLine && style.styleType() == FIRST_LETTER && !style.initialLetter().isEmpty()) >+ if (isFirstLine && style.styleType() == PseudoId::FirstLetter && !style.initialLetter().isEmpty()) > return true; > return false; > } >Index: Source/WebCore/rendering/mathml/MathOperator.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/MathOperator.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/MathOperator.cpp (working copy) >@@ -708,7 +708,7 @@ void MathOperator::paintHorizontalGlyphA > > void MathOperator::paint(const RenderStyle& style, PaintInfo& info, const LayoutPoint& paintOffset) > { >- if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style.visibility() != VISIBLE) >+ if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style.visibility() != Visibility::Visible) > return; > > // Make a copy of the PaintInfo because applyTransform will modify its rect. >Index: Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/RenderMathMLFraction.cpp (working copy) >@@ -255,7 +255,7 @@ void RenderMathMLFraction::paint(PaintIn > { > RenderMathMLBlock::paint(info, paintOffset); > LayoutUnit thickness = lineThickness(); >- if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE || !isValid() || !thickness) >+ if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != Visibility::Visible || !isValid() || !thickness) > return; > > IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + LayoutPoint(0, ascentOverHorizontalAxis())); >Index: Source/WebCore/rendering/mathml/RenderMathMLMath.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/RenderMathMLMath.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/RenderMathMLMath.cpp (working copy) >@@ -58,7 +58,7 @@ void RenderMathMLMath::layoutBlock(bool > { > ASSERT(needsLayout()); > >- if (style().display() != BLOCK) { >+ if (style().display() != DisplayType::Block) { > RenderMathMLRow::layoutBlock(relayoutChildren, pageLogicalHeight); > return; > } >Index: Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/RenderMathMLMenclose.cpp (working copy) >@@ -207,7 +207,7 @@ void RenderMathMLMenclose::paint(PaintIn > { > RenderMathMLRow::paint(info, paintOffset); > >- if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE) >+ if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != Visibility::Visible) > return; > > LayoutUnit thickness = ruleThickness(); >Index: Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp (working copy) >@@ -268,7 +268,7 @@ void RenderMathMLRoot::paint(PaintInfo& > { > RenderMathMLRow::paint(info, paintOffset); > >- if (!firstChild() || info.context().paintingDisabled() || style().visibility() != VISIBLE || !isValid()) >+ if (!firstChild() || info.context().paintingDisabled() || style().visibility() != Visibility::Visible || !isValid()) > return; > > // We draw the radical operator. >Index: Source/WebCore/rendering/mathml/RenderMathMLToken.cpp >=================================================================== >--- Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (revision 232123) >+++ Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (working copy) >@@ -594,7 +594,7 @@ void RenderMathMLToken::paint(PaintInfo& > RenderMathMLBlock::paint(info, paintOffset); > > // FIXME: Instead of using DrawGlyph, we may consider using the more general TextPainter so that we can apply mathvariant to strings with an arbitrary number of characters and preserve advanced CSS effects (text-shadow, etc). >- if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != VISIBLE || !m_mathVariantCodePoint) >+ if (info.context().paintingDisabled() || info.phase != PaintPhaseForeground || style().visibility() != Visibility::Visible || !m_mathVariantCodePoint) > return; > > auto mathVariantGlyph = style().fontCascade().glyphDataForCharacter(m_mathVariantCodePoint.value(), m_mathVariantIsMirrored); >Index: Source/WebCore/rendering/shapes/BoxShape.cpp >=================================================================== >--- Source/WebCore/rendering/shapes/BoxShape.cpp (revision 232123) >+++ Source/WebCore/rendering/shapes/BoxShape.cpp (working copy) >@@ -66,7 +66,7 @@ RoundedRect computeRoundedRectForBoxShap > { > const RenderStyle& style = renderer.style(); > switch (box) { >- case MarginBox: { >+ case CSSBoxType::MarginBox: { > if (!style.hasBorderRadius()) > return RoundedRect(renderer.marginBoxRect(), RoundedRect::Radii()); > >@@ -75,18 +75,18 @@ RoundedRect computeRoundedRectForBoxShap > radii.scale(calcBorderRadiiConstraintScaleFor(marginBox, radii)); > return RoundedRect(marginBox, radii); > } >- case PaddingBox: >+ case CSSBoxType::PaddingBox: > return style.getRoundedInnerBorderFor(renderer.borderBoxRect()); >- case ContentBox: >+ case CSSBoxType::ContentBox: > return style.getRoundedInnerBorderFor(renderer.borderBoxRect(), > renderer.paddingTop() + renderer.borderTop(), renderer.paddingBottom() + renderer.borderBottom(), > renderer.paddingLeft() + renderer.borderLeft(), renderer.paddingRight() + renderer.borderRight()); > // fill, stroke, view-box compute to border-box for HTML elements. >- case BorderBox: >- case Fill: >- case Stroke: >- case ViewBox: >- case BoxMissing: >+ case CSSBoxType::BorderBox: >+ case CSSBoxType::Fill: >+ case CSSBoxType::Stroke: >+ case CSSBoxType::ViewBox: >+ case CSSBoxType::BoxMissing: > return style.getRoundedBorderFor(renderer.borderBoxRect()); > } > >Index: Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp >=================================================================== >--- Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (revision 232123) >+++ Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp (working copy) >@@ -72,10 +72,10 @@ FloatSize ShapeOutsideInfo::shapeToRende > > static inline CSSBoxType referenceBox(const ShapeValue& shapeValue) > { >- if (shapeValue.cssBox() == BoxMissing) { >+ if (shapeValue.cssBox() == CSSBoxType::BoxMissing) { > if (shapeValue.type() == ShapeValue::Type::Image) >- return ContentBox; >- return MarginBox; >+ return CSSBoxType::ContentBox; >+ return CSSBoxType::MarginBox; > } > return shapeValue.cssBox(); > } >@@ -84,30 +84,30 @@ void ShapeOutsideInfo::setReferenceBoxLo > { > bool isHorizontalWritingMode = m_renderer.containingBlock()->style().isHorizontalWritingMode(); > switch (referenceBox(*m_renderer.style().shapeOutside())) { >- case MarginBox: >+ case CSSBoxType::MarginBox: > if (isHorizontalWritingMode) > newReferenceBoxLogicalSize.expand(m_renderer.horizontalMarginExtent(), m_renderer.verticalMarginExtent()); > else > newReferenceBoxLogicalSize.expand(m_renderer.verticalMarginExtent(), m_renderer.horizontalMarginExtent()); > break; >- case BorderBox: >+ case CSSBoxType::BorderBox: > break; >- case PaddingBox: >+ case CSSBoxType::PaddingBox: > if (isHorizontalWritingMode) > newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderExtent(), m_renderer.verticalBorderExtent()); > else > newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderExtent(), m_renderer.horizontalBorderExtent()); > break; >- case ContentBox: >+ case CSSBoxType::ContentBox: > if (isHorizontalWritingMode) > newReferenceBoxLogicalSize.shrink(m_renderer.horizontalBorderAndPaddingExtent(), m_renderer.verticalBorderAndPaddingExtent()); > else > newReferenceBoxLogicalSize.shrink(m_renderer.verticalBorderAndPaddingExtent(), m_renderer.horizontalBorderAndPaddingExtent()); > break; >- case Fill: >- case Stroke: >- case ViewBox: >- case BoxMissing: >+ case CSSBoxType::Fill: >+ case CSSBoxType::Stroke: >+ case CSSBoxType::ViewBox: >+ case CSSBoxType::BoxMissing: > ASSERT_NOT_REACHED(); > break; > } >@@ -224,14 +224,22 @@ static inline LayoutUnit borderAndPaddin > LayoutUnit ShapeOutsideInfo::logicalTopOffset() const > { > switch (referenceBox(*m_renderer.style().shapeOutside())) { >- case MarginBox: return -m_renderer.marginBefore(&m_renderer.containingBlock()->style()); >- case BorderBox: return LayoutUnit(); >- case PaddingBox: return borderBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); >- case ContentBox: return borderAndPaddingBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); >- case Fill: break; >- case Stroke: break; >- case ViewBox: break; >- case BoxMissing: break; >+ case CSSBoxType::MarginBox: >+ return -m_renderer.marginBefore(&m_renderer.containingBlock()->style()); >+ case CSSBoxType::BorderBox: >+ return LayoutUnit(); >+ case CSSBoxType::PaddingBox: >+ return borderBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); >+ case CSSBoxType::ContentBox: >+ return borderAndPaddingBeforeInWritingMode(m_renderer, m_renderer.containingBlock()->style().writingMode()); >+ case CSSBoxType::Fill: >+ break; >+ case CSSBoxType::Stroke: >+ break; >+ case CSSBoxType::ViewBox: >+ break; >+ case CSSBoxType::BoxMissing: >+ break; > } > > ASSERT_NOT_REACHED(); >@@ -272,14 +280,22 @@ LayoutUnit ShapeOutsideInfo::logicalLeft > return LayoutUnit(); > > switch (referenceBox(*m_renderer.style().shapeOutside())) { >- case MarginBox: return -m_renderer.marginStart(&m_renderer.containingBlock()->style()); >- case BorderBox: return LayoutUnit(); >- case PaddingBox: return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); >- case ContentBox: return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); >- case Fill: break; >- case Stroke: break; >- case ViewBox: break; >- case BoxMissing: break; >+ case CSSBoxType::MarginBox: >+ return -m_renderer.marginStart(&m_renderer.containingBlock()->style()); >+ case CSSBoxType::BorderBox: >+ return LayoutUnit(); >+ case CSSBoxType::PaddingBox: >+ return borderStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); >+ case CSSBoxType::ContentBox: >+ return borderAndPaddingStartWithStyleForWritingMode(m_renderer, m_renderer.containingBlock()->style()); >+ case CSSBoxType::Fill: >+ break; >+ case CSSBoxType::Stroke: >+ break; >+ case CSSBoxType::ViewBox: >+ break; >+ case CSSBoxType::BoxMissing: >+ break; > } > > ASSERT_NOT_REACHED(); >Index: Source/WebCore/rendering/style/CounterContent.h >=================================================================== >--- Source/WebCore/rendering/style/CounterContent.h (revision 232123) >+++ Source/WebCore/rendering/style/CounterContent.h (working copy) >@@ -32,7 +32,7 @@ namespace WebCore { > class CounterContent { > WTF_MAKE_FAST_ALLOCATED; > public: >- CounterContent(const AtomicString& identifier, EListStyleType style, const AtomicString& separator) >+ CounterContent(const AtomicString& identifier, ListStyleType style, const AtomicString& separator) > : m_identifier(identifier) > , m_listStyle(style) > , m_separator(separator) >@@ -40,12 +40,12 @@ public: > } > > const AtomicString& identifier() const { return m_identifier; } >- EListStyleType listStyle() const { return m_listStyle; } >+ ListStyleType listStyle() const { return m_listStyle; } > const AtomicString& separator() const { return m_separator; } > > private: > AtomicString m_identifier; >- EListStyleType m_listStyle; >+ ListStyleType m_listStyle; > AtomicString m_separator; > }; > >Index: Source/WebCore/rendering/style/RenderStyle.cpp >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.cpp (revision 232123) >+++ Source/WebCore/rendering/style/RenderStyle.cpp (working copy) >@@ -109,7 +109,7 @@ std::unique_ptr<RenderStyle> RenderStyle > return std::make_unique<RenderStyle>(style, Clone); > } > >-RenderStyle RenderStyle::createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, EDisplay display) >+RenderStyle RenderStyle::createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, DisplayType display) > { > auto newStyle = create(); > newStyle.inheritFrom(parentStyle); >@@ -120,7 +120,7 @@ RenderStyle RenderStyle::createAnonymous > > RenderStyle RenderStyle::createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle) > { >- ASSERT(pseudoStyle.styleType() == BEFORE || pseudoStyle.styleType() == AFTER); >+ ASSERT(pseudoStyle.styleType() == PseudoId::Before || pseudoStyle.styleType() == PseudoId::After); > > auto style = create(); > style.inheritFrom(pseudoStyle); >@@ -140,31 +140,31 @@ RenderStyle::RenderStyle(CreateDefaultSt > , m_inheritedData(StyleInheritedData::create()) > , m_svgStyle(SVGRenderStyle::create()) > { >- m_inheritedFlags.emptyCells = initialEmptyCells(); >- m_inheritedFlags.captionSide = initialCaptionSide(); >- m_inheritedFlags.listStyleType = initialListStyleType(); >- m_inheritedFlags.listStylePosition = initialListStylePosition(); >- m_inheritedFlags.visibility = initialVisibility(); >- m_inheritedFlags.textAlign = initialTextAlign(); >- m_inheritedFlags.textTransform = initialTextTransform(); >+ m_inheritedFlags.emptyCells = static_cast<unsigned>(initialEmptyCells()); >+ m_inheritedFlags.captionSide = static_cast<unsigned>(initialCaptionSide()); >+ m_inheritedFlags.listStyleType = static_cast<unsigned>(initialListStyleType()); >+ m_inheritedFlags.listStylePosition = static_cast<unsigned>(initialListStylePosition()); >+ m_inheritedFlags.visibility = static_cast<unsigned>(initialVisibility()); >+ m_inheritedFlags.textAlign = static_cast<unsigned>(initialTextAlign()); >+ m_inheritedFlags.textTransform = static_cast<unsigned>(initialTextTransform()); > m_inheritedFlags.textDecorations = initialTextDecoration(); >- m_inheritedFlags.cursor = initialCursor(); >+ m_inheritedFlags.cursor = static_cast<unsigned>(initialCursor()); > #if ENABLE(CURSOR_VISIBILITY) >- m_inheritedFlags.cursorVisibility = initialCursorVisibility(); >+ m_inheritedFlags.cursorVisibility = static_cast<unsigned>(initialCursorVisibility()); > #endif > m_inheritedFlags.direction = initialDirection(); >- m_inheritedFlags.whiteSpace = initialWhiteSpace(); >+ m_inheritedFlags.whiteSpace = static_cast<unsigned>(initialWhiteSpace()); > m_inheritedFlags.borderCollapse = static_cast<unsigned>(initialBorderCollapse()); >- m_inheritedFlags.rtlOrdering = initialRTLOrdering(); >+ m_inheritedFlags.rtlOrdering = static_cast<unsigned>(initialRTLOrdering()); > m_inheritedFlags.boxDirection = static_cast<unsigned>(initialBoxDirection()); > m_inheritedFlags.printColorAdjust = static_cast<unsigned>(initialPrintColorAdjust()); >- m_inheritedFlags.pointerEvents = initialPointerEvents(); >- m_inheritedFlags.insideLink = NotInsideLink; >+ m_inheritedFlags.pointerEvents = static_cast<unsigned>(initialPointerEvents()); >+ m_inheritedFlags.insideLink = static_cast<unsigned>(InsideLink::NotInside); > m_inheritedFlags.insideDefaultButton = false; > m_inheritedFlags.writingMode = initialWritingMode(); > >- m_nonInheritedFlags.effectiveDisplay = initialDisplay(); >- m_nonInheritedFlags.originalDisplay = initialDisplay(); >+ m_nonInheritedFlags.effectiveDisplay = static_cast<unsigned>(initialDisplay()); >+ m_nonInheritedFlags.originalDisplay = static_cast<unsigned>(initialDisplay()); > m_nonInheritedFlags.overflowX = static_cast<unsigned>(initialOverflowX()); > m_nonInheritedFlags.overflowY = static_cast<unsigned>(initialOverflowY()); > m_nonInheritedFlags.verticalAlign = static_cast<unsigned>(initialVerticalAlign()); >@@ -186,8 +186,8 @@ RenderStyle::RenderStyle(CreateDefaultSt > m_nonInheritedFlags.affectedByActive = false; > m_nonInheritedFlags.affectedByDrag = false; > m_nonInheritedFlags.isLink = false; >- m_nonInheritedFlags.styleType = NOPSEUDO; >- m_nonInheritedFlags.pseudoBits = NOPSEUDO; >+ m_nonInheritedFlags.styleType = static_cast<unsigned>(PseudoId::None); >+ m_nonInheritedFlags.pseudoBits = static_cast<unsigned>(PseudoId::None); > > static_assert((sizeof(InheritedFlags) <= 8), "InheritedFlags does not grow"); > static_assert((sizeof(NonInheritedFlags) <= 8), "NonInheritedFlags does not grow"); >@@ -366,7 +366,7 @@ bool RenderStyle::operator==(const Rende > > bool RenderStyle::hasUniquePseudoStyle() const > { >- if (!m_cachedPseudoStyles || styleType() != NOPSEUDO) >+ if (!m_cachedPseudoStyles || styleType() != PseudoId::None) > return false; > > for (auto& pseudoStyle : *m_cachedPseudoStyles) { >@@ -382,7 +382,7 @@ RenderStyle* RenderStyle::getCachedPseud > if (!m_cachedPseudoStyles || !m_cachedPseudoStyles->size()) > return nullptr; > >- if (styleType() != NOPSEUDO) >+ if (styleType() != PseudoId::None) > return nullptr; > > for (auto& pseudoStyle : *m_cachedPseudoStyles) { >@@ -398,7 +398,7 @@ RenderStyle* RenderStyle::addCachedPseud > if (!pseudo) > return nullptr; > >- ASSERT(pseudo->styleType() > NOPSEUDO); >+ ASSERT(pseudo->styleType() > PseudoId::None); > > RenderStyle* result = pseudo.get(); > >@@ -706,7 +706,7 @@ bool RenderStyle::changeRequiresLayout(c > return true; > > >- if (m_nonInheritedFlags.effectiveDisplay >= TABLE) { >+ if (static_cast<DisplayType>(m_nonInheritedFlags.effectiveDisplay) >= DisplayType::Table) { > if (m_inheritedFlags.borderCollapse != other.m_inheritedFlags.borderCollapse > || m_inheritedFlags.emptyCells != other.m_inheritedFlags.emptyCells > || m_inheritedFlags.captionSide != other.m_inheritedFlags.captionSide >@@ -727,7 +727,7 @@ bool RenderStyle::changeRequiresLayout(c > return true; > } > >- if (m_nonInheritedFlags.effectiveDisplay == LIST_ITEM) { >+ if (static_cast<DisplayType>(m_nonInheritedFlags.effectiveDisplay) == DisplayType::ListItem) { > if (m_inheritedFlags.listStyleType != other.m_inheritedFlags.listStyleType > || m_inheritedFlags.listStylePosition != other.m_inheritedFlags.listStylePosition) > return true; >@@ -772,7 +772,7 @@ bool RenderStyle::changeRequiresLayout(c > if (!arePointingToEqualData(m_rareNonInheritedData->counterDirectives, other.m_rareNonInheritedData->counterDirectives)) > return true; > >- if ((visibility() == COLLAPSE) != (other.visibility() == COLLAPSE)) >+ if ((visibility() == Visibility::Collapse) != (other.visibility() == Visibility::Collapse)) > return true; > > if (m_rareNonInheritedData->hasOpacity() != other.m_rareNonInheritedData->hasOpacity()) { >@@ -809,14 +809,14 @@ bool RenderStyle::changeRequiresLayout(c > } > } > >- bool hasFirstLineStyle = hasPseudoStyle(FIRST_LINE); >- if (hasFirstLineStyle != other.hasPseudoStyle(FIRST_LINE)) >+ bool hasFirstLineStyle = hasPseudoStyle(PseudoId::FirstLine); >+ if (hasFirstLineStyle != other.hasPseudoStyle(PseudoId::FirstLine)) > return true; > if (hasFirstLineStyle) { >- auto* firstLineStyle = getCachedPseudoStyle(FIRST_LINE); >+ auto* firstLineStyle = getCachedPseudoStyle(PseudoId::FirstLine); > if (!firstLineStyle) > return true; >- auto* otherFirstLineStyle = other.getCachedPseudoStyle(FIRST_LINE); >+ auto* otherFirstLineStyle = other.getCachedPseudoStyle(PseudoId::FirstLine); > if (!otherFirstLineStyle) > return true; > // FIXME: Not all first line style changes actually need layout. >@@ -885,7 +885,7 @@ bool RenderStyle::changeRequiresLayerRep > > static bool requiresPainting(const RenderStyle& style) > { >- if (style.visibility() == HIDDEN) >+ if (style.visibility() == Visibility::Hidden) > return false; > if (!style.opacity()) > return false; >@@ -1349,7 +1349,7 @@ CounterDirectiveMap& RenderStyle::access > > const AtomicString& RenderStyle::hyphenString() const > { >- ASSERT(hyphens() != HyphensNone); >+ ASSERT(hyphens() != Hyphens::None); > > auto& hyphenationString = m_rareInheritedData->hyphenationString; > if (!hyphenationString.isNull()) >@@ -1364,36 +1364,36 @@ const AtomicString& RenderStyle::hyphenS > const AtomicString& RenderStyle::textEmphasisMarkString() const > { > switch (textEmphasisMark()) { >- case TextEmphasisMarkNone: >+ case TextEmphasisMark::None: > return nullAtom(); >- case TextEmphasisMarkCustom: >+ case TextEmphasisMark::Custom: > return textEmphasisCustomMark(); >- case TextEmphasisMarkDot: { >+ case TextEmphasisMark::Dot: { > static NeverDestroyed<AtomicString> filledDotString(&bullet, 1); > static NeverDestroyed<AtomicString> openDotString(&whiteBullet, 1); >- return textEmphasisFill() == TextEmphasisFillFilled ? filledDotString : openDotString; >+ return textEmphasisFill() == TextEmphasisFill::Filled ? filledDotString : openDotString; > } >- case TextEmphasisMarkCircle: { >+ case TextEmphasisMark::Circle: { > static NeverDestroyed<AtomicString> filledCircleString(&blackCircle, 1); > static NeverDestroyed<AtomicString> openCircleString(&whiteCircle, 1); >- return textEmphasisFill() == TextEmphasisFillFilled ? filledCircleString : openCircleString; >+ return textEmphasisFill() == TextEmphasisFill::Filled ? filledCircleString : openCircleString; > } >- case TextEmphasisMarkDoubleCircle: { >+ case TextEmphasisMark::DoubleCircle: { > static NeverDestroyed<AtomicString> filledDoubleCircleString(&fisheye, 1); > static NeverDestroyed<AtomicString> openDoubleCircleString(&bullseye, 1); >- return textEmphasisFill() == TextEmphasisFillFilled ? filledDoubleCircleString : openDoubleCircleString; >+ return textEmphasisFill() == TextEmphasisFill::Filled ? filledDoubleCircleString : openDoubleCircleString; > } >- case TextEmphasisMarkTriangle: { >+ case TextEmphasisMark::Triangle: { > static NeverDestroyed<AtomicString> filledTriangleString(&blackUpPointingTriangle, 1); > static NeverDestroyed<AtomicString> openTriangleString(&whiteUpPointingTriangle, 1); >- return textEmphasisFill() == TextEmphasisFillFilled ? filledTriangleString : openTriangleString; >+ return textEmphasisFill() == TextEmphasisFill::Filled ? filledTriangleString : openTriangleString; > } >- case TextEmphasisMarkSesame: { >+ case TextEmphasisMark::Sesame: { > static NeverDestroyed<AtomicString> filledSesameString(&sesameDot, 1); > static NeverDestroyed<AtomicString> openSesameString(&whiteSesameDot, 1); >- return textEmphasisFill() == TextEmphasisFillFilled ? filledSesameString : openSesameString; >+ return textEmphasisFill() == TextEmphasisFill::Filled ? filledSesameString : openSesameString; > } >- case TextEmphasisMarkAuto: >+ case TextEmphasisMark::Auto: > ASSERT_NOT_REACHED(); > return nullAtom(); > } >@@ -1825,7 +1825,7 @@ Color RenderStyle::colorIncludingFallbac > Color RenderStyle::visitedDependentColor(CSSPropertyID colorProperty) const > { > Color unvisitedColor = colorIncludingFallback(colorProperty, false); >- if (insideLink() != InsideVisitedLink) >+ if (insideLink() != InsideLink::InsideVisited) > return unvisitedColor; > > Color visitedColor = colorIncludingFallback(colorProperty, true); >@@ -1986,11 +1986,11 @@ void RenderStyle::setMarginEnd(Length&& > TextEmphasisMark RenderStyle::textEmphasisMark() const > { > auto mark = static_cast<TextEmphasisMark>(m_rareInheritedData->textEmphasisMark); >- if (mark != TextEmphasisMarkAuto) >+ if (mark != TextEmphasisMark::Auto) > return mark; > if (isHorizontalWritingMode()) >- return TextEmphasisMarkDot; >- return TextEmphasisMarkSesame; >+ return TextEmphasisMark::Dot; >+ return TextEmphasisMark::Sesame; > } > > #if ENABLE(TOUCH_EVENTS) >@@ -2067,32 +2067,32 @@ void RenderStyle::setColumnStylesFromPag > > switch (paginationMode) { > case Pagination::LeftToRightPaginated: >- setColumnAxis(HorizontalColumnAxis); >+ setColumnAxis(ColumnAxis::Horizontal); > if (isHorizontalWritingMode()) >- setColumnProgression(isLeftToRightDirection() ? NormalColumnProgression : ReverseColumnProgression); >+ setColumnProgression(isLeftToRightDirection() ? ColumnProgression::Normal : ColumnProgression::Reverse); > else >- setColumnProgression(isFlippedBlocksWritingMode() ? ReverseColumnProgression : NormalColumnProgression); >+ setColumnProgression(isFlippedBlocksWritingMode() ? ColumnProgression::Reverse : ColumnProgression::Normal); > break; > case Pagination::RightToLeftPaginated: >- setColumnAxis(HorizontalColumnAxis); >+ setColumnAxis(ColumnAxis::Horizontal); > if (isHorizontalWritingMode()) >- setColumnProgression(isLeftToRightDirection() ? ReverseColumnProgression : NormalColumnProgression); >+ setColumnProgression(isLeftToRightDirection() ? ColumnProgression::Reverse : ColumnProgression::Normal); > else >- setColumnProgression(isFlippedBlocksWritingMode() ? NormalColumnProgression : ReverseColumnProgression); >+ setColumnProgression(isFlippedBlocksWritingMode() ? ColumnProgression::Normal : ColumnProgression::Reverse); > break; > case Pagination::TopToBottomPaginated: >- setColumnAxis(VerticalColumnAxis); >+ setColumnAxis(ColumnAxis::Vertical); > if (isHorizontalWritingMode()) >- setColumnProgression(isFlippedBlocksWritingMode() ? ReverseColumnProgression : NormalColumnProgression); >+ setColumnProgression(isFlippedBlocksWritingMode() ? ColumnProgression::Reverse : ColumnProgression::Normal); > else >- setColumnProgression(isLeftToRightDirection() ? NormalColumnProgression : ReverseColumnProgression); >+ setColumnProgression(isLeftToRightDirection() ? ColumnProgression::Normal : ColumnProgression::Reverse); > break; > case Pagination::BottomToTopPaginated: >- setColumnAxis(VerticalColumnAxis); >+ setColumnAxis(ColumnAxis::Vertical); > if (isHorizontalWritingMode()) >- setColumnProgression(isFlippedBlocksWritingMode() ? NormalColumnProgression : ReverseColumnProgression); >+ setColumnProgression(isFlippedBlocksWritingMode() ? ColumnProgression::Normal : ColumnProgression::Reverse); > else >- setColumnProgression(isLeftToRightDirection() ? ReverseColumnProgression : NormalColumnProgression); >+ setColumnProgression(isLeftToRightDirection() ? ColumnProgression::Reverse : ColumnProgression::Normal); > break; > case Pagination::Unpaginated: > ASSERT_NOT_REACHED(); >Index: Source/WebCore/rendering/style/RenderStyle.h >=================================================================== >--- Source/WebCore/rendering/style/RenderStyle.h (revision 232123) >+++ Source/WebCore/rendering/style/RenderStyle.h (working copy) >@@ -148,7 +148,7 @@ public: > static RenderStyle clone(const RenderStyle&); > static std::unique_ptr<RenderStyle> clonePtr(const RenderStyle&); > >- static RenderStyle createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, EDisplay); >+ static RenderStyle createAnonymousStyleWithDisplay(const RenderStyle& parentStyle, DisplayType); > static RenderStyle createStyleInheritingFromPseudoStyle(const RenderStyle& pseudoStyle); > > #if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS) >@@ -174,7 +174,7 @@ public: > StyleContentAlignmentData resolvedJustifyContent(const StyleContentAlignmentData& normalValueBehaviour) const; > > PseudoId styleType() const { return static_cast<PseudoId>(m_nonInheritedFlags.styleType); } >- void setStyleType(PseudoId styleType) { m_nonInheritedFlags.styleType = styleType; } >+ void setStyleType(PseudoId styleType) { m_nonInheritedFlags.styleType = static_cast<unsigned>(styleType); } > > RenderStyle* getCachedPseudoStyle(PseudoId) const; > RenderStyle* addCachedPseudoStyle(std::unique_ptr<RenderStyle>); >@@ -228,7 +228,7 @@ public: > FilterOutsets filterOutsets() const { return hasFilter() ? filter().outsets() : FilterOutsets(); } > > Order rtlOrdering() const { return static_cast<Order>(m_inheritedFlags.rtlOrdering); } >- void setRTLOrdering(Order ordering) { m_inheritedFlags.rtlOrdering = ordering; } >+ void setRTLOrdering(Order ordering) { m_inheritedFlags.rtlOrdering = static_cast<unsigned>(ordering); } > > bool isStyleAvailable() const; > >@@ -240,7 +240,7 @@ public: > > // attribute getter methods > >- EDisplay display() const { return static_cast<EDisplay>(m_nonInheritedFlags.effectiveDisplay); } >+ DisplayType display() const { return static_cast<DisplayType>(m_nonInheritedFlags.effectiveDisplay); } > > const Length& left() const { return m_surroundData->offset.left(); } > const Length& right() const { return m_surroundData->offset.right(); } >@@ -331,7 +331,7 @@ public: > Overflow overflowInlineDirection() const { return isHorizontalWritingMode() ? overflowX() : overflowY(); } > Overflow overflowBlockDirection() const { return isHorizontalWritingMode() ? overflowY() : overflowX(); } > >- EVisibility visibility() const { return static_cast<EVisibility>(m_inheritedFlags.visibility); } >+ Visibility visibility() const { return static_cast<Visibility>(m_inheritedFlags.visibility); } > VerticalAlign verticalAlign() const { return static_cast<VerticalAlign>(m_nonInheritedFlags.verticalAlign); } > const Length& verticalAlignLength() const { return m_boxData->verticalAlign(); } > >@@ -363,8 +363,8 @@ public: > FontSelectionValue fontItalic() const { return fontDescription().italic(); } > > const Length& textIndent() const { return m_rareInheritedData->indent; } >- ETextAlign textAlign() const { return static_cast<ETextAlign>(m_inheritedFlags.textAlign); } >- ETextTransform textTransform() const { return static_cast<ETextTransform>(m_inheritedFlags.textTransform); } >+ TextAlignMode textAlign() const { return static_cast<TextAlignMode>(m_inheritedFlags.textAlign); } >+ TextTransform textTransform() const { return static_cast<TextTransform>(m_inheritedFlags.textTransform); } > TextDecoration textDecorationsInEffect() const { return static_cast<TextDecoration>(m_inheritedFlags.textDecorations); } > TextDecoration textDecoration() const { return static_cast<TextDecoration>(m_visualData->textDecoration); } > TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(m_rareNonInheritedData->textDecorationStyle); } >@@ -394,12 +394,12 @@ public: > WEBCORE_EXPORT const Length& lineHeight() const; > WEBCORE_EXPORT int computedLineHeight() const; > >- EWhiteSpace whiteSpace() const { return static_cast<EWhiteSpace>(m_inheritedFlags.whiteSpace); } >- static bool autoWrap(EWhiteSpace); >+ WhiteSpace whiteSpace() const { return static_cast<WhiteSpace>(m_inheritedFlags.whiteSpace); } >+ static bool autoWrap(WhiteSpace); > bool autoWrap() const { return autoWrap(whiteSpace()); } >- static bool preserveNewline(EWhiteSpace); >+ static bool preserveNewline(WhiteSpace); > bool preserveNewline() const { return preserveNewline(whiteSpace()); } >- static bool collapseWhiteSpace(EWhiteSpace); >+ static bool collapseWhiteSpace(WhiteSpace); > bool collapseWhiteSpace() const { return collapseWhiteSpace(whiteSpace()); } > bool isCollapsibleWhiteSpace(UChar) const; > bool breakOnlyAfterWhiteSpace() const; >@@ -436,12 +436,12 @@ public: > BorderCollapse borderCollapse() const { return static_cast<BorderCollapse>(m_inheritedFlags.borderCollapse); } > float horizontalBorderSpacing() const; > float verticalBorderSpacing() const; >- EEmptyCell emptyCells() const { return static_cast<EEmptyCell>(m_inheritedFlags.emptyCells); } >- ECaptionSide captionSide() const { return static_cast<ECaptionSide>(m_inheritedFlags.captionSide); } >+ EmptyCell emptyCells() const { return static_cast<EmptyCell>(m_inheritedFlags.emptyCells); } >+ CaptionSide captionSide() const { return static_cast<CaptionSide>(m_inheritedFlags.captionSide); } > >- EListStyleType listStyleType() const { return static_cast<EListStyleType>(m_inheritedFlags.listStyleType); } >+ ListStyleType listStyleType() const { return static_cast<ListStyleType>(m_inheritedFlags.listStyleType); } > StyleImage* listStyleImage() const; >- EListStylePosition listStylePosition() const { return static_cast<EListStylePosition>(m_inheritedFlags.listStylePosition); } >+ ListStylePosition listStylePosition() const { return static_cast<ListStylePosition>(m_inheritedFlags.listStylePosition); } > > const Length& marginTop() const { return m_surroundData->margin.top(); } > const Length& marginBottom() const { return m_surroundData->margin.bottom(); } >@@ -466,7 +466,7 @@ public: > const Length& paddingStart() const { return m_surroundData->padding.start(writingMode(), direction()); } > const Length& paddingEnd() const { return m_surroundData->padding.end(writingMode(), direction()); } > >- ECursor cursor() const { return static_cast<ECursor>(m_inheritedFlags.cursor); } >+ CursorType cursor() const { return static_cast<CursorType>(m_inheritedFlags.cursor); } > > #if ENABLE(CURSOR_VISIBILITY) > CursorVisibility cursorVisibility() const { return static_cast<CursorVisibility>(m_inheritedFlags.cursorVisibility); } >@@ -474,7 +474,7 @@ public: > > CursorList* cursors() const { return m_rareInheritedData->cursorData.get(); } > >- EInsideLink insideLink() const { return static_cast<EInsideLink>(m_inheritedFlags.insideLink); } >+ InsideLink insideLink() const { return static_cast<InsideLink>(m_inheritedFlags.insideLink); } > bool isLink() const { return m_nonInheritedFlags.isLink; } > > bool insideDefaultButton() const { return m_inheritedFlags.insideDefaultButton; } >@@ -592,7 +592,7 @@ public: > short hyphenationLimitLines() const { return m_rareInheritedData->hyphenationLimitLines; } > const AtomicString& hyphenationString() const { return m_rareInheritedData->hyphenationString; } > const AtomicString& locale() const { return fontDescription().locale(); } >- EBorderFit borderFit() const { return static_cast<EBorderFit>(m_rareNonInheritedData->borderFit); } >+ BorderFit borderFit() const { return static_cast<BorderFit>(m_rareNonInheritedData->borderFit); } > Resize resize() const { return static_cast<Resize>(m_rareNonInheritedData->resize); } > ColumnAxis columnAxis() const { return static_cast<ColumnAxis>(m_rareNonInheritedData->multiCol->axis); } > bool hasInlineColumnAxis() const; >@@ -651,7 +651,7 @@ public: > LineSnap lineSnap() const { return static_cast<LineSnap>(m_rareInheritedData->lineSnap); } > LineAlign lineAlign() const { return static_cast<LineAlign>(m_rareInheritedData->lineAlign); } > >- EPointerEvents pointerEvents() const { return static_cast<EPointerEvents>(m_inheritedFlags.pointerEvents); } >+ PointerEvents pointerEvents() const { return static_cast<PointerEvents>(m_inheritedFlags.pointerEvents); } > const AnimationList* animations() const { return m_rareNonInheritedData->animations.get(); } > const AnimationList* transitions() const { return m_rareNonInheritedData->transitions.get(); } > >@@ -796,8 +796,8 @@ public: > > // attribute setter methods > >- void setDisplay(EDisplay v) { m_nonInheritedFlags.effectiveDisplay = v; } >- void setOriginalDisplay(EDisplay v) { m_nonInheritedFlags.originalDisplay = v; } >+ void setDisplay(DisplayType v) { m_nonInheritedFlags.effectiveDisplay = static_cast<unsigned>(v); } >+ void setOriginalDisplay(DisplayType v) { m_nonInheritedFlags.originalDisplay = static_cast<unsigned>(v); } > void setPosition(PositionType v) { m_nonInheritedFlags.position = static_cast<unsigned>(v); } > void setFloating(Float v) { m_nonInheritedFlags.floating = static_cast<unsigned>(v); } > >@@ -882,7 +882,7 @@ public: > > void setOverflowX(Overflow v) { m_nonInheritedFlags.overflowX = static_cast<unsigned>(v); } > void setOverflowY(Overflow v) { m_nonInheritedFlags.overflowY = static_cast<unsigned>(v); } >- void setVisibility(EVisibility v) { m_inheritedFlags.visibility = v; } >+ void setVisibility(Visibility v) { m_inheritedFlags.visibility = static_cast<unsigned>(v); } > void setVerticalAlign(VerticalAlign v) { m_nonInheritedFlags.verticalAlign = static_cast<unsigned>(v); } > void setVerticalAlignLength(Length&& length) { setVerticalAlign(VerticalAlign::Length); SET_VAR(m_boxData, m_verticalAlign, WTFMove(length)); } > >@@ -913,21 +913,21 @@ public: > > void setColor(const Color&); > void setTextIndent(Length&& length) { SET_VAR(m_rareInheritedData, indent, WTFMove(length)); } >- void setTextAlign(ETextAlign v) { m_inheritedFlags.textAlign = v; } >- void setTextTransform(ETextTransform v) { m_inheritedFlags.textTransform = v; } >+ void setTextAlign(TextAlignMode v) { m_inheritedFlags.textAlign = static_cast<unsigned>(v); } >+ void setTextTransform(TextTransform v) { m_inheritedFlags.textTransform = static_cast<unsigned>(v); } > void addToTextDecorationsInEffect(TextDecoration v) { m_inheritedFlags.textDecorations |= v; } > void setTextDecorationsInEffect(TextDecoration v) { m_inheritedFlags.textDecorations = v; } > void setTextDecoration(TextDecoration v) { SET_VAR(m_visualData, textDecoration, v); } >- void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheritedData, textDecorationStyle, v); } >- void setTextDecorationSkip(TextDecorationSkip skip) { SET_VAR(m_rareInheritedData, textDecorationSkip, skip); } >- void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(m_rareInheritedData, textUnderlinePosition, v); } >- void setDirection(TextDirection v) { m_inheritedFlags.direction = v; } >+ void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheritedData, textDecorationStyle, static_cast<unsigned>(v)); } >+ void setTextDecorationSkip(TextDecorationSkip skip) { SET_VAR(m_rareInheritedData, textDecorationSkip, static_cast<unsigned>(skip)); } >+ void setTextUnderlinePosition(TextUnderlinePosition v) { SET_VAR(m_rareInheritedData, textUnderlinePosition, static_cast<unsigned>(v)); } >+ void setDirection(TextDirection v) { m_inheritedFlags.direction = static_cast<unsigned>(v); } > void setHasExplicitlySetDirection(bool v) { m_nonInheritedFlags.hasExplicitlySetDirection = v; } > void setLineHeight(Length&&); > bool setZoom(float); > void setZoomWithoutReturnValue(float f) { setZoom(f); } > bool setEffectiveZoom(float); >- void setTextZoom(TextZoom v) { SET_VAR(m_rareInheritedData, textZoom, v); } >+ void setTextZoom(TextZoom v) { SET_VAR(m_rareInheritedData, textZoom, static_cast<unsigned>(v)); } > > #if ENABLE(CSS3_TEXT) > void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, textIndentLine, v); } >@@ -952,7 +952,7 @@ public: > void setImageResolution(float f) { SET_VAR(m_rareInheritedData, imageResolution, f); } > #endif > >- void setWhiteSpace(EWhiteSpace v) { m_inheritedFlags.whiteSpace = v; } >+ void setWhiteSpace(WhiteSpace v) { m_inheritedFlags.whiteSpace = static_cast<unsigned>(v); } > > void setWordSpacing(Length&&); > void setLetterSpacing(float); >@@ -978,16 +978,16 @@ public: > void setBorderCollapse(BorderCollapse collapse) { m_inheritedFlags.borderCollapse = static_cast<unsigned>(collapse); } > void setHorizontalBorderSpacing(float); > void setVerticalBorderSpacing(float); >- void setEmptyCells(EEmptyCell v) { m_inheritedFlags.emptyCells = v; } >- void setCaptionSide(ECaptionSide v) { m_inheritedFlags.captionSide = v; } >+ void setEmptyCells(EmptyCell v) { m_inheritedFlags.emptyCells = static_cast<unsigned>(v); } >+ void setCaptionSide(CaptionSide v) { m_inheritedFlags.captionSide = static_cast<unsigned>(v); } > > void setAspectRatioType(AspectRatioType aspectRatioType) { SET_VAR(m_rareNonInheritedData, aspectRatioType, static_cast<unsigned>(aspectRatioType)); } > void setAspectRatioDenominator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioDenominator, v); } > void setAspectRatioNumerator(float v) { SET_VAR(m_rareNonInheritedData, aspectRatioNumerator, v); } > >- void setListStyleType(EListStyleType v) { m_inheritedFlags.listStyleType = v; } >+ void setListStyleType(ListStyleType v) { m_inheritedFlags.listStyleType = static_cast<unsigned>(v); } > void setListStyleImage(RefPtr<StyleImage>&&); >- void setListStylePosition(EListStylePosition v) { m_inheritedFlags.listStylePosition = v; } >+ void setListStylePosition(ListStylePosition v) { m_inheritedFlags.listStylePosition = static_cast<unsigned>(v); } > > void resetMargin() { SET_VAR(m_surroundData, margin, LengthBox(Fixed)); } > void setMarginTop(Length&& length) { SET_VAR(m_surroundData, margin.top(), WTFMove(length)); } >@@ -1004,16 +1004,16 @@ public: > void setPaddingLeft(Length&& length) { SET_VAR(m_surroundData, padding.left(), WTFMove(length)); } > void setPaddingRight(Length&& length) { SET_VAR(m_surroundData, padding.right(), WTFMove(length)); } > >- void setCursor(ECursor c) { m_inheritedFlags.cursor = c; } >+ void setCursor(CursorType c) { m_inheritedFlags.cursor = static_cast<unsigned>(c); } > void addCursor(RefPtr<StyleImage>&&, const IntPoint& hotSpot = IntPoint()); > void setCursorList(RefPtr<CursorList>&&); > void clearCursorList(); > > #if ENABLE(CURSOR_VISIBILITY) >- void setCursorVisibility(CursorVisibility c) { m_inheritedFlags.cursorVisibility = c; } >+ void setCursorVisibility(CursorVisibility c) { m_inheritedFlags.cursorVisibility = static_cast<unsigned>(c); } > #endif > >- void setInsideLink(EInsideLink insideLink) { m_inheritedFlags.insideLink = insideLink; } >+ void setInsideLink(InsideLink insideLink) { m_inheritedFlags.insideLink = static_cast<unsigned>(insideLink); } > void setIsLink(bool v) { m_nonInheritedFlags.isLink = v; } > > void setInsideDefaultButton(bool insideDefaultButton) { m_inheritedFlags.insideDefaultButton = insideDefaultButton; } >@@ -1116,15 +1116,15 @@ public: > void setOverflowWrap(OverflowWrap b) { SET_VAR(m_rareInheritedData, overflowWrap, static_cast<unsigned>(b)); } > void setNBSPMode(NBSPMode b) { SET_VAR(m_rareInheritedData, nbspMode, static_cast<unsigned>(b)); } > void setLineBreak(LineBreak b) { SET_VAR(m_rareInheritedData, lineBreak, static_cast<unsigned>(b)); } >- void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, h); } >+ void setHyphens(Hyphens h) { SET_VAR(m_rareInheritedData, hyphens, static_cast<unsigned>(h)); } > void setHyphenationLimitBefore(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitBefore, limit); } > void setHyphenationLimitAfter(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitAfter, limit); } > void setHyphenationLimitLines(short limit) { SET_VAR(m_rareInheritedData, hyphenationLimitLines, limit); } > void setHyphenationString(const AtomicString& h) { SET_VAR(m_rareInheritedData, hyphenationString, h); } >- void setBorderFit(EBorderFit b) { SET_VAR(m_rareNonInheritedData, borderFit, b); } >+ void setBorderFit(BorderFit b) { SET_VAR(m_rareNonInheritedData, borderFit, static_cast<unsigned>(b)); } > void setResize(Resize r) { SET_VAR(m_rareNonInheritedData, resize, static_cast<unsigned>(r)); } >- void setColumnAxis(ColumnAxis axis) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, axis, axis); } >- void setColumnProgression(ColumnProgression progression) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, progression, progression); } >+ void setColumnAxis(ColumnAxis axis) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, axis, static_cast<unsigned>(axis)); } >+ void setColumnProgression(ColumnProgression progression) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, progression, static_cast<unsigned>(progression)); } > void setColumnWidth(float f) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoWidth, false); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, width, f); } > void setHasAutoColumnWidth() { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoWidth, true); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, width, 0); } > void setColumnCount(unsigned short c) { SET_NESTED_VAR(m_rareNonInheritedData, multiCol, autoCount, false); SET_NESTED_VAR(m_rareNonInheritedData, multiCol, count, c); } >@@ -1149,8 +1149,8 @@ public: > void setTextCombine(TextCombine v) { SET_VAR(m_rareNonInheritedData, textCombine, static_cast<unsigned>(v)); } > void setTextDecorationColor(const Color& c) { SET_VAR(m_rareNonInheritedData, textDecorationColor, c); } > void setTextEmphasisColor(const Color& c) { SET_VAR(m_rareInheritedData, textEmphasisColor, c); } >- void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(m_rareInheritedData, textEmphasisFill, fill); } >- void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(m_rareInheritedData, textEmphasisMark, mark); } >+ void setTextEmphasisFill(TextEmphasisFill fill) { SET_VAR(m_rareInheritedData, textEmphasisFill, static_cast<unsigned>(fill)); } >+ void setTextEmphasisMark(TextEmphasisMark mark) { SET_VAR(m_rareInheritedData, textEmphasisMark, static_cast<unsigned>(mark)); } > void setTextEmphasisCustomMark(const AtomicString& mark) { SET_VAR(m_rareInheritedData, textEmphasisCustomMark, mark); } > void setTextEmphasisPosition(TextEmphasisPosition position) { SET_VAR(m_rareInheritedData, textEmphasisPosition, position); } > bool setTextOrientation(TextOrientation); >@@ -1158,7 +1158,7 @@ public: > void setObjectFit(ObjectFit fit) { SET_VAR(m_rareNonInheritedData, objectFit, static_cast<unsigned>(fit)); } > void setObjectPosition(LengthPoint&& position) { SET_VAR(m_rareNonInheritedData, objectPosition, WTFMove(position)); } > >- void setRubyPosition(RubyPosition position) { SET_VAR(m_rareInheritedData, rubyPosition, position); } >+ void setRubyPosition(RubyPosition position) { SET_VAR(m_rareInheritedData, rubyPosition, static_cast<unsigned>(position)); } > > void setFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareNonInheritedData, filter, operations, ops); } > void setColorFilter(const FilterOperations& ops) { SET_NESTED_VAR(m_rareInheritedData, colorFilter, operations, ops); } >@@ -1169,19 +1169,19 @@ public: > > void setTabSize(unsigned size) { SET_VAR(m_rareInheritedData, tabSize, size); } > >- void setBreakBefore(BreakBetween breakBehavior) { SET_VAR(m_rareNonInheritedData, breakBefore, breakBehavior); } >- void setBreakAfter(BreakBetween breakBehavior) { SET_VAR(m_rareNonInheritedData, breakAfter, breakBehavior); } >- void setBreakInside(BreakInside breakBehavior) { SET_VAR(m_rareNonInheritedData, breakInside, breakBehavior); } >+ void setBreakBefore(BreakBetween breakBehavior) { SET_VAR(m_rareNonInheritedData, breakBefore, static_cast<unsigned>(breakBehavior)); } >+ void setBreakAfter(BreakBetween breakBehavior) { SET_VAR(m_rareNonInheritedData, breakAfter, static_cast<unsigned>(breakBehavior)); } >+ void setBreakInside(BreakInside breakBehavior) { SET_VAR(m_rareNonInheritedData, breakInside, static_cast<unsigned>(breakBehavior)); } > >- void setHangingPunctuation(HangingPunctuation punctuation) { SET_VAR(m_rareInheritedData, hangingPunctuation, punctuation); } >+ void setHangingPunctuation(HangingPunctuation punctuation) { SET_VAR(m_rareInheritedData, hangingPunctuation, static_cast<unsigned>(punctuation)); } > > // End CSS3 Setters > > void setLineGrid(const AtomicString& lineGrid) { SET_VAR(m_rareInheritedData, lineGrid, lineGrid); } >- void setLineSnap(LineSnap lineSnap) { SET_VAR(m_rareInheritedData, lineSnap, lineSnap); } >- void setLineAlign(LineAlign lineAlign) { SET_VAR(m_rareInheritedData, lineAlign, lineAlign); } >+ void setLineSnap(LineSnap lineSnap) { SET_VAR(m_rareInheritedData, lineSnap, static_cast<unsigned>(lineSnap)); } >+ void setLineAlign(LineAlign lineAlign) { SET_VAR(m_rareInheritedData, lineAlign, static_cast<unsigned>(lineAlign)); } > >- void setPointerEvents(EPointerEvents p) { m_inheritedFlags.pointerEvents = p; } >+ void setPointerEvents(PointerEvents p) { m_inheritedFlags.pointerEvents = static_cast<unsigned>(p); } > > void clearAnimations(); > void clearTransitions(); >@@ -1427,13 +1427,13 @@ public: > static Overflow initialOverflowX() { return Overflow::Visible; } > static Overflow initialOverflowY() { return Overflow::Visible; } > static Clear initialClear() { return Clear::None; } >- static EDisplay initialDisplay() { return INLINE; } >+ static DisplayType initialDisplay() { return DisplayType::Inline; } > static EUnicodeBidi initialUnicodeBidi() { return UBNormal; } > static PositionType initialPosition() { return PositionType::Static; } > static VerticalAlign initialVerticalAlign() { return VerticalAlign::Baseline; } > static Float initialFloating() { return Float::No; } >- static BreakBetween initialBreakBetween() { return AutoBreakBetween; } >- static BreakInside initialBreakInside() { return AutoBreakInside; } >+ static BreakBetween initialBreakBetween() { return BreakBetween::Auto; } >+ static BreakInside initialBreakInside() { return BreakInside::Auto; } > static HangingPunctuation initialHangingPunctuation() { return NoHangingPunctuation; } > static TableLayoutType initialTableLayout() { return TableLayoutType::Auto; } > static BorderCollapse initialBorderCollapse() { return BorderCollapse::Separate; } >@@ -1441,24 +1441,24 @@ public: > static OutlineIsAuto initialOutlineStyleIsAuto() { return OutlineIsAuto::Off; } > static NinePieceImage initialNinePieceImage() { return NinePieceImage(); } > static LengthSize initialBorderRadius() { return { { 0, Fixed }, { 0, Fixed } }; } >- static ECaptionSide initialCaptionSide() { return CAPTOP; } >- static ColumnAxis initialColumnAxis() { return AutoColumnAxis; } >- static ColumnProgression initialColumnProgression() { return NormalColumnProgression; } >+ static CaptionSide initialCaptionSide() { return CaptionSide::Top; } >+ static ColumnAxis initialColumnAxis() { return ColumnAxis::Auto; } >+ static ColumnProgression initialColumnProgression() { return ColumnProgression::Normal; } > static TextDirection initialDirection() { return LTR; } > static WritingMode initialWritingMode() { return TopToBottomWritingMode; } > static TextCombine initialTextCombine() { return TextCombine::None; } > static TextOrientation initialTextOrientation() { return TextOrientation::Mixed; } > static ObjectFit initialObjectFit() { return ObjectFit::Fill; } > static LengthPoint initialObjectPosition() { return LengthPoint(Length(50.0f, Percent), Length(50.0f, Percent)); } >- static EEmptyCell initialEmptyCells() { return SHOW; } >- static EListStylePosition initialListStylePosition() { return OUTSIDE; } >- static EListStyleType initialListStyleType() { return Disc; } >- static ETextTransform initialTextTransform() { return TTNONE; } >- static EVisibility initialVisibility() { return VISIBLE; } >- static EWhiteSpace initialWhiteSpace() { return NORMAL; } >+ static EmptyCell initialEmptyCells() { return EmptyCell::Show; } >+ static ListStylePosition initialListStylePosition() { return ListStylePosition::Outside; } >+ static ListStyleType initialListStyleType() { return ListStyleType::Disc; } >+ static TextTransform initialTextTransform() { return TextTransform::None; } >+ static Visibility initialVisibility() { return Visibility::Visible; } >+ static WhiteSpace initialWhiteSpace() { return WhiteSpace::Normal; } > static float initialHorizontalBorderSpacing() { return 0; } > static float initialVerticalBorderSpacing() { return 0; } >- static ECursor initialCursor() { return CursorAuto; } >+ static CursorType initialCursor() { return CursorType::Auto; } > static Color initialColor() { return Color::black; } > static StyleImage* initialListStyleImage() { return 0; } > static float initialBorderWidth() { return 3; } >@@ -1478,13 +1478,13 @@ public: > static short initialWidows() { return 2; } > static short initialOrphans() { return 2; } > static Length initialLineHeight() { return Length(-100.0f, Percent); } >- static ETextAlign initialTextAlign() { return TASTART; } >+ static TextAlignMode initialTextAlign() { return TextAlignMode::Start; } > static TextDecoration initialTextDecoration() { return TextDecorationNone; } >- static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyleSolid; } >+ static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyle::Solid; } > static TextDecorationSkip initialTextDecorationSkip() { return TextDecorationSkipAuto; } > static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePositionAuto; } > static float initialZoom() { return 1.0f; } >- static TextZoom initialTextZoom() { return TextZoomNormal; } >+ static TextZoom initialTextZoom() { return TextZoom::Normal; } > static float initialOutlineOffset() { return 0; } > static float initialOpacity() { return 1.0f; } > static BoxAlignment initialBoxAlign() { return BoxAlignment::Stretch; } >@@ -1524,18 +1524,18 @@ public: > static NBSPMode initialNBSPMode() { return NBSPMode::Normal; } > static LineBreak initialLineBreak() { return LineBreak::Auto; } > static ESpeakAs initialSpeakAs() { return SpeakNormal; } >- static Hyphens initialHyphens() { return HyphensManual; } >+ static Hyphens initialHyphens() { return Hyphens::Manual; } > static short initialHyphenationLimitBefore() { return -1; } > static short initialHyphenationLimitAfter() { return -1; } > static short initialHyphenationLimitLines() { return -1; } > static const AtomicString& initialHyphenationString() { return nullAtom(); } >- static EBorderFit initialBorderFit() { return BorderFitBorder; } >+ static BorderFit initialBorderFit() { return BorderFit::Border; } > static Resize initialResize() { return Resize::None; } > static ControlPart initialAppearance() { return NoControlPart; } > static AspectRatioType initialAspectRatioType() { return AspectRatioType::Auto; } > static float initialAspectRatioDenominator() { return 1; } > static float initialAspectRatioNumerator() { return 1; } >- static Order initialRTLOrdering() { return LogicalOrder; } >+ static Order initialRTLOrdering() { return Order::Logical; } > static float initialTextStrokeWidth() { return 0; } > static unsigned short initialColumnCount() { return 1; } > static ColumnFill initialColumnFill() { return ColumnFill::Balance; } >@@ -1546,7 +1546,7 @@ public: > static Length initialTransformOriginX() { return Length(50.0f, Percent); } > static Length initialTransformOriginY() { return Length(50.0f, Percent); } > static TransformBox initialTransformBox() { return TransformBox::BorderBox; } >- static EPointerEvents initialPointerEvents() { return PE_AUTO; } >+ static PointerEvents initialPointerEvents() { return PointerEvents::Auto; } > static float initialTransformOriginZ() { return 0; } > static TransformStyle3D initialTransformStyle3D() { return TransformStyle3D::Flat; } > static BackfaceVisibility initialBackfaceVisibility() { return BackfaceVisibility::Visible; } >@@ -1554,17 +1554,17 @@ public: > static Length initialPerspectiveOriginX() { return Length(50.0f, Percent); } > static Length initialPerspectiveOriginY() { return Length(50.0f, Percent); } > static Color initialBackgroundColor() { return Color::transparent; } >- static Color initialTextEmphasisColor() { return TextEmphasisFillFilled; } >- static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillFilled; } >- static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkNone; } >+ static Color initialTextEmphasisColor() { return Color(); } >+ static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFill::Filled; } >+ static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMark::None; } > static const AtomicString& initialTextEmphasisCustomMark() { return nullAtom(); } > static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver | TextEmphasisPositionRight; } >- static RubyPosition initialRubyPosition() { return RubyPositionBefore; } >+ static RubyPosition initialRubyPosition() { return RubyPosition::Before; } > static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; } > static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; } > static ImageRendering initialImageRendering() { return ImageRendering::Auto; } >- static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSpecified; } >- static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionNoSnap; } >+ static ImageResolutionSource initialImageResolutionSource() { return ImageResolutionSource::Specified; } >+ static ImageResolutionSnap initialImageResolutionSnap() { return ImageResolutionSnap::None; } > static float initialImageResolution() { return 1; } > static StyleImage* initialBorderImageSource() { return nullptr; } > static StyleImage* initialMaskBoxImageSource() { return nullptr; } >@@ -1575,12 +1575,12 @@ public: > #if ENABLE(CSS3_TEXT) > static TextIndentLine initialTextIndentLine() { return TextIndentLine::FirstLine; } > static TextIndentType initialTextIndentType() { return TextIndentType::Normal; } >- static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; } >- static TextJustify initialTextJustify() { return TextJustifyAuto; } >+ static TextAlignLast initialTextAlignLast() { return TextAlignLast::Auto; } >+ static TextJustify initialTextJustify() { return TextJustify::Auto; } > #endif > > #if ENABLE(CURSOR_VISIBILITY) >- static CursorVisibility initialCursorVisibility() { return CursorVisibilityAuto; } >+ static CursorVisibility initialCursorVisibility() { return CursorVisibility::Auto; } > #endif > > #if ENABLE(TEXT_AUTOSIZING) >@@ -1616,7 +1616,7 @@ public: > > static Vector<GridTrackSize> initialGridAutoRepeatTracks() { return Vector<GridTrackSize>(); } > static unsigned initialGridAutoRepeatInsertionPoint() { return 0; } >- static AutoRepeatType initialGridAutoRepeatType() { return NoAutoRepeat; } >+ static AutoRepeatType initialGridAutoRepeatType() { return AutoRepeatType::None; } > > static GridAutoFlow initialGridAutoFlow() { return AutoFlowRow; } > >@@ -1641,8 +1641,8 @@ public: > static unsigned initialTabSize() { return 8; } > > static const AtomicString& initialLineGrid() { return nullAtom(); } >- static LineSnap initialLineSnap() { return LineSnapNone; } >- static LineAlign initialLineAlign() { return LineAlignNone; } >+ static LineSnap initialLineSnap() { return LineSnap::None; } >+ static LineAlign initialLineAlign() { return LineAlign::None; } > > static IntSize initialInitialLetter() { return IntSize(); } > static LineClampValue initialLineClamp() { return LineClampValue(); } >@@ -1742,13 +1742,13 @@ private: > > void copyNonInheritedFrom(const NonInheritedFlags&); > >- bool hasAnyPublicPseudoStyles() const { return PUBLIC_PSEUDOID_MASK & pseudoBits; } >+ bool hasAnyPublicPseudoStyles() const { return static_cast<unsigned>(PseudoId::PublicPseudoIdMask) & pseudoBits; } > bool hasPseudoStyle(PseudoId) const; > void setHasPseudoStyle(PseudoId); > void setHasPseudoStyles(PseudoIdSet); > >- unsigned effectiveDisplay : 5; // EDisplay >- unsigned originalDisplay : 5; // EDisplay >+ unsigned effectiveDisplay : 5; // DisplayType >+ unsigned originalDisplay : 5; // DisplayType > unsigned overflowX : 3; // Overflow > unsigned overflowY : 3; // Overflow > unsigned verticalAlign : 4; // VerticalAlign >@@ -1773,7 +1773,7 @@ private: > unsigned isLink : 1; > > unsigned styleType : 4; // PseudoId >- unsigned pseudoBits : (static_cast<unsigned>(FIRST_INTERNAL_PSEUDOID) - static_cast<unsigned>(FIRST_PUBLIC_PSEUDOID)); >+ unsigned pseudoBits : (static_cast<unsigned>(PseudoId::FirstInternalPseudoId) - static_cast<unsigned>(PseudoId::FirstPublicPseudoId)); > > // If you add more style bits here, you will also need to update RenderStyle::NonInheritedFlags::copyNonInheritedFrom(). > }; >@@ -1782,20 +1782,20 @@ private: > bool operator==(const InheritedFlags&) const; > bool operator!=(const InheritedFlags& other) const { return !(*this == other); } > >- unsigned emptyCells : 1; // EEmptyCell >- unsigned captionSide : 2; // ECaptionSide >- unsigned listStyleType : 7; // EListStyleType >- unsigned listStylePosition : 1; // EListStylePosition >- unsigned visibility : 2; // EVisibility >- unsigned textAlign : 4; // ETextAlign >- unsigned textTransform : 2; // ETextTransform >+ unsigned emptyCells : 1; // EmptyCell >+ unsigned captionSide : 2; // CaptionSide >+ unsigned listStyleType : 7; // ListStyleType >+ unsigned listStylePosition : 1; // ListStylePosition >+ unsigned visibility : 2; // Visibility >+ unsigned textAlign : 4; // TextAlignMode >+ unsigned textTransform : 2; // TextTransform > unsigned textDecorations : TextDecorationBits; >- unsigned cursor : 6; // ECursor >+ unsigned cursor : 6; // CursorType > #if ENABLE(CURSOR_VISIBILITY) > unsigned cursorVisibility : 1; // CursorVisibility > #endif > unsigned direction : 1; // TextDirection >- unsigned whiteSpace : 3; // EWhiteSpace >+ unsigned whiteSpace : 3; // WhiteSpace > // 35 bits > unsigned borderCollapse : 1; // BorderCollapse > unsigned boxDirection : 1; // BoxDirection >@@ -1803,8 +1803,8 @@ private: > // non CSS2 inherited > unsigned rtlOrdering : 1; // Order > unsigned printColorAdjust : PrintColorAdjustBits; // PrintColorAdjust >- unsigned pointerEvents : 4; // EPointerEvents >- unsigned insideLink : 2; // EInsideLink >+ unsigned pointerEvents : 4; // PointerEvents >+ unsigned insideLink : 2; // InsideLink > unsigned insideDefaultButton : 1; > // 46 bits > >@@ -1816,7 +1816,7 @@ private: > // This constructor is used to implement the replace operation. > RenderStyle(RenderStyle&, RenderStyle&&); > >- EDisplay originalDisplay() const { return static_cast<EDisplay>(m_nonInheritedFlags.originalDisplay); } >+ DisplayType originalDisplay() const { return static_cast<DisplayType>(m_nonInheritedFlags.originalDisplay); } > > bool hasAutoLeftAndRight() const { return left().isAuto() && right().isAuto(); } > bool hasAutoTopAndBottom() const { return top().isAuto() && bottom().isAuto(); } >@@ -1825,11 +1825,11 @@ private: > > LayoutBoxExtent getShadowInsetExtent(const ShadowData*) const; > >- static bool isDisplayReplacedType(EDisplay); >- static bool isDisplayInlineType(EDisplay); >- static bool isDisplayFlexibleBox(EDisplay); >- static bool isDisplayGridBox(EDisplay); >- static bool isDisplayFlexibleOrGridBox(EDisplay); >+ static bool isDisplayReplacedType(DisplayType); >+ static bool isDisplayInlineType(DisplayType); >+ static bool isDisplayFlexibleBox(DisplayType); >+ static bool isDisplayGridBox(DisplayType); >+ static bool isDisplayFlexibleOrGridBox(DisplayType); > > Color colorIncludingFallback(CSSPropertyID colorProperty, bool visitedLink) const; > >@@ -1920,23 +1920,23 @@ inline void RenderStyle::NonInheritedFla > > inline bool RenderStyle::NonInheritedFlags::hasPseudoStyle(PseudoId pseudo) const > { >- ASSERT(pseudo > NOPSEUDO); >- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID); >- return pseudoBits & (1 << (pseudo - 1 /* NOPSUEDO */)); >+ ASSERT(pseudo > PseudoId::None); >+ ASSERT(pseudo < PseudoId::FirstInternalPseudoId); >+ return pseudoBits & (1 << (static_cast<unsigned>(pseudo) - 1 /* PseudoId::None */)); > } > > inline void RenderStyle::NonInheritedFlags::setHasPseudoStyle(PseudoId pseudo) > { >- ASSERT(pseudo > NOPSEUDO); >- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID); >- pseudoBits |= 1 << (pseudo - 1 /* NOPSUEDO */); >+ ASSERT(pseudo > PseudoId::None); >+ ASSERT(pseudo < PseudoId::FirstInternalPseudoId); >+ pseudoBits |= 1 << (static_cast<unsigned>(pseudo) - 1 /* PseudoId::None */); > } > > inline void RenderStyle::NonInheritedFlags::setHasPseudoStyles(PseudoIdSet pseudoIdSet) > { > ASSERT(pseudoIdSet); >- ASSERT((pseudoIdSet.data() & PUBLIC_PSEUDOID_MASK) == pseudoIdSet.data()); >- pseudoBits |= pseudoIdSet.data() >> 1; // Shift down as we do not store a bit for NOPSUEDO. >+ ASSERT((pseudoIdSet.data() & static_cast<unsigned>(PseudoId::PublicPseudoIdMask)) == pseudoIdSet.data()); >+ pseudoBits |= pseudoIdSet.data() >> 1; // Shift down as we do not store a bit for PseudoId::None. > } > > inline bool RenderStyle::InheritedFlags::operator==(const InheritedFlags& other) const >@@ -2005,22 +2005,22 @@ inline bool RenderStyle::hasBackground() > return visitedDependentColor(CSSPropertyBackgroundColor).isVisible() || hasBackgroundImage(); > } > >-inline bool RenderStyle::autoWrap(EWhiteSpace whiteSpace) >+inline bool RenderStyle::autoWrap(WhiteSpace whiteSpace) > { > // Nowrap and pre don't automatically wrap. >- return whiteSpace != NOWRAP && whiteSpace != PRE; >+ return whiteSpace != WhiteSpace::NoWrap && whiteSpace != WhiteSpace::Pre; > } > >-inline bool RenderStyle::preserveNewline(EWhiteSpace whiteSpace) >+inline bool RenderStyle::preserveNewline(WhiteSpace whiteSpace) > { > // Normal and nowrap do not preserve newlines. >- return whiteSpace != NORMAL && whiteSpace != NOWRAP; >+ return whiteSpace != WhiteSpace::Normal && whiteSpace != WhiteSpace::NoWrap; > } > >-inline bool RenderStyle::collapseWhiteSpace(EWhiteSpace ws) >+inline bool RenderStyle::collapseWhiteSpace(WhiteSpace ws) > { > // Pre and prewrap do not collapse whitespace. >- return ws != PRE && ws != PRE_WRAP; >+ return ws != WhiteSpace::Pre && ws != WhiteSpace::PreWrap; > } > > inline bool RenderStyle::isCollapsibleWhiteSpace(UChar character) const >@@ -2038,7 +2038,7 @@ inline bool RenderStyle::isCollapsibleWh > > inline bool RenderStyle::breakOnlyAfterWhiteSpace() const > { >- return whiteSpace() == PRE_WRAP || lineBreak() == LineBreak::AfterWhiteSpace; >+ return whiteSpace() == WhiteSpace::PreWrap || lineBreak() == LineBreak::AfterWhiteSpace; > } > > inline bool RenderStyle::breakWords() const >@@ -2049,7 +2049,7 @@ inline bool RenderStyle::breakWords() co > inline bool RenderStyle::hasInlineColumnAxis() const > { > auto axis = columnAxis(); >- return (axis == AutoColumnAxis || isHorizontalWritingMode() == (axis == HorizontalColumnAxis)) && !hasLinesClamp(); >+ return (axis == ColumnAxis::Auto || isHorizontalWritingMode() == (axis == ColumnAxis::Horizontal)) && !hasLinesClamp(); > } > > inline ImageOrientationEnum RenderStyle::imageOrientation() const >@@ -2170,9 +2170,9 @@ inline bool RenderStyle::willChangeCreat > > inline bool RenderStyle::isDisplayRegionType() const > { >- return display() == BLOCK || display() == INLINE_BLOCK >- || display() == TABLE_CELL || display() == TABLE_CAPTION >- || display() == LIST_ITEM; >+ return display() == DisplayType::Block || display() == DisplayType::InlineBlock >+ || display() == DisplayType::TableCell || display() == DisplayType::TableCaption >+ || display() == DisplayType::ListItem; > } > > inline bool RenderStyle::setWritingMode(WritingMode v) >@@ -2193,28 +2193,28 @@ inline void RenderStyle::getShadowBlockD > return isHorizontalWritingMode() ? getShadowVerticalExtent(shadow, logicalTop, logicalBottom) : getShadowHorizontalExtent(shadow, logicalTop, logicalBottom); > } > >-inline bool RenderStyle::isDisplayReplacedType(EDisplay display) >+inline bool RenderStyle::isDisplayReplacedType(DisplayType display) > { >- return display == INLINE_BLOCK || display == INLINE_BOX || display == INLINE_FLEX >- || display == INLINE_GRID || display == INLINE_TABLE; >+ return display == DisplayType::InlineBlock || display == DisplayType::InlineBox || display == DisplayType::InlineFlex >+ || display == DisplayType::InlineGrid || display == DisplayType::InlineTable; > } > >-inline bool RenderStyle::isDisplayInlineType(EDisplay display) >+inline bool RenderStyle::isDisplayInlineType(DisplayType display) > { >- return display == INLINE || isDisplayReplacedType(display); >+ return display == DisplayType::Inline || isDisplayReplacedType(display); > } > >-inline bool RenderStyle::isDisplayFlexibleBox(EDisplay display) >+inline bool RenderStyle::isDisplayFlexibleBox(DisplayType display) > { >- return display == FLEX || display == INLINE_FLEX; >+ return display == DisplayType::Flex || display == DisplayType::InlineFlex; > } > >-inline bool RenderStyle::isDisplayGridBox(EDisplay display) >+inline bool RenderStyle::isDisplayGridBox(DisplayType display) > { >- return display == GRID || display == INLINE_GRID; >+ return display == DisplayType::Grid || display == DisplayType::InlineGrid; > } > >-inline bool RenderStyle::isDisplayFlexibleOrGridBox(EDisplay display) >+inline bool RenderStyle::isDisplayFlexibleOrGridBox(DisplayType display) > { > return isDisplayFlexibleBox(display) || isDisplayGridBox(display); > } >@@ -2246,7 +2246,7 @@ inline void RenderStyle::setBoxReflect(R > > inline bool pseudoElementRendererIsNeeded(const RenderStyle* style) > { >- return style && style->display() != NONE && style->contentData(); >+ return style && style->display() != DisplayType::None && style->contentData(); > } > > } // namespace WebCore >Index: Source/WebCore/rendering/style/RenderStyleConstants.cpp >=================================================================== >--- Source/WebCore/rendering/style/RenderStyleConstants.cpp (revision 232123) >+++ Source/WebCore/rendering/style/RenderStyleConstants.cpp (working copy) >@@ -30,6 +30,17 @@ > > namespace WebCore { > >+TextStream& operator<<(TextStream& ts, Visibility visibility) >+{ >+ switch (visibility) { >+ case Visibility::Visible: ts << "visible"; break; >+ case Visibility::Hidden: ts << "hidden"; break; >+ case Visibility::Collapse: ts << "collapse"; break; >+ } >+ >+ return ts; >+} >+ > TextStream& operator<<(TextStream& ts, ImageRendering imageRendering) > { > switch (imageRendering) { >@@ -111,7 +122,7 @@ TextStream& operator<<(TextStream& ts, E > > bool alwaysPageBreak(BreakBetween between) > { >- return between >= PageBreakBetween; >+ return between >= BreakBetween::Page; > } > > const float defaultMiterLimit = 4; >Index: Source/WebCore/rendering/style/RenderStyleConstants.h >=================================================================== >--- Source/WebCore/rendering/style/RenderStyleConstants.h (revision 232123) >+++ Source/WebCore/rendering/style/RenderStyleConstants.h (working copy) >@@ -77,30 +77,32 @@ enum class StyleDifferenceContextSensiti > }; > > // Static pseudo styles. Dynamic ones are produced on the fly. >-enum PseudoId : unsigned char { >- // The order must be NOP ID, public IDs, and then internal IDs. >- NOPSEUDO, >- FIRST_LINE, >- FIRST_LETTER, >- MARKER, >- BEFORE, >- AFTER, >- SELECTION, >- SCROLLBAR, >- >- // Internal IDs follow: >- SCROLLBAR_THUMB, >- SCROLLBAR_BUTTON, >- SCROLLBAR_TRACK, >- SCROLLBAR_TRACK_PIECE, >- SCROLLBAR_CORNER, >- RESIZER, >- >- AFTER_LAST_INTERNAL_PSEUDOID, >- >- FIRST_PUBLIC_PSEUDOID = FIRST_LINE, >- FIRST_INTERNAL_PSEUDOID = SCROLLBAR_THUMB, >- PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_PUBLIC_PSEUDOID) - 1) >+enum class PseudoId : unsigned char { >+ // The order must be None, public IDs, and then internal IDs. >+ None, >+ >+ // Public: >+ FirstLine, >+ FirstLetter, >+ Marker, >+ Before, >+ After, >+ Selection, >+ Scrollbar, >+ >+ // Internal: >+ ScrollbarThumb, >+ ScrollbarButton, >+ ScrollbarTrack, >+ ScrollbarTrackPiece, >+ ScrollbarCorner, >+ Resizer, >+ >+ AfterLastInternalPseudoId, >+ >+ FirstPublicPseudoId = FirstLine, >+ FirstInternalPseudoId = ScrollbarThumb, >+ PublicPseudoIdMask = ((1 << FirstInternalPseudoId) - 1) & ~((1 << FirstPublicPseudoId) - 1) > }; > > class PseudoIdSet { >@@ -124,14 +126,14 @@ public: > > bool has(PseudoId pseudoId) const > { >- ASSERT((sizeof(m_data) * 8) > pseudoId); >- return m_data & (1U << pseudoId); >+ ASSERT((sizeof(m_data) * 8) > static_cast<unsigned>(pseudoId)); >+ return m_data & (1U << static_cast<unsigned>(pseudoId)); > } > > void add(PseudoId pseudoId) > { >- ASSERT((sizeof(m_data) * 8) > pseudoId); >- m_data |= (1U << pseudoId); >+ ASSERT((sizeof(m_data) * 8) > static_cast<unsigned>(pseudoId)); >+ m_data |= (1U << static_cast<unsigned>(pseudoId)); > } > > void merge(PseudoIdSet source) >@@ -543,14 +545,14 @@ enum class Resize { > }; > > // The order of this enum must match the order of the list style types in CSSValueKeywords.in. >-enum EListStyleType { >+enum class ListStyleType { > Disc, > Circle, > Square, >- DecimalListStyle, >+ Decimal, > DecimalLeadingZero, > ArabicIndic, >- BinaryListStyle, >+ Binary, > Bengali, > Cambodian, > Khmer, >@@ -624,7 +626,7 @@ enum EListStyleType { > Katakana, > HiraganaIroha, > KatakanaIroha, >- NoneListStyle >+ None > }; > > enum class QuoteType { >@@ -634,50 +636,50 @@ enum class QuoteType { > NoCloseQuote > }; > >-enum EBorderFit { >- BorderFitBorder, >- BorderFitLines >-}; >- >-enum EAnimationFillMode { >- AnimationFillModeNone, >- AnimationFillModeForwards, >- AnimationFillModeBackwards, >- AnimationFillModeBoth >-}; >- >-enum EAnimPlayState { >- AnimPlayStatePlaying = 0x0, >- AnimPlayStatePaused = 0x1 >-}; >- >-enum EWhiteSpace { >- NORMAL, >- PRE, >- PRE_WRAP, >- PRE_LINE, >- NOWRAP, >- KHTML_NOWRAP >+enum class BorderFit { >+ Border, >+ Lines >+}; >+ >+enum class AnimationFillMode { >+ None, >+ Forwards, >+ Backwards, >+ Both >+}; >+ >+enum class AnimationPlayState { >+ Playing = 0x0, >+ Paused = 0x1 >+}; >+ >+enum class WhiteSpace { >+ Normal, >+ Pre, >+ PreWrap, >+ PreLine, >+ NoWrap, >+ KHTMLNoWrap > }; > > // The order of this enum must match the order of the text align values in CSSValueKeywords.in. >-enum ETextAlign { >- LEFT, >- RIGHT, >- CENTER, >- JUSTIFY, >- WEBKIT_LEFT, >- WEBKIT_RIGHT, >- WEBKIT_CENTER, >- TASTART, >- TAEND, >-}; >- >-enum ETextTransform { >- CAPITALIZE, >- UPPERCASE, >- LOWERCASE, >- TTNONE >+enum class TextAlignMode { >+ Left, >+ Right, >+ Center, >+ Justify, >+ WebKitLeft, >+ WebKitRight, >+ WebKitCenter, >+ Start, >+ End, >+}; >+ >+enum class TextTransform { >+ Capitalize, >+ Uppercase, >+ Lowercase, >+ None > }; > > #if ENABLE(LETTERPRESS) >@@ -686,216 +688,218 @@ static const size_t TextDecorationBits = > static const size_t TextDecorationBits = 4; > #endif > enum TextDecoration { >- TextDecorationNone = 0x0, >- TextDecorationUnderline = 0x1, >- TextDecorationOverline = 0x2, >- TextDecorationLineThrough = 0x4, >- TextDecorationBlink = 0x8, >+ TextDecorationNone = 0, >+ TextDecorationUnderline = 1 << 0, >+ TextDecorationOverline = 1 << 1, >+ TextDecorationLineThrough = 1 << 2, >+ TextDecorationBlink = 1 << 3, > #if ENABLE(LETTERPRESS) >- TextDecorationLetterpress = 0x10, >+ TextDecorationLetterpress = 1 << 4, > #endif > }; > inline TextDecoration operator|(TextDecoration a, TextDecoration b) { return TextDecoration(int(a) | int(b)); } > inline TextDecoration& operator|=(TextDecoration& a, TextDecoration b) { return a = a | b; } > >-enum TextDecorationStyle { >- TextDecorationStyleSolid, >- TextDecorationStyleDouble, >- TextDecorationStyleDotted, >- TextDecorationStyleDashed, >- TextDecorationStyleWavy >+enum class TextDecorationStyle { >+ Solid, >+ Double, >+ Dotted, >+ Dashed, >+ Wavy > }; > > #if ENABLE(CSS3_TEXT) >-enum TextAlignLast { >- TextAlignLastAuto, >- TextAlignLastStart, >- TextAlignLastEnd, >- TextAlignLastLeft, >- TextAlignLastRight, >- TextAlignLastCenter, >- TextAlignLastJustify >+enum class TextAlignLast { >+ Auto, >+ Start, >+ End, >+ Left, >+ Right, >+ Center, >+ Justify > }; > >-enum TextJustify { >- TextJustifyAuto, >- TextJustifyNone, >- TextJustifyInterWord, >- TextJustifyDistribute >+enum class TextJustify { >+ Auto, >+ None, >+ InterWord, >+ Distribute > }; > #endif // CSS3_TEXT > > enum TextDecorationSkipItems { >- TextDecorationSkipNone = 0, >- TextDecorationSkipInk = 1 << 0, >- TextDecorationSkipObjects = 1 << 1, >- TextDecorationSkipAuto = 1 << 2 >+ TextDecorationSkipNone = 0, >+ TextDecorationSkipInk = 1 << 0, >+ TextDecorationSkipObjects = 1 << 1, >+ TextDecorationSkipAuto = 1 << 2 > }; > typedef unsigned TextDecorationSkip; > > enum TextUnderlinePosition { > // FIXME: Implement support for 'under left' and 'under right' values. >- TextUnderlinePositionAuto = 0x1, >- TextUnderlinePositionAlphabetic = 0x2, >- TextUnderlinePositionUnder = 0x4 >-}; >- >-enum TextZoom { >- TextZoomNormal, >- TextZoomReset >-}; >- >-enum BreakBetween { >- AutoBreakBetween, >- AvoidBreakBetween, >- AvoidColumnBreakBetween, >- AvoidPageBreakBetween, >- ColumnBreakBetween, >- PageBreakBetween, >- LeftPageBreakBetween, >- RightPageBreakBetween, >- RectoPageBreakBetween, >- VersoPageBreakBetween >+ TextUnderlinePositionAuto = 1 << 0, >+ TextUnderlinePositionAlphabetic = 1 << 1, >+ TextUnderlinePositionUnder = 1 << 2 >+}; >+ >+enum class TextZoom { >+ Normal, >+ Reset >+}; >+ >+enum class BreakBetween { >+ Auto, >+ Avoid, >+ AvoidColumn, >+ AvoidPage, >+ Column, >+ Page, >+ LeftPage, >+ RightPage, >+ RectoPage, >+ VersoPage > }; > bool alwaysPageBreak(BreakBetween); > >-enum BreakInside { >- AutoBreakInside, >- AvoidBreakInside, >- AvoidColumnBreakInside, >- AvoidPageBreakInside >+enum class BreakInside { >+ Auto, >+ Avoid, >+ AvoidColumn, >+ AvoidPage > }; > > enum HangingPunctuation { >- NoHangingPunctuation = 0, >- FirstHangingPunctuation = 1 << 0, >- LastHangingPunctuation = 1 << 1, >- AllowEndHangingPunctuation = 1 << 2, >- ForceEndHangingPunctuation = 1 << 3 >+ NoHangingPunctuation = 0, >+ FirstHangingPunctuation = 1 << 0, >+ LastHangingPunctuation = 1 << 1, >+ AllowEndHangingPunctuation = 1 << 2, >+ ForceEndHangingPunctuation = 1 << 3 > }; > inline HangingPunctuation operator|(HangingPunctuation a, HangingPunctuation b) { return HangingPunctuation(int(a) | int(b)); } > inline HangingPunctuation& operator|=(HangingPunctuation& a, HangingPunctuation b) { return a = a | b; } > >-enum EEmptyCell { >- SHOW, >- HIDE >+enum class EmptyCell { >+ Show, >+ Hide > }; > >-enum ECaptionSide { >- CAPTOP, >- CAPBOTTOM, >- CAPLEFT, >- CAPRIGHT >+enum class CaptionSide { >+ Top, >+ Bottom, >+ Left, >+ Right > }; > >-enum EListStylePosition { >- OUTSIDE, >- INSIDE >+enum class ListStylePosition { >+ Outside, >+ Inside > }; > >-enum EVisibility { >- VISIBLE, >- HIDDEN, >- COLLAPSE >+enum class Visibility { >+ Visible, >+ Hidden, >+ Collapse > }; > >-enum ECursor { >+WTF::TextStream& operator<<(WTF::TextStream&, Visibility); >+ >+enum class CursorType { > // The following must match the order in CSSValueKeywords.in. >- CursorAuto, >- CursorDefault, >- // CursorNone >- CursorContextMenu, >- CursorHelp, >- CursorPointer, >- CursorProgress, >- CursorWait, >- CursorCell, >- CursorCrosshair, >- CursorText, >- CursorVerticalText, >- CursorAlias, >- // CursorCopy >- CursorMove, >- CursorNoDrop, >- CursorNotAllowed, >- CursorGrab, >- CursorGrabbing, >- CursorEResize, >- CursorNResize, >- CursorNeResize, >- CursorNwResize, >- CursorSResize, >- CursorSeResize, >- CursorSwResize, >- CursorWResize, >- CursorEwResize, >- CursorNsResize, >- CursorNeswResize, >- CursorNwseResize, >- CursorColResize, >- CursorRowResize, >- CursorAllScroll, >- CursorZoomIn, >- CursorZoomOut, >+ Auto, >+ Default, >+ // None >+ ContextMenu, >+ Help, >+ Pointer, >+ Progress, >+ Wait, >+ Cell, >+ Crosshair, >+ Text, >+ VerticalText, >+ Alias, >+ // Copy >+ Move, >+ NoDrop, >+ NotAllowed, >+ Grab, >+ Grabbing, >+ EResize, >+ NResize, >+ NEResize, >+ NWResize, >+ SResize, >+ SEResize, >+ SWResize, >+ WResize, >+ EWResize, >+ NSResize, >+ NESWResize, >+ NWSEResize, >+ ColumnResize, >+ RowResize, >+ AllScroll, >+ ZoomIn, >+ ZoomOut, > > // The following are handled as exceptions so don't need to match. >- CursorCopy, >- CursorNone >+ Copy, >+ None > }; > > #if ENABLE(CURSOR_VISIBILITY) >-enum CursorVisibility { >- CursorVisibilityAuto, >- CursorVisibilityAutoHide, >+enum class CursorVisibility { >+ Auto, >+ AutoHide, > }; > #endif > > // The order of this enum must match the order of the display values in CSSValueKeywords.in. >-enum EDisplay { >- INLINE, >- BLOCK, >- LIST_ITEM, >- COMPACT, >- INLINE_BLOCK, >- TABLE, >- INLINE_TABLE, >- TABLE_ROW_GROUP, >- TABLE_HEADER_GROUP, >- TABLE_FOOTER_GROUP, >- TABLE_ROW, >- TABLE_COLUMN_GROUP, >- TABLE_COLUMN, >- TABLE_CELL, >- TABLE_CAPTION, >- BOX, >- INLINE_BOX, >- FLEX, >- WEBKIT_FLEX, >- INLINE_FLEX, >- WEBKIT_INLINE_FLEX, >- CONTENTS, >- GRID, >- INLINE_GRID, >- NONE >-}; >- >-enum EInsideLink { >- NotInsideLink, >- InsideUnvisitedLink, >- InsideVisitedLink >+enum class DisplayType { >+ Inline, >+ Block, >+ ListItem, >+ Compact, >+ InlineBlock, >+ Table, >+ InlineTable, >+ TableRowGroup, >+ TableHeaderGroup, >+ TableFooterGroup, >+ TableRow, >+ TableColumnGroup, >+ TableColumn, >+ TableCell, >+ TableCaption, >+ Box, >+ InlineBox, >+ Flex, >+ WebKitFlex, >+ InlineFlex, >+ WebKitInlineFlex, >+ Contents, >+ Grid, >+ InlineGrid, >+ None >+}; >+ >+enum class InsideLink { >+ NotInside, >+ InsideUnvisited, >+ InsideVisited > }; > >-enum EPointerEvents { >- PE_NONE, >- PE_AUTO, >- PE_STROKE, >- PE_FILL, >- PE_PAINTED, >- PE_VISIBLE, >- PE_VISIBLE_STROKE, >- PE_VISIBLE_FILL, >- PE_VISIBLE_PAINTED, >- PE_ALL >+enum class PointerEvents { >+ None, >+ Auto, >+ Stroke, >+ Fill, >+ Painted, >+ Visible, >+ VisibleStroke, >+ VisibleFill, >+ VisiblePainted, >+ All > }; > > enum class TransformStyle3D { >@@ -919,42 +923,42 @@ enum class LineClamp { > Percentage > }; > >-enum Hyphens { >- HyphensNone, >- HyphensManual, >- HyphensAuto >+enum class Hyphens { >+ None, >+ Manual, >+ Auto > }; > > enum ESpeakAs { >- SpeakNormal = 0, >- SpeakSpellOut = 1 << 0, >- SpeakDigits = 1 << 1, >+ SpeakNormal = 0, >+ SpeakSpellOut = 1 << 0, >+ SpeakDigits = 1 << 1, > SpeakLiteralPunctuation = 1 << 2, >- SpeakNoPunctuation = 1 << 3 >+ SpeakNoPunctuation = 1 << 3 > }; > inline ESpeakAs operator|(ESpeakAs a, ESpeakAs b) { return ESpeakAs(int(a) | int(b)); } > inline ESpeakAs& operator|=(ESpeakAs& a, ESpeakAs b) { return a = a | b; } > >-enum TextEmphasisFill { >- TextEmphasisFillFilled, >- TextEmphasisFillOpen >+enum class TextEmphasisFill { >+ Filled, >+ Open > }; > >-enum TextEmphasisMark { >- TextEmphasisMarkNone, >- TextEmphasisMarkAuto, >- TextEmphasisMarkDot, >- TextEmphasisMarkCircle, >- TextEmphasisMarkDoubleCircle, >- TextEmphasisMarkTriangle, >- TextEmphasisMarkSesame, >- TextEmphasisMarkCustom >+enum class TextEmphasisMark { >+ None, >+ Auto, >+ Dot, >+ Circle, >+ DoubleCircle, >+ Triangle, >+ Sesame, >+ Custom > }; > > enum TextEmphasisPositions { >- TextEmphasisPositionOver = 1 << 0, >+ TextEmphasisPositionOver = 1 << 0, > TextEmphasisPositionUnder = 1 << 1, >- TextEmphasisPositionLeft = 1 << 2, >+ TextEmphasisPositionLeft = 1 << 2, > TextEmphasisPositionRight = 1 << 3 > }; > typedef unsigned TextEmphasisPosition; >@@ -980,58 +984,58 @@ enum class ImageRendering { > > WTF::TextStream& operator<<(WTF::TextStream&, ImageRendering); > >-enum ImageResolutionSource { >- ImageResolutionSpecified = 0, >- ImageResolutionFromImage >+enum class ImageResolutionSource { >+ Specified = 0, >+ FromImage > }; > >-enum ImageResolutionSnap { >- ImageResolutionNoSnap = 0, >- ImageResolutionSnapPixels >+enum class ImageResolutionSnap { >+ None = 0, >+ Pixels > }; > >-enum Order { >- LogicalOrder = 0, >- VisualOrder >+enum class Order { >+ Logical = 0, >+ Visual > }; > >-enum ColumnAxis { >- HorizontalColumnAxis, >- VerticalColumnAxis, >- AutoColumnAxis >+enum class ColumnAxis { >+ Horizontal, >+ Vertical, >+ Auto > }; > >-enum ColumnProgression { >- NormalColumnProgression, >- ReverseColumnProgression >+enum class ColumnProgression { >+ Normal, >+ Reverse > }; > >-enum LineSnap { >- LineSnapNone, >- LineSnapBaseline, >- LineSnapContain >+enum class LineSnap { >+ None, >+ Baseline, >+ Contain > }; > >-enum LineAlign { >- LineAlignNone, >- LineAlignEdges >+enum class LineAlign { >+ None, >+ Edges > }; > >-enum RubyPosition { >- RubyPositionBefore, >- RubyPositionAfter, >- RubyPositionInterCharacter >+enum class RubyPosition { >+ Before, >+ After, >+ InterCharacter > }; > > static const size_t GridAutoFlowBits = 4; > enum InternalGridAutoFlowAlgorithm { >- InternalAutoFlowAlgorithmSparse = 0x1, >- InternalAutoFlowAlgorithmDense = 0x2, >+ InternalAutoFlowAlgorithmSparse = 1 << 0, >+ InternalAutoFlowAlgorithmDense = 1 << 1, > }; > > enum InternalGridAutoFlowDirection { >- InternalAutoFlowDirectionRow = 0x4, >- InternalAutoFlowDirectionColumn = 0x8 >+ InternalAutoFlowDirectionRow = 1 << 2, >+ InternalAutoFlowDirectionColumn = 1 << 3 > }; > > enum GridAutoFlow { >@@ -1041,10 +1045,10 @@ enum GridAutoFlow { > AutoFlowColumnDense = InternalAutoFlowAlgorithmDense | InternalAutoFlowDirectionColumn > }; > >-enum AutoRepeatType { >- NoAutoRepeat, >- AutoFill, >- AutoFit >+enum class AutoRepeatType { >+ None, >+ Fill, >+ Fit > }; > > // Reasonable maximum to prevent insane font sizes from causing crashes on some platforms (such as Windows). >@@ -1070,7 +1074,7 @@ enum class Isolation { > }; > > // Fill, Stroke, ViewBox are just used for SVG. >-enum CSSBoxType { >+enum class CSSBoxType { > BoxMissing = 0, > MarginBox, > BorderBox, >Index: Source/WebCore/rendering/style/ShapeValue.h >=================================================================== >--- Source/WebCore/rendering/style/ShapeValue.h (revision 232123) >+++ Source/WebCore/rendering/style/ShapeValue.h (working copy) >@@ -95,7 +95,7 @@ private: > Type m_type; > RefPtr<BasicShape> m_shape; > RefPtr<StyleImage> m_image; >- CSSBoxType m_cssBox { BoxMissing }; >+ CSSBoxType m_cssBox { CSSBoxType::BoxMissing }; > }; > > } >Index: Source/WebCore/rendering/style/StyleMultiColData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleMultiColData.cpp (revision 232123) >+++ Source/WebCore/rendering/style/StyleMultiColData.cpp (working copy) >@@ -32,8 +32,8 @@ StyleMultiColData::StyleMultiColData() > , autoCount(true) > , fill(static_cast<unsigned>(RenderStyle::initialColumnFill())) > , columnSpan(false) >- , axis(RenderStyle::initialColumnAxis()) >- , progression(RenderStyle::initialColumnProgression()) >+ , axis(static_cast<unsigned>(RenderStyle::initialColumnAxis())) >+ , progression(static_cast<unsigned>(RenderStyle::initialColumnProgression())) > { > } > >Index: Source/WebCore/rendering/style/StyleRareInheritedData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleRareInheritedData.cpp (revision 232123) >+++ Source/WebCore/rendering/style/StyleRareInheritedData.cpp (working copy) >@@ -87,11 +87,11 @@ StyleRareInheritedData::StyleRareInherit > , nbspMode(static_cast<unsigned>(NBSPMode::Normal)) > , lineBreak(static_cast<unsigned>(LineBreak::Auto)) > , userSelect(static_cast<unsigned>(RenderStyle::initialUserSelect())) >- , speakAs(SpeakNormal) >- , hyphens(HyphensManual) >- , textEmphasisFill(TextEmphasisFillFilled) >- , textEmphasisMark(TextEmphasisMarkNone) >- , textEmphasisPosition(TextEmphasisPositionOver | TextEmphasisPositionRight) >+ , speakAs(static_cast<unsigned>(SpeakNormal)) >+ , hyphens(static_cast<unsigned>(Hyphens::Manual)) >+ , textEmphasisFill(static_cast<unsigned>(TextEmphasisFill::Filled)) >+ , textEmphasisMark(static_cast<unsigned>(TextEmphasisMark::None)) >+ , textEmphasisPosition(static_cast<unsigned>(TextEmphasisPositionOver | TextEmphasisPositionRight)) > , textOrientation(static_cast<unsigned>(TextOrientation::Mixed)) > #if ENABLE(CSS3_TEXT) > , textIndentLine(RenderStyle::initialTextIndentLine()) >@@ -102,8 +102,8 @@ StyleRareInheritedData::StyleRareInherit > , imageOrientation(RenderStyle::initialImageOrientation()) > #endif > , imageRendering(static_cast<unsigned>(RenderStyle::initialImageRendering())) >- , lineSnap(RenderStyle::initialLineSnap()) >- , lineAlign(RenderStyle::initialLineAlign()) >+ , lineSnap(static_cast<unsigned>(RenderStyle::initialLineSnap())) >+ , lineAlign(static_cast<unsigned>(RenderStyle::initialLineAlign())) > #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING) > , useTouchOverflowScrolling(RenderStyle::initialUseTouchOverflowScrolling()) > #endif >@@ -117,8 +117,8 @@ StyleRareInheritedData::StyleRareInherit > #endif > , textDecorationSkip(RenderStyle::initialTextDecorationSkip()) > , textUnderlinePosition(RenderStyle::initialTextUnderlinePosition()) >- , rubyPosition(RenderStyle::initialRubyPosition()) >- , textZoom(RenderStyle::initialTextZoom()) >+ , rubyPosition(static_cast<unsigned>(RenderStyle::initialRubyPosition())) >+ , textZoom(static_cast<unsigned>(RenderStyle::initialTextZoom())) > #if PLATFORM(IOS) > , touchCalloutEnabled(RenderStyle::initialTouchCalloutEnabled()) > #endif >Index: Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >=================================================================== >--- Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (revision 232123) >+++ Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp (working copy) >@@ -86,10 +86,10 @@ StyleRareNonInheritedData::StyleRareNonI > , textOverflow(static_cast<unsigned>(RenderStyle::initialTextOverflow())) > , marginBeforeCollapse(static_cast<unsigned>(MarginCollapse::Collapse)) > , marginAfterCollapse(static_cast<unsigned>(MarginCollapse::Collapse)) >- , appearance(RenderStyle::initialAppearance()) >- , borderFit(RenderStyle::initialBorderFit()) >+ , appearance(static_cast<unsigned>(RenderStyle::initialAppearance())) >+ , borderFit(static_cast<unsigned>(RenderStyle::initialBorderFit())) > , textCombine(static_cast<unsigned>(RenderStyle::initialTextCombine())) >- , textDecorationStyle(RenderStyle::initialTextDecorationStyle()) >+ , textDecorationStyle(static_cast<unsigned>(RenderStyle::initialTextDecorationStyle())) > , aspectRatioType(static_cast<unsigned>(RenderStyle::initialAspectRatioType())) > #if ENABLE(CSS_COMPOSITING) > , effectiveBlendMode(RenderStyle::initialBlendMode()) >Index: Source/WebCore/rendering/style/StyleRareNonInheritedData.h >=================================================================== >--- Source/WebCore/rendering/style/StyleRareNonInheritedData.h (revision 232123) >+++ Source/WebCore/rendering/style/StyleRareNonInheritedData.h (working copy) >@@ -185,7 +185,7 @@ public: > unsigned marginBeforeCollapse : 2; // MarginCollapse > unsigned marginAfterCollapse : 2; // MarginCollapse > unsigned appearance : 6; // EAppearance >- unsigned borderFit : 1; // EBorderFit >+ unsigned borderFit : 1; // BorderFit > unsigned textCombine : 1; // CSS3 text-combine properties > > unsigned textDecorationStyle : 3; // TextDecorationStyle >Index: Source/WebCore/rendering/svg/RenderSVGContainer.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGContainer.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGContainer.cpp (working copy) >@@ -137,7 +137,7 @@ void RenderSVGContainer::paint(PaintInfo > // outline rect into parent coords before drawing. > // FIXME: This means our focus ring won't share our rotation like it should. > // We should instead disable our clip during PaintPhaseOutline >- if (paintInfo.phase == PaintPhaseSelfOutline && style().outlineWidth() && style().visibility() == VISIBLE) { >+ if (paintInfo.phase == PaintPhaseSelfOutline && style().outlineWidth() && style().visibility() == Visibility::Visible) { > IntRect paintRectInParent = enclosingIntRect(localToParentTransform().mapRect(repaintRect)); > paintOutline(paintInfo, paintRectInParent); > } >Index: Source/WebCore/rendering/svg/RenderSVGImage.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGImage.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGImage.cpp (working copy) >@@ -140,7 +140,7 @@ void RenderSVGImage::layout() > void RenderSVGImage::paint(PaintInfo& paintInfo, const LayoutPoint&) > { > if (paintInfo.context().paintingDisabled() || paintInfo.phase != PaintPhaseForeground >- || style().visibility() == HIDDEN || !imageResource().cachedImage()) >+ || style().visibility() == Visibility::Hidden || !imageResource().cachedImage()) > return; > > FloatRect boundingBox = repaintRectInLocalCoordinates(); >@@ -192,7 +192,7 @@ bool RenderSVGImage::nodeAtFloatPoint(co > return false; > > PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, request, style().pointerEvents()); >- bool isVisible = (style().visibility() == VISIBLE); >+ bool isVisible = (style().visibility() == Visibility::Visible); > if (isVisible || !hitRules.requireVisible) { > FloatPoint localPoint = localToParentTransform().inverse().value_or(AffineTransform()).mapPoint(pointInParent); > >Index: Source/WebCore/rendering/svg/RenderSVGInlineText.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGInlineText.cpp (working copy) >@@ -91,8 +91,8 @@ void RenderSVGInlineText::styleDidChange > RenderText::styleDidChange(diff, oldStyle); > updateScaledFont(); > >- bool newPreserves = style().whiteSpace() == PRE; >- bool oldPreserves = oldStyle ? oldStyle->whiteSpace() == PRE : false; >+ bool newPreserves = style().whiteSpace() == WhiteSpace::Pre; >+ bool oldPreserves = oldStyle ? oldStyle->whiteSpace() == WhiteSpace::Pre : false; > if (oldPreserves && !newPreserves) { > setText(applySVGWhitespaceRules(originalText(), false), true); > return; >Index: Source/WebCore/rendering/svg/RenderSVGModelObject.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (working copy) >@@ -168,7 +168,7 @@ void RenderSVGModelObject::absoluteFocus > > bool RenderSVGModelObject::checkIntersection(RenderElement* renderer, const FloatRect& rect) > { >- if (!renderer || renderer->style().pointerEvents() == PE_NONE) >+ if (!renderer || renderer->style().pointerEvents() == PointerEvents::None) > return false; > if (!isGraphicsElement(*renderer)) > return false; >@@ -181,7 +181,7 @@ bool RenderSVGModelObject::checkIntersec > > bool RenderSVGModelObject::checkEnclosure(RenderElement* renderer, const FloatRect& rect) > { >- if (!renderer || renderer->style().pointerEvents() == PE_NONE) >+ if (!renderer || renderer->style().pointerEvents() == PointerEvents::None) > return false; > if (!isGraphicsElement(*renderer)) > return false; >Index: Source/WebCore/rendering/svg/RenderSVGResource.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGResource.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGResource.cpp (working copy) >@@ -86,7 +86,7 @@ static inline RenderSVGResource* request > break; > } > >- if (style.insideLink() == InsideVisitedLink) { >+ if (style.insideLink() == InsideLink::InsideVisited) { > // FIXME: This code doesn't support the uri component of the visited link paint, https://bugs.webkit.org/show_bug.cgi?id=70006 > SVGPaintType visitedPaintType = applyToFill ? svgStyle.visitedLinkFillPaintType() : svgStyle.visitedLinkStrokePaintType(); > >Index: Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (working copy) >@@ -97,7 +97,7 @@ bool RenderSVGResourceClipper::pathOnlyC > continue; > SVGGraphicsElement& styled = downcast<SVGGraphicsElement>(*childNode); > const RenderStyle& style = renderer->style(); >- if (style.display() == NONE || style.visibility() != VISIBLE) >+ if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible) > continue; > const SVGRenderStyle& svgStyle = style.svgStyle(); > // Current shape in clip-path gets clipped too. Fallback to masking. >@@ -206,7 +206,7 @@ bool RenderSVGResourceClipper::drawConte > return false; > } > const RenderStyle& style = renderer->style(); >- if (style.display() == NONE || style.visibility() != VISIBLE) >+ if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible) > continue; > > WindRule newClipRule = style.svgStyle().clipRule(); >@@ -246,7 +246,7 @@ void RenderSVGResourceClipper::calculate > if (!renderer->isSVGShape() && !renderer->isSVGText() && !childNode->hasTagName(SVGNames::useTag)) > continue; > const RenderStyle& style = renderer->style(); >- if (style.display() == NONE || style.visibility() != VISIBLE) >+ if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible) > continue; > m_clipBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates())); > } >Index: Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp (working copy) >@@ -107,7 +107,7 @@ bool RenderSVGResourceMasker::drawConten > if (renderer->needsLayout()) > return false; > const RenderStyle& style = renderer->style(); >- if (style.display() == NONE || style.visibility() != VISIBLE) >+ if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible) > continue; > SVGRenderingContext::renderSubtreeToImageBuffer(maskerData->maskImage.get(), *renderer, maskContentTransformation); > } >@@ -132,7 +132,7 @@ void RenderSVGResourceMasker::calculateM > if (!childNode->isSVGElement() || !renderer) > continue; > const RenderStyle& style = renderer->style(); >- if (style.display() == NONE || style.visibility() != VISIBLE) >+ if (style.display() == DisplayType::None || style.visibility() != Visibility::Visible) > continue; > m_maskContentBoundaries.unite(renderer->localToParentTransform().mapRect(renderer->repaintRectInLocalCoordinates())); > } >Index: Source/WebCore/rendering/svg/RenderSVGRoot.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGRoot.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGRoot.cpp (working copy) >@@ -329,7 +329,7 @@ const AffineTransform& RenderSVGRoot::lo > > LayoutRect RenderSVGRoot::clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const > { >- if (style().visibility() != VISIBLE && !enclosingLayer()->hasVisibleContent()) >+ if (style().visibility() != Visibility::Visible && !enclosingLayer()->hasVisibleContent()) > return LayoutRect(); > > FloatRect contentRepaintRect = m_localToBorderBoxTransform.mapRect(repaintRectInLocalCoordinates()); >Index: Source/WebCore/rendering/svg/RenderSVGShape.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGShape.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGShape.cpp (working copy) >@@ -297,7 +297,7 @@ void RenderSVGShape::fillStrokeMarkers(P > void RenderSVGShape::paint(PaintInfo& paintInfo, const LayoutPoint&) > { > if (paintInfo.context().paintingDisabled() || paintInfo.phase != PaintPhaseForeground >- || style().visibility() == HIDDEN || isEmpty()) >+ || style().visibility() == Visibility::Hidden || isEmpty()) > return; > FloatRect boundingBox = repaintRectInLocalCoordinates(); > if (!SVGRenderSupport::paintInfoIntersectsRepaintRect(boundingBox, m_localTransform, paintInfo)) >@@ -374,7 +374,7 @@ bool RenderSVGShape::nodeAtFloatPoint(co > return false; > > PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_PATH_HITTESTING, request, style().pointerEvents()); >- bool isVisible = (style().visibility() == VISIBLE); >+ bool isVisible = (style().visibility() == Visibility::Visible); > if (isVisible || !hitRules.requireVisible) { > const SVGRenderStyle& svgStyle = style().svgStyle(); > WindRule fillRule = svgStyle.fillRule(); >Index: Source/WebCore/rendering/svg/RenderSVGText.cpp >=================================================================== >--- Source/WebCore/rendering/svg/RenderSVGText.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/RenderSVGText.cpp (working copy) >@@ -432,7 +432,7 @@ std::unique_ptr<RootInlineBox> RenderSVG > bool RenderSVGText::nodeAtFloatPoint(const HitTestRequest& request, HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction) > { > PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, request, style().pointerEvents()); >- bool isVisible = (style().visibility() == VISIBLE); >+ bool isVisible = (style().visibility() == Visibility::Visible); > if (isVisible || !hitRules.requireVisible) { > if ((hitRules.canHitStroke && (style().svgStyle().hasStroke() || !hitRules.requireStroke)) > || (hitRules.canHitFill && (style().svgStyle().hasFill() || !hitRules.requireFill))) { >Index: Source/WebCore/rendering/svg/SVGInlineTextBox.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (working copy) >@@ -181,7 +181,7 @@ void SVGInlineTextBox::paintSelectionBac > ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection); > ASSERT(truncation() == cNoTruncation); > >- if (renderer().style().visibility() != VISIBLE) >+ if (renderer().style().visibility() != Visibility::Visible) > return; > > auto& parentRenderer = parent()->renderer(); >@@ -239,7 +239,7 @@ void SVGInlineTextBox::paint(PaintInfo& > ASSERT(paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection); > ASSERT(truncation() == cNoTruncation); > >- if (renderer().style().visibility() != VISIBLE) >+ if (renderer().style().visibility() != Visibility::Visible) > return; > > // Note: We're explicitely not supporting composition & custom underlines and custom highlighters - unlike InlineTextBox. >@@ -265,7 +265,7 @@ void SVGInlineTextBox::paint(PaintInfo& > > const RenderStyle* selectionStyle = &style; > if (hasSelection && shouldPaintSelectionHighlight) { >- selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION); >+ selectionStyle = parentRenderer.getCachedPseudoStyle(PseudoId::Selection); > if (selectionStyle) { > const SVGRenderStyle& svgSelectionStyle = selectionStyle->svgStyle(); > >@@ -395,7 +395,7 @@ TextRun SVGInlineTextBox::constructTextR > , 0 /* padding, only relevant for justified text, not relevant for SVG */ > , AllowTrailingExpansion > , direction() >- , dirOverride() || style.rtlOrdering() == VisualOrder /* directionalOverride */); >+ , dirOverride() || style.rtlOrdering() == Order::Visual /* directionalOverride */); > > // We handle letter & word spacing ourselves. > run.disableSpacing(); >@@ -480,7 +480,7 @@ void SVGInlineTextBox::paintDecoration(G > auto& decorationRenderer = findRendererDefininingTextDecoration(parent()); > const RenderStyle& decorationStyle = decorationRenderer.style(); > >- if (decorationStyle.visibility() == HIDDEN) >+ if (decorationStyle.visibility() == Visibility::Hidden) > return; > > const SVGRenderStyle& svgDecorationStyle = decorationStyle.svgStyle(); >@@ -647,7 +647,7 @@ bool SVGInlineTextBox::nodeAtPoint(const > ASSERT(!isLineBreak()); > > PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, request, renderer().style().pointerEvents()); >- bool isVisible = renderer().style().visibility() == VISIBLE; >+ bool isVisible = renderer().style().visibility() == Visibility::Visible; > if (isVisible || !hitRules.requireVisible) { > if ((hitRules.canHitStroke && (renderer().style().svgStyle().hasStroke() || !hitRules.requireStroke)) > || (hitRules.canHitFill && (renderer().style().svgStyle().hasFill() || !hitRules.requireFill))) { >Index: Source/WebCore/rendering/svg/SVGRenderSupport.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGRenderSupport.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/SVGRenderSupport.cpp (working copy) >@@ -59,7 +59,7 @@ FloatRect SVGRenderSupport::repaintRectF > LayoutRect SVGRenderSupport::clippedOverflowRectForRepaint(const RenderElement& renderer, const RenderLayerModelObject* repaintContainer) > { > // Return early for any cases where we don't actually paint >- if (renderer.style().visibility() != VISIBLE && !renderer.enclosingLayer()->hasVisibleContent()) >+ if (renderer.style().visibility() != Visibility::Visible && !renderer.enclosingLayer()->hasVisibleContent()) > return LayoutRect(); > > // Pass our local paint rect to computeRectForRepaint() which will >Index: Source/WebCore/rendering/svg/SVGRenderingContext.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGRenderingContext.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/SVGRenderingContext.cpp (working copy) >@@ -137,10 +137,10 @@ void SVGRenderingContext::prepareToRende > if (is<ShapeClipPathOperation>(clipPathOperation)) { > auto& clipPath = downcast<ShapeClipPathOperation>(*clipPathOperation); > FloatRect referenceBox; >- if (clipPath.referenceBox() == Stroke) >+ if (clipPath.referenceBox() == CSSBoxType::Stroke) { > // FIXME: strokeBoundingBox() takes dasharray into account but shouldn't. > referenceBox = renderer.strokeBoundingBox(); >- else if (clipPath.referenceBox() == ViewBox && renderer.element()) { >+ } else if (clipPath.referenceBox() == CSSBoxType::ViewBox && renderer.element()) { > FloatSize viewportSize; > SVGLengthContext(downcast<SVGElement>(renderer.element())).determineViewport(viewportSize); > referenceBox.setWidth(viewportSize.width()); >Index: Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp (working copy) >@@ -82,7 +82,7 @@ static inline void processRenderSVGInlin > { > auto& string = text.text(); > auto length = string.length(); >- if (text.style().whiteSpace() == PRE) { >+ if (text.style().whiteSpace() == WhiteSpace::Pre) { > atCharacter += length; > return; > } >Index: Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp >=================================================================== >--- Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (revision 232123) >+++ Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp (working copy) >@@ -135,7 +135,7 @@ void SVGTextMetricsBuilder::measureTextR > } > > initializeMeasurementWithTextRenderer(text); >- bool preserveWhiteSpace = text.style().whiteSpace() == PRE; >+ bool preserveWhiteSpace = text.style().whiteSpace() == WhiteSpace::Pre; > int surrogatePairCharacters = 0; > > while (advance()) { >Index: Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (working copy) >@@ -303,7 +303,7 @@ RenderPtr<RenderObject> RenderTreeBuilde > // column span flag if it is set. > ASSERT(!inlineChildrenBlock.continuation()); > // Cache this value as it might get changed in setStyle() call. >- inlineChildrenBlock.setStyle(RenderStyle::createAnonymousStyleWithDisplay(parent.style(), BLOCK)); >+ inlineChildrenBlock.setStyle(RenderStyle::createAnonymousStyleWithDisplay(parent.style(), DisplayType::Block)); > auto blockToMove = m_builder.detachFromRenderElement(parent, inlineChildrenBlock); > > // Now just put the inlineChildrenBlock inside the blockChildrenBlock. >Index: Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (working copy) >@@ -39,7 +39,7 @@ namespace WebCore { > > static RenderStyle styleForFirstLetter(const RenderBlock& firstLetterBlock, const RenderObject& firstLetterContainer) > { >- auto* containerFirstLetterStyle = firstLetterBlock.getCachedPseudoStyle(FIRST_LETTER, &firstLetterContainer.firstLineStyle()); >+ auto* containerFirstLetterStyle = firstLetterBlock.getCachedPseudoStyle(PseudoId::FirstLetter, &firstLetterContainer.firstLineStyle()); > // FIXME: There appears to be some path where we have a first letter renderer without first letter style. > ASSERT(containerFirstLetterStyle); > auto firstLetterStyle = RenderStyle::clone(containerFirstLetterStyle ? *containerFirstLetterStyle : firstLetterContainer.firstLineStyle()); >@@ -82,7 +82,7 @@ static RenderStyle styleForFirstLetter(c > } > > // Force inline display (except for floating first-letters). >- firstLetterStyle.setDisplay(firstLetterStyle.isFloating() ? BLOCK : INLINE); >+ firstLetterStyle.setDisplay(firstLetterStyle.isFloating() ? DisplayType::Block : DisplayType::Inline); > // CSS2 says first-letter can't be positioned. > firstLetterStyle.setPosition(PositionType::Static); > return firstLetterStyle; >@@ -121,7 +121,7 @@ RenderTreeBuilder::FirstLetter::FirstLet > > void RenderTreeBuilder::FirstLetter::updateAfterDescendants(RenderBlock& block) > { >- if (!block.style().hasPseudoStyle(FIRST_LETTER)) >+ if (!block.style().hasPseudoStyle(PseudoId::FirstLetter)) > return; > if (!supportsFirstLetter(block)) > return; >@@ -140,7 +140,7 @@ void RenderTreeBuilder::FirstLetter::upd > > // If the child already has style, then it has already been created, so we just want > // to update it. >- if (firstLetterRenderer->parent()->style().styleType() == FIRST_LETTER) { >+ if (firstLetterRenderer->parent()->style().styleType() == PseudoId::FirstLetter) { > updateStyle(block, *firstLetterRenderer); > return; > } >@@ -170,7 +170,7 @@ void RenderTreeBuilder::FirstLetter::upd > if (Style::determineChange(firstLetter->style(), pseudoStyle) == Style::Detach) { > // The first-letter renderer needs to be replaced. Create a new renderer of the right type. > RenderPtr<RenderBoxModelObject> newFirstLetter; >- if (pseudoStyle.display() == INLINE) >+ if (pseudoStyle.display() == DisplayType::Inline) > newFirstLetter = createRenderer<RenderInline>(firstLetterBlock.document(), WTFMove(pseudoStyle)); > else > newFirstLetter = createRenderer<RenderBlockFlow>(firstLetterBlock.document(), WTFMove(pseudoStyle)); >@@ -205,7 +205,7 @@ void RenderTreeBuilder::FirstLetter::cre > RenderElement* firstLetterContainer = currentTextChild.parent(); > auto pseudoStyle = styleForFirstLetter(firstLetterBlock, *firstLetterContainer); > RenderPtr<RenderBoxModelObject> newFirstLetter; >- if (pseudoStyle.display() == INLINE) >+ if (pseudoStyle.display() == DisplayType::Inline) > newFirstLetter = createRenderer<RenderInline>(firstLetterBlock.document(), WTFMove(pseudoStyle)); > else > newFirstLetter = createRenderer<RenderBlockFlow>(firstLetterBlock.document(), WTFMove(pseudoStyle)); >Index: Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderInline.cpp (working copy) >@@ -168,7 +168,7 @@ void RenderTreeBuilder::Inline::attachIg > // inline into continuations. This involves creating an anonymous block box to hold > // |newChild|. We then make that block box a continuation of this inline. We take all of > // the children after |beforeChild| and put them in a clone of this object. >- auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent.style(), BLOCK); >+ auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(parent.style(), DisplayType::Block); > > // If inside an inline affected by in-flow positioning the block needs to be affected by it too. > // Giving the block a layer like this allows it to collect the x/y offsets from inline parents later. >@@ -376,7 +376,7 @@ void RenderTreeBuilder::Inline::splitInl > bool RenderTreeBuilder::Inline::newChildIsInline(const RenderInline& parent, const RenderObject& child) > { > // inline parent generates inline-table. >- return child.isInline() || (m_builder.tableBuilder().childRequiresTable(parent, child) && parent.style().display() == INLINE); >+ return child.isInline() || (m_builder.tableBuilder().childRequiresTable(parent, child) && parent.style().display() == DisplayType::Inline); > } > > void RenderTreeBuilder::Inline::childBecameNonInline(RenderInline& parent, RenderElement& child) >Index: Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp (working copy) >@@ -78,7 +78,7 @@ void RenderTreeBuilder::List::updateItem > { > auto& style = listItemRenderer.style(); > >- if (style.listStyleType() == NoneListStyle && (!style.listStyleImage() || style.listStyleImage()->errorOccurred())) { >+ if (style.listStyleType() == ListStyleType::None && (!style.listStyleImage() || style.listStyleImage()->errorOccurred())) { > if (auto* marker = listItemRenderer.markerRenderer()) > m_builder.destroy(*marker); > return; >Index: Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderMathML.cpp (working copy) >@@ -42,7 +42,7 @@ RenderTreeBuilder::MathML::MathML(Render > RenderPtr<RenderMathMLFencedOperator> RenderTreeBuilder::MathML::createMathMLOperator(RenderMathMLFenced& parent, const String& operatorString, > MathMLOperatorDictionary::Form form, MathMLOperatorDictionary::Flag flag) > { >- RenderPtr<RenderMathMLFencedOperator> newOperator = createRenderer<RenderMathMLFencedOperator>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(parent.style(), BLOCK), operatorString, form, flag); >+ RenderPtr<RenderMathMLFencedOperator> newOperator = createRenderer<RenderMathMLFencedOperator>(parent.document(), RenderStyle::createAnonymousStyleWithDisplay(parent.style(), DisplayType::Block), operatorString, form, flag); > newOperator->initializeStyle(); > return newOperator; > } >Index: Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderMultiColumn.cpp (working copy) >@@ -166,7 +166,7 @@ void RenderTreeBuilder::MultiColumn::cre > } > } > >- auto newFragmentedFlow = !flow.style().hasLinesClamp() ? WebCore::createRenderer<RenderMultiColumnFlow>(flow.document(), RenderStyle::createAnonymousStyleWithDisplay(flow.style(), BLOCK)) : WebCore::createRenderer<RenderLinesClampFlow>(flow.document(), RenderStyle::createAnonymousStyleWithDisplay(flow.style(), BLOCK)); >+ auto newFragmentedFlow = !flow.style().hasLinesClamp() ? WebCore::createRenderer<RenderMultiColumnFlow>(flow.document(), RenderStyle::createAnonymousStyleWithDisplay(flow.style(), DisplayType::Block)) : WebCore::createRenderer<RenderLinesClampFlow>(flow.document(), RenderStyle::createAnonymousStyleWithDisplay(flow.style(), DisplayType::Block)); > newFragmentedFlow->initializeStyle(); > auto& fragmentedFlow = *newFragmentedFlow; > m_builder.blockBuilder().attach(flow, WTFMove(newFragmentedFlow), nullptr); >@@ -352,7 +352,7 @@ RenderObject* RenderTreeBuilder::MultiCo > // Need to create a new column set when there's no set already created. We also always insert > // another column set after a spanner. Even if it turns out that there are no renderers > // following the spanner, there may be bottom margins there, which take up space. >- auto newSet = flow.createMultiColumnSet(RenderStyle::createAnonymousStyleWithDisplay(multicolContainer->style(), BLOCK)); >+ auto newSet = flow.createMultiColumnSet(RenderStyle::createAnonymousStyleWithDisplay(multicolContainer->style(), DisplayType::Block)); > newSet->initializeStyle(); > auto& set = *newSet; > m_builder.blockBuilder().attach(*multicolContainer, WTFMove(newSet), insertBeforeMulticolChild); >Index: Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderRuby.cpp (working copy) >@@ -47,7 +47,7 @@ static inline bool isAnonymousRubyInline > || !isRuby(object->parent()) > || is<RenderRubyRun>(*object) > || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) >- || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == INLINE_BLOCK)); >+ || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == DisplayType::InlineBlock)); > > return object > && isRuby(object->parent()) >@@ -60,7 +60,7 @@ static inline bool isRubyBeforeBlock(con > return isAnonymousRubyInlineBlock(object) > && !object->previousSibling() > && downcast<RenderBlock>(*object).firstChild() >- && downcast<RenderBlock>(*object).firstChild()->style().styleType() == BEFORE; >+ && downcast<RenderBlock>(*object).firstChild()->style().styleType() == PseudoId::Before; > } > > static inline bool isRubyAfterBlock(const RenderObject* object) >@@ -68,7 +68,7 @@ static inline bool isRubyAfterBlock(cons > return isAnonymousRubyInlineBlock(object) > && !object->nextSibling() > && downcast<RenderBlock>(*object).firstChild() >- && downcast<RenderBlock>(*object).firstChild()->style().styleType() == AFTER; >+ && downcast<RenderBlock>(*object).firstChild()->style().styleType() == PseudoId::After; > } > > #ifndef ASSERT_DISABLED >@@ -97,7 +97,7 @@ static inline RenderBlock* rubyAfterBloc > > static auto createAnonymousRubyInlineBlock(RenderObject& ruby) > { >- auto newBlock = createRenderer<RenderBlockFlow>(ruby.document(), RenderStyle::createAnonymousStyleWithDisplay(ruby.style(), INLINE_BLOCK)); >+ auto newBlock = createRenderer<RenderBlockFlow>(ruby.document(), RenderStyle::createAnonymousStyleWithDisplay(ruby.style(), DisplayType::InlineBlock)); > newBlock->initializeStyle(); > return newBlock; > } >Index: Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp (working copy) >@@ -139,8 +139,8 @@ RenderElement& RenderTreeBuilder::Table: > auto* parentCandidate = beforeChild; > while (parentCandidate && parentCandidate->parent()->isAnonymous() > && !is<RenderTableSection>(*parentCandidate) >- && parentCandidate->style().display() != TABLE_CAPTION >- && parentCandidate->style().display() != TABLE_COLUMN_GROUP) >+ && parentCandidate->style().display() != DisplayType::TableCaption >+ && parentCandidate->style().display() != DisplayType::TableColumnGroup) > parentCandidate = parentCandidate->parent(); > > if (parentCandidate && is<RenderTableSection>(*parentCandidate) && parentCandidate->isAnonymous() && !parent.isAfterContent(parentCandidate)) { >@@ -150,8 +150,8 @@ RenderElement& RenderTreeBuilder::Table: > } > > if (beforeChild && !is<RenderTableSection>(*beforeChild) >- && beforeChild->style().display() != TABLE_CAPTION >- && beforeChild->style().display() != TABLE_COLUMN_GROUP) >+ && beforeChild->style().display() != DisplayType::TableCaption >+ && beforeChild->style().display() != DisplayType::TableColumnGroup) > beforeChild = nullptr; > > auto newSection = RenderTableSection::createAnonymousWithParentRenderer(parent); >Index: Source/WebCore/rendering/updating/RenderTreeUpdater.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeUpdater.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeUpdater.cpp (working copy) >@@ -62,9 +62,9 @@ public: > > private: > const Element& m_element; >- EDisplay m_previousDisplay; >- EVisibility m_previousVisibility; >- EVisibility m_previousImplicitVisibility; >+ DisplayType m_previousDisplay; >+ Visibility m_previousVisibility; >+ Visibility m_previousImplicitVisibility; > }; > #endif // PLATFORM(IOS) > >@@ -257,13 +257,13 @@ void RenderTreeUpdater::popParentsToDept > void RenderTreeUpdater::updateBeforeDescendants(Element& element, const Style::ElementUpdates* updates) > { > if (updates) >- generatedContent().updatePseudoElement(element, updates->beforePseudoElementUpdate, BEFORE); >+ generatedContent().updatePseudoElement(element, updates->beforePseudoElementUpdate, PseudoId::Before); > } > > void RenderTreeUpdater::updateAfterDescendants(Element& element, const Style::ElementUpdates* updates) > { > if (updates) >- generatedContent().updatePseudoElement(element, updates->afterPseudoElementUpdate, AFTER); >+ generatedContent().updatePseudoElement(element, updates->afterPseudoElementUpdate, PseudoId::After); > > auto* renderer = element.renderer(); > if (!renderer) >@@ -317,13 +317,13 @@ void RenderTreeUpdater::updateElementRen > } > > // display:none cancels animations. >- auto teardownType = update.style->display() == NONE ? TeardownType::RendererUpdateCancelingAnimations : TeardownType::RendererUpdate; >+ auto teardownType = update.style->display() == DisplayType::None ? TeardownType::RendererUpdateCancelingAnimations : TeardownType::RendererUpdate; > tearDownRenderers(element, teardownType, m_builder); > > renderingParent().didCreateOrDestroyChildRenderer = true; > } > >- bool hasDisplayContents = update.style->display() == CONTENTS; >+ bool hasDisplayContents = update.style->display() == DisplayType::Contents; > if (hasDisplayContents) > element.storeDisplayContentsStyle(RenderStyle::clonePtr(*update.style)); > else >@@ -640,34 +640,34 @@ RenderView& RenderTreeUpdater::renderVie > } > > #if PLATFORM(IOS) >-static EVisibility elementImplicitVisibility(const Element& element) >+static Visibility elementImplicitVisibility(const Element& element) > { > auto* renderer = element.renderer(); > if (!renderer) >- return VISIBLE; >+ return Visibility::Visible; > > auto& style = renderer->style(); > > auto width = style.width(); > auto height = style.height(); > if ((width.isFixed() && width.value() <= 0) || (height.isFixed() && height.value() <= 0)) >- return HIDDEN; >+ return Visibility::Hidden; > > auto top = style.top(); > auto left = style.left(); > if (left.isFixed() && width.isFixed() && -left.value() >= width.value()) >- return HIDDEN; >+ return Visibility::Hidden; > > if (top.isFixed() && height.isFixed() && -top.value() >= height.value()) >- return HIDDEN; >- return VISIBLE; >+ return Visibility::Hidden; >+ return Visibility::Visible; > } > > CheckForVisibilityChange::CheckForVisibilityChange(const Element& element) > : m_element(element) >- , m_previousDisplay(element.renderStyle() ? element.renderStyle()->display() : NONE) >- , m_previousVisibility(element.renderStyle() ? element.renderStyle()->visibility() : HIDDEN) >- , m_previousImplicitVisibility(WKObservingContentChanges() && WKObservedContentChange() != WKContentVisibilityChange ? elementImplicitVisibility(element) : VISIBLE) >+ , m_previousDisplay(element.renderStyle() ? element.renderStyle()->display() : DisplayType::None) >+ , m_previousVisibility(element.renderStyle() ? element.renderStyle()->visibility() : Visibility::Hidden) >+ , m_previousImplicitVisibility(WKObservingContentChanges() && WKObservedContentChange() != WKContentVisibilityChange ? elementImplicitVisibility(element) : Visibility::Visible) > { > } > >@@ -680,8 +680,8 @@ CheckForVisibilityChange::~CheckForVisib > auto* style = m_element.renderStyle(); > if (!style) > return; >- if ((m_previousDisplay == NONE && style->display() != NONE) || (m_previousVisibility == HIDDEN && style->visibility() != HIDDEN) >- || (m_previousImplicitVisibility == HIDDEN && elementImplicitVisibility(m_element) == VISIBLE)) >+ if ((m_previousDisplay == DisplayType::None && style->display() != DisplayType::None) || (m_previousVisibility == Visibility::Hidden && style->visibility() != Visibility::Hidden) >+ || (m_previousImplicitVisibility == Visibility::Hidden && elementImplicitVisibility(m_element) == Visibility::Visible)) > WKSetObservedContentChange(WKContentVisibilityChange); > } > #endif >Index: Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp >=================================================================== >--- Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp (revision 232123) >+++ Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp (working copy) >@@ -91,14 +91,14 @@ static void updateStyleForContentRendere > > void RenderTreeUpdater::GeneratedContent::updatePseudoElement(Element& current, const std::optional<Style::ElementUpdate>& update, PseudoId pseudoId) > { >- PseudoElement* pseudoElement = pseudoId == BEFORE ? current.beforePseudoElement() : current.afterPseudoElement(); >+ PseudoElement* pseudoElement = pseudoId == PseudoId::Before ? current.beforePseudoElement() : current.afterPseudoElement(); > > if (auto* renderer = pseudoElement ? pseudoElement->renderer() : nullptr) > m_updater.renderTreePosition().invalidateNextSibling(*renderer); > > if (!needsPseudoElement(update)) { > if (pseudoElement) { >- if (pseudoId == BEFORE) >+ if (pseudoId == PseudoId::Before) > removeBeforePseudoElement(current, m_updater.m_builder); > else > removeAfterPseudoElement(current, m_updater.m_builder); >@@ -116,13 +116,13 @@ void RenderTreeUpdater::GeneratedContent > return; > > if (newPseudoElement) { >- if (pseudoId == BEFORE) >+ if (pseudoId == PseudoId::Before) > current.setBeforePseudoElement(newPseudoElement.releaseNonNull()); > else > current.setAfterPseudoElement(newPseudoElement.releaseNonNull()); > } > >- if (update->style->display() == CONTENTS) { >+ if (update->style->display() == DisplayType::Contents) { > // For display:contents we create an inline wrapper that inherits its > // style from the display:contents style. > auto contentsStyle = RenderStyle::createPtr(); >Index: Source/WebCore/style/InlineTextBoxStyle.cpp >=================================================================== >--- Source/WebCore/style/InlineTextBoxStyle.cpp (revision 232123) >+++ Source/WebCore/style/InlineTextBoxStyle.cpp (working copy) >@@ -119,7 +119,7 @@ GlyphOverflow visualOverflowForDecoratio > float height = lineStyle.fontCascade().fontMetrics().floatHeight(); > GlyphOverflow overflowResult; > >- if (decorationStyle == TextDecorationStyleWavy) { >+ if (decorationStyle == TextDecorationStyle::Wavy) { > getWavyStrokeParameters(lineStyle.computedFontPixelSize(), controlPointDistance, step); > wavyOffset = wavyOffsetFromDecoration(); > overflowResult.left = strokeThickness; >@@ -131,7 +131,7 @@ GlyphOverflow visualOverflowForDecoratio > // Compensate for the integral ceiling in GraphicsContext::computeLineBoundsAndAntialiasingModeForText() > int underlineOffset = 1; > underlineOffset += computeUnderlineOffset(lineStyle.textUnderlinePosition(), lineStyle.fontMetrics(), inlineTextBox, strokeThickness); >- if (decorationStyle == TextDecorationStyleWavy) { >+ if (decorationStyle == TextDecorationStyle::Wavy) { > extendIntToFloat(overflowResult.bottom, underlineOffset + wavyOffset + controlPointDistance + strokeThickness - height); > extendIntToFloat(overflowResult.top, -(underlineOffset + wavyOffset - controlPointDistance - strokeThickness)); > } else { >@@ -140,7 +140,7 @@ GlyphOverflow visualOverflowForDecoratio > } > } > if (decoration & TextDecorationOverline) { >- if (decorationStyle == TextDecorationStyleWavy) { >+ if (decorationStyle == TextDecorationStyle::Wavy) { > extendIntToFloat(overflowResult.bottom, -wavyOffset + controlPointDistance + strokeThickness - height); > extendIntToFloat(overflowResult.top, wavyOffset + controlPointDistance + strokeThickness); > } else { >@@ -150,7 +150,7 @@ GlyphOverflow visualOverflowForDecoratio > } > if (decoration & TextDecorationLineThrough) { > float baseline = lineStyle.fontMetrics().floatAscent(); >- if (decorationStyle == TextDecorationStyleWavy) { >+ if (decorationStyle == TextDecorationStyle::Wavy) { > extendIntToFloat(overflowResult.bottom, 2 * baseline / 3 + controlPointDistance + strokeThickness - height); > extendIntToFloat(overflowResult.top, -(2 * baseline / 3 - controlPointDistance - strokeThickness)); > } else { >Index: Source/WebCore/style/StyleChange.cpp >=================================================================== >--- Source/WebCore/style/StyleChange.cpp (revision 232123) >+++ Source/WebCore/style/StyleChange.cpp (working copy) >@@ -35,7 +35,7 @@ Change determineChange(const RenderStyle > { > if (s1.display() != s2.display()) > return Detach; >- if (s1.hasPseudoStyle(FIRST_LETTER) != s2.hasPseudoStyle(FIRST_LETTER)) >+ if (s1.hasPseudoStyle(PseudoId::FirstLetter) != s2.hasPseudoStyle(PseudoId::FirstLetter)) > return Detach; > // We just detach if a renderer acquires or loses a column-span, since spanning elements > // typically won't contain much content. >@@ -62,7 +62,7 @@ Change determineChange(const RenderStyle > // If the pseudoStyles have changed, we want any StyleChange that is not NoChange > // because setStyle will do the right thing with anything else. > if (s1.hasAnyPublicPseudoStyles()) { >- for (PseudoId pseudoId = FIRST_PUBLIC_PSEUDOID; pseudoId < FIRST_INTERNAL_PSEUDOID; pseudoId = static_cast<PseudoId>(pseudoId + 1)) { >+ for (PseudoId pseudoId = PseudoId::FirstPublicPseudoId; pseudoId < PseudoId::FirstInternalPseudoId; pseudoId = static_cast<PseudoId>(static_cast<unsigned>(pseudoId) + 1)) { > if (s1.hasPseudoStyle(pseudoId)) { > RenderStyle* ps2 = s2.getCachedPseudoStyle(pseudoId); > if (!ps2) >Index: Source/WebCore/style/StyleFontSizeFunctions.cpp >=================================================================== >--- Source/WebCore/style/StyleFontSizeFunctions.cpp (revision 232123) >+++ Source/WebCore/style/StyleFontSizeFunctions.cpp (working copy) >@@ -92,7 +92,7 @@ float computedFontSizeFromSpecifiedSize( > if (!useSVGZoomRules) { > zoomFactor = style->effectiveZoom(); > Frame* frame = document.frame(); >- if (frame && style->textZoom() != TextZoomReset) >+ if (frame && style->textZoom() != TextZoom::Reset) > zoomFactor *= frame->textZoomFactor(); > } > return computedFontSizeFromSpecifiedSize(specifiedSize, isAbsoluteSize, zoomFactor, useSVGZoomRules ? MinimumFontSizeRule::None : MinimumFontSizeRule::AbsoluteAndRelative, document.settings()); >Index: Source/WebCore/style/StyleResolveForDocument.cpp >=================================================================== >--- Source/WebCore/style/StyleResolveForDocument.cpp (revision 232123) >+++ Source/WebCore/style/StyleResolveForDocument.cpp (working copy) >@@ -58,8 +58,8 @@ RenderStyle resolveForDocument(const Doc > > auto documentStyle = RenderStyle::create(); > >- documentStyle.setDisplay(BLOCK); >- documentStyle.setRTLOrdering(document.visuallyOrdered() ? VisualOrder : LogicalOrder); >+ documentStyle.setDisplay(DisplayType::Block); >+ documentStyle.setRTLOrdering(document.visuallyOrdered() ? Order::Visual : Order::Logical); > documentStyle.setZoom(!document.printing() ? renderView.frame().pageZoomFactor() : 1); > documentStyle.setPageScaleTransform(renderView.frame().frameScaleFactor()); > FontCascadeDescription documentFontDescription = documentStyle.fontDescription(); >@@ -99,7 +99,7 @@ RenderStyle resolveForDocument(const Doc > renderView.updateColumnProgressionFromStyle(documentStyle); > if (renderView.page().paginationLineGridEnabled()) { > documentStyle.setLineGrid("-webkit-default-pagination-grid"); >- documentStyle.setLineSnap(LineSnapContain); >+ documentStyle.setLineSnap(LineSnap::Contain); > } > } > >Index: Source/WebCore/style/StyleSharingResolver.cpp >=================================================================== >--- Source/WebCore/style/StyleSharingResolver.cpp (revision 232123) >+++ Source/WebCore/style/StyleSharingResolver.cpp (working copy) >@@ -50,7 +50,7 @@ struct SharingResolver::Context { > const Update& update; > const StyledElement& element; > bool elementAffectedByClassRules; >- EInsideLink elementLinkState; >+ InsideLink elementLinkState; > }; > > SharingResolver::SharingResolver(const Document& document, const DocumentRuleSets& ruleSets, const SelectorFilter& selectorFilter) >Index: Source/WebCore/style/StyleTreeResolver.cpp >=================================================================== >--- Source/WebCore/style/StyleTreeResolver.cpp (revision 232123) >+++ Source/WebCore/style/StyleTreeResolver.cpp (working copy) >@@ -156,7 +156,7 @@ static bool affectsRenderedSubtree(Eleme > { > if (element.renderer()) > return true; >- if (newStyle.display() != NONE) >+ if (newStyle.display() != DisplayType::None) > return true; > if (element.rendererIsNeeded(newStyle)) > return true; >@@ -239,15 +239,15 @@ ElementUpdates TreeResolver::resolveElem > } > } > >- auto beforeUpdate = resolvePseudoStyle(element, update, BEFORE); >- auto afterUpdate = resolvePseudoStyle(element, update, AFTER); >+ auto beforeUpdate = resolvePseudoStyle(element, update, PseudoId::Before); >+ auto afterUpdate = resolvePseudoStyle(element, update, PseudoId::After); > > return { WTFMove(update), descendantsToResolve, WTFMove(beforeUpdate), WTFMove(afterUpdate) }; > } > > ElementUpdate TreeResolver::resolvePseudoStyle(Element& element, const ElementUpdate& elementUpdate, PseudoId pseudoId) > { >- if (elementUpdate.style->display() == NONE) >+ if (elementUpdate.style->display() == DisplayType::None) > return { }; > if (!elementUpdate.style->hasPseudoStyle(pseudoId)) > return { }; >@@ -256,11 +256,11 @@ ElementUpdate TreeResolver::resolvePseud > if (!pseudoStyle) > return { }; > >- PseudoElement* pseudoElement = pseudoId == BEFORE ? element.beforePseudoElement() : element.afterPseudoElement(); >+ PseudoElement* pseudoElement = pseudoId == PseudoId::Before ? element.beforePseudoElement() : element.afterPseudoElement(); > if (!pseudoElement) { > auto newPseudoElement = PseudoElement::create(element, pseudoId); > pseudoElement = newPseudoElement.ptr(); >- if (pseudoId == BEFORE) >+ if (pseudoId == PseudoId::Before) > element.setBeforePseudoElement(WTFMove(newPseudoElement)); > else > element.setAfterPseudoElement(WTFMove(newPseudoElement)); >@@ -274,9 +274,9 @@ const RenderStyle* TreeResolver::parentB > // 'display: contents' doesn't generate boxes. > for (unsigned i = m_parentStack.size(); i; --i) { > auto& parent = m_parentStack[i - 1]; >- if (parent.style.display() == NONE) >+ if (parent.style.display() == DisplayType::None) > return nullptr; >- if (parent.style.display() != CONTENTS) >+ if (parent.style.display() != DisplayType::Contents) > return &parent.style; > } > ASSERT_NOT_REACHED(); >@@ -433,7 +433,7 @@ static bool hasLoadingStylesheet(const S > > static std::unique_ptr<RenderStyle> createInheritedDisplayContentsStyleIfNeeded(const RenderStyle& parentElementStyle, const RenderStyle* parentBoxStyle) > { >- if (parentElementStyle.display() != CONTENTS) >+ if (parentElementStyle.display() != DisplayType::Contents) > return nullptr; > if (parentBoxStyle && !parentBoxStyle->inheritedNotEqual(&parentElementStyle)) > return nullptr; >@@ -465,7 +465,7 @@ void TreeResolver::resolveComposedTree() > if (is<Text>(node)) { > auto& text = downcast<Text>(node); > >- if ((text.styleValidity() >= Validity::SubtreeAndRenderersInvalid && parent.change != Detach) || parent.style.display() == CONTENTS) { >+ if ((text.styleValidity() >= Validity::SubtreeAndRenderersInvalid && parent.change != Detach) || parent.style.display() == DisplayType::Contents) { > TextUpdate textUpdate; > textUpdate.inheritedDisplayContentsStyle = createInheritedDisplayContentsStyleIfNeeded(parent.style, parentBoxStyle()); > >Index: Source/WebCore/svg/SVGElement.h >=================================================================== >--- Source/WebCore/svg/SVGElement.h (revision 232123) >+++ Source/WebCore/svg/SVGElement.h (working copy) >@@ -172,7 +172,7 @@ protected: > class InstanceInvalidationGuard; > > private: >- const RenderStyle* computedStyle(PseudoId = NOPSEUDO) final; >+ const RenderStyle* computedStyle(PseudoId = PseudoId::None) final; > > virtual void clearTarget() { } > >Index: Source/WebCore/svg/SVGGElement.cpp >=================================================================== >--- Source/WebCore/svg/SVGGElement.cpp (revision 232123) >+++ Source/WebCore/svg/SVGGElement.cpp (working copy) >@@ -93,7 +93,7 @@ RenderPtr<RenderElement> SVGGElement::cr > // We still have to create renderers for the <g> & <linearGradient> element, though the > // subtree may be hidden - we only want the resource renderers to exist so they can be > // referenced from somewhere else. >- if (style.display() == NONE) >+ if (style.display() == DisplayType::None) > return createRenderer<RenderSVGHiddenContainer>(*this, WTFMove(style)); > > return createRenderer<RenderSVGTransformableContainer>(*this, WTFMove(style)); >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 232123) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-05-22 Sam Weinig <sam@webkit.org> >+ >+ Modernize RenderStyleConstants.h - Part 2 >+ https://bugs.webkit.org/show_bug.cgi?id=185901 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebHTMLRepresentation.mm: >+ (searchForLabelsBeforeElement): >+ * WebView/WebView.mm: >+ (nsTextAlignmentFromRenderStyle): >+ > 2018-05-22 Chris Dumez <cdumez@apple.com> > > Regression(AsyncPolicyDelegates): Box.app login Window is blank >Index: Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm (revision 232123) >+++ Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm (working copy) >@@ -455,7 +455,7 @@ static NSString* searchForLabelsBeforeEl > 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: Source/WebKitLegacy/mac/WebView/WebView.mm >=================================================================== >--- Source/WebKitLegacy/mac/WebView/WebView.mm (revision 232123) >+++ Source/WebKitLegacy/mac/WebView/WebView.mm (working copy) >@@ -9799,25 +9799,25 @@ static NSTextAlignment nsTextAlignmentFr > { > NSTextAlignment textAlignment; > switch (style->textAlign()) { >- case RIGHT: >- case WEBKIT_RIGHT: >+ case TextAlignMode::Right: >+ case TextAlignMode::WebKitRight: > textAlignment = NSTextAlignmentRight; > break; >- case LEFT: >- case WEBKIT_LEFT: >+ case TextAlignMode::Left: >+ case TextAlignMode::WebKitLeft: > textAlignment = NSTextAlignmentLeft; > break; >- case CENTER: >- case WEBKIT_CENTER: >+ case TextAlignMode::Center: >+ case TextAlignMode::WebKitCenter: > textAlignment = NSTextAlignmentCenter; > break; >- case JUSTIFY: >+ case TextAlignMode::Justify: > textAlignment = NSTextAlignmentJustified; > break; >- case TASTART: >+ case TextAlignMode::Start: > textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentLeft : NSTextAlignmentRight; > break; >- case TAEND: >+ case TextAlignMode::End: > textAlignment = style->isLeftToRightDirection() ? NSTextAlignmentRight : NSTextAlignmentLeft; > break; > default:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185901
:
341069
|
341130
|
341150
|
341163
|
341176