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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2306303002: Ensure clean layout for the remaining call sites of plainText() (Closed)
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/core/dom/Range.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index b87220317549301a2c971a87deec6e32280cda35..a2c3b347d1895581b0a8caf43493afad267a82e5 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1132,6 +1132,11 @@ WebString WebLocalFrameImpl::selectionAsMarkup() const
void WebLocalFrameImpl::selectWordAroundPosition(LocalFrame* frame, VisiblePosition position)
{
TRACE_EVENT0("blink", "WebLocalFrameImpl::selectWordAroundPosition");
+
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
frame->selection().selectWordAroundPosition(position);
}
@@ -1141,6 +1146,11 @@ bool WebLocalFrameImpl::selectWordAroundCaret()
FrameSelection& selection = frame()->selection();
if (selection.isNone() || selection.isRange())
return false;
+
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets needs to be audited.
+ // see http://crbug.com/590369 for more details.
+ frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
return frame()->selection().selectWordAroundPosition(selection.selection().visibleStart());
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Range.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698