Changeset 183021 in webkit
- Timestamp:
- Apr 20, 2015 12:03:00 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r183017 r183021 1 2015-04-20 Beth Dakin <bdakin@apple.com> 2 3 Should remove mouseForceClick and mouseForceCancelled from DOM force events 4 https://bugs.webkit.org/show_bug.cgi?id=143904 5 -and corresponding- 6 rdar://problem/20578842 7 8 Reviewed by Dan Bernstein. 9 10 After more thought and discussion, we decided to remove mouseForceClick and 11 mouseForceCancelled from DOM force events. mouseForceClick is confusing and 12 redundant. mouseForceCancelled is confusing as it is currently implemented, and 13 all of its functionality can be filled by exisiting events such as mouseup, 14 mouseout, etc. 15 16 * dom/Document.cpp: 17 (WebCore::Document::addListenerTypeIfNeeded): 18 * dom/Document.h: 19 * dom/Document.idl: 20 * dom/Element.cpp: 21 (WebCore::Element::dispatchMouseForceWillBegin): 22 (WebCore::Element::dispatchMouseForceClick): Deleted. 23 (WebCore::Element::dispatchMouseForceCancelled): Deleted. 24 * dom/Element.h: 25 * dom/Element.idl: 26 * dom/EventNames.h: 27 * html/HTMLAttributeNames.in: 28 * html/HTMLBodyElement.cpp: 29 (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): 30 * html/HTMLBodyElement.idl: 31 * html/HTMLElement.cpp: 32 (WebCore::HTMLElement::createEventHandlerNameMap): 33 * page/DOMWindow.idl: 34 1 35 2015-04-20 Simon Fraser <simon.fraser@apple.com> 2 36 -
trunk/Source/WebCore/dom/Document.cpp
r183017 r183021 4021 4021 else if (eventType == eventNames().webkitmouseforceupEvent) 4022 4022 addListenerType(FORCEUP_LISTENER); 4023 else if (eventType == eventNames().webkitmouseforceclickEvent)4024 addListenerType(FORCECLICK_LISTENER);4025 else if (eventType == eventNames().webkitmouseforcecancelledEvent)4026 addListenerType(FORCECANCELLED_LISTENER);4027 4023 } 4028 4024 -
trunk/Source/WebCore/dom/Document.h
r183017 r183021 776 776 FORCECHANGED_LISTENER = 1 << 14, 777 777 FORCEDOWN_LISTENER = 1 << 15, 778 FORCEUP_LISTENER = 1 << 16, 779 FORCECLICK_LISTENER = 1 << 17, 780 FORCECANCELLED_LISTENER = 1 << 18 778 FORCEUP_LISTENER = 1 << 16 781 779 }; 782 780 -
trunk/Source/WebCore/dom/Document.idl
r182046 r183021 302 302 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop; 303 303 304 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcecancelled;305 304 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcechanged; 306 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceclick;307 305 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcedown; 308 306 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceup; -
trunk/Source/WebCore/dom/Element.cpp
r182963 r183021 2261 2261 return false; 2262 2262 } 2263 2264 void Element::dispatchMouseForceClick() 2265 { 2266 if (!document().hasListenerType(Document::FORCECLICK_LISTENER)) 2267 return; 2268 2269 Frame* frame = document().frame(); 2270 if (!frame) 2271 return; 2272 2273 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtForceClick); 2274 RefPtr<MouseEvent> mouseForceClickEvent = MouseEvent::create(eventNames().webkitmouseforceclickEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2275 2276 mouseForceClickEvent->setTarget(this); 2277 dispatchEvent(mouseForceClickEvent); 2278 } 2279 2280 void Element::dispatchMouseForceCancelled() 2281 { 2282 if (!document().hasListenerType(Document::FORCECANCELLED_LISTENER)) 2283 return; 2284 2285 Frame* frame = document().frame(); 2286 if (!frame) 2287 return; 2288 2289 PlatformMouseEvent platformMouseEvent(frame->eventHandler().lastKnownMousePosition(), frame->eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), 0); 2290 RefPtr<MouseEvent> mouseForceCancelledEvent = MouseEvent::create(eventNames().webkitmouseforcecancelledEvent, document().defaultView(), platformMouseEvent, 0, nullptr); 2291 2292 mouseForceCancelledEvent->setTarget(this); 2293 dispatchEvent(mouseForceCancelledEvent); 2294 } 2295 2296 #else // #if ENABLE(MOUSE_FORCE_EVENTS) 2297 2263 #else 2298 2264 bool Element::dispatchMouseForceWillBegin() 2299 2265 { 2300 2266 return false; 2301 }2302 2303 void Element::dispatchMouseForceClick()2304 {2305 }2306 2307 void Element::dispatchMouseForceCancelled()2308 {2309 2267 } 2310 2268 #endif // #if ENABLE(MOUSE_FORCE_EVENTS) -
trunk/Source/WebCore/dom/Element.h
r182963 r183021 470 470 471 471 WEBCORE_EXPORT bool dispatchMouseForceWillBegin(); 472 WEBCORE_EXPORT void dispatchMouseForceClick();473 WEBCORE_EXPORT void dispatchMouseForceCancelled();474 472 475 473 virtual bool willRecalcStyle(Style::Change); -
trunk/Source/WebCore/dom/Element.idl
r182046 r183021 259 259 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop; 260 260 261 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcecancelled;262 261 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcechanged; 263 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceclick;264 262 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcedown; 265 263 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin; -
trunk/Source/WebCore/dom/EventNames.h
r182141 r183021 234 234 macro(webkitkeyerror) \ 235 235 macro(webkitkeymessage) \ 236 macro(webkitmouseforcecancelled) \237 236 macro(webkitmouseforcechanged) \ 238 macro(webkitmouseforceclick) \239 237 macro(webkitmouseforcedown) \ 240 238 macro(webkitmouseforcewillbegin) \ -
trunk/Source/WebCore/html/HTMLAttributeNames.in
r181907 r183021 271 271 onwebkitkeyerror 272 272 onwebkitkeymessage 273 onwebkitmouseforcecancelled274 273 onwebkitmouseforcechanged 275 onwebkitmouseforceclick276 274 onwebkitmouseforcedown 277 275 onwebkitmouseforceup -
trunk/Source/WebCore/html/HTMLBodyElement.cpp
r182677 r183021 124 124 &onstorageAttr, 125 125 &onunloadAttr, 126 &onwebkitmouseforcecancelledAttr,127 126 &onwebkitmouseforcechangedAttr, 128 &onwebkitmouseforceclickAttr,129 127 &onwebkitmouseforcedownAttr, 130 128 &onwebkitmouseforceupAttr, -
trunk/Source/WebCore/html/HTMLBodyElement.idl
r182046 r183021 46 46 [NotEnumerable, WindowEventHandler] attribute EventHandler onunload; 47 47 48 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcecancelled;49 48 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcechanged; 50 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceclick;51 49 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcedown; 52 50 [NotEnumerable, WindowEventHandler, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcewillbegin; -
trunk/Source/WebCore/html/HTMLElement.cpp
r182120 r183021 338 338 &onwebkitkeyerrorAttr, 339 339 &onwebkitkeymessageAttr, 340 &onwebkitmouseforcecancelledAttr,341 340 &onwebkitmouseforcechangedAttr, 342 &onwebkitmouseforceclickAttr,343 341 &onwebkitmouseforcedownAttr, 344 342 &onwebkitmouseforcewillbeginAttr, -
trunk/Source/WebCore/page/DOMWindow.idl
r182046 r183021 286 286 [NotEnumerable, Conditional=WILL_REVEAL_EDGE_EVENTS] attribute EventHandler onwebkitwillrevealtop; 287 287 288 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcecancelled;289 288 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcechanged; 290 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceclick;291 289 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforcedown; 292 290 [NotEnumerable, Conditional=MOUSE_FORCE_EVENTS] attribute EventHandler onwebkitmouseforceup; -
trunk/Source/WebKit2/ChangeLog
r183019 r183021 1 2015-04-20 Beth Dakin <bdakin@apple.com> 2 3 Should remove mouseForceClick and mouseForceCancelled from DOM force events 4 https://bugs.webkit.org/show_bug.cgi?id=143904 5 -and corresponding- 6 rdar://problem/20578842 7 8 Reviewed by Dan Bernstein. 9 10 * WebProcess/WebPage/mac/WebPageMac.mm: 11 (WebKit::WebPage::immediateActionDidCancel): 12 1 13 2015-04-20 Tim Horton <timothy_horton@apple.com> 2 14 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r182963 r183021 1150 1150 { 1151 1151 m_page->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelled); 1152 1153 Element* element = m_lastActionMenuHitTestResult.innerElement();1154 if (!element)1155 return;1156 1157 element->dispatchMouseForceCancelled();1158 1152 } 1159 1153
Note: See TracChangeset
for help on using the changeset viewer.