Changeset 70004 in webkit
- Timestamp:
- Oct 18, 2010 3:40:38 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70001 r70004 1 2010-10-18 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by John Sullivan. 4 5 WebKit2 should handle dismissing the Find overlay on mouse-down 6 https://bugs.webkit.org/show_bug.cgi?id=47854 7 8 * WebProcess/WebPage/FindPageOverlay.cpp: 9 (WebKit::FindPageOverlay::mouseEvent): 10 Dismiss the find UI on MouseDown. 11 12 * WebProcess/WebPage/WebPage.cpp: 13 (WebKit::WebPage::mouseEvent): 14 If there's a page overlay, let it have a go at the event. 15 1 16 2010-10-18 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
r69711 r70004 141 141 } 142 142 143 bool FindPageOverlay::mouseEvent(const WebMouseEvent& event) 144 { 145 if (event.type() == WebEvent::MouseDown) { 146 // Dismiss the overlay. 147 m_findController->hideFindUI(); 148 return false; 149 } 150 151 return false; 152 } 153 143 154 } // namespace WebKit -
trunk/WebKit2/WebProcess/WebPage/FindPageOverlay.h
r69625 r70004 47 47 // PageOverlay. 48 48 virtual void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect); 49 virtual bool mouseEvent(const WebMouseEvent&); 49 50 50 51 FindController* m_findController; -
trunk/WebKit2/WebProcess/WebPage/PageOverlay.h
r69625 r70004 36 36 namespace WebKit { 37 37 38 class WebMouseEvent; 38 39 class WebPage; 39 40 … … 44 45 virtual ~PageOverlay(); 45 46 virtual void drawRect(WebCore::GraphicsContext&, const WebCore::IntRect& dirtyRect) = 0; 46 47 virtual bool mouseEvent(const WebMouseEvent&) = 0; 48 47 49 void setPage(WebPage*); 48 50 void setNeedsDisplay(); -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r69997 r70004 494 494 void WebPage::mouseEvent(const WebMouseEvent& mouseEvent) 495 495 { 496 CurrentEvent currentEvent(mouseEvent); 497 498 bool handled = handleMouseEvent(mouseEvent, m_page.get()); 496 bool handled = false; 497 498 if (m_pageOverlay) { 499 // Let the page overlay handle the event. 500 handled = m_pageOverlay->mouseEvent(mouseEvent); 501 } 502 503 if (!handled) { 504 CurrentEvent currentEvent(mouseEvent); 505 506 handled = handleMouseEvent(mouseEvent, m_page.get()); 507 } 508 499 509 WebProcess::shared().connection()->send(Messages::WebPageProxy::DidReceiveEvent(static_cast<uint32_t>(mouseEvent.type()), handled), m_pageID); 500 510 }
Note: See TracChangeset
for help on using the changeset viewer.