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" | |
42 #include "core/frame/FrameView.h" | 41 #include "core/frame/FrameView.h" |
43 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
44 #include "core/html/HTMLAnchorElement.h" | 43 #include "core/html/HTMLAnchorElement.h" |
45 #include "core/html/HTMLElement.h" | 44 #include "core/html/HTMLElement.h" |
46 #include "core/html/HTMLHtmlElement.h" | 45 #include "core/html/HTMLHtmlElement.h" |
47 #include "core/html/HTMLTableCellElement.h" | 46 #include "core/html/HTMLTableCellElement.h" |
48 #include "core/html/HTMLTableElement.h" | 47 #include "core/html/HTMLTableElement.h" |
49 #include "core/page/AutoscrollController.h" | 48 #include "core/page/AutoscrollController.h" |
50 #include "core/page/EventHandler.h" | 49 #include "core/page/EventHandler.h" |
51 #include "core/page/Page.h" | 50 #include "core/page/Page.h" |
(...skipping 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2162 } | 2161 } |
2163 | 2162 |
2164 // Elements with non-auto touch-action will send a SetTouchAction message | 2163 // Elements with non-auto touch-action will send a SetTouchAction message |
2165 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 2164 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
2166 // a touchstart handler that must be reported. | 2165 // a touchstart handler that must be reported. |
2167 // | 2166 // |
2168 // Since a CSS property cannot be applied directly to a text node, a | 2167 // Since a CSS property cannot be applied directly to a text node, a |
2169 // handler will have already been added for its parent so ignore it. | 2168 // handler will have already been added for its parent so ignore it. |
2170 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; | 2169 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; |
2171 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { | 2170 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { |
2172 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | |
2173 if (newStyle.touchAction() != TouchActionAuto) | 2171 if (newStyle.touchAction() != TouchActionAuto) |
2174 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
t); | 2172 document().didAddTouchEventHandler(node()); |
2175 else | 2173 else |
2176 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); | 2174 document().didRemoveTouchEventHandler(node()); |
2177 } | 2175 } |
2178 } | 2176 } |
2179 | 2177 |
2180 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderSt
yle* b) | 2178 static bool areNonIdenticalCursorListsEqual(const RenderStyle* a, const RenderSt
yle* b) |
2181 { | 2179 { |
2182 ASSERT(a->cursors() != b->cursors()); | 2180 ASSERT(a->cursors() != b->cursors()); |
2183 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); | 2181 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); |
2184 } | 2182 } |
2185 | 2183 |
2186 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b) | 2184 static inline bool areCursorsEqual(const RenderStyle* a, const RenderStyle* b) |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2684 // this renderer had no parent at the time remove() was called. | 2682 // this renderer had no parent at the time remove() was called. |
2685 | 2683 |
2686 if (hasCounterNodeMap()) | 2684 if (hasCounterNodeMap()) |
2687 RenderCounter::destroyCounterNodes(*this); | 2685 RenderCounter::destroyCounterNodes(*this); |
2688 | 2686 |
2689 // Remove the handler if node had touch-action set. Don't call when | 2687 // Remove the handler if node had touch-action set. Don't call when |
2690 // document is being destroyed as all handlers will have been cleared | 2688 // document is being destroyed as all handlers will have been cleared |
2691 // previously. Handlers are not added for text nodes so don't try removing | 2689 // previously. Handlers are not added for text nodes so don't try removing |
2692 // for one too. Need to check if m_style is null in cases of partial constru
ction. | 2690 // for one too. Need to check if m_style is null in cases of partial constru
ction. |
2693 if (!documentBeingDestroyed() && node() && !node()->isTextNode() && m_style
&& m_style->touchAction() != TouchActionAuto) | 2691 if (!documentBeingDestroyed() && node() && !node()->isTextNode() && m_style
&& m_style->touchAction() != TouchActionAuto) |
2694 document().frameHost()->eventHandlerRegistry().didRemoveEventHandler(*no
de(), EventHandlerRegistry::TouchEvent); | 2692 document().didRemoveTouchEventHandler(node()); |
2695 | 2693 |
2696 setAncestorLineBoxDirty(false); | 2694 setAncestorLineBoxDirty(false); |
2697 | 2695 |
2698 clearLayoutRootIfNeeded(); | 2696 clearLayoutRootIfNeeded(); |
2699 } | 2697 } |
2700 | 2698 |
2701 void RenderObject::insertedIntoTree() | 2699 void RenderObject::insertedIntoTree() |
2702 { | 2700 { |
2703 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. | 2701 // FIXME: We should ASSERT(isRooted()) here but generated content makes some
out-of-order insertion. |
2704 | 2702 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3447 { | 3445 { |
3448 if (object1) { | 3446 if (object1) { |
3449 const WebCore::RenderObject* root = object1; | 3447 const WebCore::RenderObject* root = object1; |
3450 while (root->parent()) | 3448 while (root->parent()) |
3451 root = root->parent(); | 3449 root = root->parent(); |
3452 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3450 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3453 } | 3451 } |
3454 } | 3452 } |
3455 | 3453 |
3456 #endif | 3454 #endif |
OLD | NEW |