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 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2030 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 2030 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
2031 // a touchstart handler that must be reported. | 2031 // a touchstart handler that must be reported. |
2032 // | 2032 // |
2033 // Since a CSS property cannot be applied directly to a text node, a | 2033 // Since a CSS property cannot be applied directly to a text node, a |
2034 // handler will have already been added for its parent so ignore it. | 2034 // handler will have already been added for its parent so ignore it. |
2035 // TODO: Remove this blocking event handler; crbug.com/318381 | 2035 // TODO: Remove this blocking event handler; crbug.com/318381 |
2036 TouchAction oldTouchAction = m_style ? m_style->getTouchAction() : TouchActi
onAuto; | 2036 TouchAction oldTouchAction = m_style ? m_style->getTouchAction() : TouchActi
onAuto; |
2037 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.getTouchAction() == TouchActionAuto)) { | 2037 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.getTouchAction() == TouchActionAuto)) { |
2038 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2038 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2039 if (newStyle.getTouchAction() != TouchActionAuto) | 2039 if (newStyle.getTouchAction() != TouchActionAuto) |
2040 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
tBlocking); | 2040 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchStar
tOrMoveEventBlocking); |
2041 else | 2041 else |
2042 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); | 2042 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchS
tartOrMoveEventBlocking); |
2043 } | 2043 } |
2044 } | 2044 } |
2045 | 2045 |
2046 void LayoutObject::clearBaseComputedStyle() | 2046 void LayoutObject::clearBaseComputedStyle() |
2047 { | 2047 { |
2048 if (!node()) | 2048 if (!node()) |
2049 return; | 2049 return; |
2050 if (!node()->isElementNode()) | 2050 if (!node()->isElementNode()) |
2051 return; | 2051 return; |
2052 if (ElementAnimations* animations = toElement(node())->elementAnimations()) | 2052 if (ElementAnimations* animations = toElement(node())->elementAnimations()) |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2644 | 2644 |
2645 if (hasCounterNodeMap()) | 2645 if (hasCounterNodeMap()) |
2646 LayoutCounter::destroyCounterNodes(*this); | 2646 LayoutCounter::destroyCounterNodes(*this); |
2647 | 2647 |
2648 // Remove the handler if node had touch-action set. Handlers are not added | 2648 // Remove the handler if node had touch-action set. Handlers are not added |
2649 // for text nodes so don't try removing for one too. Need to check if | 2649 // for text nodes so don't try removing for one too. Need to check if |
2650 // m_style is null in cases of partial construction. Any handler we added | 2650 // m_style is null in cases of partial construction. Any handler we added |
2651 // previously may have already been removed by the Document independently. | 2651 // previously may have already been removed by the Document independently. |
2652 if (node() && !node()->isTextNode() && m_style && m_style->getTouchAction()
!= TouchActionAuto) { | 2652 if (node() && !node()->isTextNode() && m_style && m_style->getTouchAction()
!= TouchActionAuto) { |
2653 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2653 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2654 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEventBlockin
g)->contains(node())) | 2654 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchStartOrMoveE
ventBlocking)->contains(node())) |
2655 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
ventBlocking); | 2655 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchS
tartOrMoveEventBlocking); |
2656 } | 2656 } |
2657 | 2657 |
2658 setAncestorLineBoxDirty(false); | 2658 setAncestorLineBoxDirty(false); |
2659 | 2659 |
2660 if (selectionPaintInvalidationMap) | 2660 if (selectionPaintInvalidationMap) |
2661 selectionPaintInvalidationMap->remove(this); | 2661 selectionPaintInvalidationMap->remove(this); |
2662 | 2662 |
2663 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2663 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2664 clearObjectPaintProperties(); | 2664 clearObjectPaintProperties(); |
2665 | 2665 |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3679 const blink::LayoutObject* root = object1; | 3679 const blink::LayoutObject* root = object1; |
3680 while (root->parent()) | 3680 while (root->parent()) |
3681 root = root->parent(); | 3681 root = root->parent(); |
3682 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3682 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3683 } else { | 3683 } else { |
3684 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3684 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3685 } | 3685 } |
3686 } | 3686 } |
3687 | 3687 |
3688 #endif | 3688 #endif |
OLD | NEW |