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

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

Issue 13905007: Remove the last remaining PLATFORM() bits from WebCore. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/WebCore/html/HTMLSelectElement.cpp ('k') | Source/WebCore/platform/ScrollAnimator.h » ('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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent); 1740 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
1741 Frame* subframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m _capturingMouseEventsNode.get()) : subframeForHitTestResult(mev); 1741 Frame* subframe = m_capturingMouseEventsNode.get() ? subframeForTargetNode(m _capturingMouseEventsNode.get()) : subframeForHitTestResult(mev);
1742 if (m_eventHandlerWillResetCapturingMouseEventsNode) 1742 if (m_eventHandlerWillResetCapturingMouseEventsNode)
1743 m_capturingMouseEventsNode = 0; 1743 m_capturingMouseEventsNode = 0;
1744 if (subframe && passMouseReleaseEventToSubframe(mev, subframe)) 1744 if (subframe && passMouseReleaseEventToSubframe(mev, subframe))
1745 return true; 1745 return true;
1746 1746
1747 bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, me v.targetNode(), true, m_clickCount, mouseEvent, false); 1747 bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, me v.targetNode(), true, m_clickCount, mouseEvent, false);
1748 1748
1749 bool contextMenuEvent = mouseEvent.button() == RightButton; 1749 bool contextMenuEvent = mouseEvent.button() == RightButton;
1750 #if PLATFORM(CHROMIUM) && OS(DARWIN) 1750 #if OS(DARWIN)
1751 // FIXME: The Mac port achieves the same behavior by checking whether the co ntext menu is currently open in WebPage::mouseEvent(). Consider merging the impl ementations. 1751 // FIXME: The Mac port achieves the same behavior by checking whether the co ntext menu is currently open in WebPage::mouseEvent(). Consider merging the impl ementations.
1752 if (mouseEvent.button() == LeftButton && mouseEvent.modifiers() & PlatformEv ent::CtrlKey) 1752 if (mouseEvent.button() == LeftButton && mouseEvent.modifiers() & PlatformEv ent::CtrlKey)
1753 contextMenuEvent = true; 1753 contextMenuEvent = true;
1754 #endif 1754 #endif
1755 1755
1756 bool swallowClickEvent = m_clickCount > 0 && !contextMenuEvent && mouseIsRel easedOnPressedElement(mev.targetNode(), m_clickNode.get()) && !dispatchMouseEven t(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, mouseEvent, tru e); 1756 bool swallowClickEvent = m_clickCount > 0 && !contextMenuEvent && mouseIsRel easedOnPressedElement(mev.targetNode(), m_clickNode.get()) && !dispatchMouseEven t(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, mouseEvent, tru e);
1757 1757
1758 if (m_resizeLayer) { 1758 if (m_resizeLayer) {
1759 m_resizeLayer->setInResizeMode(false); 1759 m_resizeLayer->setInResizeMode(false);
1760 m_resizeLayer = 0; 1760 m_resizeLayer = 0;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 if (RenderView* renderView = m_frame->contentRenderer()) { 2188 if (RenderView* renderView = m_frame->contentRenderer()) {
2189 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Disall owShadowContent); 2189 HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Disall owShadowContent);
2190 HitTestResult result(windowPoint); 2190 HitTestResult result(windowPoint);
2191 renderView->hitTest(request, result); 2191 renderView->hitTest(request, result);
2192 return result.scrollbar(); 2192 return result.scrollbar();
2193 } 2193 }
2194 2194
2195 return false; 2195 return false;
2196 } 2196 }
2197 2197
2198 #if !(PLATFORM(CHROMIUM) && (OS(UNIX) && !OS(DARWIN))) 2198 #if !(OS(UNIX) && !OS(DARWIN))
jamesr 2013/04/12 02:38:53 !(OS(UNIX) && !OS(DARWIN)) !OS(UNIX) || OS(DARWIN
Nico 2013/04/12 04:04:15 Done.
2199 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, c onst PlatformWheelEvent&) const 2199 bool EventHandler::shouldTurnVerticalTicksIntoHorizontal(const HitTestResult&, c onst PlatformWheelEvent&) const
2200 { 2200 {
2201 return false; 2201 return false;
2202 } 2202 }
2203 #endif 2203 #endif
2204 2204
2205 bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e) 2205 bool EventHandler::handleWheelEvent(const PlatformWheelEvent& e)
2206 { 2206 {
2207 Document* doc = m_frame->document(); 2207 Document* doc = m_frame->document();
2208 2208
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
3879 #endif 3879 #endif
3880 3880
3881 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event) 3881 void EventHandler::setLastKnownMousePosition(const PlatformMouseEvent& event)
3882 { 3882 {
3883 m_mousePositionIsUnknown = false; 3883 m_mousePositionIsUnknown = false;
3884 m_lastKnownMousePosition = event.position(); 3884 m_lastKnownMousePosition = event.position();
3885 m_lastKnownMouseGlobalPosition = event.globalPosition(); 3885 m_lastKnownMouseGlobalPosition = event.globalPosition();
3886 } 3886 }
3887 3887
3888 } // namespace WebCore 3888 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLSelectElement.cpp ('k') | Source/WebCore/platform/ScrollAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698