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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2352763004: Prune CreateVisiblePositionDeprecated from Editor::firstRectForRange (Closed)
Patch Set: 201609231108 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
Index: third_party/WebKit/Source/core/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 9f8a56ca988c8452f8d9964769c01c7f5770678a..21ae034712e1f78a0bffd7e52c710e080027124f 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2046,6 +2046,10 @@ WebInputEventResult EventHandler::sendContextMenuEventForKey(Element* overrideTa
VisualViewport& visualViewport = frameHost()->visualViewport();
if (!overrideTargetElement && start.anchorNode() && (selection.rootEditableElement() || selection.isRange())) {
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ doc->updateStyleAndLayoutIgnorePendingStylesheets();
+
IntRect firstRect = m_frame->editor().firstRectForRange(selection.selection().toNormalizedEphemeralRange());
int x = rightAligned ? firstRect.maxX() : firstRect.x();

Powered by Google App Engine
This is Rietveld 408576698