Index: third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
index 89c8fd5ea9dce1af5bf5a9611648c253199e9969..99b4d834a880dba093d29cd77dbc19acd3f95096 100644 |
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
@@ -1702,6 +1702,11 @@ int indexForVisiblePosition(const VisiblePosition& visiblePosition, ContainerNod |
else |
scope = document.documentElement(); |
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets |
+ // needs to be audited. See http://crbug.com/590369 for more details. |
+ document.updateStyleAndLayoutIgnorePendingStylesheets(); |
yosin_UTC9
2016/08/30 07:40:24
I hope following patch will hoist this updateLayou
Xiaocheng
2016/08/30 07:42:52
Yeah, there will be such a patch.
|
+ |
+ // TODO(xiaochengh): We should use EphemeralRange here. |
Range* range = Range::create(document, Position::firstPositionInNode(scope), p.parentAnchoredEquivalent()); |
return TextIterator::rangeLength(range->startPosition(), range->endPosition(), true); |