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

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

Issue 1860273003: Downgrade some lifecycle update calls to not include paint if not necessary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 // Do a new hit-test in case the mousemove event changed the DOM. 2123 // Do a new hit-test in case the mousemove event changed the DOM.
2124 // Note that if the original hit test wasn't over an element (eg. was over a scrollbar) we 2124 // Note that if the original hit test wasn't over an element (eg. was over a scrollbar) we
2125 // don't want to re-hit-test because it may be in the wrong frame (and there 's no way the page 2125 // don't want to re-hit-test because it may be in the wrong frame (and there 's no way the page
2126 // could have seen the event anyway). 2126 // could have seen the event anyway).
2127 // Also note that the position of the frame may have changed, so we need to recompute the content 2127 // Also note that the position of the frame may have changed, so we need to recompute the content
2128 // co-ordinates (updating layout/style as hitTestResultAtPoint normally woul d). 2128 // co-ordinates (updating layout/style as hitTestResultAtPoint normally woul d).
2129 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug. com/398920 2129 // FIXME: Use a hit-test cache to avoid unnecessary hit tests. http://crbug. com/398920
2130 if (currentHitTest.innerNode()) { 2130 if (currentHitTest.innerNode()) {
2131 LocalFrame* mainFrame = m_frame->localFrameRoot(); 2131 LocalFrame* mainFrame = m_frame->localFrameRoot();
2132 if (mainFrame && mainFrame->view()) 2132 if (mainFrame && mainFrame->view())
2133 mainFrame->view()->updateAllLifecyclePhases(); 2133 mainFrame->view()->updateLifecycleToCompositingCleanPlusScrolling();
2134 adjustedPoint = frameView->rootFrameToContents(gestureEvent.position()); 2134 adjustedPoint = frameView->rootFrameToContents(gestureEvent.position());
2135 currentHitTest = hitTestResultInFrame(m_frame, adjustedPoint, hitType); 2135 currentHitTest = hitTestResultInFrame(m_frame, adjustedPoint, hitType);
2136 } 2136 }
2137 m_clickNode = currentHitTest.innerNode(); 2137 m_clickNode = currentHitTest.innerNode();
2138 2138
2139 // Capture data for showUnhandledTapUIIfNeeded. 2139 // Capture data for showUnhandledTapUIIfNeeded.
2140 RawPtr<Node> tappedNode = m_clickNode; 2140 RawPtr<Node> tappedNode = m_clickNode;
2141 IntPoint tappedPosition = gestureEvent.position(); 2141 IntPoint tappedPosition = gestureEvent.position();
2142 2142
2143 if (m_clickNode && m_clickNode->isTextNode()) 2143 if (m_clickNode && m_clickNode->isTextNode())
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
4006 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 4006 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
4007 { 4007 {
4008 #if OS(MACOSX) 4008 #if OS(MACOSX)
4009 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 4009 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
4010 #else 4010 #else
4011 return PlatformEvent::AltKey; 4011 return PlatformEvent::AltKey;
4012 #endif 4012 #endif
4013 } 4013 }
4014 4014
4015 } // namespace blink 4015 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698