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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 void WebFrameWidgetImpl::themeChanged() 309 void WebFrameWidgetImpl::themeChanged()
310 { 310 {
311 FrameView* view = m_localRoot->frameView(); 311 FrameView* view = m_localRoot->frameView();
312 312
313 WebRect damagedRect(0, 0, m_size.width, m_size.height); 313 WebRect damagedRect(0, 0, m_size.width, m_size.height);
314 view->invalidateRect(damagedRect); 314 view->invalidateRect(damagedRect);
315 } 315 }
316 316
317 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr; 317 const WebInputEvent* WebFrameWidgetImpl::m_currentInputEvent = nullptr;
318 318
319 bool WebFrameWidgetImpl::handleInputEvent(const WebInputEvent& inputEvent) 319 WebInputEventResult WebFrameWidgetImpl::handleInputEvent(const WebInputEvent& in putEvent)
320 { 320 {
321 321
322 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", inputT ypeToName(inputEvent.type)); 322 TRACE_EVENT1("input", "WebFrameWidgetImpl::handleInputEvent", "type", inputT ypeToName(inputEvent.type));
323 323
324 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately. 324 // Report the event to be NOT processed by WebKit, so that the browser can h andle it appropriately.
325 if (m_ignoreInputEvents) 325 if (m_ignoreInputEvents)
326 return false; 326 return WebInputEventResult::NotHandled;
327 327
328 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available. 328 // FIXME: pass event to m_localRoot's WebDevToolsAgentImpl once available.
329 329
330 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent); 330 TemporaryChange<const WebInputEvent*> currentEventChange(m_currentInputEvent , &inputEvent);
331 331
332 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) { 332 if (m_mouseCaptureNode && WebInputEvent::isMouseEventType(inputEvent.type)) {
333 TRACE_EVENT1("input", "captured mouse event", "type", inputEvent.type); 333 TRACE_EVENT1("input", "captured mouse event", "type", inputEvent.type);
334 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it. 334 // Save m_mouseCaptureNode since mouseCaptureLost() will clear it.
335 RefPtrWillBeRawPtr<Node> node = m_mouseCaptureNode; 335 RefPtrWillBeRawPtr<Node> node = m_mouseCaptureNode;
336 336
(...skipping 20 matching lines...) Expand all
357 eventType = EventTypeNames::mouseup; 357 eventType = EventTypeNames::mouseup;
358 gestureIndicator = adoptPtr(new UserGestureIndicator(m_mouseCaptureG estureToken.release())); 358 gestureIndicator = adoptPtr(new UserGestureIndicator(m_mouseCaptureG estureToken.release()));
359 break; 359 break;
360 default: 360 default:
361 ASSERT_NOT_REACHED(); 361 ASSERT_NOT_REACHED();
362 } 362 }
363 363
364 node->dispatchMouseEvent( 364 node->dispatchMouseEvent(
365 PlatformMouseEventBuilder(m_localRoot->frameView(), static_cast<cons t WebMouseEvent&>(inputEvent)), 365 PlatformMouseEventBuilder(m_localRoot->frameView(), static_cast<cons t WebMouseEvent&>(inputEvent)),
366 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount) ; 366 eventType, static_cast<const WebMouseEvent&>(inputEvent).clickCount) ;
367 return true; 367 return WebInputEventResult::HandledSystem;
368 } 368 }
369 369
370 return PageWidgetDelegate::handleInputEvent(*this, inputEvent, m_localRoot-> frame()); 370 return PageWidgetDelegate::handleInputEvent(*this, inputEvent, m_localRoot-> frame());
371 } 371 }
372 372
373 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible) 373 void WebFrameWidgetImpl::setCursorVisibilityState(bool isVisible)
374 { 374 {
375 page()->setIsCursorVisible(isVisible); 375 page()->setIsCursorVisible(isVisible);
376 } 376 }
377 377
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 PageWidgetEventHandler::handleMouseUp(mainFrame, event); 697 PageWidgetEventHandler::handleMouseUp(mainFrame, event);
698 698
699 if (page()->settings().showContextMenuOnMouseUp()) { 699 if (page()->settings().showContextMenuOnMouseUp()) {
700 // Dispatch the contextmenu event regardless of if the click was swallow ed. 700 // Dispatch the contextmenu event regardless of if the click was swallow ed.
701 // On Mac/Linux, we handle it on mouse down, not up. 701 // On Mac/Linux, we handle it on mouse down, not up.
702 if (event.button == WebMouseEvent::ButtonRight) 702 if (event.button == WebMouseEvent::ButtonRight)
703 mouseContextMenu(event); 703 mouseContextMenu(event);
704 } 704 }
705 } 705 }
706 706
707 bool WebFrameWidgetImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseW heelEvent& event) 707 WebInputEventResult WebFrameWidgetImpl::handleMouseWheel(LocalFrame& mainFrame, const WebMouseWheelEvent& event)
708 { 708 {
709 return PageWidgetEventHandler::handleMouseWheel(mainFrame, event); 709 return PageWidgetEventHandler::handleMouseWheel(mainFrame, event);
710 } 710 }
711 711
712 bool WebFrameWidgetImpl::handleGestureEvent(const WebGestureEvent& event) 712 WebInputEventResult WebFrameWidgetImpl::handleGestureEvent(const WebGestureEvent & event)
713 { 713 {
714 bool eventSwallowed = false; 714 WebInputEventResult eventResult = WebInputEventResult::NotHandled;
715 bool eventCancelled = false; 715 bool eventCancelled = false;
716 switch (event.type) { 716 switch (event.type) {
717 case WebInputEvent::GestureScrollBegin: 717 case WebInputEvent::GestureScrollBegin:
718 case WebInputEvent::GestureScrollEnd: 718 case WebInputEvent::GestureScrollEnd:
719 case WebInputEvent::GestureScrollUpdate: 719 case WebInputEvent::GestureScrollUpdate:
720 case WebInputEvent::GestureTap: 720 case WebInputEvent::GestureTap:
721 case WebInputEvent::GestureTapUnconfirmed: 721 case WebInputEvent::GestureTapUnconfirmed:
722 case WebInputEvent::GestureTapDown: 722 case WebInputEvent::GestureTapDown:
723 case WebInputEvent::GestureShowPress: 723 case WebInputEvent::GestureShowPress:
724 case WebInputEvent::GestureTapCancel: 724 case WebInputEvent::GestureTapCancel:
725 case WebInputEvent::GestureDoubleTap: 725 case WebInputEvent::GestureDoubleTap:
726 case WebInputEvent::GestureTwoFingerTap: 726 case WebInputEvent::GestureTwoFingerTap:
727 case WebInputEvent::GestureLongPress: 727 case WebInputEvent::GestureLongPress:
728 case WebInputEvent::GestureLongTap: 728 case WebInputEvent::GestureLongTap:
729 break; 729 break;
730 case WebInputEvent::GestureFlingStart: 730 case WebInputEvent::GestureFlingStart:
731 case WebInputEvent::GestureFlingCancel: 731 case WebInputEvent::GestureFlingCancel:
732 m_client->didHandleGestureEvent(event, eventCancelled); 732 m_client->didHandleGestureEvent(event, eventCancelled);
733 return false; 733 return WebInputEventResult::NotHandled;
734 default: 734 default:
735 ASSERT_NOT_REACHED(); 735 ASSERT_NOT_REACHED();
736 } 736 }
737 LocalFrame* frame = m_localRoot->frame(); 737 LocalFrame* frame = m_localRoot->frame();
738 eventSwallowed = frame->eventHandler().handleGestureEvent(PlatformGestureEve ntBuilder(frame->view(), event)); 738 eventResult = frame->eventHandler().handleGestureEvent(PlatformGestureEventB uilder(frame->view(), event));
739 m_client->didHandleGestureEvent(event, eventCancelled); 739 m_client->didHandleGestureEvent(event, eventCancelled);
740 return eventSwallowed; 740 return eventResult;
741 } 741 }
742 742
743 bool WebFrameWidgetImpl::handleKeyEvent(const WebKeyboardEvent& event) 743 WebInputEventResult WebFrameWidgetImpl::handleKeyEvent(const WebKeyboardEvent& e vent)
744 { 744 {
745 ASSERT((event.type == WebInputEvent::RawKeyDown) 745 ASSERT((event.type == WebInputEvent::RawKeyDown)
746 || (event.type == WebInputEvent::KeyDown) 746 || (event.type == WebInputEvent::KeyDown)
747 || (event.type == WebInputEvent::KeyUp)); 747 || (event.type == WebInputEvent::KeyUp));
748 748
749 // Please refer to the comments explaining the m_suppressNextKeypressEvent 749 // Please refer to the comments explaining the m_suppressNextKeypressEvent
750 // member. 750 // member.
751 // The m_suppressNextKeypressEvent is set if the KeyDown is handled by 751 // The m_suppressNextKeypressEvent is set if the KeyDown is handled by
752 // Webkit. A keyDown event is typically associated with a keyPress(char) 752 // Webkit. A keyDown event is typically associated with a keyPress(char)
753 // event and a keyUp event. We reset this flag here as this is a new keyDown 753 // event and a keyUp event. We reset this flag here as this is a new keyDown
754 // event. 754 // event.
755 m_suppressNextKeypressEvent = false; 755 m_suppressNextKeypressEvent = false;
756 756
757 RefPtrWillBeRawPtr<Frame> focusedFrame = focusedCoreFrame(); 757 RefPtrWillBeRawPtr<Frame> focusedFrame = focusedCoreFrame();
758 if (focusedFrame && focusedFrame->isRemoteFrame()) { 758 if (focusedFrame && focusedFrame->isRemoteFrame()) {
759 WebRemoteFrameImpl* webFrame = WebRemoteFrameImpl::fromFrame(*toRemoteFr ame(focusedFrame.get())); 759 WebRemoteFrameImpl* webFrame = WebRemoteFrameImpl::fromFrame(*toRemoteFr ame(focusedFrame.get()));
760 webFrame->client()->forwardInputEvent(&event); 760 webFrame->client()->forwardInputEvent(&event);
761 return true; 761 return WebInputEventResult::HandledSystem;
762 } 762 }
763 763
764 if (!focusedFrame || !focusedFrame->isLocalFrame()) 764 if (!focusedFrame || !focusedFrame->isLocalFrame())
765 return false; 765 return WebInputEventResult::NotHandled;
766 766
767 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(focusedFrame.get()); 767 RefPtrWillBeRawPtr<LocalFrame> frame = toLocalFrame(focusedFrame.get());
768 768
769 PlatformKeyboardEventBuilder evt(event); 769 PlatformKeyboardEventBuilder evt(event);
770 770
771 if (frame->eventHandler().keyEvent(evt)) { 771 WebInputEventResult result = frame->eventHandler().keyEvent(evt);
772 if (result != WebInputEventResult::NotHandled) {
772 if (WebInputEvent::RawKeyDown == event.type) { 773 if (WebInputEvent::RawKeyDown == event.type) {
773 // Suppress the next keypress event unless the focused node is a plu gin node. 774 // Suppress the next keypress event unless the focused node is a plu gin node.
774 // (Flash needs these keypress events to handle non-US keyboards.) 775 // (Flash needs these keypress events to handle non-US keyboards.)
775 Element* element = focusedElement(); 776 Element* element = focusedElement();
776 if (!element || !element->layoutObject() || !element->layoutObject() ->isEmbeddedObject()) 777 if (!element || !element->layoutObject() || !element->layoutObject() ->isEmbeddedObject())
777 m_suppressNextKeypressEvent = true; 778 m_suppressNextKeypressEvent = true;
778 } 779 }
779 return true; 780 return result;
780 } 781 }
781 782
782 #if !OS(MACOSX) 783 #if !OS(MACOSX)
783 const WebInputEvent::Type contextMenuTriggeringEventType = 784 const WebInputEvent::Type contextMenuTriggeringEventType =
784 #if OS(WIN) 785 #if OS(WIN)
785 WebInputEvent::KeyUp; 786 WebInputEvent::KeyUp;
786 #else 787 #else
787 WebInputEvent::RawKeyDown; 788 WebInputEvent::RawKeyDown;
788 #endif 789 #endif
789 790
790 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS; 791 bool isUnmodifiedMenuKey = !(event.modifiers & WebInputEvent::InputModifiers ) && event.windowsKeyCode == VKEY_APPS;
791 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10; 792 bool isShiftF10 = event.modifiers == WebInputEvent::ShiftKey && event.window sKeyCode == VKEY_F10;
792 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) { 793 if ((isUnmodifiedMenuKey || isShiftF10) && event.type == contextMenuTriggeri ngEventType) {
793 view()->sendContextMenuEvent(event); 794 view()->sendContextMenuEvent(event);
794 return true; 795 return WebInputEventResult::HandledSystem;
795 } 796 }
796 #endif // !OS(MACOSX) 797 #endif // !OS(MACOSX)
797 798
798 return keyEventDefault(event); 799 return keyEventDefault(event);
799 } 800 }
800 801
801 bool WebFrameWidgetImpl::handleCharEvent(const WebKeyboardEvent& event) 802 WebInputEventResult WebFrameWidgetImpl::handleCharEvent(const WebKeyboardEvent& event)
802 { 803 {
803 ASSERT(event.type == WebInputEvent::Char); 804 ASSERT(event.type == WebInputEvent::Char);
804 805
805 // Please refer to the comments explaining the m_suppressNextKeypressEvent 806 // Please refer to the comments explaining the m_suppressNextKeypressEvent
806 // member. The m_suppressNextKeypressEvent is set if the KeyDown is 807 // member. The m_suppressNextKeypressEvent is set if the KeyDown is
807 // handled by Webkit. A keyDown event is typically associated with a 808 // handled by Webkit. A keyDown event is typically associated with a
808 // keyPress(char) event and a keyUp event. We reset this flag here as it 809 // keyPress(char) event and a keyUp event. We reset this flag here as it
809 // only applies to the current keyPress event. 810 // only applies to the current keyPress event.
810 bool suppress = m_suppressNextKeypressEvent; 811 bool suppress = m_suppressNextKeypressEvent;
811 m_suppressNextKeypressEvent = false; 812 m_suppressNextKeypressEvent = false;
812 813
813 LocalFrame* frame = toLocalFrame(focusedCoreFrame()); 814 LocalFrame* frame = toLocalFrame(focusedCoreFrame());
814 if (!frame) 815 if (!frame)
815 return suppress; 816 return suppress ? WebInputEventResult::HandledSuppressed : WebInputEvent Result::NotHandled;
816 817
817 EventHandler& handler = frame->eventHandler(); 818 EventHandler& handler = frame->eventHandler();
818 819
819 PlatformKeyboardEventBuilder evt(event); 820 PlatformKeyboardEventBuilder evt(event);
820 if (!evt.isCharacterKey()) 821 if (!evt.isCharacterKey())
821 return true; 822 return WebInputEventResult::HandledSuppressed;
822 823
823 // Accesskeys are triggered by char events and can't be suppressed. 824 // Accesskeys are triggered by char events and can't be suppressed.
825 // It is unclear whether a keypress should be dispatched as well
826 // crbug.com/563507
824 if (handler.handleAccessKey(evt)) 827 if (handler.handleAccessKey(evt))
825 return true; 828 return WebInputEventResult::HandledSystem;
826 829
827 // Safari 3.1 does not pass off windows system key messages (WM_SYSCHAR) to 830 // Safari 3.1 does not pass off windows system key messages (WM_SYSCHAR) to
828 // the eventHandler::keyEvent. We mimic this behavior on all platforms since 831 // the eventHandler::keyEvent. We mimic this behavior on all platforms since
829 // for now we are converting other platform's key events to windows key 832 // for now we are converting other platform's key events to windows key
830 // events. 833 // events.
831 if (evt.isSystemKey()) 834 if (evt.isSystemKey())
832 return false; 835 return WebInputEventResult::NotHandled;
833 836
834 if (!suppress && !handler.keyEvent(evt)) 837 if (suppress)
835 return keyEventDefault(event); 838 return WebInputEventResult::HandledSuppressed;
836 839
837 return true; 840 WebInputEventResult result = handler.keyEvent(evt);
841 if (result != WebInputEventResult::NotHandled)
842 return result;
843
844 return keyEventDefault(event);
838 } 845 }
839 846
840 847 WebInputEventResult WebFrameWidgetImpl::keyEventDefault(const WebKeyboardEvent& event)
841 bool WebFrameWidgetImpl::keyEventDefault(const WebKeyboardEvent& event)
842 { 848 {
843 LocalFrame* frame = toLocalFrame(focusedCoreFrame()); 849 LocalFrame* frame = toLocalFrame(focusedCoreFrame());
844 if (!frame) 850 if (!frame)
845 return false; 851 return WebInputEventResult::NotHandled;
846 852
847 switch (event.type) { 853 switch (event.type) {
848 case WebInputEvent::Char: 854 case WebInputEvent::Char:
849 if (event.windowsKeyCode == VKEY_SPACE) { 855 if (event.windowsKeyCode == VKEY_SPACE) {
850 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT); 856 int keyCode = ((event.modifiers & WebInputEvent::ShiftKey) ? VKEY_PR IOR : VKEY_NEXT);
851 return scrollViewWithKeyboard(keyCode, event.modifiers); 857 return scrollViewWithKeyboard(keyCode, event.modifiers);
852 } 858 }
853 break; 859 break;
854 case WebInputEvent::RawKeyDown: 860 case WebInputEvent::RawKeyDown:
855 if (event.modifiers == WebInputEvent::ControlKey) { 861 if (event.modifiers == WebInputEvent::ControlKey) {
856 switch (event.windowsKeyCode) { 862 switch (event.windowsKeyCode) {
857 #if !OS(MACOSX) 863 #if !OS(MACOSX)
858 case 'A': 864 case 'A':
859 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("SelectAll")); 865 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("SelectAll"));
860 return true; 866 return WebInputEventResult::HandledSystem;
861 case VKEY_INSERT: 867 case VKEY_INSERT:
862 case 'C': 868 case 'C':
863 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("Copy")); 869 WebFrame::fromFrame(focusedCoreFrame())->executeCommand(WebStrin g::fromUTF8("Copy"));
864 return true; 870 return WebInputEventResult::HandledSystem;
865 #endif 871 #endif
866 // Match FF behavior in the sense that Ctrl+home/end are the only Ct rl 872 // Match FF behavior in the sense that Ctrl+home/end are the only Ct rl
867 // key combinations which affect scrolling. Safari is buggy in the 873 // key combinations which affect scrolling. Safari is buggy in the
868 // sense that it scrolls the page for all Ctrl+scrolling key 874 // sense that it scrolls the page for all Ctrl+scrolling key
869 // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc. 875 // combinations. For e.g. Ctrl+pgup/pgdn/up/down, etc.
870 case VKEY_HOME: 876 case VKEY_HOME:
871 case VKEY_END: 877 case VKEY_END:
872 break; 878 break;
873 default: 879 default:
874 return false; 880 return WebInputEventResult::NotHandled;
875 } 881 }
876 } 882 }
877 if (!event.isSystemKey && !(event.modifiers & WebInputEvent::ShiftKey)) 883 if (!event.isSystemKey && !(event.modifiers & WebInputEvent::ShiftKey))
878 return scrollViewWithKeyboard(event.windowsKeyCode, event.modifiers) ; 884 return scrollViewWithKeyboard(event.windowsKeyCode, event.modifiers) ;
879 break; 885 break;
880 default: 886 default:
881 break; 887 break;
882 } 888 }
883 return false; 889 return WebInputEventResult::NotHandled;
884 } 890 }
885 891
886 bool WebFrameWidgetImpl::scrollViewWithKeyboard(int keyCode, int modifiers) 892 WebInputEventResult WebFrameWidgetImpl::scrollViewWithKeyboard(int keyCode, int modifiers)
887 { 893 {
888 ScrollDirection scrollDirection; 894 ScrollDirection scrollDirection;
889 ScrollGranularity scrollGranularity; 895 ScrollGranularity scrollGranularity;
890 #if OS(MACOSX) 896 #if OS(MACOSX)
891 // Control-Up/Down should be PageUp/Down on Mac. 897 // Control-Up/Down should be PageUp/Down on Mac.
892 if (modifiers & WebMouseEvent::ControlKey) { 898 if (modifiers & WebMouseEvent::ControlKey) {
893 if (keyCode == VKEY_UP) 899 if (keyCode == VKEY_UP)
894 keyCode = VKEY_PRIOR; 900 keyCode = VKEY_PRIOR;
895 else if (keyCode == VKEY_DOWN) 901 else if (keyCode == VKEY_DOWN)
896 keyCode = VKEY_NEXT; 902 keyCode = VKEY_NEXT;
897 } 903 }
898 #endif 904 #endif
899 if (!mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity)) 905 if (!mapKeyCodeForScroll(keyCode, &scrollDirection, &scrollGranularity))
900 return false; 906 return WebInputEventResult::NotHandled;
901 907
902 if (LocalFrame* frame = toLocalFrame(focusedCoreFrame())) 908 LocalFrame* frame = toLocalFrame(focusedCoreFrame());
903 return frame->eventHandler().bubblingScroll(scrollDirection, scrollGranu larity); 909 if (frame && frame->eventHandler().bubblingScroll(scrollDirection, scrollGra nularity))
904 return false; 910 return WebInputEventResult::HandledSystem;
911 return WebInputEventResult::NotHandled;
905 } 912 }
906 913
907 bool WebFrameWidgetImpl::mapKeyCodeForScroll( 914 bool WebFrameWidgetImpl::mapKeyCodeForScroll(
908 int keyCode, 915 int keyCode,
909 ScrollDirection* scrollDirection, 916 ScrollDirection* scrollDirection,
910 ScrollGranularity* scrollGranularity) 917 ScrollGranularity* scrollGranularity)
911 { 918 {
912 switch (keyCode) { 919 switch (keyCode) {
913 case VKEY_LEFT: 920 case VKEY_LEFT:
914 *scrollDirection = ScrollLeftIgnoringWritingMode; 921 *scrollDirection = ScrollLeftIgnoringWritingMode;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 1076
1070 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1077 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1071 { 1078 {
1072 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1079 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1073 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1080 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1074 result.setToShadowHostIfInUserAgentShadowRoot(); 1081 result.setToShadowHostIfInUserAgentShadowRoot();
1075 return result; 1082 return result;
1076 } 1083 }
1077 1084
1078 } // namespace blink 1085 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698