Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Unified Diff: Source/core/layout/LayoutSliderContainer.cpp

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Blind fix for Mac. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutSliderContainer.cpp
diff --git a/Source/core/layout/LayoutSliderContainer.cpp b/Source/core/layout/LayoutSliderContainer.cpp
index a53c3dffa13f69e153e4aec9408f3818b1e83f0c..6a8d0aa8309e19649227c4b399eb5c3b7cd17f55 100644
--- a/Source/core/layout/LayoutSliderContainer.cpp
+++ b/Source/core/layout/LayoutSliderContainer.cpp
@@ -58,7 +58,7 @@ inline static Decimal sliderPosition(HTMLInputElement* element)
inline static bool hasVerticalAppearance(HTMLInputElement* input)
{
ASSERT(input->renderer());
- RenderStyle* sliderStyle = input->renderer()->style();
+ const RenderStyle* sliderStyle = input->renderer()->style();
return sliderStyle->appearance() == SliderVerticalPart;
}
@@ -100,13 +100,13 @@ void LayoutSliderContainer::layout()
{
HTMLInputElement* input = toHTMLInputElement(node()->shadowHost());
bool isVertical = hasVerticalAppearance(input);
- style()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
+ deprecatedMutableStyle()->setFlexDirection(isVertical ? FlowColumn : FlowRow);
TextDirection oldTextDirection = style()->direction();
if (isVertical) {
// FIXME: Work around rounding issues in RTL vertical sliders. We want them to
// render identically to LTR vertical sliders. We can remove this work around when
// subpixel rendering is enabled on all ports.
- style()->setDirection(LTR);
+ deprecatedMutableStyle()->setDirection(LTR);
}
Element* thumbElement = input->userAgentShadowRoot()->getElementById(ShadowElementNames::sliderThumb());
@@ -122,7 +122,7 @@ void LayoutSliderContainer::layout()
RenderFlexibleBox::layout();
- style()->setDirection(oldTextDirection);
+ deprecatedMutableStyle()->setDirection(oldTextDirection);
// These should always exist, unless someone mutates the shadow DOM (e.g., in the inspector).
if (!thumb || !track)
return;

Powered by Google App Engine
This is Rietveld 408576698