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