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 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2037 } else { | 2037 } else { |
2038 s_affectsParentBlock = false; | 2038 s_affectsParentBlock = false; |
2039 } | 2039 } |
2040 | 2040 |
2041 // Elements with non-auto touch-action will send a SetTouchAction message | 2041 // Elements with non-auto touch-action will send a SetTouchAction message |
2042 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 2042 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
2043 // a touchstart handler that must be reported. | 2043 // a touchstart handler that must be reported. |
2044 // | 2044 // |
2045 // Since a CSS property cannot be applied directly to a text node, a | 2045 // Since a CSS property cannot be applied directly to a text node, a |
2046 // handler will have already been added for its parent so ignore it. | 2046 // handler will have already been added for its parent so ignore it. |
| 2047 // TODO: Remove this blocking event handler; crbug.com/318381 |
2047 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; | 2048 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; |
2048 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { | 2049 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { |
2049 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2050 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2050 if (newStyle.touchAction() != TouchActionAuto) | 2051 if (newStyle.touchAction() != TouchActionAuto) |
2051 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
t); | 2052 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
tBlocking); |
2052 else | 2053 else |
2053 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); | 2054 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); |
2054 } | 2055 } |
2055 } | 2056 } |
2056 | 2057 |
2057 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) | 2058 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) |
2058 { | 2059 { |
2059 ASSERT(a->cursors() != b->cursors()); | 2060 ASSERT(a->cursors() != b->cursors()); |
2060 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); | 2061 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); |
2061 } | 2062 } |
2062 | 2063 |
2063 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) | 2064 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2565 | 2566 |
2566 if (hasCounterNodeMap()) | 2567 if (hasCounterNodeMap()) |
2567 LayoutCounter::destroyCounterNodes(*this); | 2568 LayoutCounter::destroyCounterNodes(*this); |
2568 | 2569 |
2569 // Remove the handler if node had touch-action set. Handlers are not added | 2570 // Remove the handler if node had touch-action set. Handlers are not added |
2570 // for text nodes so don't try removing for one too. Need to check if | 2571 // for text nodes so don't try removing for one too. Need to check if |
2571 // m_style is null in cases of partial construction. Any handler we added | 2572 // m_style is null in cases of partial construction. Any handler we added |
2572 // previously may have already been removed by the Document independently. | 2573 // previously may have already been removed by the Document independently. |
2573 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() !=
TouchActionAuto) { | 2574 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() !=
TouchActionAuto) { |
2574 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2575 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2575 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEvent)->cont
ains(node())) | 2576 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEventBlockin
g)->contains(node())) |
2576 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); | 2577 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); |
2577 } | 2578 } |
2578 | 2579 |
2579 setAncestorLineBoxDirty(false); | 2580 setAncestorLineBoxDirty(false); |
2580 | 2581 |
2581 if (selectionPaintInvalidationMap) | 2582 if (selectionPaintInvalidationMap) |
2582 selectionPaintInvalidationMap->remove(this); | 2583 selectionPaintInvalidationMap->remove(this); |
2583 | 2584 |
2584 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2585 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2585 clearObjectPaintProperties(); | 2586 clearObjectPaintProperties(); |
2586 | 2587 |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3568 const blink::LayoutObject* root = object1; | 3569 const blink::LayoutObject* root = object1; |
3569 while (root->parent()) | 3570 while (root->parent()) |
3570 root = root->parent(); | 3571 root = root->parent(); |
3571 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3572 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3572 } else { | 3573 } else { |
3573 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3574 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3574 } | 3575 } |
3575 } | 3576 } |
3576 | 3577 |
3577 #endif | 3578 #endif |
OLD | NEW |