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

Unified Diff: Source/core/page/EventHandler.cpp

Issue 25490002: Refactoring: Change the order of conditions to avoid computing rendererIsEditable() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unrelated changes Created 7 years, 2 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 | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/EventHandler.cpp
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp
index 24e8b39d56fda3cde31125118138ddfe1dc0f3a7..fd56485e60f17790bb8f74234a8a0a1c5edae9ce 100644
--- a/Source/core/page/EventHandler.cpp
+++ b/Source/core/page/EventHandler.cpp
@@ -828,7 +828,7 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e
VisibleSelection newSelection;
Node* node = event.targetNode();
bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled();
- if (node && (caretBrowsing || node->rendererIsEditable()) && node->renderer()) {
+ if (node && node->renderer() && (caretBrowsing || node->rendererIsEditable())) {
VisiblePosition pos = VisiblePosition(node->renderer()->positionForPoint(event.localPoint()));
newSelection = VisibleSelection(pos);
}
« no previous file with comments | « Source/core/dom/Position.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698