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

Unified Diff: Source/core/rendering/RenderBoxModelObject.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/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 86c16367ea4b217751e49bf6b0564437d1c4d482..5c5b0dd01d0b6be88eb86c520e37a26769ddf91b 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -113,7 +113,7 @@ void RenderBoxModelObject::willBeDestroyed()
bool RenderBoxModelObject::calculateHasBoxDecorations() const
{
- RenderStyle* styleToUse = style();
+ const RenderStyle* styleToUse = style();
ASSERT(styleToUse);
return hasBackground() || styleToUse->hasBorder() || styleToUse->hasAppearance() || styleToUse->boxShadow();
}
@@ -122,7 +122,7 @@ void RenderBoxModelObject::updateFromStyle()
{
RenderLayerModelObject::updateFromStyle();
- RenderStyle* styleToUse = style();
+ const RenderStyle* styleToUse = style();
setHasBoxDecorationBackground(calculateHasBoxDecorations());
setInline(styleToUse->isDisplayInlineType());
setPositionState(styleToUse->position());
@@ -500,7 +500,7 @@ LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width,
// However, as soon as some content is entered, the line boxes will be
// constructed and this kludge is not called any more. So only the caret size
// of an empty :first-line'd block is wrong. I think we can live with that.
- RenderStyle* currentStyle = firstLineStyle();
+ const RenderStyle* currentStyle = firstLineStyle();
enum CaretAlignment { alignLeft, alignRight, alignCenter };

Powered by Google App Engine
This is Rietveld 408576698