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

Unified Diff: trunk/Source/core/dom/Document.cpp

Issue 948053002: Revert 190605 "Make RenderObject::style() return a const object" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 5 years, 10 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
« no previous file with comments | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/dom/Element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/dom/Document.cpp
===================================================================
--- trunk/Source/core/dom/Document.cpp (revision 190671)
+++ trunk/Source/core/dom/Document.cpp (working copy)
@@ -1628,7 +1628,7 @@
ASSERT(inStyleRecalc());
ASSERT(documentElement());
- RefPtr<LayoutStyle> documentElementStyle = documentElement()->mutableLayoutStyle();
+ RefPtr<LayoutStyle> documentElementStyle = documentElement()->layoutStyle();
if (!documentElementStyle || documentElement()->needsStyleRecalc() || change == Force)
documentElementStyle = ensureStyleResolver().styleForElement(documentElement());
@@ -1638,7 +1638,7 @@
HTMLElement* body = this->body();
RefPtr<LayoutStyle> bodyStyle;
if (body) {
- bodyStyle = body->mutableLayoutStyle();
+ bodyStyle = body->layoutStyle();
if (!bodyStyle || body->needsStyleRecalc() || documentElement()->needsStyleRecalc() || change == Force)
bodyStyle = ensureStyleResolver().styleForElement(body, documentElementStyle.get());
rootWritingMode = bodyStyle->writingMode();
@@ -1685,7 +1685,7 @@
WebScrollBlocksOn scrollBlocksOn = documentElementStyle->scrollBlocksOn();
- RefPtr<LayoutStyle> documentStyle = renderView()->mutableStyle();
+ RefPtr<LayoutStyle> documentStyle = renderView()->style();
if (documentStyle->writingMode() != rootWritingMode
|| documentStyle->direction() != rootDirection
|| documentStyle->overflowX() != overflowX
@@ -1704,13 +1704,13 @@
}
if (body) {
- if (const LayoutStyle* style = body->layoutStyle()) {
+ if (LayoutStyle* style = body->layoutStyle()) {
if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
body->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
}
}
- if (const LayoutStyle* style = documentElement()->layoutStyle()) {
+ if (LayoutStyle* style = documentElement()->layoutStyle()) {
if (style->direction() != rootDirection || style->writingMode() != rootWritingMode)
documentElement()->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::WritingModeChange));
}
@@ -2408,7 +2408,7 @@
return Traversal<HTMLHeadElement>::firstChild(*de);
}
-Element* Document::viewportDefiningElement(const LayoutStyle* rootStyle) const
+Element* Document::viewportDefiningElement(LayoutStyle* rootStyle) const
{
// If a BODY element sets non-visible overflow, it is to be propagated to the viewport, as long
// as the following conditions are all met:
@@ -4204,7 +4204,7 @@
m_visuallyOrdered = shouldUseVisualOrdering;
// FIXME: How is possible to not have a renderer here?
if (renderView())
- renderView()->mutableStyleRef().setRTLOrdering(m_visuallyOrdered ? VisualOrder : LogicalOrder);
+ renderView()->style()->setRTLOrdering(m_visuallyOrdered ? VisualOrder : LogicalOrder);
setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::VisuallyOrdered));
}
}
« no previous file with comments | « trunk/Source/core/dom/Document.h ('k') | trunk/Source/core/dom/Element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698