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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated change after Doug's review. Created 5 years, 10 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/layout/style/LayoutStyle.cpp ('k') | Source/core/page/TouchAdjustment.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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 #if OS(WIN) 1048 #if OS(WIN)
1049 if (panScrollInProgress()) 1049 if (panScrollInProgress())
1050 return NoCursorChange; 1050 return NoCursorChange;
1051 #endif 1051 #endif
1052 1052
1053 Node* node = result.innerPossiblyPseudoNode(); 1053 Node* node = result.innerPossiblyPseudoNode();
1054 if (!node) 1054 if (!node)
1055 return selectAutoCursor(result, node, iBeamCursor()); 1055 return selectAutoCursor(result, node, iBeamCursor());
1056 1056
1057 LayoutObject* renderer = node->renderer(); 1057 LayoutObject* renderer = node->renderer();
1058 LayoutStyle* style = renderer ? renderer->style() : nullptr; 1058 const LayoutStyle* style = renderer ? renderer->style() : nullptr;
1059 1059
1060 if (renderer) { 1060 if (renderer) {
1061 Cursor overrideCursor; 1061 Cursor overrideCursor;
1062 switch (renderer->getCursor(roundedIntPoint(result.localPoint()), overri deCursor)) { 1062 switch (renderer->getCursor(roundedIntPoint(result.localPoint()), overri deCursor)) {
1063 case SetCursorBasedOnStyle: 1063 case SetCursorBasedOnStyle:
1064 break; 1064 break;
1065 case SetCursor: 1065 case SetCursor:
1066 return overrideCursor; 1066 return overrideCursor;
1067 case DoNotSetCursor: 1067 case DoNotSetCursor:
1068 return NoCursorChange; 1068 return NoCursorChange;
(...skipping 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after
3897 unsigned EventHandler::accessKeyModifiers() 3897 unsigned EventHandler::accessKeyModifiers()
3898 { 3898 {
3899 #if OS(MACOSX) 3899 #if OS(MACOSX)
3900 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; 3900 return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
3901 #else 3901 #else
3902 return PlatformEvent::AltKey; 3902 return PlatformEvent::AltKey;
3903 #endif 3903 #endif
3904 } 3904 }
3905 3905
3906 } // namespace blink 3906 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/style/LayoutStyle.cpp ('k') | Source/core/page/TouchAdjustment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698