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 8389684c3bb0a35ded794d25debfa5fae2dbaedd..09d07a49bf76a65a8a52f2de2be4c5b7afea0d12 100644 |
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp |
@@ -1337,14 +1337,14 @@ static inline LayoutPoint absoluteLineDirectionPointToLocalPointInBlock(RootInli |
VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, LayoutUnit lineDirectionPoint, EditableType editableType) |
{ |
+ DCHECK(visiblePosition.isValid()); |
yosin_UTC9
2016/09/20 13:55:51
We should add |DCHECK(vp.isValid())| all functions
Xiaocheng
2016/09/21 06:31:49
Unfortunately we are not having such a gigantic pa
|
+ |
Position p = visiblePosition.deepEquivalent(); |
Node* node = p.anchorNode(); |
if (!node) |
return VisiblePosition(); |
- DCHECK(!node->document().needsLayoutTreeUpdate()); |
- |
LayoutObject* layoutObject = node->layoutObject(); |
if (!layoutObject) |
return VisiblePosition(); |
@@ -1390,14 +1390,14 @@ VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay |
VisiblePosition nextLinePosition(const VisiblePosition& visiblePosition, LayoutUnit lineDirectionPoint, EditableType editableType) |
{ |
+ DCHECK(visiblePosition.isValid()); |
+ |
Position p = visiblePosition.deepEquivalent(); |
Node* node = p.anchorNode(); |
if (!node) |
return VisiblePosition(); |
- DCHECK(!node->document().needsLayoutTreeUpdate()); |
- |
LayoutObject* layoutObject = node->layoutObject(); |
if (!layoutObject) |
return VisiblePosition(); |