OLD | NEW |
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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "core/accessibility/AXObjectCache.h" | 31 #include "core/accessibility/AXObjectCache.h" |
32 #include "core/css/resolver/StyleResolver.h" | 32 #include "core/css/resolver/StyleResolver.h" |
33 #include "core/dom/ElementTraversal.h" | 33 #include "core/dom/ElementTraversal.h" |
34 #include "core/dom/StyleEngine.h" | 34 #include "core/dom/StyleEngine.h" |
35 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
36 #include "core/editing/EditingBoundary.h" | 36 #include "core/editing/EditingBoundary.h" |
37 #include "core/editing/FrameSelection.h" | 37 #include "core/editing/FrameSelection.h" |
38 #include "core/editing/htmlediting.h" | 38 #include "core/editing/htmlediting.h" |
39 #include "core/fetch/ResourceLoadPriorityOptimizer.h" | 39 #include "core/fetch/ResourceLoadPriorityOptimizer.h" |
40 #include "core/fetch/ResourceLoader.h" | 40 #include "core/fetch/ResourceLoader.h" |
| 41 #include "core/frame/EventHandlerRegistry.h" |
41 #include "core/frame/FrameView.h" | 42 #include "core/frame/FrameView.h" |
42 #include "core/frame/LocalFrame.h" | 43 #include "core/frame/LocalFrame.h" |
43 #include "core/html/HTMLAnchorElement.h" | 44 #include "core/html/HTMLAnchorElement.h" |
44 #include "core/html/HTMLElement.h" | 45 #include "core/html/HTMLElement.h" |
45 #include "core/html/HTMLHtmlElement.h" | 46 #include "core/html/HTMLHtmlElement.h" |
46 #include "core/html/HTMLTableCellElement.h" | 47 #include "core/html/HTMLTableCellElement.h" |
47 #include "core/html/HTMLTableElement.h" | 48 #include "core/html/HTMLTableElement.h" |
48 #include "core/page/AutoscrollController.h" | 49 #include "core/page/AutoscrollController.h" |
49 #include "core/page/EventHandler.h" | 50 #include "core/page/EventHandler.h" |
50 #include "core/page/Page.h" | 51 #include "core/page/Page.h" |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 } | 2178 } |
2178 | 2179 |
2179 // Elements with non-auto touch-action will send a SetTouchAction message | 2180 // Elements with non-auto touch-action will send a SetTouchAction message |
2180 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 2181 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
2181 // a touchstart handler that must be reported. | 2182 // a touchstart handler that must be reported. |
2182 // | 2183 // |
2183 // Since a CSS property cannot be applied directly to a text node, a | 2184 // Since a CSS property cannot be applied directly to a text node, a |
2184 // handler will have already been added for its parent so ignore it. | 2185 // handler will have already been added for its parent so ignore it. |
2185 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; | 2186 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; |
2186 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { | 2187 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { |
| 2188 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2187 if (newStyle.touchAction() != TouchActionAuto) | 2189 if (newStyle.touchAction() != TouchActionAuto) |
2188 document().didAddTouchEventHandler(node()); | 2190 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
t); |
2189 else | 2191 else |
2190 document().didRemoveTouchEventHandler(node()); | 2192 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); |
2191 } | 2193 } |
2192 } | 2194 } |
2193 | 2195 |
2194 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderSt
yle* b) | 2196 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderSt
yle* b) |
2195 { | 2197 { |
2196 ASSERT(a->cursors() != b->cursors()); | 2198 ASSERT(a->cursors() != b->cursors()); |
2197 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); | 2199 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); |
2198 } | 2200 } |
2199 | 2201 |
2200 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b) | 2202 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b) |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2698 // this renderer had no parent at the time remove() was called. | 2700 // this renderer had no parent at the time remove() was called. |
2699 | 2701 |
2700 if (hasCounterNodeMap()) | 2702 if (hasCounterNodeMap()) |
2701 RenderCounter::destroyCounterNodes(*this); | 2703 RenderCounter::destroyCounterNodes(*this); |
2702 | 2704 |
2703 // Remove the handler if node had touch-action set. Don't call when | 2705 // Remove the handler if node had touch-action set. Don't call when |
2704 // document is being destroyed as all handlers will have been cleared | 2706 // document is being destroyed as all handlers will have been cleared |
2705 // previously. Handlers are not added for text nodes so don't try removing | 2707 // previously. Handlers are not added for text nodes so don't try removing |
2706 // for one too. Need to check if m_style is null in cases of partial constru
ction. | 2708 // for one too. Need to check if m_style is null in cases of partial constru
ction. |
2707 if (!documentBeingDestroyed() && node() && !node()->isTextNode() && m_style
&& m_style->touchAction() != TouchActionAuto) | 2709 if (!documentBeingDestroyed() && node() && !node()->isTextNode() && m_style
&& m_style->touchAction() != TouchActionAuto) |
2708 document().didRemoveTouchEventHandler(node()); | 2710 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*no
de(), EventHandlerRegistry::TouchEvent); |
2709 | 2711 |
2710 setAncestorLineBoxDirty(false); | 2712 setAncestorLineBoxDirty(false); |
2711 | 2713 |
2712 clearLayoutRootIfNeeded(); | 2714 clearLayoutRootIfNeeded(); |
2713 } | 2715 } |
2714 | 2716 |
2715 void RenderObject::insertedIntoTree() | 2717 void RenderObject::insertedIntoTree() |
2716 { | 2718 { |
2717 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. | 2719 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. |
2718 | 2720 |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3470 { | 3472 { |
3471 if (object1) { | 3473 if (object1) { |
3472 const blink::RenderObject* root = object1; | 3474 const blink::RenderObject* root = object1; |
3473 while (root->parent()) | 3475 while (root->parent()) |
3474 root = root->parent(); | 3476 root = root->parent(); |
3475 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3477 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3476 } | 3478 } |
3477 } | 3479 } |
3478 | 3480 |
3479 #endif | 3481 #endif |
OLD | NEW |