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

Unified Diff: Source/core/rendering/RenderTextControl.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/rendering/RenderTextControl.cpp
diff --git a/Source/core/rendering/RenderTextControl.cpp b/Source/core/rendering/RenderTextControl.cpp
index a537f15e042a0dbb9ed177af3afef014cb2f49e9..ed3fcb355eba414c58249ebdfb7101ce057c613a 100644
--- a/Source/core/rendering/RenderTextControl.cpp
+++ b/Source/core/rendering/RenderTextControl.cpp
@@ -72,8 +72,8 @@ void RenderTextControl::styleDidChange(StyleDifference diff, const RenderStyle*
if (innerEditorRenderer) {
// We may have set the width and the height in the old style in layout().
// Reset them now to avoid getting a spurious layout hint.
- innerEditorRenderer->style()->setHeight(Length());
- innerEditorRenderer->style()->setWidth(Length());
+ innerEditorRenderer->deprecatedMutableStyle()->setHeight(Length());
+ innerEditorRenderer->deprecatedMutableStyle()->setWidth(Length());
innerEditorRenderer->setStyle(createInnerEditorStyle(style()));
innerEditor->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Control));
}
@@ -116,7 +116,7 @@ void RenderTextControl::updateFromElement()
{
Element* innerEditor = innerEditorElement();
if (innerEditor && innerEditor->renderer())
- updateUserModifyProperty(textFormControlElement(), innerEditor->renderer()->style());
+ updateUserModifyProperty(textFormControlElement(), innerEditor->renderer()->deprecatedMutableStyle());
}
int RenderTextControl::scrollbarThickness() const
@@ -258,7 +258,7 @@ void RenderTextControl::computePreferredLogicalWidths()
m_minPreferredLogicalWidth = 0;
m_maxPreferredLogicalWidth = 0;
- RenderStyle* styleToUse = style();
+ const RenderStyle* styleToUse = style();
if (styleToUse->logicalWidth().isFixed() && styleToUse->logicalWidth().value() >= 0)
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalWidth().value());

Powered by Google App Engine
This is Rietveld 408576698