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

Unified Diff: trunk/Source/core/editing/VisibleUnits.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
Index: trunk/Source/core/editing/VisibleUnits.cpp
===================================================================
--- trunk/Source/core/editing/VisibleUnits.cpp (revision 190671)
+++ trunk/Source/core/editing/VisibleUnits.cpp (working copy)
@@ -1115,8 +1115,8 @@
n = NodeTraversal::previousPostOrder(*n, startBlock);
continue;
}
- const LayoutStyle& style = r->styleRef();
- if (style.visibility() != VISIBLE) {
+ LayoutStyle* style = r->style();
+ if (style->visibility() != VISIBLE) {
n = NodeTraversal::previousPostOrder(*n, startBlock);
continue;
}
@@ -1127,7 +1127,7 @@
if (r->isText() && toRenderText(r)->renderedTextLength()) {
ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode());
type = Position::PositionIsOffsetInAnchor;
- if (style.preserveNewline()) {
+ if (style->preserveNewline()) {
RenderText* text = toRenderText(r);
int i = text->textLength();
int o = offset;
@@ -1194,8 +1194,8 @@
n = NodeTraversal::next(*n, stayInsideBlock);
continue;
}
- const LayoutStyle& style = r->styleRef();
- if (style.visibility() != VISIBLE) {
+ LayoutStyle* style = r->style();
+ if (style->visibility() != VISIBLE) {
n = NodeTraversal::next(*n, stayInsideBlock);
continue;
}
@@ -1208,7 +1208,7 @@
ASSERT_WITH_SECURITY_IMPLICATION(n->isTextNode());
int length = toRenderText(r)->textLength();
type = Position::PositionIsOffsetInAnchor;
- if (style.preserveNewline()) {
+ if (style->preserveNewline()) {
RenderText* text = toRenderText(r);
int o = n == startNode ? offset : 0;
for (int i = o; i < length; ++i) {
« no previous file with comments | « trunk/Source/core/editing/SimplifyMarkupCommand.cpp ('k') | trunk/Source/core/editing/iterators/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698