Index: third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
index 64e14e90d098de8b049eb51b7e28470008ecdbf0..614178ba0be936f59d2554089fdf2b113e3db6e1 100644 |
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
@@ -102,7 +102,7 @@ static PositionType canonicalPosition(const PositionType& passedPosition) |
return PositionType(); |
DCHECK(position.document()); |
- position.document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
+ DCHECK(!position.document()->needsLayoutTreeUpdate()); |
Node* node = position.computeContainerNode(); |
@@ -1240,6 +1240,13 @@ bool inSameLineAlgorithm(const PositionWithAffinityTemplate<Strategy>& position1 |
{ |
if (position1.isNull() || position2.isNull()) |
return false; |
+ if (position1.position().document() != position2.position().document()) |
yosin_UTC9
2016/09/12 09:25:03
Could you change this to DCHEC_EQ(position1.positi
Xiaocheng
2016/09/12 11:20:49
Done.
Haven't found any call site that may compar
|
+ return false; |
+ |
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
+ // needs to be audited. See http://crbug.com/590369 for more details. |
+ position1.position().document()->updateStyleAndLayoutIgnorePendingStylesheets(); |
+ |
PositionWithAffinityTemplate<Strategy> startOfLine1 = startOfLine(position1); |
PositionWithAffinityTemplate<Strategy> startOfLine2 = startOfLine(position2); |
if (startOfLine1 == startOfLine2) |