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

Unified Diff: third_party/WebKit/Source/core/editing/SelectionController.cpp

Issue 2747463003: Ensure clean layout for a call site of FrameSelection::contains() (Closed)
Patch Set: Created 3 years, 9 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/LayoutTests/hittesting/subframe_active_crash.html ('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/core/editing/SelectionController.cpp
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index 47f38d3768d88e7fae781670a60130f382942056..b53e47fc7df02c2823e0edb3b917245e9d536d6d 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -1015,6 +1015,10 @@ void SelectionController::sendContextMenuEvent(
void SelectionController::passMousePressEventToSubframe(
const MouseEventWithHitTestResults& mev) {
+ // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
+ // needs to be audited. See http://crbug.com/590369 for more details.
+ m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
+
// If we're clicking into a frame that is selected, the frame will appear
// greyed out even though we're clicking on the selection. This looks
// really strange (having the whole frame be greyed out), so we deselect the
@@ -1024,10 +1028,6 @@ void SelectionController::passMousePressEventToSubframe(
if (!selection().contains(p))
return;
- // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
- // needs to be audited. See http://crbug.com/590369 for more details.
- m_frame->document()->updateStyleAndLayoutIgnorePendingStylesheets();
-
const VisiblePositionInFlatTree& visiblePos =
visiblePositionOfHitTestResult(mev.hitTestResult());
if (visiblePos.isNull()) {
« no previous file with comments | « third_party/WebKit/LayoutTests/hittesting/subframe_active_crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698