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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 2710883002: Expand FrameSeleciton::isNone() to increase chances of hoisting update layout (Closed)
Patch Set: 2017-02-23T16:27:43 rebase to resolve conflict with DOMSelection in r452402 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 layer->getScrollableArea()->isPointInResizeControl( 548 layer->getScrollableArea()->isPointInResizeControl(
549 result.roundedPointInMainFrame(), ResizerForPointer); 549 result.roundedPointInMainFrame(), ResizerForPointer);
550 } 550 }
551 551
552 // During selection, use an I-beam no matter what we're over. 552 // During selection, use an I-beam no matter what we're over.
553 // If a drag may be starting or we're capturing mouse events for a particular 553 // If a drag may be starting or we're capturing mouse events for a particular
554 // node, don't treat this as a selection. 554 // node, don't treat this as a selection.
555 if (m_mouseEventManager->mousePressed() && 555 if (m_mouseEventManager->mousePressed() &&
556 selectionController().mouseDownMayStartSelect() && 556 selectionController().mouseDownMayStartSelect() &&
557 !m_mouseEventManager->mouseDownMayStartDrag() && 557 !m_mouseEventManager->mouseDownMayStartDrag() &&
558 !m_frame->selection().isNone() && !m_capturingMouseEventsNode) { 558 !m_frame->selection()
559 .computeVisibleSelectionInDOMTreeDeprecated()
560 .isNone() &&
561 !m_capturingMouseEventsNode) {
559 return iBeam; 562 return iBeam;
560 } 563 }
561 564
562 if ((editable || 565 if ((editable ||
563 (layoutObject && layoutObject->isText() && node->canStartSelection())) && 566 (layoutObject && layoutObject->isText() && node->canStartSelection())) &&
564 !inResizer && !result.scrollbar()) 567 !inResizer && !result.scrollbar())
565 return iBeam; 568 return iBeam;
566 return pointerCursor(); 569 return pointerCursor();
567 } 570 }
568 571
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 } 2142 }
2140 2143
2141 FrameHost* EventHandler::frameHost() const { 2144 FrameHost* EventHandler::frameHost() const {
2142 if (!m_frame->page()) 2145 if (!m_frame->page())
2143 return nullptr; 2146 return nullptr;
2144 2147
2145 return &m_frame->page()->frameHost(); 2148 return &m_frame->page()->frameHost();
2146 } 2149 }
2147 2150
2148 } // namespace blink 2151 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698