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 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 // Elements with non-auto touch-action will send a SetTouchAction message | 1915 // Elements with non-auto touch-action will send a SetTouchAction message |
1916 // on touchstart in EventHandler::handleTouchEvent, and so effectively have | 1916 // on touchstart in EventHandler::handleTouchEvent, and so effectively have |
1917 // a touchstart handler that must be reported. | 1917 // a touchstart handler that must be reported. |
1918 // | 1918 // |
1919 // Since a CSS property cannot be applied directly to a text node, a | 1919 // Since a CSS property cannot be applied directly to a text node, a |
1920 // handler will have already been added for its parent so ignore it. | 1920 // handler will have already been added for its parent so ignore it. |
1921 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; | 1921 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA
uto; |
1922 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { | 1922 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) !
= (newStyle.touchAction() == TouchActionAuto)) { |
1923 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 1923 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
1924 if (newStyle.touchAction() != TouchActionAuto) | 1924 if (newStyle.touchAction() != TouchActionAuto) |
1925 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven
t); | 1925 registry.didAddEventHandler(*node(), EventTypeNames::touchstart); |
1926 else | 1926 else |
1927 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); | 1927 registry.didRemoveEventHandler(*node(), EventTypeNames::touchstart); |
1928 } | 1928 } |
1929 } | 1929 } |
1930 | 1930 |
1931 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) | 1931 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput
edStyle* b) |
1932 { | 1932 { |
1933 ASSERT(a->cursors() != b->cursors()); | 1933 ASSERT(a->cursors() != b->cursors()); |
1934 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); | 1934 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); |
1935 } | 1935 } |
1936 | 1936 |
1937 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) | 1937 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle*
b) |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 if (hasCounterNodeMap()) | 2443 if (hasCounterNodeMap()) |
2444 LayoutCounter::destroyCounterNodes(*this); | 2444 LayoutCounter::destroyCounterNodes(*this); |
2445 | 2445 |
2446 // Remove the handler if node had touch-action set. Handlers are not added | 2446 // Remove the handler if node had touch-action set. Handlers are not added |
2447 // for text nodes so don't try removing for one too. Need to check if | 2447 // for text nodes so don't try removing for one too. Need to check if |
2448 // m_style is null in cases of partial construction. Any handler we added | 2448 // m_style is null in cases of partial construction. Any handler we added |
2449 // previously may have already been removed by the Document independently. | 2449 // previously may have already been removed by the Document independently. |
2450 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() !=
TouchActionAuto) { | 2450 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() !=
TouchActionAuto) { |
2451 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); | 2451 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg
istry(); |
2452 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEvent)->cont
ains(node())) | 2452 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEvent)->cont
ains(node())) |
2453 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE
vent); | 2453 registry.didRemoveEventHandler(*node(), EventTypeNames::touchstart); |
2454 } | 2454 } |
2455 | 2455 |
2456 setAncestorLineBoxDirty(false); | 2456 setAncestorLineBoxDirty(false); |
2457 | 2457 |
2458 if (selectionPaintInvalidationMap) | 2458 if (selectionPaintInvalidationMap) |
2459 selectionPaintInvalidationMap->remove(this); | 2459 selectionPaintInvalidationMap->remove(this); |
2460 | 2460 |
2461 clearLayoutRootIfNeeded(); | 2461 clearLayoutRootIfNeeded(); |
2462 | 2462 |
2463 if (m_style) { | 2463 if (m_style) { |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3405 const blink::LayoutObject* root = object1; | 3405 const blink::LayoutObject* root = object1; |
3406 while (root->parent()) | 3406 while (root->parent()) |
3407 root = root->parent(); | 3407 root = root->parent(); |
3408 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3408 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3409 } else { | 3409 } else { |
3410 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3410 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3411 } | 3411 } |
3412 } | 3412 } |
3413 | 3413 |
3414 #endif | 3414 #endif |
OLD | NEW |