Changeset 200098 in webkit


Ignore:
Timestamp:
Apr 26, 2016 11:20:09 AM (8 years ago)
Author:
Antti Koivisto
Message:

RenderElement::style() should return const RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=157016

Reviewed by Geoff Garen.

Style should be changed via setStyle, not by mutating it directly.

Pulling this string turns RenderStyle const in many places.

  • accessibility/AccessibilityObject.cpp:

(WebCore::startOfStyleRange):

  • accessibility/atk/WebKitAccessibleInterfaceText.cpp:

(getAttributeSetForAccessibilityObject):

  • bindings/objc/DOM.mm:

(-[DOMNode innerFrameQuad]):
(-[DOMNode computedFontSize]):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createPositionListForLayer):
(WebCore::positionOffsetValue):
(WebCore::ComputedStyleExtractor::currentColorOrValidColor):
(WebCore::getTransitionPropertyValue):
(WebCore::scrollSnapDestination):
(WebCore::scrollSnapPoints):
(WebCore::scrollSnapCoordinates):
(WebCore::logUnimplementedPropertyID):
(WebCore::fontFamilyFromStyle):
(WebCore::lineHeightFromStyle):
(WebCore::fontSizeFromStyle):
(WebCore::fontStyleFromStyle):
(WebCore::fontVariantFromStyle):
(WebCore::fontWeightFromStyle):
(WebCore::fontSynthesisFromStyle):
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::paddingOrMarginIsRendererDependent):
(WebCore::convertToRegionBreak):
(WebCore::isLayoutDependent):
(WebCore::updateStyleIfNeededForNode):
(WebCore::computeRenderStyleForProperty):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::CSSComputedStyleDeclaration::length):
(WebCore::CSSComputedStyleDeclaration::item):
(WebCore::ComputedStyleExtractor::propertyMatches):

  • css/CSSComputedStyleDeclaration.h:
  • css/CSSToLengthConversionData.cpp:

(WebCore::CSSToLengthConversionData::viewportWidthFactor):
(WebCore::CSSToLengthConversionData::viewportHeightFactor):
(WebCore::CSSToLengthConversionData::viewportMinFactor):
(WebCore::CSSToLengthConversionData::viewportMaxFactor):

  • css/CSSToLengthConversionData.h:

(WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
(WebCore::CSSToLengthConversionData::style):
(WebCore::CSSToLengthConversionData::rootStyle):
(WebCore::CSSToLengthConversionData::computingFontSize):
(WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):

  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::style):
(WebCore::CSSToStyleMap::rootElementStyle):

  • css/CSSToStyleMap.h:
  • css/MediaQueryEvaluator.cpp:

(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):

  • css/MediaQueryEvaluator.h:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/SourceSizeList.cpp:

(WebCore::match):
(WebCore::defaultLength):
(WebCore::computeLength):
(WebCore::parseSizesAttribute):

  • css/StyleBuilderCustom.h:

(WebCore::ApplyPropertyBorderImageModifier::applyValue):
(WebCore::ApplyPropertyBorderImageModifier::getValue):
(WebCore::StyleBuilderCustom::applyInheritClip):
(WebCore::StyleBuilderCustom::applyInheritCounter):
(WebCore::StyleBuilderCustom::applyValueContent):
(WebCore::StyleBuilderCustom::applyValueAlt):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::sweepMatchedPropertiesCache):
(WebCore::StyleResolver::State::State):
(WebCore::isAtShadowBoundary):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::keyframeStylesForAnimation):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::checkForTextSizeAdjust):
(WebCore::StyleResolver::checkForZoomChange):
(WebCore::StyleResolver::checkForGenericFamilyChange):

  • css/StyleResolver.h:

(WebCore::StyleResolver::style):
(WebCore::StyleResolver::parentStyle):
(WebCore::StyleResolver::rootElementStyle):
(WebCore::StyleResolver::element):
(WebCore::StyleResolver::document):
(WebCore::StyleResolver::documentSettings):
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::State::takeStyle):
(WebCore::StyleResolver::State::parentStyle):
(WebCore::StyleResolver::State::rootElementStyle):
(WebCore::StyleResolver::State::regionForStyling):
(WebCore::StyleResolver::State::elementLinkState):

  • dom/Document.cpp:

(WebCore::Document::updateLayoutIgnorePendingStylesheets):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::setVisuallyOrdered):
(WebCore::Document::createParser):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::styleResolver):
(WebCore::Element::resolveStyle):
(WebCore::checkForEmptyStyleChange):
(WebCore::checkForSiblingStyleChanges):
(WebCore::beforeOrAfterPseudoElement):
(WebCore::Element::existingComputedStyle):
(WebCore::Element::resolveComputedStyle):
(WebCore::Element::computedStyle):
(WebCore::Element::didDetachRenderers):
(WebCore::Element::resolveCustomStyle):

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::computeEditabilityFromComputedStyle):
(WebCore::Node::pseudoAwareLastChild):
(WebCore::Node::computedStyle):

  • dom/Node.h:
  • dom/NodeRenderStyle.h:

(WebCore::Node::renderStyle):

  • dom/PseudoElement.cpp:

(WebCore::PseudoElement::clearHostElement):
(WebCore::PseudoElement::resolveCustomStyle):

  • dom/PseudoElement.h:
  • editing/ApplyBlockElementCommand.cpp:

(WebCore::isNewLineAtPosition):
(WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
(WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
(WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):

  • editing/ApplyBlockElementCommand.h:
  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::init):
(WebCore::EditingStyle::removeTextFillAndStrokeColorsIfNeeded):

  • editing/EditingStyle.h:
  • editing/Editor.h:
  • editing/SimplifyMarkupCommand.cpp:

(WebCore::SimplifyMarkupCommand::doApply):

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::styleForSelectionStart):
(WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::fontForSelection):
(WebCore::Editor::fontAttributesForSelectionStart):

  • html/HTMLTitleElement.cpp:

(WebCore::HTMLTitleElement::computedTextWithDirection):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::FontProxy::fontsNeedUpdate):
(WebCore::CanvasRenderingContext2D::FontProxy::initialize):
(WebCore::CanvasRenderingContext2D::setFont):
(WebCore::CanvasRenderingContext2D::setTextBaseline):
(WebCore::CanvasRenderingContext2D::toTextDirection):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

  • html/canvas/CanvasRenderingContext2D.h:
  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::HTMLResourcePreloader::preload):
(WebCore::mediaAttributeMatches):

  • html/shadow/SliderThumbElement.cpp:

(WebCore::RenderSliderThumb::RenderSliderThumb):
(WebCore::RenderSliderThumb::updateAppearance):
(WebCore::RenderSliderContainer::layout):
(WebCore::SliderThumbElement::hostInput):
(WebCore::SliderThumbElement::resolveCustomStyle):
(WebCore::SliderContainerElement::createElementRenderer):
(WebCore::SliderContainerElement::resolveCustomStyle):

  • html/shadow/SliderThumbElement.h:
  • html/shadow/TextControlInnerElements.cpp:

(WebCore::TextControlInnerElement::create):
(WebCore::TextControlInnerElement::resolveCustomStyle):
(WebCore::TextControlInnerTextElement::renderer):
(WebCore::TextControlInnerTextElement::resolveCustomStyle):
(WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
(WebCore::TextControlPlaceholderElement::resolveCustomStyle):

  • html/shadow/TextControlInnerElements.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::selectCursor):

  • page/animation/AnimationBase.cpp:

(WebCore::solveStepsFunction):
(WebCore::AnimationBase::AnimationBase):

  • page/animation/AnimationBase.h:

(WebCore::AnimationBase::~AnimationBase):
(WebCore::AnimationBase::renderer):
(WebCore::AnimationBase::animation):
(WebCore::AnimationBase::setAnimation):

  • page/animation/AnimationController.cpp:

(WebCore::AnimationController::cancelAnimations):
(WebCore::AnimationController::updateAnimations):

  • page/animation/AnimationController.h:
  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::clearRenderer):
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::animate):

  • page/animation/CompositeAnimation.h:
  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::ImplicitAnimation):
(WebCore::ImplicitAnimation::shouldSendEventForListener):
(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::sendTransitionEvent):
(WebCore::ImplicitAnimation::reset):

  • page/animation/ImplicitAnimation.h:

(WebCore::ImplicitAnimation::create):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
(WebCore::KeyframeAnimation::animate):

  • page/animation/KeyframeAnimation.h:
  • page/ios/FrameIOS.mm:

(WebCore::ancestorRespondingToScrollWheelEvents):

  • rendering/FlowThreadController.cpp:

(WebCore::FlowThreadController::styleDidChange):

  • rendering/InlineFlowBox.cpp:

(WebCore::clipRectForNinePieceImageStrip):

  • rendering/RenderBlock.cpp:

(WebCore::RenderBlock::styleDidChange):
(WebCore::RenderBlock::lineHeight):
(WebCore::RenderBlock::firstLineBlock):
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
(WebCore::calculateMinimumPageHeight):
(WebCore::RenderBlockFlow::adjustComputedFontSizes):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::borderRadii):
(WebCore::RenderBox::enclosingFloatPaintingLayer):
(WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
(WebCore::RenderBox::visualOverflowRectForPropagation):
(WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
(WebCore::RenderBox::layoutOverflowRectForPropagation):

  • rendering/RenderBox.h:

(WebCore::RenderBox::applyTopLeftLocationOffset):
(WebCore::RenderBox::hasRenderOverflow):
(WebCore::RenderBox::hasVisualOverflow):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
(WebCore::applyBoxShadowForBackground):

  • rendering/RenderButton.cpp:

(WebCore::RenderButton::addChild):
(WebCore::RenderButton::styleWillChange):
(WebCore::RenderButton::styleDidChange):
(WebCore::RenderButton::setupInnerStyle):
(WebCore::RenderButton::layout):

  • rendering/RenderDeprecatedFlexibleBox.cpp:

(WebCore::RenderDeprecatedFlexibleBox::styleWillChange):

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::createFor):
(WebCore::RenderElement::uncachedFirstLineStyle):
(WebCore::RenderElement::cachedFirstLineStyle):
(WebCore::RenderElement::firstLineStyle):
(WebCore::RenderElement::styleWillChange):
(WebCore::RenderElement::addControlStatesForRenderer):
(WebCore::RenderElement::getCachedPseudoStyle):
(WebCore::RenderElement::getMutableCachedPseudoStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::paintOutline):

  • rendering/RenderElement.h:

(WebCore::RenderElement::hasInitializedStyle):
(WebCore::RenderElement::style):
(WebCore::RenderElement::mutableStyle):
(WebCore::RenderElement::element):
(WebCore::RenderObject::isRenderInline):
(WebCore::RenderObject::style):
(WebCore::RenderObject::firstLineStyle):

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::layout):

  • rendering/RenderFlowThread.cpp:

(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::createFlowThreadStyle):

  • rendering/RenderFlowThread.h:
  • rendering/RenderImage.cpp:

(WebCore::RenderImage::layoutShadowControls):

  • rendering/RenderInline.cpp:

(WebCore::RenderInline::styleDidChange):
(WebCore::RenderInline::updateAlwaysCreateLineBoxes):
(WebCore::RenderInline::paintOutline):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::setupClipPath):

  • rendering/RenderListBox.cpp:

(WebCore::RenderListBox::paintScrollbar):
(WebCore::itemOffsetForAlignment):
(WebCore::RenderListBox::paintItemForeground):
(WebCore::RenderListBox::paintItemBackground):

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::updateMargins):
(WebCore::RenderListMarker::lineHeight):

  • rendering/RenderMarquee.cpp:

(WebCore::RenderMarquee::computePosition):
(WebCore::RenderMarquee::updateMarqueeStyle):

  • rendering/RenderMenuList.cpp:

(WebCore::RenderMenuList::adjustInnerStyle):
(RenderMenuList::updateOptionsWidth):
(RenderMenuList::itemStyle):

  • rendering/RenderMultiColumnFlowThread.cpp:

(WebCore::isValidColumnSpanner):

  • rendering/RenderMultiColumnSpannerPlaceholder.cpp:

(WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):

  • rendering/RenderMultiColumnSpannerPlaceholder.h:
  • rendering/RenderNamedFlowFragment.cpp:

(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):

  • rendering/RenderNamedFlowFragment.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::innerLineHeight):
(WebCore::decorationColor):
(WebCore::RenderObject::getTextDecorationColorsAndStyles):

  • rendering/RenderObject.h:

(WebCore::RenderObject::minPreferredLogicalWidth):
(WebCore::RenderObject::maxPreferredLogicalWidth):

  • rendering/RenderTable.cpp:

(WebCore::RenderTable::computePreferredLogicalWidths):

  • rendering/RenderTableSection.cpp:

(WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
(WebCore::physicalBorderForDirection):

  • rendering/RenderText.h:

(WebCore::RenderText::characterAt):
(WebCore::RenderText::style):
(WebCore::RenderText::firstLineStyle):
(WebCore::RenderText::getCachedPseudoStyle):

  • rendering/RenderTextControl.cpp:

(WebCore::RenderTextControl::styleDidChange):

  • rendering/RenderTextControlMultiLine.cpp:

(WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):

  • rendering/RenderTextControlSingleLine.cpp:

(WebCore::RenderTextControlSingleLine::layout):
(WebCore::RenderTextControlSingleLine::styleDidChange):

  • rendering/RenderTextFragment.cpp:

(WebCore::RenderTextFragment::styleDidChange):

  • rendering/RenderThemeGtk.cpp:

(WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
(WebCore::borderRadiiFromStyle):
(WebCore::RenderThemeGtk::paintMediaSliderTrack):
(WebCore::RenderThemeGtk::paintMediaSliderThumb):
(WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::paintFlow):
(WebCore::SimpleLineLayout::hitTestFlow):

  • rendering/TextAutoSizing.cpp:

(WebCore::TextAutoSizingKey::TextAutoSizingKey):

  • rendering/TextAutoSizing.h:

(WebCore::TextAutoSizingKey::style):
(WebCore::TextAutoSizingKey::isDeleted):

  • rendering/TextPaintStyle.cpp:

(WebCore::computeTextSelectionPaintStyle):

  • rendering/line/BreakingContext.h:
  • rendering/mathml/RenderMathMLRoot.cpp:

(WebCore::RenderMathMLRoot::layout):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::setColumnRuleWidth):
(WebCore::RenderStyle::resetColumnRule):
(WebCore::RenderStyle::setColumnSpan):
(WebCore::RenderStyle::inheritColumnPropertiesFrom):
(WebCore::RenderStyle::setTransform):
(WebCore::RenderStyle::setTransformOriginX):
(WebCore::RenderStyle::setTransformOriginY):

  • rendering/svg/SVGInlineTextBox.cpp:

(WebCore::SVGInlineTextBox::positionForOffset):
(WebCore::SVGInlineTextBox::selectionRectForTextFragment):
(WebCore::SVGInlineTextBox::localSelectionRect):
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::acquirePaintingResource):
(WebCore::SVGInlineTextBox::releasePaintingResource):
(WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
(WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
(WebCore::SVGInlineTextBox::constructTextRun):
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::paintText):

  • rendering/svg/SVGInlineTextBox.h:
  • rendering/svg/SVGPathData.cpp:

(WebCore::updatePathFromCircleElement):
(WebCore::updatePathFromEllipseElement):
(WebCore::updatePathFromRectElement):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::Parent::Parent):
(WebCore::Style::TreeResolver::popScope):
(WebCore::Style::TreeResolver::styleForElement):
(WebCore::Style::TreeResolver::pushParent):
(WebCore::Style::TreeResolver::resolveComposedTree):

  • style/StyleTreeResolver.h:

(WebCore::Style::TreeResolver::scope):

  • style/StyleUpdate.cpp:

(WebCore::Style::Update::textUpdate):
(WebCore::Style::Update::elementStyle):
(WebCore::Style::Update::addElement):

  • style/StyleUpdate.h:

(WebCore::Style::Update::document):

  • svg/SVGElement.cpp:

(WebCore::SVGElement::synchronizeSystemLanguage):
(WebCore::SVGElement::resolveCustomStyle):
(WebCore::SVGElement::setUseOverrideComputedStyle):
(WebCore::SVGElement::computedStyle):

  • svg/SVGElement.h:
  • svg/SVGElementRareData.h:

(WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
(WebCore::SVGElementRareData::overrideComputedStyle):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::animatedLocalTransform):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits):
(WebCore::renderStyleForLengthResolving):
(WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
(WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):
(WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS):
(WebCore::SVGLengthContext::convertValueFromEXSToUserUnits):

  • svg/SVGStopElement.cpp:

(WebCore::SVGStopElement::stopColorIncludingOpacity):

  • svg/SVGTextElement.cpp:

(WebCore::SVGTextElement::animatedLocalTransform):

Location:
trunk/Source
Files:
117 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r200094 r200098  
     12016-04-26  Antti Koivisto  <antti@apple.com>
     2
     3        RenderElement::style() should return const RenderStyle
     4        https://bugs.webkit.org/show_bug.cgi?id=157016
     5
     6        Reviewed by Geoff Garen.
     7
     8        Style should be changed via setStyle, not by mutating it directly.
     9
     10        Pulling this string turns RenderStyle const in many places.
     11
     12        * accessibility/AccessibilityObject.cpp:
     13        (WebCore::startOfStyleRange):
     14        * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
     15        (getAttributeSetForAccessibilityObject):
     16        * bindings/objc/DOM.mm:
     17        (-[DOMNode innerFrameQuad]):
     18        (-[DOMNode computedFontSize]):
     19        * css/CSSComputedStyleDeclaration.cpp:
     20        (WebCore::createPositionListForLayer):
     21        (WebCore::positionOffsetValue):
     22        (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
     23        (WebCore::getTransitionPropertyValue):
     24        (WebCore::scrollSnapDestination):
     25        (WebCore::scrollSnapPoints):
     26        (WebCore::scrollSnapCoordinates):
     27        (WebCore::logUnimplementedPropertyID):
     28        (WebCore::fontFamilyFromStyle):
     29        (WebCore::lineHeightFromStyle):
     30        (WebCore::fontSizeFromStyle):
     31        (WebCore::fontStyleFromStyle):
     32        (WebCore::fontVariantFromStyle):
     33        (WebCore::fontWeightFromStyle):
     34        (WebCore::fontSynthesisFromStyle):
     35        (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
     36        (WebCore::paddingOrMarginIsRendererDependent):
     37        (WebCore::convertToRegionBreak):
     38        (WebCore::isLayoutDependent):
     39        (WebCore::updateStyleIfNeededForNode):
     40        (WebCore::computeRenderStyleForProperty):
     41        (WebCore::ComputedStyleExtractor::propertyValue):
     42        (WebCore::CSSComputedStyleDeclaration::length):
     43        (WebCore::CSSComputedStyleDeclaration::item):
     44        (WebCore::ComputedStyleExtractor::propertyMatches):
     45        * css/CSSComputedStyleDeclaration.h:
     46        * css/CSSToLengthConversionData.cpp:
     47        (WebCore::CSSToLengthConversionData::viewportWidthFactor):
     48        (WebCore::CSSToLengthConversionData::viewportHeightFactor):
     49        (WebCore::CSSToLengthConversionData::viewportMinFactor):
     50        (WebCore::CSSToLengthConversionData::viewportMaxFactor):
     51        * css/CSSToLengthConversionData.h:
     52        (WebCore::CSSToLengthConversionData::CSSToLengthConversionData):
     53        (WebCore::CSSToLengthConversionData::style):
     54        (WebCore::CSSToLengthConversionData::rootStyle):
     55        (WebCore::CSSToLengthConversionData::computingFontSize):
     56        (WebCore::CSSToLengthConversionData::copyWithAdjustedZoom):
     57        * css/CSSToStyleMap.cpp:
     58        (WebCore::CSSToStyleMap::style):
     59        (WebCore::CSSToStyleMap::rootElementStyle):
     60        * css/CSSToStyleMap.h:
     61        * css/MediaQueryEvaluator.cpp:
     62        (WebCore::MediaQueryEvaluator::MediaQueryEvaluator):
     63        * css/MediaQueryEvaluator.h:
     64        * css/SVGCSSComputedStyleDeclaration.cpp:
     65        (WebCore::strokeDashArrayToCSSValueList):
     66        (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
     67        (WebCore::ComputedStyleExtractor::svgPropertyValue):
     68        * css/SourceSizeList.cpp:
     69        (WebCore::match):
     70        (WebCore::defaultLength):
     71        (WebCore::computeLength):
     72        (WebCore::parseSizesAttribute):
     73        * css/StyleBuilderCustom.h:
     74        (WebCore::ApplyPropertyBorderImageModifier::applyValue):
     75        (WebCore::ApplyPropertyBorderImageModifier::getValue):
     76        (WebCore::StyleBuilderCustom::applyInheritClip):
     77        (WebCore::StyleBuilderCustom::applyInheritCounter):
     78        (WebCore::StyleBuilderCustom::applyValueContent):
     79        (WebCore::StyleBuilderCustom::applyValueAlt):
     80        * css/StyleResolver.cpp:
     81        (WebCore::StyleResolver::sweepMatchedPropertiesCache):
     82        (WebCore::StyleResolver::State::State):
     83        (WebCore::isAtShadowBoundary):
     84        (WebCore::StyleResolver::styleForElement):
     85        (WebCore::StyleResolver::keyframeStylesForAnimation):
     86        (WebCore::StyleResolver::pseudoStyleForElement):
     87        (WebCore::StyleResolver::applyProperty):
     88        (WebCore::StyleResolver::checkForTextSizeAdjust):
     89        (WebCore::StyleResolver::checkForZoomChange):
     90        (WebCore::StyleResolver::checkForGenericFamilyChange):
     91        * css/StyleResolver.h:
     92        (WebCore::StyleResolver::style):
     93        (WebCore::StyleResolver::parentStyle):
     94        (WebCore::StyleResolver::rootElementStyle):
     95        (WebCore::StyleResolver::element):
     96        (WebCore::StyleResolver::document):
     97        (WebCore::StyleResolver::documentSettings):
     98        (WebCore::StyleResolver::State::State):
     99        (WebCore::StyleResolver::State::takeStyle):
     100        (WebCore::StyleResolver::State::parentStyle):
     101        (WebCore::StyleResolver::State::rootElementStyle):
     102        (WebCore::StyleResolver::State::regionForStyling):
     103        (WebCore::StyleResolver::State::elementLinkState):
     104        * dom/Document.cpp:
     105        (WebCore::Document::updateLayoutIgnorePendingStylesheets):
     106        (WebCore::Document::styleForElementIgnoringPendingStylesheets):
     107        (WebCore::Document::setVisuallyOrdered):
     108        (WebCore::Document::createParser):
     109        * dom/Document.h:
     110        * dom/Element.cpp:
     111        (WebCore::Element::styleResolver):
     112        (WebCore::Element::resolveStyle):
     113        (WebCore::checkForEmptyStyleChange):
     114        (WebCore::checkForSiblingStyleChanges):
     115        (WebCore::beforeOrAfterPseudoElement):
     116        (WebCore::Element::existingComputedStyle):
     117        (WebCore::Element::resolveComputedStyle):
     118        (WebCore::Element::computedStyle):
     119        (WebCore::Element::didDetachRenderers):
     120        (WebCore::Element::resolveCustomStyle):
     121        * dom/Element.h:
     122        * dom/Node.cpp:
     123        (WebCore::computeEditabilityFromComputedStyle):
     124        (WebCore::Node::pseudoAwareLastChild):
     125        (WebCore::Node::computedStyle):
     126        * dom/Node.h:
     127        * dom/NodeRenderStyle.h:
     128        (WebCore::Node::renderStyle):
     129        * dom/PseudoElement.cpp:
     130        (WebCore::PseudoElement::clearHostElement):
     131        (WebCore::PseudoElement::resolveCustomStyle):
     132        * dom/PseudoElement.h:
     133        * editing/ApplyBlockElementCommand.cpp:
     134        (WebCore::isNewLineAtPosition):
     135        (WebCore::ApplyBlockElementCommand::renderStyleOfEnclosingTextNode):
     136        (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded):
     137        (WebCore::ApplyBlockElementCommand::endOfNextParagraphSplittingTextNodesIfNeeded):
     138        * editing/ApplyBlockElementCommand.h:
     139        * editing/EditingStyle.cpp:
     140        (WebCore::EditingStyle::init):
     141        (WebCore::EditingStyle::removeTextFillAndStrokeColorsIfNeeded):
     142        * editing/EditingStyle.h:
     143        * editing/Editor.h:
     144        * editing/SimplifyMarkupCommand.cpp:
     145        (WebCore::SimplifyMarkupCommand::doApply):
     146        * editing/cocoa/EditorCocoa.mm:
     147        (WebCore::Editor::styleForSelectionStart):
     148        (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle):
     149        * editing/ios/EditorIOS.mm:
     150        (WebCore::Editor::fontForSelection):
     151        (WebCore::Editor::fontAttributesForSelectionStart):
     152        * editing/mac/EditorMac.mm:
     153        (WebCore::Editor::fontForSelection):
     154        (WebCore::Editor::fontAttributesForSelectionStart):
     155        * html/HTMLTitleElement.cpp:
     156        (WebCore::HTMLTitleElement::computedTextWithDirection):
     157        * html/canvas/CanvasRenderingContext2D.cpp:
     158        (WebCore::CanvasRenderingContext2D::FontProxy::fontsNeedUpdate):
     159        (WebCore::CanvasRenderingContext2D::FontProxy::initialize):
     160        (WebCore::CanvasRenderingContext2D::setFont):
     161        (WebCore::CanvasRenderingContext2D::setTextBaseline):
     162        (WebCore::CanvasRenderingContext2D::toTextDirection):
     163        (WebCore::CanvasRenderingContext2D::drawTextInternal):
     164        * html/canvas/CanvasRenderingContext2D.h:
     165        * html/parser/HTMLResourcePreloader.cpp:
     166        (WebCore::HTMLResourcePreloader::preload):
     167        (WebCore::mediaAttributeMatches):
     168        * html/shadow/SliderThumbElement.cpp:
     169        (WebCore::RenderSliderThumb::RenderSliderThumb):
     170        (WebCore::RenderSliderThumb::updateAppearance):
     171        (WebCore::RenderSliderContainer::layout):
     172        (WebCore::SliderThumbElement::hostInput):
     173        (WebCore::SliderThumbElement::resolveCustomStyle):
     174        (WebCore::SliderContainerElement::createElementRenderer):
     175        (WebCore::SliderContainerElement::resolveCustomStyle):
     176        * html/shadow/SliderThumbElement.h:
     177        * html/shadow/TextControlInnerElements.cpp:
     178        (WebCore::TextControlInnerElement::create):
     179        (WebCore::TextControlInnerElement::resolveCustomStyle):
     180        (WebCore::TextControlInnerTextElement::renderer):
     181        (WebCore::TextControlInnerTextElement::resolveCustomStyle):
     182        (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):
     183        (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
     184        * html/shadow/TextControlInnerElements.h:
     185        * page/EventHandler.cpp:
     186        (WebCore::EventHandler::selectCursor):
     187        * page/animation/AnimationBase.cpp:
     188        (WebCore::solveStepsFunction):
     189        (WebCore::AnimationBase::AnimationBase):
     190        * page/animation/AnimationBase.h:
     191        (WebCore::AnimationBase::~AnimationBase):
     192        (WebCore::AnimationBase::renderer):
     193        (WebCore::AnimationBase::animation):
     194        (WebCore::AnimationBase::setAnimation):
     195        * page/animation/AnimationController.cpp:
     196        (WebCore::AnimationController::cancelAnimations):
     197        (WebCore::AnimationController::updateAnimations):
     198        * page/animation/AnimationController.h:
     199        * page/animation/CompositeAnimation.cpp:
     200        (WebCore::CompositeAnimation::clearRenderer):
     201        (WebCore::CompositeAnimation::updateTransitions):
     202        (WebCore::CompositeAnimation::updateKeyframeAnimations):
     203        (WebCore::CompositeAnimation::animate):
     204        * page/animation/CompositeAnimation.h:
     205        * page/animation/ImplicitAnimation.cpp:
     206        (WebCore::ImplicitAnimation::ImplicitAnimation):
     207        (WebCore::ImplicitAnimation::shouldSendEventForListener):
     208        (WebCore::ImplicitAnimation::animate):
     209        (WebCore::ImplicitAnimation::sendTransitionEvent):
     210        (WebCore::ImplicitAnimation::reset):
     211        * page/animation/ImplicitAnimation.h:
     212        (WebCore::ImplicitAnimation::create):
     213        * page/animation/KeyframeAnimation.cpp:
     214        (WebCore::KeyframeAnimation::KeyframeAnimation):
     215        (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
     216        (WebCore::KeyframeAnimation::animate):
     217        * page/animation/KeyframeAnimation.h:
     218        * page/ios/FrameIOS.mm:
     219        (WebCore::ancestorRespondingToScrollWheelEvents):
     220        * rendering/FlowThreadController.cpp:
     221        (WebCore::FlowThreadController::styleDidChange):
     222        * rendering/InlineFlowBox.cpp:
     223        (WebCore::clipRectForNinePieceImageStrip):
     224        * rendering/RenderBlock.cpp:
     225        (WebCore::RenderBlock::styleDidChange):
     226        (WebCore::RenderBlock::lineHeight):
     227        (WebCore::RenderBlock::firstLineBlock):
     228        (WebCore::styleForFirstLetter):
     229        (WebCore::RenderBlock::updateFirstLetterStyle):
     230        (WebCore::RenderBlock::createFirstLetterRenderer):
     231        * rendering/RenderBlockFlow.cpp:
     232        (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
     233        (WebCore::calculateMinimumPageHeight):
     234        (WebCore::RenderBlockFlow::adjustComputedFontSizes):
     235        * rendering/RenderBox.cpp:
     236        (WebCore::RenderBox::styleDidChange):
     237        (WebCore::RenderBox::borderRadii):
     238        (WebCore::RenderBox::enclosingFloatPaintingLayer):
     239        (WebCore::RenderBox::logicalVisualOverflowRectForPropagation):
     240        (WebCore::RenderBox::visualOverflowRectForPropagation):
     241        (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation):
     242        (WebCore::RenderBox::layoutOverflowRectForPropagation):
     243        * rendering/RenderBox.h:
     244        (WebCore::RenderBox::applyTopLeftLocationOffset):
     245        (WebCore::RenderBox::hasRenderOverflow):
     246        (WebCore::RenderBox::hasVisualOverflow):
     247        * rendering/RenderBoxModelObject.cpp:
     248        (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
     249        (WebCore::applyBoxShadowForBackground):
     250        * rendering/RenderButton.cpp:
     251        (WebCore::RenderButton::addChild):
     252        (WebCore::RenderButton::styleWillChange):
     253        (WebCore::RenderButton::styleDidChange):
     254        (WebCore::RenderButton::setupInnerStyle):
     255        (WebCore::RenderButton::layout):
     256        * rendering/RenderDeprecatedFlexibleBox.cpp:
     257        (WebCore::RenderDeprecatedFlexibleBox::styleWillChange):
     258        * rendering/RenderElement.cpp:
     259        (WebCore::RenderElement::createFor):
     260        (WebCore::RenderElement::uncachedFirstLineStyle):
     261        (WebCore::RenderElement::cachedFirstLineStyle):
     262        (WebCore::RenderElement::firstLineStyle):
     263        (WebCore::RenderElement::styleWillChange):
     264        (WebCore::RenderElement::addControlStatesForRenderer):
     265        (WebCore::RenderElement::getCachedPseudoStyle):
     266        (WebCore::RenderElement::getMutableCachedPseudoStyle):
     267        (WebCore::RenderElement::getUncachedPseudoStyle):
     268        (WebCore::RenderElement::paintOutline):
     269        * rendering/RenderElement.h:
     270        (WebCore::RenderElement::hasInitializedStyle):
     271        (WebCore::RenderElement::style):
     272        (WebCore::RenderElement::mutableStyle):
     273        (WebCore::RenderElement::element):
     274        (WebCore::RenderObject::isRenderInline):
     275        (WebCore::RenderObject::style):
     276        (WebCore::RenderObject::firstLineStyle):
     277        * rendering/RenderEmbeddedObject.cpp:
     278        (WebCore::RenderEmbeddedObject::layout):
     279        * rendering/RenderFlowThread.cpp:
     280        (WebCore::RenderFlowThread::RenderFlowThread):
     281        (WebCore::RenderFlowThread::createFlowThreadStyle):
     282        * rendering/RenderFlowThread.h:
     283        * rendering/RenderImage.cpp:
     284        (WebCore::RenderImage::layoutShadowControls):
     285        * rendering/RenderInline.cpp:
     286        (WebCore::RenderInline::styleDidChange):
     287        (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
     288        (WebCore::RenderInline::paintOutline):
     289        * rendering/RenderLayer.cpp:
     290        (WebCore::RenderLayer::setupClipPath):
     291        * rendering/RenderListBox.cpp:
     292        (WebCore::RenderListBox::paintScrollbar):
     293        (WebCore::itemOffsetForAlignment):
     294        (WebCore::RenderListBox::paintItemForeground):
     295        (WebCore::RenderListBox::paintItemBackground):
     296        * rendering/RenderListMarker.cpp:
     297        (WebCore::RenderListMarker::updateMargins):
     298        (WebCore::RenderListMarker::lineHeight):
     299        * rendering/RenderMarquee.cpp:
     300        (WebCore::RenderMarquee::computePosition):
     301        (WebCore::RenderMarquee::updateMarqueeStyle):
     302        * rendering/RenderMenuList.cpp:
     303        (WebCore::RenderMenuList::adjustInnerStyle):
     304        (RenderMenuList::updateOptionsWidth):
     305        (RenderMenuList::itemStyle):
     306        * rendering/RenderMultiColumnFlowThread.cpp:
     307        (WebCore::isValidColumnSpanner):
     308        * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
     309        (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
     310        * rendering/RenderMultiColumnSpannerPlaceholder.h:
     311        * rendering/RenderNamedFlowFragment.cpp:
     312        (WebCore::RenderNamedFlowFragment::checkRegionStyle):
     313        (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
     314        * rendering/RenderNamedFlowFragment.h:
     315        * rendering/RenderObject.cpp:
     316        (WebCore::RenderObject::innerLineHeight):
     317        (WebCore::decorationColor):
     318        (WebCore::RenderObject::getTextDecorationColorsAndStyles):
     319        * rendering/RenderObject.h:
     320        (WebCore::RenderObject::minPreferredLogicalWidth):
     321        (WebCore::RenderObject::maxPreferredLogicalWidth):
     322        * rendering/RenderTable.cpp:
     323        (WebCore::RenderTable::computePreferredLogicalWidths):
     324        * rendering/RenderTableSection.cpp:
     325        (WebCore::RenderTableSection::paintRowGroupBorderIfRequired):
     326        (WebCore::physicalBorderForDirection):
     327        * rendering/RenderText.h:
     328        (WebCore::RenderText::characterAt):
     329        (WebCore::RenderText::style):
     330        (WebCore::RenderText::firstLineStyle):
     331        (WebCore::RenderText::getCachedPseudoStyle):
     332        * rendering/RenderTextControl.cpp:
     333        (WebCore::RenderTextControl::styleDidChange):
     334        * rendering/RenderTextControlMultiLine.cpp:
     335        (WebCore::RenderTextControlMultiLine::layoutSpecialExcludedChild):
     336        * rendering/RenderTextControlSingleLine.cpp:
     337        (WebCore::RenderTextControlSingleLine::layout):
     338        (WebCore::RenderTextControlSingleLine::styleDidChange):
     339        * rendering/RenderTextFragment.cpp:
     340        (WebCore::RenderTextFragment::styleDidChange):
     341        * rendering/RenderThemeGtk.cpp:
     342        (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
     343        (WebCore::borderRadiiFromStyle):
     344        (WebCore::RenderThemeGtk::paintMediaSliderTrack):
     345        (WebCore::RenderThemeGtk::paintMediaSliderThumb):
     346        (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
     347        * rendering/SimpleLineLayoutFunctions.cpp:
     348        (WebCore::SimpleLineLayout::paintFlow):
     349        (WebCore::SimpleLineLayout::hitTestFlow):
     350        * rendering/TextAutoSizing.cpp:
     351        (WebCore::TextAutoSizingKey::TextAutoSizingKey):
     352        * rendering/TextAutoSizing.h:
     353        (WebCore::TextAutoSizingKey::style):
     354        (WebCore::TextAutoSizingKey::isDeleted):
     355        * rendering/TextPaintStyle.cpp:
     356        (WebCore::computeTextSelectionPaintStyle):
     357        * rendering/line/BreakingContext.h:
     358        * rendering/mathml/RenderMathMLRoot.cpp:
     359        (WebCore::RenderMathMLRoot::layout):
     360        * rendering/style/RenderStyle.h:
     361        (WebCore::RenderStyle::setColumnRuleWidth):
     362        (WebCore::RenderStyle::resetColumnRule):
     363        (WebCore::RenderStyle::setColumnSpan):
     364        (WebCore::RenderStyle::inheritColumnPropertiesFrom):
     365        (WebCore::RenderStyle::setTransform):
     366        (WebCore::RenderStyle::setTransformOriginX):
     367        (WebCore::RenderStyle::setTransformOriginY):
     368        * rendering/svg/SVGInlineTextBox.cpp:
     369        (WebCore::SVGInlineTextBox::positionForOffset):
     370        (WebCore::SVGInlineTextBox::selectionRectForTextFragment):
     371        (WebCore::SVGInlineTextBox::localSelectionRect):
     372        (WebCore::SVGInlineTextBox::paintSelectionBackground):
     373        (WebCore::SVGInlineTextBox::paint):
     374        (WebCore::SVGInlineTextBox::acquirePaintingResource):
     375        (WebCore::SVGInlineTextBox::releasePaintingResource):
     376        (WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
     377        (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
     378        (WebCore::SVGInlineTextBox::constructTextRun):
     379        (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
     380        (WebCore::SVGInlineTextBox::paintTextWithShadows):
     381        (WebCore::SVGInlineTextBox::paintText):
     382        * rendering/svg/SVGInlineTextBox.h:
     383        * rendering/svg/SVGPathData.cpp:
     384        (WebCore::updatePathFromCircleElement):
     385        (WebCore::updatePathFromEllipseElement):
     386        (WebCore::updatePathFromRectElement):
     387        * rendering/svg/SVGRenderingContext.cpp:
     388        (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
     389        * style/StyleTreeResolver.cpp:
     390        (WebCore::Style::TreeResolver::Parent::Parent):
     391        (WebCore::Style::TreeResolver::popScope):
     392        (WebCore::Style::TreeResolver::styleForElement):
     393        (WebCore::Style::TreeResolver::pushParent):
     394        (WebCore::Style::TreeResolver::resolveComposedTree):
     395        * style/StyleTreeResolver.h:
     396        (WebCore::Style::TreeResolver::scope):
     397        * style/StyleUpdate.cpp:
     398        (WebCore::Style::Update::textUpdate):
     399        (WebCore::Style::Update::elementStyle):
     400        (WebCore::Style::Update::addElement):
     401        * style/StyleUpdate.h:
     402        (WebCore::Style::Update::document):
     403        * svg/SVGElement.cpp:
     404        (WebCore::SVGElement::synchronizeSystemLanguage):
     405        (WebCore::SVGElement::resolveCustomStyle):
     406        (WebCore::SVGElement::setUseOverrideComputedStyle):
     407        (WebCore::SVGElement::computedStyle):
     408        * svg/SVGElement.h:
     409        * svg/SVGElementRareData.h:
     410        (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
     411        (WebCore::SVGElementRareData::overrideComputedStyle):
     412        * svg/SVGGraphicsElement.cpp:
     413        (WebCore::SVGGraphicsElement::animatedLocalTransform):
     414        * svg/SVGLengthContext.cpp:
     415        (WebCore::SVGLengthContext::convertValueFromPercentageToUserUnits):
     416        (WebCore::renderStyleForLengthResolving):
     417        (WebCore::SVGLengthContext::convertValueFromUserUnitsToEMS):
     418        (WebCore::SVGLengthContext::convertValueFromEMSToUserUnits):
     419        (WebCore::SVGLengthContext::convertValueFromUserUnitsToEXS):
     420        (WebCore::SVGLengthContext::convertValueFromEXSToUserUnits):
     421        * svg/SVGStopElement.cpp:
     422        (WebCore::SVGStopElement::stopColorIncludingOpacity):
     423        * svg/SVGTextElement.cpp:
     424        (WebCore::SVGTextElement::animatedLocalTransform):
     425
    14262016-04-26  Myles C. Maxfield  <mmaxfield@apple.com>
    2427
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r199817 r200098  
    11351135    RenderObject* renderer = visiblePos.deepEquivalent().deprecatedNode()->renderer();
    11361136    RenderObject* startRenderer = renderer;
    1137     RenderStyle* style = &renderer->style();
     1137    auto* style = &renderer->style();
    11381138
    11391139    // traverse backward by renderer to look for style change
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp

    r185502 r200098  
    8585
    8686    RenderObject* renderer = object->renderer();
    87     RenderStyle* style = &renderer->style();
     87    auto* style = &renderer->style();
    8888
    8989    AtkAttributeSet* result = nullptr;
  • trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

    r199817 r200098  
    19911991static void AXAttributeStringSetStyle(NSMutableAttributedString* attrString, RenderObject* renderer, NSRange range)
    19921992{
    1993     RenderStyle& style = renderer->style();
     1993    auto& style = renderer->style();
    19941994   
    19951995    // set basic font info
  • trunk/Source/WebCore/bindings/objc/DOM.mm

    r197892 r200098  
    500500        return emptyQuad();
    501501
    502     RenderStyle& style = renderer->style();
     502    auto& style = renderer->style();
    503503    IntRect boundingBox = renderer->absoluteBoundingBoxRect(true /* use transforms*/);
    504504
     
    514514{
    515515    WebCore::Node *node = core(self);
    516     RenderStyle *style = node->renderStyle();
     516    auto *style = node->renderStyle();
    517517    if (!style)
    518518        return 0.0f;
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r199981 r200098  
    701701}
    702702
    703 static RefPtr<CSSValue> positionOffsetValue(RenderStyle& style, CSSPropertyID propertyID)
     703static RefPtr<CSSValue> positionOffsetValue(const RenderStyle& style, CSSPropertyID propertyID)
    704704{
    705705    Length length;
     
    738738}
    739739
    740 RefPtr<CSSPrimitiveValue> ComputedStyleExtractor::currentColorOrValidColor(RenderStyle* style, const Color& color) const
     740RefPtr<CSSPrimitiveValue> ComputedStyleExtractor::currentColorOrValidColor(const RenderStyle* style, const Color& color) const
    741741{
    742742    // This function does NOT look at visited information, so that computed style doesn't expose that.
     
    11441144
    11451145#if ENABLE(CSS_SCROLL_SNAP)
    1146 static Ref<CSSValueList> scrollSnapDestination(RenderStyle& style, const LengthSize& destination)
     1146static Ref<CSSValueList> scrollSnapDestination(const RenderStyle& style, const LengthSize& destination)
    11471147{
    11481148    auto list = CSSValueList::createSpaceSeparated();
     
    11521152}
    11531153
    1154 static Ref<CSSValue> scrollSnapPoints(RenderStyle& style, const ScrollSnapPoints* points)
     1154static Ref<CSSValue> scrollSnapPoints(const RenderStyle& style, const ScrollSnapPoints* points)
    11551155{
    11561156    if (!points)
     
    11671167}
    11681168
    1169 static Ref<CSSValue> scrollSnapCoordinates(RenderStyle& style, const Vector<LengthSize>& coordinates)
     1169static Ref<CSSValue> scrollSnapCoordinates(const RenderStyle& style, const Vector<LengthSize>& coordinates)
    11701170{
    11711171    if (coordinates.isEmpty())
     
    18081808}
    18091809
    1810 static Ref<CSSValueList> fontFamilyFromStyle(RenderStyle* style)
     1810static Ref<CSSValueList> fontFamilyFromStyle(const RenderStyle* style)
    18111811{
    18121812    auto list = CSSValueList::createCommaSeparated();
     
    18161816}
    18171817
    1818 static Ref<CSSPrimitiveValue> lineHeightFromStyle(RenderStyle& style)
     1818static Ref<CSSPrimitiveValue> lineHeightFromStyle(const RenderStyle& style)
    18191819{
    18201820    Length length = style.lineHeight();
     
    18311831}
    18321832
    1833 static Ref<CSSPrimitiveValue> fontSizeFromStyle(RenderStyle& style)
     1833static Ref<CSSPrimitiveValue> fontSizeFromStyle(const RenderStyle& style)
    18341834{
    18351835    return zoomAdjustedPixelValue(style.fontDescription().computedSize(), style);
    18361836}
    18371837
    1838 static Ref<CSSPrimitiveValue> fontStyleFromStyle(RenderStyle* style)
     1838static Ref<CSSPrimitiveValue> fontStyleFromStyle(const RenderStyle* style)
    18391839{
    18401840    if (style->fontDescription().italic())
     
    18431843}
    18441844
    1845 static Ref<CSSValue> fontVariantFromStyle(RenderStyle* style)
     1845static Ref<CSSValue> fontVariantFromStyle(const RenderStyle* style)
    18461846{
    18471847    if (style->fontDescription().variantSettings().isAllNormal())
     
    20302030}
    20312031
    2032 static Ref<CSSPrimitiveValue> fontWeightFromStyle(RenderStyle* style)
     2032static Ref<CSSPrimitiveValue> fontWeightFromStyle(const RenderStyle* style)
    20332033{
    20342034    switch (style->fontDescription().weight()) {
     
    20562056}
    20572057
    2058 static Ref<CSSValue> fontSynthesisFromStyle(RenderStyle& style)
     2058static Ref<CSSValue> fontSynthesisFromStyle(const RenderStyle& style)
    20592059{
    20602060    if (style.fontDescription().fontSynthesis() == FontSynthesisNone)
     
    20732073
    20742074template<RenderStyleLengthGetter lengthGetter, RenderBoxComputedCSSValueGetter computedCSSValueGetter>
    2075 inline RefPtr<CSSValue> zoomAdjustedPaddingOrMarginPixelValue(RenderStyle& style, RenderObject* renderer)
     2075inline RefPtr<CSSValue> zoomAdjustedPaddingOrMarginPixelValue(const RenderStyle& style, RenderObject* renderer)
    20762076{
    20772077    Length unzoomzedLength = (style.*lengthGetter)();
     
    20822082
    20832083template<RenderStyleLengthGetter lengthGetter>
    2084 inline bool paddingOrMarginIsRendererDependent(RenderStyle* style, RenderObject* renderer)
     2084inline bool paddingOrMarginIsRendererDependent(const RenderStyle* style, RenderObject* renderer)
    20852085{
    20862086    if (!renderer || !renderer->isBox())
     
    21402140#endif
    21412141   
    2142 static bool isLayoutDependent(CSSPropertyID propertyID, RenderStyle* style, RenderObject* renderer)
     2142static bool isLayoutDependent(CSSPropertyID propertyID, const RenderStyle* style, RenderObject* renderer)
    21432143{
    21442144    switch (propertyID) {
     
    22682268}
    22692269
    2270 static inline RenderStyle* computeRenderStyleForProperty(Node* styledNode, PseudoId pseudoElementSpecifier, CSSPropertyID propertyID, std::unique_ptr<RenderStyle>& ownedStyle)
     2270static inline const RenderStyle* computeRenderStyleForProperty(Node* styledNode, PseudoId pseudoElementSpecifier, CSSPropertyID propertyID, std::unique_ptr<RenderStyle>& ownedStyle)
    22712271{
    22722272    RenderObject* renderer = styledNode->renderer();
     
    23742374
    23752375    std::unique_ptr<RenderStyle> ownedStyle;
    2376     RenderStyle* style = nullptr;
     2376    const RenderStyle* style = nullptr;
    23772377    RenderObject* renderer = nullptr;
    23782378    bool forceFullLayout = false;
     
    38623862        return 0;
    38633863
    3864     RenderStyle* style = node->computedStyle(m_pseudoElementSpecifier);
     3864    auto* style = node->computedStyle(m_pseudoElementSpecifier);
    38653865    if (!style)
    38663866        return 0;
     
    38813881        return emptyString();
    38823882
    3883     RenderStyle* style = node->computedStyle(m_pseudoElementSpecifier);
     3883    auto* style = node->computedStyle(m_pseudoElementSpecifier);
    38843884    if (!style)
    38853885        return emptyString();
     
    39003900    if (propertyID == CSSPropertyFontSize && is<CSSPrimitiveValue>(*value) && m_node) {
    39013901        m_node->document().updateLayoutIgnorePendingStylesheets();
    3902         if (RenderStyle* style = m_node->computedStyle(m_pseudoElementSpecifier)) {
     3902        if (auto* style = m_node->computedStyle(m_pseudoElementSpecifier)) {
    39033903            if (CSSValueID sizeIdentifier = style->fontDescription().keywordSizeAsIdentifier()) {
    39043904                auto& primitiveValue = downcast<CSSPrimitiveValue>(*value);
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.h

    r197563 r200098  
    7171
    7272    RefPtr<CSSValue> svgPropertyValue(CSSPropertyID, EUpdateLayout) const;
    73     RefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, RenderStyle*) const;
     73    RefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, const RenderStyle*) const;
    7474
    7575    static Ref<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle&, AdjustPixelValuesForComputedStyle = AdjustPixelValues);
    76     RefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const Color&) const;
     76    RefPtr<CSSPrimitiveValue> currentColorOrValidColor(const RenderStyle*, const Color&) const;
    7777
    7878    RefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const StylePropertyShorthand&) const;
  • trunk/Source/WebCore/css/CSSToLengthConversionData.cpp

    r169779 r200098  
    4747{
    4848    if (m_style && !m_computingFontSize)
    49         m_style->setHasViewportUnits();
     49        const_cast<RenderStyle*>(m_style)->setHasViewportUnits();
    5050
    5151    if (!m_renderView)
     
    5858{
    5959    if (m_style && !m_computingFontSize)
    60         m_style->setHasViewportUnits();
     60        const_cast<RenderStyle*>(m_style)->setHasViewportUnits();
    6161
    6262    if (!m_renderView)
     
    6969{
    7070    if (m_style && !m_computingFontSize)
    71         m_style->setHasViewportUnits();
     71        const_cast<RenderStyle*>(m_style)->setHasViewportUnits();
    7272
    7373    if (!m_renderView)
     
    8181{
    8282    if (m_style && !m_computingFontSize)
    83         m_style->setHasViewportUnits();
     83        const_cast<RenderStyle*>(m_style)->setHasViewportUnits();
    8484
    8585    if (!m_renderView)
  • trunk/Source/WebCore/css/CSSToLengthConversionData.h

    r169779 r200098  
    4242class CSSToLengthConversionData {
    4343public:
    44     CSSToLengthConversionData(RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, float zoom, bool computingFontSize = false)
     44    CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, float zoom, bool computingFontSize = false)
    4545        : m_style(style)
    4646        , m_rootStyle(rootStyle)
     
    5353    }
    5454
    55     CSSToLengthConversionData(RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, bool computingFontSize = false)
     55    CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, bool computingFontSize = false)
    5656        : m_style(style)
    5757        , m_rootStyle(rootStyle)
     
    6868    }
    6969
    70     RenderStyle* style() const { return m_style; }
     70    const RenderStyle* style() const { return m_style; }
    7171    const RenderStyle* rootStyle() const { return m_rootStyle; }
    7272    float zoom() const;
     
    8484
    8585private:
    86     RenderStyle* m_style;
     86    const RenderStyle* m_style;
    8787    const RenderStyle* m_rootStyle;
    8888    const RenderView* m_renderView;
  • trunk/Source/WebCore/css/CSSToStyleMap.cpp

    r191151 r200098  
    5757}
    5858
    59 RenderStyle* CSSToStyleMap::rootElementStyle() const
     59const RenderStyle* CSSToStyleMap::rootElementStyle() const
    6060{
    6161    return m_resolver->rootElementStyle();
  • trunk/Source/WebCore/css/CSSToStyleMap.h

    r188315 r200098  
    8282    // the current paint/layout.
    8383    RenderStyle* style() const;
    84     RenderStyle* rootElementStyle() const;
     84    const RenderStyle* rootElementStyle() const;
    8585    bool useSVGZoomRules() const;
    8686
  • trunk/Source/WebCore/css/MediaQueryEvaluator.cpp

    r199964 r200098  
    8686}
    8787
    88 MediaQueryEvaluator::MediaQueryEvaluator(const String& acceptedMediaType, Frame* frame, RenderStyle* style)
     88MediaQueryEvaluator::MediaQueryEvaluator(const String& acceptedMediaType, Frame* frame, const RenderStyle* style)
    8989    : m_mediaType(acceptedMediaType)
    9090    , m_frame(frame)
    91     , m_style(WTFMove(style))
     91    , m_style(style)
    9292    , m_expResult(false) // doesn't matter when we have m_frame and m_style
    9393{
  • trunk/Source/WebCore/css/MediaQueryEvaluator.h

    r199964 r200098  
    8181    /** Creates evaluator which evaluates full media queries
    8282     */
    83     MediaQueryEvaluator(const String& acceptedMediaType, Frame*, RenderStyle*);
     83    MediaQueryEvaluator(const String& acceptedMediaType, Frame*, const RenderStyle*);
    8484
    8585    ~MediaQueryEvaluator();
     
    100100    String m_mediaType;
    101101    Frame* m_frame { nullptr }; // not owned
    102     RenderStyle* m_style { nullptr };
     102    const RenderStyle* m_style { nullptr };
    103103    bool m_expResult;
    104104};
  • trunk/Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp

    r194496 r200098  
    9494}
    9595
    96 RefPtr<SVGPaint> ComputedStyleExtractor::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const
     96RefPtr<SVGPaint> ComputedStyleExtractor::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, const RenderStyle* style) const
    9797{
    9898    RefPtr<SVGPaint> paint = newPaint;
     
    112112        node->document().updateLayout();
    113113
    114     RenderStyle* style = node->computedStyle();
     114    auto* style = node->computedStyle();
    115115    if (!style)
    116116        return nullptr;
  • trunk/Source/WebCore/css/SourceSizeList.cpp

    r197456 r200098  
    3333namespace WebCore {
    3434
    35 static bool match(std::unique_ptr<MediaQueryExp>&& expression, RenderStyle& style, Frame* frame)
     35static bool match(std::unique_ptr<MediaQueryExp>&& expression, const RenderStyle& style, Frame* frame)
    3636{
    3737    if (expression->mediaFeature().isEmpty())
     
    4848}
    4949
    50 static float defaultLength(RenderStyle& style, RenderView* view)
     50static float defaultLength(const RenderStyle& style, RenderView* view)
    5151{
    5252    return clampTo<float>(CSSPrimitiveValue::computeNonCalcLengthDouble(CSSToLengthConversionData(&style, &style, view), CSSPrimitiveValue::CSS_VW, 100.0));
    5353}
    5454
    55 static float computeLength(CSSValue* value, RenderStyle& style, RenderView* view)
     55static float computeLength(CSSValue* value, const RenderStyle& style, RenderView* view)
    5656{
    5757    CSSToLengthConversionData conversionData(&style, &style, view);
     
    7171    if (!view)
    7272        return 0;
    73     RenderStyle& style = view->style();
     73    auto& style = view->style();
    7474    for (auto& sourceSize : CSSParser(CSSStrictMode).parseSizesAttribute(sizesAttribute)) {
    7575        if (match(WTFMove(sourceSize.expression), style, frame))
  • trunk/Source/WebCore/css/StyleBuilderCustom.h

    r199625 r200098  
    576576
    577577private:
    578     static const NinePieceImage& getValue(RenderStyle* style)
     578    static const NinePieceImage& getValue(const RenderStyle* style)
    579579    {
    580580        return type == BorderImage ? style->borderImage() : style->maskBoxImage();
     
    665665inline void StyleBuilderCustom::applyInheritClip(StyleResolver& styleResolver)
    666666{
    667     RenderStyle* parentStyle = styleResolver.parentStyle();
     667    auto* parentStyle = styleResolver.parentStyle();
    668668    if (!parentStyle->hasClip())
    669669        return applyInitialClip(styleResolver);
     
    10531053{
    10541054    CounterDirectiveMap& map = styleResolver.style()->accessCounterDirectives();
    1055     for (auto& keyValue : styleResolver.parentStyle()->accessCounterDirectives()) {
     1055    for (auto& keyValue : const_cast<RenderStyle*>(styleResolver.parentStyle())->accessCounterDirectives()) {
    10561056        CounterDirectives& directives = map.add(keyValue.key, CounterDirectives()).iterator->value;
    10571057        if (counterBehavior == Reset)
     
    13381338                styleResolver.style()->setUnique();
    13391339            else
    1340                 styleResolver.parentStyle()->setUnique();
     1340                const_cast<RenderStyle*>(styleResolver.parentStyle())->setUnique();
    13411341            QualifiedName attr(nullAtom, contentValue.getStringValue().impl(), nullAtom);
    13421342            const AtomicString& value = styleResolver.element()->getAttribute(attr);
     
    17071707            styleResolver.style()->setUnique();
    17081708        else
    1709             styleResolver.parentStyle()->setUnique();
     1709            const_cast<RenderStyle*>(styleResolver.parentStyle())->setUnique();
    17101710
    17111711        QualifiedName attr(nullAtom, primitiveValue.getStringValue(), nullAtom);
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r200041 r200098  
    337337}
    338338
    339 StyleResolver::State::State(const Element& element, RenderStyle* parentStyle, RenderStyle* documentElementStyle, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
     339StyleResolver::State::State(const Element& element, const RenderStyle* parentStyle, const RenderStyle* documentElementStyle, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
    340340    : m_element(&element)
    341341    , m_parentStyle(parentStyle)
     
    381381}
    382382
    383 ElementStyle StyleResolver::styleForElement(const Element& element, RenderStyle* parentStyle, RuleMatchingBehavior matchingBehavior, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
     383ElementStyle StyleResolver::styleForElement(const Element& element, const RenderStyle* parentStyle, RuleMatchingBehavior matchingBehavior, const RenderRegion* regionForStyling, const SelectorFilter* selectorFilter)
    384384{
    385385    RELEASE_ASSERT(!m_inLoadPendingImages);
     
    559559}
    560560
    561 std::unique_ptr<RenderStyle> StyleResolver::pseudoStyleForElement(const Element& element, const PseudoStyleRequest& pseudoStyleRequest, RenderStyle& parentStyle)
     561std::unique_ptr<RenderStyle> StyleResolver::pseudoStyleForElement(const Element& element, const PseudoStyleRequest& pseudoStyleRequest, const RenderStyle& parentStyle)
    562562{
    563563    m_state = State(element, &parentStyle);
     
    16321632
    16331633    if (isInherit && !state.parentStyle()->hasExplicitlyInheritedProperties() && !CSSProperty::isInheritedProperty(id))
    1634         state.parentStyle()->setHasExplicitlyInheritedProperties();
     1634        const_cast<RenderStyle*>(state.parentStyle())->setHasExplicitlyInheritedProperties();
    16351635   
    16361636    if (id == CSSPropertyCustom) {
     
    17351735#endif
    17361736
    1737 void StyleResolver::checkForZoomChange(RenderStyle* style, RenderStyle* parentStyle)
     1737void StyleResolver::checkForZoomChange(RenderStyle* style, const RenderStyle* parentStyle)
    17381738{
    17391739    if (!parentStyle)
     
    17491749}
    17501750
    1751 void StyleResolver::checkForGenericFamilyChange(RenderStyle* style, RenderStyle* parentStyle)
     1751void StyleResolver::checkForGenericFamilyChange(RenderStyle* style, const RenderStyle* parentStyle)
    17521752{
    17531753    const auto& childFont = style->fontDescription();
  • trunk/Source/WebCore/css/StyleResolver.h

    r199964 r200098  
    142142    ~StyleResolver();
    143143
    144     ElementStyle styleForElement(const Element&, RenderStyle* parentStyle, RuleMatchingBehavior = MatchAllRules, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
     144    ElementStyle styleForElement(const Element&, const RenderStyle* parentStyle, RuleMatchingBehavior = MatchAllRules, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
    145145
    146146    void keyframeStylesForAnimation(const Element&, const RenderStyle*, KeyframeList&);
    147147
    148     std::unique_ptr<RenderStyle> pseudoStyleForElement(const Element&, const PseudoStyleRequest&, RenderStyle& parentStyle);
     148    std::unique_ptr<RenderStyle> pseudoStyleForElement(const Element&, const PseudoStyleRequest&, const RenderStyle& parentStyle);
    149149
    150150    std::unique_ptr<RenderStyle> styleForPage(int pageIndex);
     
    152152
    153153    RenderStyle* style() const { return m_state.style(); }
    154     RenderStyle* parentStyle() const { return m_state.parentStyle(); }
    155     RenderStyle* rootElementStyle() const { return m_state.rootElementStyle(); }
     154    const RenderStyle* parentStyle() const { return m_state.parentStyle(); }
     155    const RenderStyle* rootElementStyle() const { return m_state.rootElementStyle(); }
    156156    const Element* element() { return m_state.element(); }
    157157    Document& document() { return m_document; }
     
    318318private:
    319319    // This function fixes up the default font size if it detects that the current generic font family has changed. -dwh
    320     void checkForGenericFamilyChange(RenderStyle*, RenderStyle* parentStyle);
    321     void checkForZoomChange(RenderStyle*, RenderStyle* parentStyle);
     320    void checkForGenericFamilyChange(RenderStyle*, const RenderStyle* parentStyle);
     321    void checkForZoomChange(RenderStyle*, const RenderStyle* parentStyle);
    322322#if ENABLE(IOS_TEXT_AUTOSIZING)
    323323    void checkForTextSizeAdjust(RenderStyle*);
     
    362362    public:
    363363        State() { }
    364         State(const Element&, RenderStyle* parentStyle, RenderStyle* documentElementStyle = nullptr, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
     364        State(const Element&, const RenderStyle* parentStyle, const RenderStyle* documentElementStyle = nullptr, const RenderRegion* regionForStyling = nullptr, const SelectorFilter* = nullptr);
    365365
    366366    public:
     
    375375
    376376        void setParentStyle(std::unique_ptr<RenderStyle>);
    377         RenderStyle* parentStyle() const { return m_parentStyle; }
    378         RenderStyle* rootElementStyle() const { return m_rootElementStyle; }
     377        const RenderStyle* parentStyle() const { return m_parentStyle; }
     378        const RenderStyle* rootElementStyle() const { return m_rootElementStyle; }
    379379
    380380        const RenderRegion* regionForStyling() const { return m_regionForStyling; }
     
    428428        const Element* m_element { nullptr };
    429429        std::unique_ptr<RenderStyle> m_style;
    430         RenderStyle* m_parentStyle { nullptr };
     430        const RenderStyle* m_parentStyle { nullptr };
    431431        std::unique_ptr<RenderStyle> m_ownedParentStyle;
    432         RenderStyle* m_rootElementStyle { nullptr };
     432        const RenderStyle* m_rootElementStyle { nullptr };
    433433
    434434        const RenderRegion* m_regionForStyling { nullptr };
  • trunk/Source/WebCore/dom/Document.cpp

    r200075 r200098  
    20052005}
    20062006
    2007 std::unique_ptr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets(Element& element, RenderStyle* parentStyle)
     2007std::unique_ptr<RenderStyle> Document::styleForElementIgnoringPendingStylesheets(Element& element, const RenderStyle* parentStyle)
    20082008{
    20092009    ASSERT(&element.document() == this);
     
    25122512    m_visuallyOrdered = true;
    25132513    if (renderView())
    2514         renderView()->style().setRTLOrdering(VisualOrder);
     2514        renderView()->mutableStyle().setRTLOrdering(VisualOrder);
    25152515}
    25162516
  • trunk/Source/WebCore/dom/Document.h

    r200075 r200098  
    572572    WEBCORE_EXPORT void updateLayoutIgnorePendingStylesheets(RunPostLayoutTasks = RunPostLayoutTasks::Asynchronously);
    573573
    574     std::unique_ptr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element&, RenderStyle* parentStyle);
     574    std::unique_ptr<RenderStyle> styleForElementIgnoringPendingStylesheets(Element&, const RenderStyle* parentStyle);
    575575
    576576    // Returns true if page box (margin boxes and page borders) is visible.
  • trunk/Source/WebCore/dom/Element.cpp

    r200075 r200098  
    13711371}
    13721372
    1373 ElementStyle Element::resolveStyle(RenderStyle* parentStyle)
     1373ElementStyle Element::resolveStyle(const RenderStyle* parentStyle)
    13741374{
    13751375    return styleResolver().styleForElement(*this, parentStyle);
     
    17591759{
    17601760    if (element.styleAffectedByEmpty()) {
    1761         RenderStyle* style = element.renderStyle();
     1761        auto* style = element.renderStyle();
    17621762        if (!style || (!style->emptyState() || element.hasChildNodes()))
    17631763            element.setNeedsStyleRecalc();
     
    17851785        // This is the insert/append case.
    17861786        if (newFirstElement != elementAfterChange) {
    1787             RenderStyle* style = elementAfterChange->renderStyle();
     1787            auto* style = elementAfterChange->renderStyle();
    17881788            if (!style || style->firstChildState())
    17891789                elementAfterChange->setNeedsStyleRecalc();
     
    17921792        // We also have to handle node removal.
    17931793        if (checkType == SiblingElementRemoved && newFirstElement == elementAfterChange && newFirstElement) {
    1794             RenderStyle* style = newFirstElement->renderStyle();
     1794            auto* style = newFirstElement->renderStyle();
    17951795            if (!style || !style->firstChildState())
    17961796                newFirstElement->setNeedsStyleRecalc();
     
    18051805
    18061806        if (newLastElement != elementBeforeChange) {
    1807             RenderStyle* style = elementBeforeChange->renderStyle();
     1807            auto* style = elementBeforeChange->renderStyle();
    18081808            if (!style || style->lastChildState())
    18091809                elementBeforeChange->setNeedsStyleRecalc();
     
    18131813        // to match now.
    18141814        if ((checkType == SiblingElementRemoved || checkType == FinishedParsingChildren) && newLastElement == elementBeforeChange && newLastElement) {
    1815             RenderStyle* style = newLastElement->renderStyle();
     1815            auto* style = newLastElement->renderStyle();
    18161816            if (!style || !style->lastChildState())
    18171817                newLastElement->setNeedsStyleRecalc();
     
    24602460}
    24612461
    2462 RenderStyle* Element::existingComputedStyle()
     2462const RenderStyle* Element::existingComputedStyle()
    24632463{
    24642464    if (auto* renderTreeStyle = renderStyle())
     
    24712471}
    24722472
    2473 RenderStyle& Element::resolveComputedStyle()
     2473const RenderStyle& Element::resolveComputedStyle()
    24742474{
    24752475    ASSERT(inDocument());
     
    24772477
    24782478    Deque<Element*, 32> elementsRequiringComputedStyle({ this });
    2479     RenderStyle* computedStyle = nullptr;
     2479    const RenderStyle* computedStyle = nullptr;
    24802480
    24812481    // Collect ancestors until we find one that has style.
     
    25002500}
    25012501
    2502 RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
     2502const RenderStyle* Element::computedStyle(PseudoId pseudoElementSpecifier)
    25032503{
    25042504    if (PseudoElement* pseudoElement = beforeOrAfterPseudoElement(*this, pseudoElementSpecifier))
     
    32943294}
    32953295
    3296 Optional<ElementStyle> Element::resolveCustomStyle(RenderStyle&, RenderStyle*)
     3296Optional<ElementStyle> Element::resolveCustomStyle(const RenderStyle&, const RenderStyle*)
    32973297{
    32983298    ASSERT(hasCustomStyleResolveCallbacks());
  • trunk/Source/WebCore/dom/Element.h

    r200041 r200098  
    280280    virtual Element* focusDelegate();
    281281
    282     RenderStyle* computedStyle(PseudoId = NOPSEUDO) override;
     282    const RenderStyle* computedStyle(PseudoId = NOPSEUDO) override;
    283283
    284284    bool needsStyleInvalidation() const;
     
    481481    virtual void willDetachRenderers();
    482482    virtual void didDetachRenderers();
    483     virtual Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle);
     483    virtual Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle);
    484484
    485485    LayoutRect absoluteEventHandlerBounds(bool& includesFixedPositionElements) override;
     
    500500
    501501    StyleResolver& styleResolver();
    502     ElementStyle resolveStyle(RenderStyle* parentStyle);
     502    ElementStyle resolveStyle(const RenderStyle* parentStyle);
    503503
    504504    bool hasDisplayContents() const;
     
    593593    void removeShadowRoot();
    594594
    595     RenderStyle* existingComputedStyle();
    596     RenderStyle& resolveComputedStyle();
     595    const RenderStyle* existingComputedStyle();
     596    const RenderStyle& resolveComputedStyle();
    597597
    598598    bool rareDataStyleAffectedByEmpty() const;
  • trunk/Source/WebCore/dom/Node.cpp

    r200075 r200098  
    660660
    661661    for (const Node* node = &startNode; node; node = node->parentNode()) {
    662         RenderStyle* style = node->isDocumentNode() ? node->renderStyle() : const_cast<Node*>(node)->computedStyle();
     662        auto* style = node->isDocumentNode() ? node->renderStyle() : const_cast<Node*>(node)->computedStyle();
    663663        if (!style)
    664664            continue;
     
    10071007}
    10081008
    1009 RenderStyle* Node::computedStyle(PseudoId pseudoElementSpecifier)
     1009const RenderStyle* Node::computedStyle(PseudoId pseudoElementSpecifier)
    10101010{
    10111011    auto* composedParent = composedTreeAncestors(*this).first();
  • trunk/Source/WebCore/dom/Node.h

    r199385 r200098  
    444444   
    445445    // Wrapper for nodes that don't have a renderer, but still cache the style (like HTMLOptionElement).
    446     RenderStyle* renderStyle() const;
    447 
    448     virtual RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO);
     446    const RenderStyle* renderStyle() const;
     447
     448    virtual const RenderStyle* computedStyle(PseudoId pseudoElementSpecifier = NOPSEUDO);
    449449
    450450    // -----------------------------------------------------------------------------
  • trunk/Source/WebCore/dom/NodeRenderStyle.h

    r172591 r200098  
    3333namespace WebCore {
    3434
    35 inline RenderStyle* Node::renderStyle() const
     35inline const RenderStyle* Node::renderStyle() const
    3636{
    3737    auto* renderer = this->renderer();
  • trunk/Source/WebCore/dom/PseudoElement.cpp

    r200041 r200098  
    7878}
    7979
    80 Optional<ElementStyle> PseudoElement::resolveCustomStyle(RenderStyle& parentStyle, RenderStyle*)
     80Optional<ElementStyle> PseudoElement::resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle*)
    8181{
    8282    auto* style = m_hostElement->renderer()->getCachedPseudoStyle(m_pseudoId, &parentStyle);
  • trunk/Source/WebCore/dom/PseudoElement.h

    r197764 r200098  
    4646    void clearHostElement();
    4747
    48     Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle) override;
     48    Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
    4949    void didAttachRenderers() override;
    5050    void didRecalcStyle(Style::Change) override;
  • trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp

    r192567 r200098  
    180180}
    181181
    182 RenderStyle* ApplyBlockElementCommand::renderStyleOfEnclosingTextNode(const Position& position)
     182const RenderStyle* ApplyBlockElementCommand::renderStyleOfEnclosingTextNode(const Position& position)
    183183{
    184184    if (position.anchorType() != Position::PositionIsOffsetInAnchor
    185185        || !position.containerNode()
    186186        || !position.containerNode()->isTextNode())
    187         return 0;
     187        return nullptr;
    188188
    189189    document().updateStyleIfNeeded();
     
    191191    RenderObject* renderer = position.containerNode()->renderer();
    192192    if (!renderer)
    193         return 0;
     193        return nullptr;
    194194
    195195    return &renderer->style();
     
    202202
    203203    bool isStartAndEndOnSameNode = false;
    204     if (RenderStyle* startStyle = renderStyleOfEnclosingTextNode(start)) {
     204    if (auto* startStyle = renderStyleOfEnclosingTextNode(start)) {
    205205        isStartAndEndOnSameNode = renderStyleOfEnclosingTextNode(end) && start.containerNode() == end.containerNode();
    206206        bool isStartAndEndOfLastParagraphOnSameNode = renderStyleOfEnclosingTextNode(m_endOfLastParagraph) && start.containerNode() == m_endOfLastParagraph.containerNode();
     
    227227    }
    228228
    229     if (RenderStyle* endStyle = renderStyleOfEnclosingTextNode(end)) {
     229    if (auto* endStyle = renderStyleOfEnclosingTextNode(end)) {
    230230        bool isEndAndEndOfLastParagraphOnSameNode = renderStyleOfEnclosingTextNode(m_endOfLastParagraph) && end.deprecatedNode() == m_endOfLastParagraph.deprecatedNode();
    231231        // Include \n at the end of line if we're at an empty paragraph
     
    259259    VisiblePosition endOfNextParagraph = endOfParagraph(endOfCurrentParagraph.next());
    260260    Position position = endOfNextParagraph.deepEquivalent();
    261     RenderStyle* style = renderStyleOfEnclosingTextNode(position);
     261    auto* style = renderStyleOfEnclosingTextNode(position);
    262262    if (!style)
    263263        return endOfNextParagraph;
  • trunk/Source/WebCore/editing/ApplyBlockElementCommand.h

    r197563 r200098  
    4949    void doApply() override;
    5050    virtual void formatRange(const Position& start, const Position& end, const Position& endOfSelection, RefPtr<Element>&) = 0;
    51     RenderStyle* renderStyleOfEnclosingTextNode(const Position&);
     51    const RenderStyle* renderStyleOfEnclosingTextNode(const Position&);
    5252    void rangeForParagraphSplittingTextNodesIfNeeded(const VisiblePosition&, Position&, Position&);
    5353    VisiblePosition endOfNextParagraphSplittingTextNodesIfNeeded(VisiblePosition&, Position&, Position&);
  • trunk/Source/WebCore/editing/EditingStyle.cpp

    r197591 r200098  
    462462
    463463    if (node && node->computedStyle()) {
    464         RenderStyle* renderStyle = node->computedStyle();
     464        auto* renderStyle = node->computedStyle();
    465465        removeTextFillAndStrokeColorsIfNeeded(renderStyle);
    466466        if (renderStyle->fontDescription().keywordSize())
     
    472472}
    473473
    474 void EditingStyle::removeTextFillAndStrokeColorsIfNeeded(RenderStyle* renderStyle)
     474void EditingStyle::removeTextFillAndStrokeColorsIfNeeded(const RenderStyle* renderStyle)
    475475{
    476476    // If a node's text fill color is invalid, then its children use
  • trunk/Source/WebCore/editing/EditingStyle.h

    r191671 r200098  
    179179    EditingStyle(CSSPropertyID, CSSValueID);
    180180    void init(Node*, PropertiesToInclude);
    181     void removeTextFillAndStrokeColorsIfNeeded(RenderStyle*);
     181    void removeTextFillAndStrokeColorsIfNeeded(const RenderStyle*);
    182182    void setProperty(CSSPropertyID, const String& value, bool important = false);
    183183    void extractFontSizeDelta();
  • trunk/Source/WebCore/editing/Editor.h

    r199030 r200098  
    431431
    432432#if PLATFORM(COCOA)
    433     WEBCORE_EXPORT static RenderStyle* styleForSelectionStart(Frame* , Node *&nodeToRemove);
    434     void getTextDecorationAttributesRespectingTypingStyle(RenderStyle&, NSMutableDictionary*) const;
     433    WEBCORE_EXPORT static const RenderStyle* styleForSelectionStart(Frame* , Node *&nodeToRemove);
     434    void getTextDecorationAttributesRespectingTypingStyle(const RenderStyle&, NSMutableDictionary*) const;
    435435    WEBCORE_EXPORT const Font* fontForSelection(bool&) const;
    436436    WEBCORE_EXPORT NSDictionary *fontAttributesForSelectionStart() const;
  • trunk/Source/WebCore/editing/SimplifyMarkupCommand.cpp

    r179143 r200098  
    5858       
    5959        Node* startingNode = node->parentNode();
    60         RenderStyle* startingStyle = startingNode->renderStyle();
     60        auto* startingStyle = startingNode->renderStyle();
    6161        if (!startingStyle)
    6262            continue;
  • trunk/Source/WebCore/editing/cocoa/EditorCocoa.mm

    r192285 r200098  
    4242
    4343// FIXME: This figures out the current style by inserting a <span>!
    44 RenderStyle* Editor::styleForSelectionStart(Frame* frame, Node *&nodeToRemove)
     44const RenderStyle* Editor::styleForSelectionStart(Frame* frame, Node *&nodeToRemove)
    4545{
    4646    nodeToRemove = nullptr;
     
    7777}
    7878
    79 void Editor::getTextDecorationAttributesRespectingTypingStyle(RenderStyle& style, NSMutableDictionary* result) const
     79void Editor::getTextDecorationAttributesRespectingTypingStyle(const RenderStyle& style, NSMutableDictionary* result) const
    8080{
    8181    RefPtr<EditingStyle> typingStyle = m_frame.selection().typingStyle();
  • trunk/Source/WebCore/editing/ios/EditorIOS.mm

    r198177 r200098  
    182182    if (!m_frame.selection().isRange()) {
    183183        Node* nodeToRemove;
    184         RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
     184        auto* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
    185185
    186186        const Font* result = nullptr;
     
    221221{
    222222    Node* nodeToRemove;
    223     RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove);
     223    auto* style = styleForSelectionStart(&m_frame, nodeToRemove);
    224224    if (!style)
    225225        return nil;
  • trunk/Source/WebCore/editing/mac/EditorMac.mm

    r199817 r200098  
    108108    if (!m_frame.selection().isRange()) {
    109109        Node* nodeToRemove;
    110         RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
     110        auto* style = styleForSelectionStart(&m_frame, nodeToRemove); // sets nodeToRemove
    111111
    112112        const Font* result = nullptr;
     
    147147{
    148148    Node* nodeToRemove;
    149     RenderStyle* style = styleForSelectionStart(&m_frame, nodeToRemove);
     149    auto* style = styleForSelectionStart(&m_frame, nodeToRemove);
    150150    if (!style)
    151151        return nil;
  • trunk/Source/WebCore/html/HTMLTitleElement.cpp

    r199964 r200098  
    8080{
    8181    TextDirection direction = LTR;
    82     if (RenderStyle* computedStyle = this->computedStyle())
     82    if (auto* computedStyle = this->computedStyle())
    8383        direction = computedStyle->direction();
    8484    else {
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp

    r200058 r200098  
    321321}
    322322
    323 inline void CanvasRenderingContext2D::FontProxy::initialize(FontSelector& fontSelector, RenderStyle& newStyle)
     323inline void CanvasRenderingContext2D::FontProxy::initialize(FontSelector& fontSelector, const RenderStyle& newStyle)
    324324{
    325325    // Beware! m_font.fontSelector() might not point to document.fontSelector()!
     
    21972197    document.updateStyleIfNeeded();
    21982198
    2199     if (RenderStyle* computedStyle = canvas()->computedStyle())
     2199    if (auto* computedStyle = canvas()->computedStyle())
    22002200        newStyle->setFontDescription(computedStyle->fontDescription());
    22012201    else {
     
    22602260}
    22612261
    2262 inline TextDirection CanvasRenderingContext2D::toTextDirection(Direction direction, RenderStyle** computedStyle) const
    2263 {
    2264     RenderStyle* style = (computedStyle || direction == Direction::Inherit) ? canvas()->computedStyle() : nullptr;
     2262inline TextDirection CanvasRenderingContext2D::toTextDirection(Direction direction, const RenderStyle** computedStyle) const
     2263{
     2264    auto* style = (computedStyle || direction == Direction::Inherit) ? canvas()->computedStyle() : nullptr;
    22652265    if (computedStyle)
    22662266        *computedStyle = style;
     
    23852385    // FIXME: Need to turn off font smoothing.
    23862386
    2387     RenderStyle* computedStyle;
     2387    const RenderStyle* computedStyle;
    23882388    TextDirection direction = toTextDirection(state().direction, &computedStyle);
    23892389    bool isRTL = direction == RTL;
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.h

    r200058 r200098  
    256256
    257257        bool realized() const { return m_font.fontSelector(); }
    258         void initialize(FontSelector&, RenderStyle&);
     258        void initialize(FontSelector&, const RenderStyle&);
    259259        FontMetrics fontMetrics() const;
    260260        const FontCascadeDescription& fontDescription() const;
     
    383383
    384384    bool hasInvertibleTransform() const override { return state().hasInvertibleTransform; }
    385     TextDirection toTextDirection(Direction, RenderStyle** computedStyle = nullptr) const;
     385    TextDirection toTextDirection(Direction, const RenderStyle** computedStyle = nullptr) const;
    386386
    387387#if ENABLE(ACCELERATED_2D_CANVAS)
  • trunk/Source/WebCore/html/parser/HTMLResourcePreloader.cpp

    r194496 r200098  
    5959}
    6060
    61 static bool mediaAttributeMatches(Frame* frame, RenderStyle* renderStyle, const String& attributeValue)
     61static bool mediaAttributeMatches(Frame* frame, const RenderStyle* renderStyle, const String& attributeValue)
    6262{
    6363    RefPtr<MediaQuerySet> mediaQueries = MediaQuerySet::createAllowingDescriptionSyntax(attributeValue);
  • trunk/Source/WebCore/html/shadow/SliderThumbElement.cpp

    r200041 r200098  
    8484}
    8585
    86 void RenderSliderThumb::updateAppearance(RenderStyle* parentStyle)
     86void RenderSliderThumb::updateAppearance(const RenderStyle* parentStyle)
    8787{
    8888    if (parentStyle->appearance() == SliderVerticalPart)
    89         style().setAppearance(SliderThumbVerticalPart);
     89        mutableStyle().setAppearance(SliderThumbVerticalPart);
    9090    else if (parentStyle->appearance() == SliderHorizontalPart)
    91         style().setAppearance(SliderThumbHorizontalPart);
     91        mutableStyle().setAppearance(SliderThumbHorizontalPart);
    9292    else if (parentStyle->appearance() == MediaSliderPart)
    93         style().setAppearance(MediaSliderThumbPart);
     93        mutableStyle().setAppearance(MediaSliderThumbPart);
    9494    else if (parentStyle->appearance() == MediaVolumeSliderPart)
    95         style().setAppearance(MediaVolumeSliderThumbPart);
     95        mutableStyle().setAppearance(MediaVolumeSliderThumbPart);
    9696    else if (parentStyle->appearance() == MediaFullScreenVolumeSliderPart)
    97         style().setAppearance(MediaFullScreenVolumeSliderThumbPart);
     97        mutableStyle().setAppearance(MediaFullScreenVolumeSliderThumbPart);
    9898    if (style().hasAppearance()) {
    9999        ASSERT(element());
    100         theme().adjustSliderThumbSize(style(), element());
     100        theme().adjustSliderThumbSize(mutableStyle(), element());
    101101    }
    102102}
     
    160160    auto& input = downcast<HTMLInputElement>(*element()->shadowHost());
    161161    bool isVertical = hasVerticalAppearance(input);
    162     style().setFlexDirection(isVertical ? FlowColumn : FlowRow);
     162    mutableStyle().setFlexDirection(isVertical ? FlowColumn : FlowRow);
    163163    TextDirection oldTextDirection = style().direction();
    164164    if (isVertical) {
     
    166166        // render identically to LTR vertical sliders. We can remove this work around when
    167167        // subpixel rendering is enabled on all ports.
    168         style().setDirection(LTR);
     168        mutableStyle().setDirection(LTR);
    169169    }
    170170
     
    178178    RenderFlexibleBox::layout();
    179179
    180     style().setDirection(oldTextDirection);
     180    mutableStyle().setDirection(oldTextDirection);
    181181    // These should always exist, unless someone mutates the shadow DOM (e.g., in the inspector).
    182182    if (!thumb || !track)
     
    575575}
    576576
    577 Optional<ElementStyle> SliderThumbElement::resolveCustomStyle(RenderStyle&, RenderStyle* hostStyle)
     577Optional<ElementStyle> SliderThumbElement::resolveCustomStyle(const RenderStyle&, const RenderStyle* hostStyle)
    578578{
    579579    // This doesn't actually compute style. This is just a hack to pick shadow pseudo id when host style is known.
     
    629629}
    630630
    631 Optional<ElementStyle> SliderContainerElement::resolveCustomStyle(RenderStyle&, RenderStyle* hostStyle)
     631Optional<ElementStyle> SliderContainerElement::resolveCustomStyle(const RenderStyle&, const RenderStyle* hostStyle)
    632632{
    633633    // This doesn't actually compute style. This is just a hack to pick shadow pseudo id when host style is known.
  • trunk/Source/WebCore/html/shadow/SliderThumbElement.h

    r200041 r200098  
    7979    void willDetachRenderers() override;
    8080
    81     Optional<ElementStyle> resolveCustomStyle(RenderStyle&, RenderStyle*) override;
     81    Optional<ElementStyle> resolveCustomStyle(const RenderStyle&, const RenderStyle*) override;
    8282    const AtomicString& shadowPseudoId() const override;
    8383
     
    121121public:
    122122    RenderSliderThumb(SliderThumbElement&, RenderStyle&&);
    123     void updateAppearance(RenderStyle* parentStyle);
     123    void updateAppearance(const RenderStyle* parentStyle);
    124124
    125125private:
     
    136136    SliderContainerElement(Document&);
    137137    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
    138     Optional<ElementStyle> resolveCustomStyle(RenderStyle&, RenderStyle*) override;
     138    Optional<ElementStyle> resolveCustomStyle(const RenderStyle&, const RenderStyle*) override;
    139139    const AtomicString& shadowPseudoId() const override;
    140140
  • trunk/Source/WebCore/html/shadow/TextControlInnerElements.cpp

    r200041 r200098  
    7676}
    7777
    78 Optional<ElementStyle> TextControlInnerElement::resolveCustomStyle(RenderStyle&, RenderStyle* shadowHostStyle)
     78Optional<ElementStyle> TextControlInnerElement::resolveCustomStyle(const RenderStyle&, const RenderStyle* shadowHostStyle)
    7979{
    8080    auto innerContainerStyle = RenderStyle::createPtr();
     
    135135}
    136136
    137 Optional<ElementStyle> TextControlInnerTextElement::resolveCustomStyle(RenderStyle&, RenderStyle* shadowHostStyle)
     137Optional<ElementStyle> TextControlInnerTextElement::resolveCustomStyle(const RenderStyle&, const RenderStyle* shadowHostStyle)
    138138{
    139139    auto style = downcast<HTMLTextFormControlElement>(*shadowHost()).createInnerTextStyle(*shadowHostStyle);
     
    150150}
    151151
    152 Optional<ElementStyle> TextControlPlaceholderElement::resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle)
     152Optional<ElementStyle> TextControlPlaceholderElement::resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle)
    153153{
    154154    auto style = resolveStyle(&parentStyle);
  • trunk/Source/WebCore/html/shadow/TextControlInnerElements.h

    r200041 r200098  
    4949protected:
    5050    TextControlInnerElement(Document&);
    51     Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle) override;
     51    Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
    5252
    5353private:
     
    6666    TextControlInnerTextElement(Document&);
    6767    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
    68     Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle) override;
     68    Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
    6969    bool isMouseFocusable() const override { return false; }
    7070    bool isTextControlInnerTextElement() const override { return true; }
     
    7878    TextControlPlaceholderElement(Document&);
    7979   
    80     Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle) override;
     80    Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
    8181};
    8282
  • trunk/Source/WebCore/page/EventHandler.cpp

    r199817 r200098  
    13821382
    13831383    auto renderer = node->renderer();
    1384     RenderStyle* style = renderer ? &renderer->style() : nullptr;
     1384    auto* style = renderer ? &renderer->style() : nullptr;
    13851385    bool horizontalText = !style || style->isHorizontalWritingMode();
    13861386    const Cursor& iBeam = horizontalText ? iBeamCursor() : verticalTextCursor();
  • trunk/Source/WebCore/page/animation/AnimationBase.cpp

    r200047 r200098  
    7171}
    7272
    73 AnimationBase::AnimationBase(Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation)
     73AnimationBase::AnimationBase(const Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation)
    7474    : m_object(renderer)
    7575    , m_compositeAnimation(compositeAnimation)
    76     , m_animation(animation)
     76    , m_animation(const_cast<Animation&>(animation))
    7777{
    7878    // Compute the total duration
  • trunk/Source/WebCore/page/animation/AnimationBase.h

    r200047 r200098  
    5353    WTF_MAKE_FAST_ALLOCATED;
    5454public:
    55     AnimationBase(Animation& transition, RenderElement*, CompositeAnimation*);
     55    AnimationBase(const Animation& transition, RenderElement*, CompositeAnimation*);
    5656    virtual ~AnimationBase() { }
    5757
     
    139139
    140140    // Returns true if the animation state changed.
    141     virtual bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* /*currentStyle*/, RenderStyle* /*targetStyle*/, std::unique_ptr<RenderStyle>& /*animatedStyle*/) = 0;
     141    virtual bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* /*currentStyle*/, const RenderStyle* /*targetStyle*/, std::unique_ptr<RenderStyle>& /*animatedStyle*/) = 0;
    142142    virtual void getAnimatedStyle(std::unique_ptr<RenderStyle>& /*animatedStyle*/) = 0;
    143143
     
    151151
    152152    const Animation& animation() const { return m_animation; }
    153     void setAnimation(Animation& animation) { m_animation = animation; }
     153    void setAnimation(const Animation& animation) { m_animation = const_cast<Animation&>(animation); }
    154154
    155155    // Return true if this animation is overridden. This will only be the case for
  • trunk/Source/WebCore/page/animation/AnimationController.cpp

    r200041 r200098  
    594594}
    595595
    596 bool AnimationController::updateAnimations(RenderElement& renderer, RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle)
    597 {
    598     RenderStyle* oldStyle = renderer.hasInitializedStyle() ? &renderer.style() : nullptr;
     596bool AnimationController::updateAnimations(RenderElement& renderer, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle)
     597{
     598    auto* oldStyle = renderer.hasInitializedStyle() ? &renderer.style() : nullptr;
    599599    if ((!oldStyle || (!oldStyle->animations() && !oldStyle->transitions())) && (!newStyle.animations() && !newStyle.transitions()))
    600600        return false;
  • trunk/Source/WebCore/page/animation/AnimationController.h

    r199964 r200098  
    5151
    5252    void cancelAnimations(RenderElement&);
    53     bool updateAnimations(RenderElement&, RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle);
     53    bool updateAnimations(RenderElement&, const RenderStyle& newStyle, std::unique_ptr<RenderStyle>& animatedStyle);
    5454    std::unique_ptr<RenderStyle> getAnimatedStyleForRenderer(RenderElement&);
    5555
  • trunk/Source/WebCore/page/animation/CompositeAnimation.cpp

    r200047 r200098  
    7878}
    7979
    80 void CompositeAnimation::updateTransitions(RenderElement* renderer, RenderStyle* currentStyle, RenderStyle* targetStyle)
     80void CompositeAnimation::updateTransitions(RenderElement* renderer, const RenderStyle* currentStyle, const RenderStyle* targetStyle)
    8181{
    8282    // If currentStyle is null or there are no old or new transitions, just skip it
     
    9494    if (targetStyle->transitions()) {
    9595        for (size_t i = 0; i < targetStyle->transitions()->size(); ++i) {
    96             Animation& animation = targetStyle->transitions()->animation(i);
     96            auto& animation = targetStyle->transitions()->animation(i);
    9797            bool isActiveTransition = !m_suspended && (animation.duration() || animation.delay() > 0);
    9898
     
    123123                // against the unanimated style here, but we "override" the transition later.
    124124                RefPtr<KeyframeAnimation> keyframeAnim = getAnimationForProperty(prop);
    125                 RenderStyle* fromStyle = keyframeAnim ? keyframeAnim->unanimatedStyle() : currentStyle;
     125                auto* fromStyle = keyframeAnim ? keyframeAnim->unanimatedStyle() : currentStyle;
    126126
    127127                // See if there is a current transition for this prop
     
    196196}
    197197
    198 void CompositeAnimation::updateKeyframeAnimations(RenderElement* renderer, RenderStyle* currentStyle, RenderStyle* targetStyle)
     198void CompositeAnimation::updateKeyframeAnimations(RenderElement* renderer, const RenderStyle* currentStyle, const RenderStyle* targetStyle)
    199199{
    200200    // Nothing to do if we don't have any animations, and didn't have any before
     
    222222        int numAnims = targetStyle->animations()->size();
    223223        for (int i = 0; i < numAnims; ++i) {
    224             Animation& animation = targetStyle->animations()->animation(i);
     224            auto& animation = targetStyle->animations()->animation(i);
    225225            AtomicString animationName(animation.name());
    226226
     
    285285}
    286286
    287 bool CompositeAnimation::animate(RenderElement& renderer, RenderStyle* currentStyle, RenderStyle& targetStyle, std::unique_ptr<RenderStyle>& blendedStyle)
     287bool CompositeAnimation::animate(RenderElement& renderer, const RenderStyle* currentStyle, const RenderStyle& targetStyle, std::unique_ptr<RenderStyle>& blendedStyle)
    288288{
    289289    // We don't do any transitions if we don't have a currentStyle (on startup).
  • trunk/Source/WebCore/page/animation/CompositeAnimation.h

    r199964 r200098  
    5757    void clearRenderer();
    5858
    59     bool animate(RenderElement&, RenderStyle* currentStyle, RenderStyle& targetStyle, std::unique_ptr<RenderStyle>& blendedStyle);
     59    bool animate(RenderElement&, const RenderStyle* currentStyle, const RenderStyle& targetStyle, std::unique_ptr<RenderStyle>& blendedStyle);
    6060    std::unique_ptr<RenderStyle> getAnimatedStyle() const;
    6161    bool computeExtentOfTransformAnimation(LayoutRect&) const;
     
    8989    CompositeAnimation(AnimationControllerPrivate&);
    9090
    91     void updateTransitions(RenderElement*, RenderStyle* currentStyle, RenderStyle* targetStyle);
    92     void updateKeyframeAnimations(RenderElement*, RenderStyle* currentStyle, RenderStyle* targetStyle);
     91    void updateTransitions(RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle);
     92    void updateKeyframeAnimations(RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle);
    9393   
    9494    typedef HashMap<int, RefPtr<ImplicitAnimation>> CSSPropertyTransitionsMap;
  • trunk/Source/WebCore/page/animation/ImplicitAnimation.cpp

    r200041 r200098  
    4040namespace WebCore {
    4141
    42 ImplicitAnimation::ImplicitAnimation(Animation& transition, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compAnim, RenderStyle* fromStyle)
     42ImplicitAnimation::ImplicitAnimation(const Animation& transition, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compAnim, const RenderStyle* fromStyle)
    4343    : AnimationBase(transition, renderer, compAnim)
    4444    , m_fromStyle(RenderStyle::clonePtr(*fromStyle))
     
    6161}
    6262
    63 bool ImplicitAnimation::animate(CompositeAnimation*, RenderElement*, const RenderStyle*, RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle)
     63bool ImplicitAnimation::animate(CompositeAnimation*, RenderElement*, const RenderStyle*, const RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle)
    6464{
    6565    // If we get this far and the animation is done, it means we are cleaning up a just finished animation.
     
    206206}
    207207
    208 void ImplicitAnimation::reset(RenderStyle* to)
     208void ImplicitAnimation::reset(const RenderStyle* to)
    209209{
    210210    ASSERT(to);
  • trunk/Source/WebCore/page/animation/ImplicitAnimation.h

    r199964 r200098  
    4242class ImplicitAnimation : public AnimationBase {
    4343public:
    44     static Ref<ImplicitAnimation> create(Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* fromStyle)
     44    static Ref<ImplicitAnimation> create(const Animation& animation, CSSPropertyID animatingProperty, RenderElement* renderer, CompositeAnimation* compositeAnimation, const RenderStyle* fromStyle)
    4545    {
    4646        return adoptRef(*new ImplicitAnimation(animation, animatingProperty, renderer, compositeAnimation, fromStyle));
     
    5555    void endAnimation() override;
    5656
    57     bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle) override;
     57    bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle) override;
    5858    void getAnimatedStyle(std::unique_ptr<RenderStyle>& animatedStyle) override;
    59     virtual void reset(RenderStyle* to);
     59    void reset(const RenderStyle* to);
    6060
    6161    bool computeExtentOfTransformAnimation(LayoutRect&) const override;
     
    8888
    8989private:
    90     ImplicitAnimation(Animation&, CSSPropertyID, RenderElement*, CompositeAnimation*, RenderStyle*);
     90    ImplicitAnimation(const Animation&, CSSPropertyID, RenderElement*, CompositeAnimation*, const RenderStyle*);
    9191    virtual ~ImplicitAnimation();
    9292
  • trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp

    r200047 r200098  
    4242namespace WebCore {
    4343
    44 KeyframeAnimation::KeyframeAnimation(Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* unanimatedStyle)
     44KeyframeAnimation::KeyframeAnimation(const Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation, const RenderStyle* unanimatedStyle)
    4545    : AnimationBase(animation, renderer, compositeAnimation)
    4646    , m_keyframes(animation.name())
     
    125125}
    126126
    127 bool KeyframeAnimation::animate(CompositeAnimation* compositeAnimation, RenderElement*, const RenderStyle*, RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle)
     127bool KeyframeAnimation::animate(CompositeAnimation* compositeAnimation, RenderElement*, const RenderStyle*, const RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle)
    128128{
    129129    // Fire the start timeout if needed
  • trunk/Source/WebCore/page/animation/KeyframeAnimation.h

    r200047 r200098  
    4141class KeyframeAnimation final : public AnimationBase {
    4242public:
    43     static Ref<KeyframeAnimation> create(Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation, RenderStyle* unanimatedStyle)
     43    static Ref<KeyframeAnimation> create(const Animation& animation, RenderElement* renderer, CompositeAnimation* compositeAnimation, const RenderStyle* unanimatedStyle)
    4444    {
    4545        return adoptRef(*new KeyframeAnimation(animation, renderer, compositeAnimation, unanimatedStyle));
    4646    }
    4747
    48     bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle) override;
     48    bool animate(CompositeAnimation*, RenderElement*, const RenderStyle* currentStyle, const RenderStyle* targetStyle, std::unique_ptr<RenderStyle>& animatedStyle) override;
    4949    void getAnimatedStyle(std::unique_ptr<RenderStyle>&) override;
    5050
     
    8989
    9090private:
    91     KeyframeAnimation(Animation&, RenderElement*, CompositeAnimation*, RenderStyle* unanimatedStyle);
     91    KeyframeAnimation(const Animation&, RenderElement*, CompositeAnimation*, const RenderStyle* unanimatedStyle);
    9292    virtual ~KeyframeAnimation();
    9393   
  • trunk/Source/WebCore/page/ios/FrameIOS.mm

    r193884 r200098  
    288288        }
    289289
    290         RenderStyle& style = renderer->style();
     290        auto& style = renderer->style();
    291291
    292292        if (renderer->hasOverflowClip() &&
  • trunk/Source/WebCore/rendering/FlowThreadController.cpp

    r187659 r200098  
    8282void FlowThreadController::styleDidChange()
    8383{
    84     RenderStyle& viewStyle = m_view->style();
     84    auto& viewStyle = m_view->style();
    8585    for (auto& flowRenderer : *m_renderNamedFlowThreadList)
    8686        flowRenderer->setStyle(RenderFlowThread::createFlowThreadStyle(&viewStyle));
  • trunk/Source/WebCore/rendering/InlineFlowBox.cpp

    r196222 r200098  
    13291329{
    13301330    LayoutRect clipRect(paintRect);
    1331     RenderStyle& style = box->renderer().style();
     1331    auto& style = box->renderer().style();
    13321332    LayoutBoxExtent outsets = style.imageOutsets(image);
    13331333    if (box->isHorizontal()) {
  • trunk/Source/WebCore/rendering/RenderBlock.cpp

    r200041 r200098  
    288288void RenderBlock::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
    289289{
    290     RenderStyle& newStyle = style();
     290    auto& newStyle = style();
    291291
    292292    bool hadTransform = hasTransform();
     
    28382838
    28392839    if (firstLine && view().usesFirstLineRules()) {
    2840         RenderStyle& s = firstLine ? firstLineStyle() : style();
     2840        auto& s = firstLine ? firstLineStyle() : style();
    28412841        if (&s != &style())
    28422842            return s.computedLineHeight();
     
    29772977}
    29782978
    2979 static RenderStyle& styleForFirstLetter(RenderElement* firstLetterBlock, RenderObject* firstLetterContainer)
    2980 {
    2981     RenderStyle* pseudoStyle = firstLetterBlock->getCachedPseudoStyle(FIRST_LETTER, &firstLetterContainer->firstLineStyle());
     2979static const RenderStyle& styleForFirstLetter(RenderElement* firstLetterBlock, RenderObject* firstLetterContainer)
     2980{
     2981    auto* pseudoStyle = firstLetterBlock->getMutableCachedPseudoStyle(FIRST_LETTER, &firstLetterContainer->firstLineStyle());
    29822982   
    29832983    // If we have an initial letter drop that is >= 1, then we need to force floating to be on.
     
    30623062    RenderElement* firstLetter = currentChild->parent();
    30633063    RenderElement* firstLetterContainer = firstLetter->parent();
    3064     RenderStyle& pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetterContainer);
     3064    auto& pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetterContainer);
    30653065    ASSERT(firstLetter->isFloating() || firstLetter->isInline());
    30663066
     
    31033103{
    31043104    RenderElement* firstLetterContainer = currentTextChild->parent();
    3105     RenderStyle& pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetterContainer);
     3105    auto& pseudoStyle = styleForFirstLetter(firstLetterBlock, firstLetterContainer);
    31063106    RenderBoxModelObject* firstLetter = nullptr;
    31073107    if (pseudoStyle.display() == INLINE)
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r200041 r200098  
    16161616}
    16171617
    1618 static inline LayoutUnit calculateMinimumPageHeight(RenderStyle& renderStyle, RootInlineBox& lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
     1618static inline LayoutUnit calculateMinimumPageHeight(const RenderStyle& renderStyle, RootInlineBox& lastLine, LayoutUnit lineTop, LayoutUnit lineBottom)
    16191619{
    16201620    // We may require a certain minimum number of lines per page in order to satisfy
     
    37243724        if (isVisibleRenderText(descendent) && resizeTextPermitted(descendent)) {
    37253725            RenderText& text = downcast<RenderText>(*descendent);
    3726             RenderStyle& oldStyle = text.style();
     3726            auto& oldStyle = text.style();
    37273727            auto fontDescription = oldStyle.fontDescription();
    37283728            float specifiedSize = fontDescription.specifiedSize();
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r200041 r200098  
    385385        // Propagate the new writing mode and direction up to the RenderView.
    386386        auto* documentElementRenderer = document().documentElement()->renderer();
    387         RenderStyle& viewStyle = view().style();
     387        auto& viewStyle = view().mutableStyle();
    388388        bool viewChangedWritingMode = false;
    389389        bool rootStyleChanged = false;
     
    394394            viewStyleChanged = true;
    395395            if (isBodyRenderer) {
    396                 rootRenderer->style().setDirection(newStyle.direction());
     396                rootRenderer->mutableStyle().setDirection(newStyle.direction());
    397397                rootStyleChanged = true;
    398398            }
     
    408408            if (isBodyRenderer) {
    409409                rootStyleChanged = true;
    410                 rootRenderer->style().setWritingMode(newStyle.writingMode());
     410                rootRenderer->mutableStyle().setWritingMode(newStyle.writingMode());
    411411                rootRenderer->setHorizontalWritingMode(newStyle.isHorizontalWritingMode());
    412412            }
     
    433433            // the basis of the grid.
    434434            if (newStyle.fontDescription() != view().style().fontDescription()) {
    435                 view().style().setFontDescription(newStyle.fontDescription());
    436                 view().style().fontCascade().update(&document().fontSelector());
     435                view().mutableStyle().setFontDescription(newStyle.fontDescription());
     436                view().mutableStyle().fontCascade().update(&document().fontSelector());
    437437            }
    438438        }
     
    681681RoundedRect::Radii RenderBox::borderRadii() const
    682682{
    683     RenderStyle& style = this->style();
     683    auto& style = this->style();
    684684    LayoutRect bounds = frameRect();
    685685
     
    48154815}
    48164816
    4817 LayoutRect RenderBox::logicalVisualOverflowRectForPropagation(RenderStyle* parentStyle) const
     4817LayoutRect RenderBox::logicalVisualOverflowRectForPropagation(const RenderStyle* parentStyle) const
    48184818{
    48194819    LayoutRect rect = visualOverflowRectForPropagation(parentStyle);
     
    48234823}
    48244824
    4825 LayoutRect RenderBox::visualOverflowRectForPropagation(RenderStyle* parentStyle) const
     4825LayoutRect RenderBox::visualOverflowRectForPropagation(const RenderStyle* parentStyle) const
    48264826{
    48274827    // If the writing modes of the child and parent match, then we don't have to
     
    48414841}
    48424842
    4843 LayoutRect RenderBox::logicalLayoutOverflowRectForPropagation(RenderStyle* parentStyle) const
     4843LayoutRect RenderBox::logicalLayoutOverflowRectForPropagation(const RenderStyle* parentStyle) const
    48444844{
    48454845    LayoutRect rect = layoutOverflowRectForPropagation(parentStyle);
     
    48494849}
    48504850
    4851 LayoutRect RenderBox::layoutOverflowRectForPropagation(RenderStyle* parentStyle) const
     4851LayoutRect RenderBox::layoutOverflowRectForPropagation(const RenderStyle* parentStyle) const
    48524852{
    48534853    // Only propagate interior layout overflow if we don't clip it.
  • trunk/Source/WebCore/rendering/RenderBox.h

    r200041 r200098  
    564564    }
    565565
    566     LayoutRect logicalVisualOverflowRectForPropagation(RenderStyle*) const;
    567     LayoutRect visualOverflowRectForPropagation(RenderStyle*) const;
    568     LayoutRect logicalLayoutOverflowRectForPropagation(RenderStyle*) const;
    569     LayoutRect layoutOverflowRectForPropagation(RenderStyle*) const;
     566    LayoutRect logicalVisualOverflowRectForPropagation(const RenderStyle*) const;
     567    LayoutRect visualOverflowRectForPropagation(const RenderStyle*) const;
     568    LayoutRect logicalLayoutOverflowRectForPropagation(const RenderStyle*) const;
     569    LayoutRect layoutOverflowRectForPropagation(const RenderStyle*) const;
    570570
    571571    bool hasRenderOverflow() const { return m_overflow; }   
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r200041 r200098  
    582582}
    583583
    584 static void applyBoxShadowForBackground(GraphicsContext& context, RenderStyle* style)
     584static void applyBoxShadowForBackground(GraphicsContext& context, const RenderStyle* style)
    585585{
    586586    const ShadowData* boxShadow = style->boxShadow();
  • trunk/Source/WebCore/rendering/RenderButton.cpp

    r200041 r200098  
    7070        ASSERT(!firstChild());
    7171        m_inner = createAnonymousBlock(style().display());
    72         setupInnerStyle(&m_inner->style());
     72        setupInnerStyle(&m_inner->mutableStyle());
    7373        RenderFlexibleBox::addChild(m_inner);
    7474    }
     
    9898        // because of the difference. Same goes for the other properties.
    9999        // FIXME: Make this hack unnecessary.
    100         m_inner->style().setFlexGrow(newStyle.initialFlexGrow());
    101         m_inner->style().setMarginTop(newStyle.initialMargin());
    102         m_inner->style().setMarginBottom(newStyle.initialMargin());
     100        m_inner->mutableStyle().setFlexGrow(newStyle.initialFlexGrow());
     101        m_inner->mutableStyle().setMarginTop(newStyle.initialMargin());
     102        m_inner->mutableStyle().setMarginBottom(newStyle.initialMargin());
    103103    }
    104104    RenderBlock::styleWillChange(diff, newStyle);
     
    110110
    111111    if (m_inner) // RenderBlock handled updating the anonymous block's style.
    112         setupInnerStyle(&m_inner->style());
     112        setupInnerStyle(&m_inner->mutableStyle());
    113113}
    114114
     
    175175
    176176    // FIXME: We should not be adjusting styles during layout. See <rdar://problem/7675493>.
    177     RenderThemeIOS::adjustRoundBorderRadius(style(), *this);
     177    RenderThemeIOS::adjustRoundBorderRadius(mutableStyle(), *this);
    178178}
    179179#endif
  • trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp

    r200041 r200098  
    166166void RenderDeprecatedFlexibleBox::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
    167167{
    168     RenderStyle* oldStyle = hasInitializedStyle() ? &style() : nullptr;
     168    auto* oldStyle = hasInitializedStyle() ? &style() : nullptr;
    169169    if (oldStyle && !oldStyle->lineClamp().isNone() && newStyle.lineClamp().isNone())
    170170        clearLineClamp();
  • trunk/Source/WebCore/rendering/RenderElement.cpp

    r200041 r200098  
    206206}
    207207
    208 enum StyleCacheState {
    209     Cached,
    210     Uncached
    211 };
    212 
    213208std::unique_ptr<RenderStyle> RenderElement::uncachedFirstLineStyle(RenderStyle* style) const
    214209{
     
    222217            return firstLineBlock->getUncachedPseudoStyle(PseudoStyleRequest(FIRST_LINE), style, firstLineBlock == this ? style : nullptr);
    223218    } else if (!rendererForFirstLineStyle.isAnonymous() && rendererForFirstLineStyle.isRenderInline()) {
    224         RenderStyle& parentStyle = rendererForFirstLineStyle.parent()->firstLineStyle();
     219        auto& parentStyle = rendererForFirstLineStyle.parent()->firstLineStyle();
    225220        if (&parentStyle != &rendererForFirstLineStyle.parent()->style())
    226221            return rendererForFirstLineStyle.getUncachedPseudoStyle(PseudoStyleRequest(FIRST_LINE_INHERITED), &parentStyle, style);
     
    229224}
    230225
    231 RenderStyle* RenderElement::cachedFirstLineStyle() const
     226const RenderStyle* RenderElement::cachedFirstLineStyle() const
    232227{
    233228    ASSERT(view().usesFirstLineRules());
     
    239234            return firstLineBlock->getCachedPseudoStyle(FIRST_LINE, &style());
    240235    } else if (!rendererForFirstLineStyle.isAnonymous() && rendererForFirstLineStyle.isRenderInline()) {
    241         RenderStyle& parentStyle = rendererForFirstLineStyle.parent()->firstLineStyle();
     236        auto& parentStyle = rendererForFirstLineStyle.parent()->firstLineStyle();
    242237        if (&parentStyle != &rendererForFirstLineStyle.parent()->style()) {
    243238            // A first-line style is in effect. Cache a first-line style for ourselves.
    244             rendererForFirstLineStyle.style().setHasPseudoStyle(FIRST_LINE_INHERITED);
     239            rendererForFirstLineStyle.m_style.setHasPseudoStyle(FIRST_LINE_INHERITED);
    245240            return rendererForFirstLineStyle.getCachedPseudoStyle(FIRST_LINE_INHERITED, &parentStyle);
    246241        }
     
    250245}
    251246
    252 RenderStyle& RenderElement::firstLineStyle() const
     247const RenderStyle& RenderElement::firstLineStyle() const
    253248{
    254249    return view().usesFirstLineRules() ? *cachedFirstLineStyle() : style();
     
    807802void RenderElement::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
    808803{
    809     RenderStyle* oldStyle = hasInitializedStyle() ? &style() : nullptr;
     804    auto* oldStyle = hasInitializedStyle() ? &style() : nullptr;
    810805    if (oldStyle) {
    811806        // If our z-index changes value or our visibility changes,
     
    15361531}
    15371532
    1538 RenderStyle* RenderElement::getCachedPseudoStyle(PseudoId pseudo, RenderStyle* parentStyle) const
     1533const RenderStyle* RenderElement::getCachedPseudoStyle(PseudoId pseudo, const RenderStyle* parentStyle) const
    15391534{
    15401535    if (pseudo < FIRST_INTERNAL_PSEUDOID && !style().hasPseudoStyle(pseudo))
     
    15471542    std::unique_ptr<RenderStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
    15481543    if (result)
    1549         return style().addCachedPseudoStyle(WTFMove(result));
     1544        return const_cast<RenderStyle&>(m_style).addCachedPseudoStyle(WTFMove(result));
    15501545    return nullptr;
    15511546}
    15521547
    1553 std::unique_ptr<RenderStyle> RenderElement::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, RenderStyle* parentStyle, RenderStyle* ownStyle) const
     1548RenderStyle* RenderElement::getMutableCachedPseudoStyle(PseudoId pseudo, const RenderStyle* parentStyle)
     1549{
     1550    if (pseudo < FIRST_INTERNAL_PSEUDOID && !style().hasPseudoStyle(pseudo))
     1551        return nullptr;
     1552
     1553    RenderStyle* cachedStyle = style().getCachedPseudoStyle(pseudo);
     1554    if (cachedStyle)
     1555        return cachedStyle;
     1556
     1557    std::unique_ptr<RenderStyle> result = getUncachedPseudoStyle(PseudoStyleRequest(pseudo), parentStyle);
     1558    if (result)
     1559        return m_style.addCachedPseudoStyle(WTFMove(result));
     1560    return nullptr;
     1561}
     1562
     1563std::unique_ptr<RenderStyle> RenderElement::getUncachedPseudoStyle(const PseudoStyleRequest& pseudoStyleRequest, const RenderStyle* parentStyle, const RenderStyle* ownStyle) const
    15541564{
    15551565    if (pseudoStyleRequest.pseudoId < FIRST_INTERNAL_PSEUDOID && !ownStyle && !style().hasPseudoStyle(pseudoStyleRequest.pseudoId))
     
    20672077        return;
    20682078
    2069     RenderStyle& styleToUse = style();
     2079    auto& styleToUse = style();
    20702080    float outlineWidth = floorToDevicePixel(styleToUse.outlineWidth(), document().deviceScaleFactor());
    20712081    float outlineOffset = floorToDevicePixel(styleToUse.outlineOffset(), document().deviceScaleFactor());
  • trunk/Source/WebCore/rendering/RenderElement.h

    r200041 r200098  
    4141    bool hasInitializedStyle() const { return m_hasInitializedStyle; }
    4242
    43     RenderStyle& style() const { return const_cast<RenderStyle&>(m_style); }
    44     RenderStyle& firstLineStyle() const;
     43    const RenderStyle& style() const { return m_style; }
     44    const RenderStyle& firstLineStyle() const;
     45
     46    // FIXME: Style shouldn't be mutated.
     47    RenderStyle& mutableStyle() { return m_style; }
    4548
    4649    void initializeStyle();
     
    5356    // The pseudo element style can be cached or uncached.  Use the cached method if the pseudo element doesn't respect
    5457    // any pseudo classes (and therefore has no concept of changing state).
    55     RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = nullptr) const;
    56     std::unique_ptr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, RenderStyle* parentStyle = nullptr, RenderStyle* ownStyle = nullptr) const;
     58    const RenderStyle* getCachedPseudoStyle(PseudoId, const RenderStyle* parentStyle = nullptr) const;
     59    RenderStyle* getMutableCachedPseudoStyle(PseudoId, const RenderStyle* parentStyle = nullptr);
     60    std::unique_ptr<RenderStyle> getUncachedPseudoStyle(const PseudoStyleRequest&, const RenderStyle* parentStyle = nullptr, const RenderStyle* ownStyle = nullptr) const;
    5761
    5862    // This is null for anonymous renderers.
     
    299303
    300304    StyleDifference adjustStyleDifference(StyleDifference, unsigned contextSensitiveProperties) const;
    301     RenderStyle* cachedFirstLineStyle() const;
     305    const RenderStyle* cachedFirstLineStyle() const;
    302306
    303307    void newImageAnimationFrameAvailable(CachedImage&) final;
     
    451455}
    452456
    453 inline RenderStyle& RenderObject::style() const
     457inline const RenderStyle& RenderObject::style() const
    454458{
    455459    if (isText())
     
    458462}
    459463
    460 inline RenderStyle& RenderObject::firstLineStyle() const
     464inline const RenderStyle& RenderObject::firstLineStyle() const
    461465{
    462466    if (isText())
  • trunk/Source/WebCore/rendering/RenderEmbeddedObject.cpp

    r200041 r200098  
    523523   
    524524    childBox.setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
    525     childBox.style().setHeight(Length(newSize.height(), Fixed));
    526     childBox.style().setWidth(Length(newSize.width(), Fixed));
     525    childBox.mutableStyle().setHeight(Length(newSize.height(), Fixed));
     526    childBox.mutableStyle().setWidth(Length(newSize.width(), Fixed));
    527527    childBox.setNeedsLayout(MarkOnlyThis);
    528528    childBox.layout();
  • trunk/Source/WebCore/rendering/RenderFlowThread.cpp

    r200041 r200098  
    7070}
    7171
    72 RenderStyle RenderFlowThread::createFlowThreadStyle(RenderStyle* parentStyle)
     72RenderStyle RenderFlowThread::createFlowThreadStyle(const RenderStyle* parentStyle)
    7373{
    7474    auto newStyle = RenderStyle::create();
  • trunk/Source/WebCore/rendering/RenderFlowThread.h

    r200041 r200098  
    100100    virtual void flowThreadDescendantBoxLaidOut(RenderBox*) { }
    101101
    102     static RenderStyle createFlowThreadStyle(RenderStyle* parentStyle);
     102    static RenderStyle createFlowThreadStyle(const RenderStyle* parentStyle);
    103103
    104104    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
  • trunk/Source/WebCore/rendering/RenderImage.cpp

    r200041 r200098  
    717717    if (shadowControlsNeedCustomLayoutMetrics()) {
    718718        controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + LayoutSize(paddingLeft(), paddingTop()));
    719         controlsRenderer->style().setHeight(Length(newSize.height(), Fixed));
    720         controlsRenderer->style().setWidth(Length(newSize.width(), Fixed));
     719        controlsRenderer->mutableStyle().setHeight(Length(newSize.height(), Fixed));
     720        controlsRenderer->mutableStyle().setWidth(Length(newSize.width(), Fixed));
    721721    }
    722722
  • trunk/Source/WebCore/rendering/RenderInline.cpp

    r200041 r200098  
    188188    // and after the block share the same style, but the block doesn't
    189189    // need to pass its style on to anyone else.
    190     RenderStyle& newStyle = style();
     190    auto& newStyle = style();
    191191    RenderInline* continuation = inlineElementContinuation();
    192192    if (continuation) {
     
    221221        return;
    222222
    223     RenderStyle* parentStyle = &parent()->style();
     223    auto* parentStyle = &parent()->style();
    224224    RenderInline* parentRenderInline = is<RenderInline>(*parent()) ? downcast<RenderInline>(parent()) : nullptr;
    225225    bool checkFonts = document().inNoQuirksMode();
     
    236236        // Have to check the first line style as well.
    237237        parentStyle = &parent()->firstLineStyle();
    238         RenderStyle& childStyle = firstLineStyle();
     238        auto& childStyle = firstLineStyle();
    239239        alwaysCreateLineBoxes = !parentStyle->fontCascade().fontMetrics().hasIdenticalAscentDescentAndLineGap(childStyle.fontCascade().fontMetrics())
    240240            || childStyle.verticalAlign() != BASELINE
     
    16021602        return;
    16031603
    1604     RenderStyle& styleToUse = style();
     1604    auto& styleToUse = style();
    16051605    // Only paint the focus ring by hand if the theme isn't able to draw it.
    16061606    if (styleToUse.outlineStyleIsAuto() && !theme().supportsFocusRing(styleToUse)) {
  • trunk/Source/WebCore/rendering/RenderLayer.cpp

    r200041 r200098  
    41124112    }
    41134113
    4114     RenderStyle& style = renderer().style();
     4114    auto& style = renderer().style();
    41154115    ASSERT(style.clipPath());
    41164116    if (is<ShapeClipPathOperation>(*style.clipPath()) || (is<BoxClipPathOperation>(*style.clipPath()) && is<RenderBox>(renderer()))) {
  • trunk/Source/WebCore/rendering/RenderListBox.cpp

    r200041 r200098  
    355355}
    356356
    357 static LayoutSize itemOffsetForAlignment(TextRun textRun, RenderStyle* itemStyle, FontCascade itemFont, LayoutRect itemBoudingBox)
     357static LayoutSize itemOffsetForAlignment(TextRun textRun, const RenderStyle* itemStyle, FontCascade itemFont, LayoutRect itemBoudingBox)
    358358{
    359359    ETextAlign actualAlignment = itemStyle->textAlign();
     
    380380    HTMLElement* listItemElement = listItems[listIndex];
    381381
    382     RenderStyle& itemStyle = *listItemElement->computedStyle();
     382    auto& itemStyle = *listItemElement->computedStyle();
    383383
    384384    if (itemStyle.visibility() == HIDDEN)
     
    424424    const Vector<HTMLElement*>& listItems = selectElement().listItems();
    425425    HTMLElement* listItemElement = listItems[listIndex];
    426     RenderStyle& itemStyle = *listItemElement->computedStyle();
     426    auto& itemStyle = *listItemElement->computedStyle();
    427427
    428428    Color backColor;
  • trunk/Source/WebCore/rendering/RenderListMarker.cpp

    r200041 r200098  
    17091709    }
    17101710
    1711     style().setMarginStart(Length(marginStart, Fixed));
    1712     style().setMarginEnd(Length(marginEnd, Fixed));
     1711    mutableStyle().setMarginStart(Length(marginStart, Fixed));
     1712    mutableStyle().setMarginEnd(Length(marginEnd, Fixed));
    17131713}
    17141714
  • trunk/Source/WebCore/rendering/RenderMarquee.cpp

    r194466 r200098  
    111111    RenderBox* box = m_layer->renderBox();
    112112    ASSERT(box);
    113     RenderStyle& boxStyle = box->style();
     113    auto& boxStyle = box->style();
    114114    if (isHorizontal()) {
    115115        bool ltr = boxStyle.isLeftToRightDirection();
     
    198198void RenderMarquee::updateMarqueeStyle()
    199199{
    200     RenderStyle& style = m_layer->renderer().style();
     200    auto& style = m_layer->renderer().mutableStyle();
    201201   
    202202    if (m_direction != style.marqueeDirection() || (m_totalLoops != style.marqueeLoopCount() && m_currentLoop >= m_totalLoops))
  • trunk/Source/WebCore/rendering/RenderMenuList.cpp

    r200041 r200098  
    110110void RenderMenuList::adjustInnerStyle()
    111111{
    112     RenderStyle& innerStyle = m_innerBlock->style();
     112    auto& innerStyle = m_innerBlock->mutableStyle();
    113113    innerStyle.setFlexGrow(1);
    114114    innerStyle.setFlexShrink(1);
     
    216216            // Add in the option's text indent.  We can't calculate percentage values for now.
    217217            float optionWidth = 0;
    218             if (RenderStyle* optionStyle = element->computedStyle())
     218            if (auto* optionStyle = element->computedStyle())
    219219                optionWidth += minimumValueForLength(optionStyle->textIndent(), 0);
    220220            if (!text.isEmpty()) {
     
    520520    getItemBackgroundColor(listIndex, itemBackgroundColor, itemHasCustomBackgroundColor);
    521521
    522     RenderStyle& style = *element->computedStyle();
     522    auto& style = *element->computedStyle();
    523523    return PopupMenuStyle(style.visitedDependentColor(CSSPropertyColor), itemBackgroundColor, style.fontCascade(), style.visibility() == VISIBLE,
    524524        style.display() == NONE, true, style.textIndent(), style.direction(), isOverride(style.unicodeBidi()),
  • trunk/Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp

    r200041 r200098  
    240240
    241241    // First make sure that the renderer itself has the right properties for becoming a spanner.
    242     RenderStyle& style = descendant->style();
     242    auto& style = descendant->style();
    243243    if (style.columnSpan() != ColumnSpanAll || !is<RenderBox>(*descendant) || descendant->isFloatingOrOutOfFlowPositioned())
    244244        return false;
  • trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.cpp

    r200041 r200098  
    3535namespace WebCore {
    3636
    37 RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlowThread* flowThread, RenderBox* spanner, RenderStyle* parentStyle)
     37RenderMultiColumnSpannerPlaceholder* RenderMultiColumnSpannerPlaceholder::createAnonymous(RenderMultiColumnFlowThread* flowThread, RenderBox* spanner, const RenderStyle* parentStyle)
    3838{
    3939    auto newStyle = RenderStyle::createAnonymousStyleWithDisplay(*parentStyle, BLOCK);
  • trunk/Source/WebCore/rendering/RenderMultiColumnSpannerPlaceholder.h

    r200041 r200098  
    3939class RenderMultiColumnSpannerPlaceholder final : public RenderBox {
    4040public:
    41     static RenderMultiColumnSpannerPlaceholder* createAnonymous(RenderMultiColumnFlowThread*, RenderBox* spanner, RenderStyle* parentStyle);
     41    static RenderMultiColumnSpannerPlaceholder* createAnonymous(RenderMultiColumnFlowThread*, RenderBox* spanner, const RenderStyle* parentStyle);
    4242
    4343    RenderBox* spanner() const { return m_spanner; }
  • trunk/Source/WebCore/rendering/RenderNamedFlowFragment.cpp

    r200041 r200098  
    348348}
    349349
    350 std::unique_ptr<RenderStyle> RenderNamedFlowFragment::computeStyleInRegion(RenderElement& renderer, RenderStyle& parentStyle) const
     350std::unique_ptr<RenderStyle> RenderNamedFlowFragment::computeStyleInRegion(RenderElement& renderer, const RenderStyle& parentStyle) const
    351351{
    352352    ASSERT(!renderer.isAnonymous());
  • trunk/Source/WebCore/rendering/RenderNamedFlowFragment.h

    r200041 r200098  
    124124    const char* renderName() const override { return "RenderNamedFlowFragment"; }
    125125
    126     std::unique_ptr<RenderStyle> computeStyleInRegion(RenderElement&, RenderStyle& parentStyle) const;
     126    std::unique_ptr<RenderStyle> computeStyleInRegion(RenderElement&, const RenderStyle& parentStyle) const;
    127127    void computeChildrenStyleInRegion(RenderElement&);
    128128    void setObjectStyleInRegion(RenderObject*, std::unique_ptr<RenderStyle>, bool objectRegionStyleCached);
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r199068 r200098  
    18231823}
    18241824
    1825 static Color decorationColor(RenderStyle* style)
     1825static Color decorationColor(const RenderStyle* style)
    18261826{
    18271827    Color result;
     
    18451845{
    18461846    const RenderObject* current = this;
    1847     RenderStyle* styleToUse = nullptr;
     1847    const RenderStyle* styleToUse = nullptr;
    18481848    TextDecoration currDecs = TextDecorationNone;
    18491849    Color resultColor;
  • trunk/Source/WebCore/rendering/RenderObject.h

    r199068 r200098  
    698698    virtual LayoutUnit maxPreferredLogicalWidth() const { return 0; }
    699699
    700     RenderStyle& style() const;
    701     RenderStyle& firstLineStyle() const;
     700    const RenderStyle& style() const;
     701    const RenderStyle& firstLineStyle() const;
    702702
    703703    // Anonymous blocks that are part of of a continuation chain will return their inline continuation's outline style instead.
  • trunk/Source/WebCore/rendering/RenderTable.cpp

    r200041 r200098  
    812812        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_captions[i]->minPreferredLogicalWidth());
    813813
    814     RenderStyle& styleToUse = style();
     814    auto& styleToUse = style();
    815815    // FIXME: This should probably be checking for isSpecified since you should be able to use percentage or calc values for min-width.
    816816    if (styleToUse.logicalMinWidth().isFixed() && styleToUse.logicalMinWidth().value() > 0) {
  • trunk/Source/WebCore/rendering/RenderTableSection.cpp

    r200041 r200098  
    11991199}
    12001200
    1201 static BoxSide physicalBorderForDirection(RenderStyle* styleForCellFlow, CollapsedBorderSide side)
     1201static BoxSide physicalBorderForDirection(const RenderStyle* styleForCellFlow, CollapsedBorderSide side)
    12021202{
    12031203
  • trunk/Source/WebCore/rendering/RenderText.h

    r199818 r200098  
    4949    virtual bool isTextFragment() const;
    5050
    51     RenderStyle& style() const;
    52     RenderStyle& firstLineStyle() const;
    53     RenderStyle* getCachedPseudoStyle(PseudoId, RenderStyle* parentStyle = nullptr) const;
     51    const RenderStyle& style() const;
     52    const RenderStyle& firstLineStyle() const;
     53    const RenderStyle* getCachedPseudoStyle(PseudoId, const RenderStyle* parentStyle = nullptr) const;
    5454
    5555    Color selectionBackgroundColor() const;
     
    252252}
    253253
    254 inline RenderStyle& RenderText::style() const
     254inline const RenderStyle& RenderText::style() const
    255255{
    256256    return parent()->style();
    257257}
    258258
    259 inline RenderStyle& RenderText::firstLineStyle() const
     259inline const RenderStyle& RenderText::firstLineStyle() const
    260260{
    261261    return parent()->firstLineStyle();
    262262}
    263263
    264 inline RenderStyle* RenderText::getCachedPseudoStyle(PseudoId pseudoId, RenderStyle* parentStyle) const
     264inline const RenderStyle* RenderText::getCachedPseudoStyle(PseudoId pseudoId, const RenderStyle* parentStyle) const
    265265{
    266266    return parent()->getCachedPseudoStyle(pseudoId, parentStyle);
  • trunk/Source/WebCore/rendering/RenderTextControl.cpp

    r200041 r200098  
    6666        // We may have set the width and the height in the old style in layout().
    6767        // Reset them now to avoid getting a spurious layout hint.
    68         innerTextRenderer->style().setHeight(Length());
    69         innerTextRenderer->style().setWidth(Length());
     68        innerTextRenderer->mutableStyle().setHeight(Length());
     69        innerTextRenderer->mutableStyle().setWidth(Length());
    7070        innerTextRenderer->setStyle(textFormControlElement().createInnerTextStyle(style()));
    7171    }
  • trunk/Source/WebCore/rendering/RenderTextControlMultiLine.cpp

    r200041 r200098  
    9393    if (is<RenderBox>(placeholderRenderer)) {
    9494        auto& placeholderBox = downcast<RenderBox>(*placeholderRenderer);
    95         placeholderBox.style().setLogicalWidth(Length(contentLogicalWidth() - placeholderBox.borderAndPaddingLogicalWidth(), Fixed));
     95        placeholderBox.mutableStyle().setLogicalWidth(Length(contentLogicalWidth() - placeholderBox.borderAndPaddingLogicalWidth(), Fixed));
    9696        placeholderBox.layoutIfNeeded();
    9797        placeholderBox.setX(borderLeft() + paddingLeft());
  • trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp

    r200041 r200098  
    109109    // To ensure consistency between layouts, we need to reset any conditionally overriden height.
    110110    if (innerTextRenderer && !innerTextRenderer->style().logicalHeight().isAuto()) {
    111         innerTextRenderer->style().setLogicalHeight(Length(Auto));
     111        innerTextRenderer->mutableStyle().setLogicalHeight(Length(Auto));
    112112        setNeedsLayoutOnAncestors(innerTextRenderer, this);
    113113    }
    114114    if (innerBlockRenderer && !innerBlockRenderer->style().logicalHeight().isAuto()) {
    115         innerBlockRenderer->style().setLogicalHeight(Length(Auto));
     115        innerBlockRenderer->mutableStyle().setLogicalHeight(Length(Auto));
    116116        setNeedsLayoutOnAncestors(innerBlockRenderer, this);
    117117    }
     
    129129            setNeedsLayout(MarkOnlyThis);
    130130
    131         innerTextRenderer->style().setLogicalHeight(Length(desiredLogicalHeight, Fixed));
     131        innerTextRenderer->mutableStyle().setLogicalHeight(Length(desiredLogicalHeight, Fixed));
    132132        innerTextRenderer->setNeedsLayout(MarkOnlyThis);
    133133        if (innerBlockRenderer) {
    134             innerBlockRenderer->style().setLogicalHeight(Length(desiredLogicalHeight, Fixed));
     134            innerBlockRenderer->mutableStyle().setLogicalHeight(Length(desiredLogicalHeight, Fixed));
    135135            innerBlockRenderer->setNeedsLayout(MarkOnlyThis);
    136136        }
     
    141141        LayoutUnit containerLogicalHeight = containerRenderer->logicalHeight();
    142142        if (containerLogicalHeight > logicalHeightLimit) {
    143             containerRenderer->style().setLogicalHeight(Length(logicalHeightLimit, Fixed));
     143            containerRenderer->mutableStyle().setLogicalHeight(Length(logicalHeightLimit, Fixed));
    144144            setNeedsLayout(MarkOnlyThis);
    145145        } else if (containerRenderer->logicalHeight() < contentLogicalHeight()) {
    146             containerRenderer->style().setLogicalHeight(Length(contentLogicalHeight(), Fixed));
     146            containerRenderer->mutableStyle().setLogicalHeight(Length(contentLogicalHeight(), Fixed));
    147147            setNeedsLayout(MarkOnlyThis);
    148148        } else
    149             containerRenderer->style().setLogicalHeight(Length(containerLogicalHeight, Fixed));
     149            containerRenderer->mutableStyle().setLogicalHeight(Length(containerLogicalHeight, Fixed));
    150150    }
    151151
     
    175175        if (innerTextRenderer)
    176176            innerTextSize = innerTextRenderer->size();
    177         placeholderBox->style().setWidth(Length(innerTextSize.width() - placeholderBox->horizontalBorderAndPaddingExtent(), Fixed));
    178         placeholderBox->style().setHeight(Length(innerTextSize.height() - placeholderBox->verticalBorderAndPaddingExtent(), Fixed));
     177        placeholderBox->mutableStyle().setWidth(Length(innerTextSize.width() - placeholderBox->horizontalBorderAndPaddingExtent(), Fixed));
     178        placeholderBox->mutableStyle().setHeight(Length(innerTextSize.height() - placeholderBox->verticalBorderAndPaddingExtent(), Fixed));
    179179        bool neededLayout = placeholderBox->needsLayout();
    180180        bool placeholderBoxHadLayout = placeholderBox->everHadLayout();
     
    203203    // FIXME: We should not be adjusting styles during layout. <rdar://problem/7675493>
    204204    if (inputElement().isSearchField())
    205         RenderThemeIOS::adjustRoundBorderRadius(style(), *this);
     205        RenderThemeIOS::adjustRoundBorderRadius(mutableStyle(), *this);
    206206#endif
    207207}
     
    237237    // Reset them now to avoid getting a spurious layout hint.
    238238    HTMLElement* innerBlock = innerBlockElement();
    239     if (RenderObject* innerBlockRenderer = innerBlock ? innerBlock->renderer() : 0) {
    240         innerBlockRenderer->style().setHeight(Length());
    241         innerBlockRenderer->style().setWidth(Length());
     239    if (auto* innerBlockRenderer = innerBlock ? innerBlock->renderer() : nullptr) {
     240        innerBlockRenderer->mutableStyle().setHeight(Length());
     241        innerBlockRenderer->mutableStyle().setWidth(Length());
    242242    }
    243243    HTMLElement* container = containerElement();
    244     if (RenderObject* containerRenderer = container ? container->renderer() : 0) {
    245         containerRenderer->style().setHeight(Length());
    246         containerRenderer->style().setWidth(Length());
     244    if (auto* containerRenderer = container ? container->renderer() : nullptr) {
     245        containerRenderer->mutableStyle().setHeight(Length());
     246        containerRenderer->mutableStyle().setWidth(Length());
    247247    }
    248248    if (diff == StyleDifferenceLayout) {
  • trunk/Source/WebCore/rendering/RenderTextFragment.cpp

    r179691 r200098  
    6969
    7070    if (RenderBlock* block = blockForAccompanyingFirstLetter()) {
    71         block->style().removeCachedPseudoStyle(FIRST_LETTER);
     71        block->mutableStyle().removeCachedPseudoStyle(FIRST_LETTER);
    7272        block->updateFirstLetter();
    7373    }
  • trunk/Source/WebCore/rendering/RenderThemeGtk.cpp

    r199659 r200098  
    20162016#endif
    20172017
    2018 static FloatRoundedRect::Radii borderRadiiFromStyle(RenderStyle& style)
     2018static FloatRoundedRect::Radii borderRadiiFromStyle(const RenderStyle& style)
    20192019{
    20202020    return FloatRoundedRect::Radii(
     
    20372037    float mediaDuration = mediaElement->duration();
    20382038    float totalTrackWidth = r.width();
    2039     RenderStyle& style = o.style();
     2039    auto& style = o.style();
    20402040    RefPtr<TimeRanges> timeRanges = mediaElement->buffered();
    20412041    for (unsigned index = 0; index < timeRanges->length(); ++index) {
     
    20602060bool RenderThemeGtk::paintMediaSliderThumb(const RenderObject& o, const PaintInfo& paintInfo, const IntRect& r)
    20612061{
    2062     RenderStyle& style = o.style();
     2062    auto& style = o.style();
    20632063    paintInfo.context().fillRoundedRect(FloatRoundedRect(r, borderRadiiFromStyle(style)), style.visitedDependentColor(CSSPropertyColor));
    20642064    return false;
     
    20812081    int rectHeight = rect.height();
    20822082    float trackHeight = rectHeight * volume;
    2083     RenderStyle& style = renderObject.style();
     2083    auto& style = renderObject.style();
    20842084    IntRect volumeRect(rect);
    20852085    volumeRect.move(0, rectHeight - trackHeight);
  • trunk/Source/WebCore/rendering/RenderThemeIOS.mm

    r199640 r200098  
    337337    // To fix inner border bleeding issues <rdar://problem/9812507>, we clip to the outer border and assert that
    338338    // the border is opaque or transparent, unless we're checked because checked radio/checkboxes show no bleeding.
    339     RenderStyle& style = box.style();
     339    auto& style = box.style();
    340340    RoundedRect border = isChecked(box) ? style.getRoundedInnerBorderFor(rect) : style.getRoundedBorderFor(rect);
    341341
     
    500500bool RenderThemeIOS::paintTextFieldDecorations(const RenderObject& box, const PaintInfo& paintInfo, const FloatRect& rect)
    501501{
    502     RenderStyle& style = box.style();
     502    auto& style = box.style();
    503503    FloatPoint point(rect.x() + style.borderLeftWidth(), rect.y() + style.borderTopWidth());
    504504
     
    631631bool RenderThemeIOS::paintMenuListButtonDecorations(const RenderBox& box, const PaintInfo& paintInfo, const FloatRect& rect)
    632632{
    633     RenderStyle& style = box.style();
     633    auto& style = box.style();
    634634    float borderTopWidth = style.borderTopWidth();
    635635    FloatRect clip(rect.x() + style.borderLeftWidth(), rect.y() + style.borderTopWidth(), rect.width() - style.borderLeftWidth() - style.borderRightWidth(), rect.height() - style.borderTopWidth() - style.borderBottomWidth());
     
    735735{
    736736    IntRect trackClip = rect;
    737     RenderStyle& style = box.style();
     737    auto& style = box.style();
    738738
    739739    bool isHorizontal = true;
  • trunk/Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp

    r199516 r200098  
    8585        return;
    8686
    87     RenderStyle& style = flow.style();
     87    auto& style = flow.style();
    8888    if (style.visibility() != VISIBLE)
    8989        return;
     
    141141        return false;
    142142
    143     RenderStyle& style = flow.style();
     143    auto& style = flow.style();
    144144    if (style.visibility() != VISIBLE || style.pointerEvents() == PE_NONE)
    145145        return false;
  • trunk/Source/WebCore/rendering/TextAutoSizing.cpp

    r200041 r200098  
    5252}
    5353
    54 TextAutoSizingKey::TextAutoSizingKey(RenderStyle* style)
     54TextAutoSizingKey::TextAutoSizingKey(const RenderStyle* style)
    5555    : m_style(style ? RenderStyle::clonePtr(*style) : nullptr)
    5656{
  • trunk/Source/WebCore/rendering/TextAutoSizing.h

    r199964 r200098  
    4444    enum DeletedTag { Deleted };
    4545    explicit TextAutoSizingKey(DeletedTag);
    46     explicit TextAutoSizingKey(RenderStyle*);
     46    explicit TextAutoSizingKey(const RenderStyle*);
    4747    TextAutoSizingKey(TextAutoSizingKey&&) = default;
    4848
    4949    TextAutoSizingKey& operator=(TextAutoSizingKey&&) = default;
    5050
    51     RenderStyle* style() const { return m_style.get(); }
     51    const RenderStyle* style() const { return m_style.get(); }
    5252    inline bool isDeleted() const { return m_isDeleted; }
    5353
  • trunk/Source/WebCore/rendering/TextPaintStyle.cpp

    r192140 r200098  
    137137    }
    138138
    139     if (RenderStyle* pseudoStyle = renderer.getCachedPseudoStyle(SELECTION)) {
     139    if (auto* pseudoStyle = renderer.getCachedPseudoStyle(SELECTION)) {
    140140        const ShadowData* shadow = paintInfo.forceTextColor() ? nullptr : pseudoStyle->textShadow();
    141141        if (shadow != selectionShadow) {
  • trunk/Source/WebCore/rendering/line/BreakingContext.h

    r199818 r200098  
    253253    // very specific circumstances (in order to match common WinIE renderings).
    254254    // Not supporting the quirk has caused us to mis-render some real sites. (See Bugzilla 10517.)
    255     RenderStyle& m_blockStyle;
     255    const RenderStyle& m_blockStyle;
    256256
    257257    LineInfo& m_lineInfo;
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp

    r200041 r200098  
    302302                indexTopMargin = 0;
    303303            }
    304             index->style().setMarginTop(Length(indexTopMargin, Fixed));
    305         }
    306         radical->style().setMarginTop(Length(radicalTopMargin, Fixed));
    307         base->style().setMarginTop(Length(baseTopMargin, Fixed));
     304            index->mutableStyle().setMarginTop(Length(indexTopMargin, Fixed));
     305        }
     306        radical->mutableStyle().setMarginTop(Length(radicalTopMargin, Fixed));
     307        base->mutableStyle().setMarginTop(Length(baseTopMargin, Fixed));
    308308    }
    309309
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r200041 r200098  
    16071607    void resetColumnRule() { SET_NESTED_VAR(rareNonInheritedData, m_multiCol, m_rule, BorderValue()); }
    16081608    void setColumnSpan(ColumnSpan columnSpan) { SET_NESTED_VAR(rareNonInheritedData, m_multiCol, m_columnSpan, columnSpan); }
    1609     void inheritColumnPropertiesFrom(RenderStyle* parent) { rareNonInheritedData.access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
     1609    void inheritColumnPropertiesFrom(const RenderStyle* parent) { rareNonInheritedData.access()->m_multiCol = parent->rareNonInheritedData->m_multiCol; }
    16101610    void setTransform(const TransformOperations& ops) { SET_NESTED_VAR(rareNonInheritedData, m_transform, m_operations, ops); }
    16111611    void setTransformOriginX(Length length) { SET_NESTED_VAR(rareNonInheritedData, m_transform, m_x, WTFMove(length)); }
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp

    r199307 r200098  
    108108}
    109109
    110 FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, RenderStyle* style) const
     110FloatRect SVGInlineTextBox::selectionRectForTextFragment(const SVGTextFragment& fragment, int startPosition, int endPosition, const RenderStyle* style) const
    111111{
    112112    ASSERT_WITH_SECURITY_IMPLICATION(startPosition < endPosition);
     
    143143        return LayoutRect();
    144144
    145     RenderStyle& style = renderer().style();
     145    auto& style = renderer().style();
    146146
    147147    AffineTransform fragmentTransform;
     
    202202        return;
    203203
    204     RenderStyle& style = parentRenderer.style();
     204    auto& style = parentRenderer.style();
    205205
    206206    int startPosition;
     
    257257        return;
    258258
    259     RenderStyle& style = parentRenderer.style();
     259    auto& style = parentRenderer.style();
    260260
    261261    const SVGRenderStyle& svgStyle = style.svgStyle();
     
    264264    bool hasVisibleStroke = svgStyle.hasVisibleStroke();
    265265
    266     RenderStyle* selectionStyle = &style;
     266    const RenderStyle* selectionStyle = &style;
    267267    if (hasSelection) {
    268268        selectionStyle = parentRenderer.getCachedPseudoStyle(SELECTION);
     
    335335}
    336336
    337 bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float scalingFactor, RenderBoxModelObject& renderer, RenderStyle* style)
     337bool SVGInlineTextBox::acquirePaintingResource(GraphicsContext*& context, float scalingFactor, RenderBoxModelObject& renderer, const RenderStyle* style)
    338338{
    339339    ASSERT(scalingFactor);
     
    378378}
    379379
    380 bool SVGInlineTextBox::prepareGraphicsContextForTextPainting(GraphicsContext*& context, float scalingFactor, RenderStyle* style)
     380bool SVGInlineTextBox::prepareGraphicsContextForTextPainting(GraphicsContext*& context, float scalingFactor, const RenderStyle* style)
    381381{
    382382    return acquirePaintingResource(context, scalingFactor, parent()->renderer(), style);
     
    388388}
    389389
    390 TextRun SVGInlineTextBox::constructTextRun(RenderStyle* style, const SVGTextFragment& fragment) const
     390TextRun SVGInlineTextBox::constructTextRun(const RenderStyle* style, const SVGTextFragment& fragment) const
    391391{
    392392    ASSERT(style);
     
    507507    ASSERT(m_paintingResourceMode != ApplyToDefaultMode);
    508508
    509     RenderStyle& decorationStyle = decorationRenderer.style();
     509    auto& decorationStyle = decorationRenderer.style();
    510510
    511511    float scalingFactor = 1;
     
    541541}
    542542
    543 void SVGInlineTextBox::paintTextWithShadows(GraphicsContext& context, RenderStyle* style, TextRun& textRun, const SVGTextFragment& fragment, int startPosition, int endPosition)
     543void SVGInlineTextBox::paintTextWithShadows(GraphicsContext& context, const RenderStyle* style, TextRun& textRun, const SVGTextFragment& fragment, int startPosition, int endPosition)
    544544{
    545545    float scalingFactor = renderer().scalingFactor();
     
    586586}
    587587
    588 void SVGInlineTextBox::paintText(GraphicsContext& context, RenderStyle* style, RenderStyle* selectionStyle, const SVGTextFragment& fragment, bool hasSelection, bool paintSelectedTextOnly)
     588void SVGInlineTextBox::paintText(GraphicsContext& context, const RenderStyle* style, const RenderStyle* selectionStyle, const SVGTextFragment& fragment, bool hasSelection, bool paintSelectedTextOnly)
    589589{
    590590    ASSERT(style);
  • trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h

    r198074 r200098  
    6565
    6666    int offsetForPositionInFragment(const SVGTextFragment&, float position, bool includePartialGlyphs) const;
    67     FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentStartPosition, int fragmentEndPosition, RenderStyle*) const;
     67    FloatRect selectionRectForTextFragment(const SVGTextFragment&, int fragmentStartPosition, int fragmentEndPosition, const RenderStyle*) const;
    6868
    6969private:
    7070    bool isSVGInlineTextBox() const override { return true; }
    7171
    72     TextRun constructTextRun(RenderStyle*, const SVGTextFragment&) const;
     72    TextRun constructTextRun(const RenderStyle*, const SVGTextFragment&) const;
    7373
    74     bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderBoxModelObject&, RenderStyle*);
     74    bool acquirePaintingResource(GraphicsContext*&, float scalingFactor, RenderBoxModelObject&, const RenderStyle*);
    7575    void releasePaintingResource(GraphicsContext*&, const Path*);
    7676
    77     bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingFactor, RenderStyle*);
     77    bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingFactor, const RenderStyle*);
    7878    void restoreGraphicsContextAfterTextPainting(GraphicsContext*&);
    7979
    8080    void paintDecoration(GraphicsContext&, TextDecoration, const SVGTextFragment&);
    8181    void paintDecorationWithStyle(GraphicsContext&, TextDecoration, const SVGTextFragment&, RenderBoxModelObject& decorationRenderer);
    82     void paintTextWithShadows(GraphicsContext&, RenderStyle*, TextRun&, const SVGTextFragment&, int startPosition, int endPosition);
    83     void paintText(GraphicsContext&, RenderStyle*, RenderStyle* selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
     82    void paintTextWithShadows(GraphicsContext&, const RenderStyle*, TextRun&, const SVGTextFragment&, int startPosition, int endPosition);
     83    void paintText(GraphicsContext&, const RenderStyle*, const RenderStyle* selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
    8484
    8585    bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) override;
  • trunk/Source/WebCore/rendering/svg/SVGPathData.cpp

    r173921 r200098  
    4646    if (!renderer)
    4747        return;
    48     RenderStyle& style = renderer->style();
     48    auto& style = renderer->style();
    4949    float r = lengthContext.valueForLength(style.svgStyle().r());
    5050    if (r > 0) {
     
    6060    if (!renderer)
    6161        return;
    62     RenderStyle& style = renderer->style();
     62    auto& style = renderer->style();
    6363    SVGLengthContext lengthContext(element);
    6464    float rx = lengthContext.valueForLength(style.svgStyle().rx(), LengthModeWidth);
     
    121121        return;
    122122
    123     RenderStyle& style = renderer->style();
     123    auto& style = renderer->style();
    124124    SVGLengthContext lengthContext(element);
    125125    float width = lengthContext.valueForLength(style.width(), LengthModeWidth);
  • trunk/Source/WebCore/rendering/svg/SVGRenderingContext.cpp

    r198075 r200098  
    9191    }
    9292
    93     RenderStyle& style = m_renderer->style();
     93    auto& style = m_renderer->style();
    9494
    9595    const SVGRenderStyle& svgStyle = style.svgStyle();
  • trunk/Source/WebCore/style/StyleTreeResolver.cpp

    r200041 r200098  
    9494}
    9595
    96 TreeResolver::Parent::Parent(Element& element, RenderStyle& style, Change change)
     96TreeResolver::Parent::Parent(Element& element, const RenderStyle& style, Change change)
    9797    : element(&element)
    9898    , style(style)
     
    120120}
    121121
    122 std::unique_ptr<RenderStyle> TreeResolver::styleForElement(Element& element, RenderStyle& inheritedStyle)
     122std::unique_ptr<RenderStyle> TreeResolver::styleForElement(Element& element, const RenderStyle& inheritedStyle)
    123123{
    124124    if (!m_document.haveStylesheetsLoaded() && !element.renderer()) {
     
    236236        return VISIBLE;
    237237
    238     RenderStyle& style = renderer->style();
     238    auto& style = renderer->style();
    239239
    240240    Length width(style.width());
     
    255255class CheckForVisibilityChangeOnRecalcStyle {
    256256public:
    257     CheckForVisibilityChangeOnRecalcStyle(Element* element, RenderStyle* currentStyle)
     257    CheckForVisibilityChangeOnRecalcStyle(Element* element, const RenderStyle* currentStyle)
    258258        : m_element(element)
    259259        , m_previousDisplay(currentStyle ? currentStyle->display() : NONE)
     
    268268        if (m_element->isInUserAgentShadowTree())
    269269            return;
    270         RenderStyle* style = m_element->renderStyle();
     270        auto* style = m_element->renderStyle();
    271271        if (!style)
    272272            return;
     
    283283#endif // PLATFORM(IOS)
    284284
    285 void TreeResolver::pushParent(Element& element, RenderStyle& style, Change change)
     285void TreeResolver::pushParent(Element& element, const RenderStyle& style, Change change)
    286286{
    287287    scope().selectorFilter.pushParent(&element);
     
    376376        bool shouldResolveForPseudoElement = shouldResolvePseudoElement(element.beforePseudoElement()) || shouldResolvePseudoElement(element.afterPseudoElement());
    377377
    378         RenderStyle* style;
     378        const RenderStyle* style;
    379379        Change change;
    380380
  • trunk/Source/WebCore/style/StyleTreeResolver.h

    r199964 r200098  
    6262
    6363private:
    64     std::unique_ptr<RenderStyle> styleForElement(Element&, RenderStyle& inheritedStyle);
     64    std::unique_ptr<RenderStyle> styleForElement(Element&, const RenderStyle& inheritedStyle);
    6565
    6666    void resolveComposedTree();
     
    8080    struct Parent {
    8181        Element* element;
    82         RenderStyle& style;
     82        const RenderStyle& style;
    8383        Change change;
    8484        bool didPushScope { false };
     
    8686
    8787        Parent(Document&, Change);
    88         Parent(Element&, RenderStyle&, Change);
     88        Parent(Element&, const RenderStyle&, Change);
    8989    };
    9090
     
    9696    void popScope();
    9797
    98     void pushParent(Element&, RenderStyle&, Change);
     98    void pushParent(Element&, const RenderStyle&, Change);
    9999    void popParent();
    100100    void popParentsToDepth(unsigned depth);
  • trunk/Source/WebCore/style/StyleUpdate.cpp

    r199964 r200098  
    6262}
    6363
    64 RenderStyle* Update::elementStyle(const Element& element) const
     64const RenderStyle* Update::elementStyle(const Element& element) const
    6565{
    6666    if (auto* update = elementUpdate(element))
    6767        return update->style.get();
    68     return element.renderStyle();
     68    auto* renderer = element.renderer();
     69    if (!renderer)
     70        return nullptr;
     71    return &renderer->style();
     72}
     73
     74RenderStyle* Update::elementStyle(const Element& element)
     75{
     76    if (auto* update = elementUpdate(element))
     77        return update->style.get();
     78    auto* renderer = element.renderer();
     79    if (!renderer)
     80        return nullptr;
     81    return &renderer->mutableStyle();
    6982}
    7083
  • trunk/Source/WebCore/style/StyleUpdate.h

    r199964 r200098  
    6464    bool textUpdate(const Text&) const;
    6565
    66     RenderStyle* elementStyle(const Element&) const;
     66    const RenderStyle* elementStyle(const Element&) const;
     67    RenderStyle* elementStyle(const Element&);
    6768
    6869    const Document& document() const { return m_document; }
  • trunk/Source/WebCore/svg/SVGElement.cpp

    r199625 r200098  
    747747}
    748748
    749 Optional<ElementStyle> SVGElement::resolveCustomStyle(RenderStyle& parentStyle, RenderStyle*)
     749Optional<ElementStyle> SVGElement::resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle*)
    750750{
    751751    // If the element is in a <use> tree we get the style from the definition tree.
     
    774774}
    775775
    776 RenderStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier)
     776const RenderStyle* SVGElement::computedStyle(PseudoId pseudoElementSpecifier)
    777777{
    778778    if (!m_svgRareData || !m_svgRareData->useOverrideComputedStyle())
    779779        return Element::computedStyle(pseudoElementSpecifier);
    780780
    781     RenderStyle* parentStyle = nullptr;
     781    const RenderStyle* parentStyle = nullptr;
    782782    if (Element* parent = parentOrShadowHostElement()) {
    783783        if (auto renderer = parent->renderer())
  • trunk/Source/WebCore/svg/SVGElement.h

    r199625 r200098  
    113113    static void synchronizeAllAnimatedSVGAttribute(SVGElement*);
    114114 
    115     Optional<ElementStyle> resolveCustomStyle(RenderStyle& parentStyle, RenderStyle* shadowHostStyle) override;
     115    Optional<ElementStyle> resolveCustomStyle(const RenderStyle& parentStyle, const RenderStyle* shadowHostStyle) override;
    116116
    117117    static void synchronizeRequiredFeatures(SVGElement* contextElement);
     
    182182
    183183private:
    184     RenderStyle* computedStyle(PseudoId = NOPSEUDO) final;
     184    const RenderStyle* computedStyle(PseudoId = NOPSEUDO) final;
    185185
    186186    virtual bool isSupported(StringImpl* feature, StringImpl* version) const;
  • trunk/Source/WebCore/svg/SVGElementRareData.h

    r199964 r200098  
    6060    }
    6161
    62     RenderStyle* overrideComputedStyle(Element& element, RenderStyle* parentStyle)
     62    const RenderStyle* overrideComputedStyle(Element& element, const RenderStyle* parentStyle)
    6363    {
    6464        if (!m_useOverrideComputedStyle)
    65             return 0;
     65            return nullptr;
    6666        if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) {
    6767            // The style computed here contains no CSS Animations/Transitions or SMIL induced rules - this is needed to compute the "base value" for the SMIL animation sandwhich model.
  • trunk/Source/WebCore/svg/SVGGraphicsElement.cpp

    r200041 r200098  
    6464{
    6565    AffineTransform matrix;
    66     RenderStyle* style = renderer() ? &renderer()->style() : nullptr;
     66    auto* style = renderer() ? &renderer()->style() : nullptr;
    6767
    6868    // If CSS property was set, use that, otherwise fallback to attribute (if set).
  • trunk/Source/WebCore/svg/SVGLengthContext.cpp

    r184055 r200098  
    223223}
    224224
    225 static inline RenderStyle* renderStyleForLengthResolving(const SVGElement* context)
     225static inline const RenderStyle* renderStyleForLengthResolving(const SVGElement* context)
    226226{
    227227    if (!context)
     
    237237    // There must be at least a RenderSVGRoot renderer, carrying a style.
    238238    ASSERT_NOT_REACHED();
    239     return 0;
     239    return nullptr;
    240240}
    241241
    242242float SVGLengthContext::convertValueFromUserUnitsToEMS(float value, ExceptionCode& ec) const
    243243{
    244     RenderStyle* style = renderStyleForLengthResolving(m_context);
     244    auto* style = renderStyleForLengthResolving(m_context);
    245245    if (!style) {
    246246        ec = NOT_SUPPORTED_ERR;
     
    259259float SVGLengthContext::convertValueFromEMSToUserUnits(float value, ExceptionCode& ec) const
    260260{
    261     RenderStyle* style = renderStyleForLengthResolving(m_context);
     261    auto* style = renderStyleForLengthResolving(m_context);
    262262    if (!style) {
    263263        ec = NOT_SUPPORTED_ERR;
     
    270270float SVGLengthContext::convertValueFromUserUnitsToEXS(float value, ExceptionCode& ec) const
    271271{
    272     RenderStyle* style = renderStyleForLengthResolving(m_context);
     272    auto* style = renderStyleForLengthResolving(m_context);
    273273    if (!style) {
    274274        ec = NOT_SUPPORTED_ERR;
     
    289289float SVGLengthContext::convertValueFromEXSToUserUnits(float value, ExceptionCode& ec) const
    290290{
    291     RenderStyle* style = renderStyleForLengthResolving(m_context);
     291    auto* style = renderStyleForLengthResolving(m_context);
    292292    if (!style) {
    293293        ec = NOT_SUPPORTED_ERR;
  • trunk/Source/WebCore/svg/SVGStopElement.cpp

    r200041 r200098  
    8989Color SVGStopElement::stopColorIncludingOpacity() const
    9090{
    91     RenderStyle* style = renderer() ? &renderer()->style() : nullptr;
     91    auto* style = renderer() ? &renderer()->style() : nullptr;
    9292    // FIXME: This check for null style exists to address Bug WK 90814, a rare crash condition in
    9393    // which the renderer or style is null. This entire class is scheduled for removal (Bug WK 86941)
  • trunk/Source/WebCore/svg/SVGTextElement.cpp

    r200041 r200098  
    4646{
    4747    AffineTransform matrix;
    48     RenderStyle* style = renderer() ? &renderer()->style() : nullptr;
     48    auto* style = renderer() ? &renderer()->style() : nullptr;
    4949
    5050    // if CSS property was set, use that, otherwise fallback to attribute (if set)
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r199955 r200098  
    824824        if (!selection.isNone()) {
    825825            Node* nodeToRemove;
    826             if (RenderStyle* style = Editor::styleForSelectionStart(&frame, nodeToRemove)) {
     826            if (auto* style = Editor::styleForSelectionStart(&frame, nodeToRemove)) {
    827827                if (style->fontCascade().weight() >= FontWeightBold)
    828828                    postLayoutData.typingAttributes |= AttributeBold;
  • trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

    r199955 r200098  
    825825        return FloatQuad();
    826826
    827     RenderStyle& style = renderer->style();
     827    auto& style = renderer->style();
    828828    IntRect boundingBox = renderer->absoluteBoundingBoxRect(true /* use transforms*/);
    829829
Note: See TracChangeset for help on using the changeset viewer.