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

Unified Diff: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp

Issue 2292023002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in TextIterator::rangeLength (Closed)
Patch Set: 201609011431 Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
index 5cc04a2bce4a99d935bfcbbc1b3fa9d29d1b0319..79689699ab7321b56aa665fb1d521ff9f584e24a 100644
--- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
+++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -1121,9 +1121,8 @@ PositionTemplate<Strategy> TextIteratorAlgorithm<Strategy>::endPositionInCurrent
template<typename Strategy>
int TextIteratorAlgorithm<Strategy>::rangeLength(const PositionTemplate<Strategy>& start, const PositionTemplate<Strategy>& end, bool forSelectionPreservation)
{
- // TODO(dglazkov): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
- // see http://crbug.com/590369 for more details.
- start.document()->updateStyleAndLayoutIgnorePendingStylesheets();
+ DCHECK(start.document());
+ DocumentLifecycle::DisallowTransitionScope disallowTransition(start.document()->lifecycle());
int length = 0;
TextIteratorBehaviorFlags behaviorFlags = TextIteratorEmitsObjectReplacementCharacter;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698