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

Side by Side Diff: Source/WebCore/dom/Node.cpp

Issue 14296003: Remove TOUCH_EVENTS and TOUCH_EVENT_TRACKING compile-time flags. (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 m_next->setPreviousSibling(0); 417 m_next->setPreviousSibling(0);
418 418
419 m_treeScope->guardDeref(); 419 m_treeScope->guardDeref();
420 420
421 InspectorCounters::decrementCounter(InspectorCounters::NodeCounter); 421 InspectorCounters::decrementCounter(InspectorCounters::NodeCounter);
422 } 422 }
423 423
424 void Node::willBeDeletedFrom(Document* document) 424 void Node::willBeDeletedFrom(Document* document)
425 { 425 {
426 if (hasEventTargetData()) { 426 if (hasEventTargetData()) {
427 #if ENABLE(TOUCH_EVENT_TRACKING)
428 if (document) 427 if (document)
429 document->didRemoveEventTargetNode(this); 428 document->didRemoveEventTargetNode(this);
430 #endif
431 clearEventTargetData(); 429 clearEventTargetData();
432 } 430 }
433 431
434 if (document) { 432 if (document) {
435 if (AXObjectCache* cache = document->existingAXObjectCache()) 433 if (AXObjectCache* cache = document->existingAXObjectCache())
436 cache->remove(this); 434 cache->remove(this);
437 } 435 }
438 } 436 }
439 437
440 NodeRareData* Node::rareData() const 438 NodeRareData* Node::rareData() const
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 2321
2324 void Node::dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator> eventDispatchMediator) 2322 void Node::dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator> eventDispatchMediator)
2325 { 2323 {
2326 EventDispatcher::dispatchScopedEvent(this, eventDispatchMediator); 2324 EventDispatcher::dispatchScopedEvent(this, eventDispatchMediator);
2327 } 2325 }
2328 2326
2329 bool Node::dispatchEvent(PassRefPtr<Event> event) 2327 bool Node::dispatchEvent(PassRefPtr<Event> event)
2330 { 2328 {
2331 if (event->isMouseEvent()) 2329 if (event->isMouseEvent())
2332 return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator:: create(adoptRef(toMouseEvent(event.leakRef())), MouseEventDispatchMediator::Synt heticMouseEvent)); 2330 return EventDispatcher::dispatchEvent(this, MouseEventDispatchMediator:: create(adoptRef(toMouseEvent(event.leakRef())), MouseEventDispatchMediator::Synt heticMouseEvent));
2333 #if ENABLE(TOUCH_EVENTS)
2334 if (event->isTouchEvent()) 2331 if (event->isTouchEvent())
2335 return dispatchTouchEvent(adoptRef(toTouchEvent(event.leakRef()))); 2332 return dispatchTouchEvent(adoptRef(toTouchEvent(event.leakRef())));
2336 #endif
2337 return EventDispatcher::dispatchEvent(this, EventDispatchMediator::create(ev ent)); 2333 return EventDispatcher::dispatchEvent(this, EventDispatchMediator::create(ev ent));
2338 } 2334 }
2339 2335
2340 void Node::dispatchSubtreeModifiedEvent() 2336 void Node::dispatchSubtreeModifiedEvent()
2341 { 2337 {
2342 if (isInShadowTree()) 2338 if (isInShadowTree())
2343 return; 2339 return;
2344 2340
2345 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden()); 2341 ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
2346 2342
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 } 2381 }
2386 2382
2387 bool Node::dispatchGestureEvent(const PlatformGestureEvent& event) 2383 bool Node::dispatchGestureEvent(const PlatformGestureEvent& event)
2388 { 2384 {
2389 RefPtr<GestureEvent> gestureEvent = GestureEvent::create(document()->default View(), event); 2385 RefPtr<GestureEvent> gestureEvent = GestureEvent::create(document()->default View(), event);
2390 if (!gestureEvent.get()) 2386 if (!gestureEvent.get())
2391 return false; 2387 return false;
2392 return EventDispatcher::dispatchEvent(this, GestureEventDispatchMediator::cr eate(gestureEvent)); 2388 return EventDispatcher::dispatchEvent(this, GestureEventDispatchMediator::cr eate(gestureEvent));
2393 } 2389 }
2394 2390
2395 #if ENABLE(TOUCH_EVENTS)
2396 bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event) 2391 bool Node::dispatchTouchEvent(PassRefPtr<TouchEvent> event)
2397 { 2392 {
2398 return EventDispatcher::dispatchEvent(this, TouchEventDispatchMediator::crea te(event)); 2393 return EventDispatcher::dispatchEvent(this, TouchEventDispatchMediator::crea te(event));
2399 } 2394 }
2400 #endif
2401 2395
2402 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve ntOptions eventOptions, SimulatedClickVisualOptions visualOptions) 2396 void Node::dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEve ntOptions eventOptions, SimulatedClickVisualOptions visualOptions)
2403 { 2397 {
2404 EventDispatcher::dispatchSimulatedClick(this, underlyingEvent, eventOptions, visualOptions); 2398 EventDispatcher::dispatchSimulatedClick(this, underlyingEvent, eventOptions, visualOptions);
2405 } 2399 }
2406 2400
2407 bool Node::dispatchBeforeLoadEvent(const String& sourceURL) 2401 bool Node::dispatchBeforeLoadEvent(const String& sourceURL)
2408 { 2402 {
2409 if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER)) 2403 if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER))
2410 return true; 2404 return true;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2514 2508
2515 bool Node::willRespondToMouseClickEvents() 2509 bool Node::willRespondToMouseClickEvents()
2516 { 2510 {
2517 if (isDisabledFormControl(this)) 2511 if (isDisabledFormControl(this))
2518 return false; 2512 return false;
2519 return isContentEditable(UserSelectAllIsAlwaysNonEditable) || hasEventListen ers(eventNames().mouseupEvent) || hasEventListeners(eventNames().mousedownEvent) || hasEventListeners(eventNames().clickEvent) || hasEventListeners(eventNames() .DOMActivateEvent); 2513 return isContentEditable(UserSelectAllIsAlwaysNonEditable) || hasEventListen ers(eventNames().mouseupEvent) || hasEventListeners(eventNames().mousedownEvent) || hasEventListeners(eventNames().clickEvent) || hasEventListeners(eventNames() .DOMActivateEvent);
2520 } 2514 }
2521 2515
2522 bool Node::willRespondToTouchEvents() 2516 bool Node::willRespondToTouchEvents()
2523 { 2517 {
2524 #if ENABLE(TOUCH_EVENTS)
2525 if (isDisabledFormControl(this)) 2518 if (isDisabledFormControl(this))
2526 return false; 2519 return false;
2527 return hasEventListeners(eventNames().touchstartEvent) || hasEventListeners( eventNames().touchmoveEvent) || hasEventListeners(eventNames().touchcancelEvent) || hasEventListeners(eventNames().touchendEvent); 2520 return hasEventListeners(eventNames().touchstartEvent) || hasEventListeners( eventNames().touchmoveEvent) || hasEventListeners(eventNames().touchcancelEvent) || hasEventListeners(eventNames().touchendEvent);
2528 #else
2529 return false;
2530 #endif
2531 } 2521 }
2532 2522
2533 // This is here for inlining 2523 // This is here for inlining
2534 inline void TreeScope::removedLastRefToScope() 2524 inline void TreeScope::removedLastRefToScope()
2535 { 2525 {
2536 ASSERT(!deletionHasBegun()); 2526 ASSERT(!deletionHasBegun());
2537 if (m_guardRefCount) { 2527 if (m_guardRefCount) {
2538 // If removing a child removes the last self-only ref, we don't 2528 // If removing a child removes the last self-only ref, we don't
2539 // want the scope to be destructed until after 2529 // want the scope to be destructed until after
2540 // removeDetachedChildren returns, so we guard ourselves with an 2530 // removeDetachedChildren returns, so we guard ourselves with an
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 node->showTreeForThis(); 2699 node->showTreeForThis();
2710 } 2700 }
2711 2701
2712 void showNodePath(const WebCore::Node* node) 2702 void showNodePath(const WebCore::Node* node)
2713 { 2703 {
2714 if (node) 2704 if (node)
2715 node->showNodePathForThis(); 2705 node->showNodePathForThis();
2716 } 2706 }
2717 2707
2718 #endif 2708 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698