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

Side by Side Diff: Source/core/page/EventHandler.cpp

Issue 215843002: Dispel the myth that enclosingLayer can return zero (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 1259
1260 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, Node* node, const Cursor& iBeam, bool shiftKey) 1260 OptionalCursor EventHandler::selectAutoCursor(const HitTestResult& result, Node* node, const Cursor& iBeam, bool shiftKey)
1261 { 1261 {
1262 bool editable = (node && node->rendererIsEditable()); 1262 bool editable = (node && node->rendererIsEditable());
1263 1263
1264 if (useHandCursor(node, result.isOverLink(), shiftKey)) 1264 if (useHandCursor(node, result.isOverLink(), shiftKey))
1265 return handCursor(); 1265 return handCursor();
1266 1266
1267 bool inResizer = false; 1267 bool inResizer = false;
1268 RenderObject* renderer = node ? node->renderer() : 0; 1268 RenderObject* renderer = node ? node->renderer() : 0;
1269 if (renderer) { 1269 if (renderer && m_frame->view()) {
1270 if (RenderLayer* layer = renderer->enclosingLayer()) { 1270 RenderLayer* layer = renderer->enclosingLayer();
1271 if (m_frame->view()) 1271 inResizer = layer->scrollableArea() && layer->scrollableArea()->isPointI nResizeControl(result.roundedPointInMainFrame(), ResizerForPointer);
1272 inResizer = layer->scrollableArea() && layer->scrollableArea()-> isPointInResizeControl(result.roundedPointInMainFrame(), ResizerForPointer);
1273 }
1274 } 1272 }
1275 1273
1276 // During selection, use an I-beam no matter what we're over. 1274 // During selection, use an I-beam no matter what we're over.
1277 // If a drag may be starting or we're capturing mouse events for a particula r node, don't treat this as a selection. 1275 // If a drag may be starting or we're capturing mouse events for a particula r node, don't treat this as a selection.
1278 if (m_mousePressed && m_mouseDownMayStartSelect 1276 if (m_mousePressed && m_mouseDownMayStartSelect
1279 && !m_mouseDownMayStartDrag 1277 && !m_mouseDownMayStartDrag
1280 && m_frame->selection().isCaretOrRange() 1278 && m_frame->selection().isCaretOrRange()
1281 && !m_capturingMouseEventsNode) { 1279 && !m_capturingMouseEventsNode) {
1282 return iBeam; 1280 return iBeam;
1283 } 1281 }
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 unsigned EventHandler::accessKeyModifiers() 4045 unsigned EventHandler::accessKeyModifiers()
4048 { 4046 {
4049 #if OS(MACOSX) 4047 #if OS(MACOSX)
4050 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 4048 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
4051 #else 4049 #else
4052 return PlatformEvent::AltKey; 4050 return PlatformEvent::AltKey;
4053 #endif 4051 #endif
4054 } 4052 }
4055 4053
4056 } // namespace WebCore 4054 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698