Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2022 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 if (diff.needsLayout()) { 2033 if (diff.needsLayout()) {
2034 setFloating(false); 2034 setFloating(false);
2035 clearPositionedState(); 2035 clearPositionedState();
2036 } 2036 }
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.
Rick Byers 2016/02/04 22:18:57 nit: add a TODO to remove this blocking touch hand
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 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA uto; 2047 TouchAction oldTouchAction = m_style ? m_style->touchAction() : TouchActionA uto;
2048 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) ! = (newStyle.touchAction() == TouchActionAuto)) { 2048 if (node() && !node()->isTextNode() && (oldTouchAction == TouchActionAuto) ! = (newStyle.touchAction() == TouchActionAuto)) {
2049 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry(); 2049 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry();
2050 if (newStyle.touchAction() != TouchActionAuto) 2050 if (newStyle.touchAction() != TouchActionAuto)
2051 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven t); 2051 registry.didAddEventHandler(*node(), EventHandlerRegistry::TouchEven tBlocking);
2052 else 2052 else
2053 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE vent); 2053 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE ventBlocking);
2054 } 2054 }
2055 } 2055 }
2056 2056
2057 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput edStyle* b) 2057 static bool areNonIdenticalCursorListsEqual(const ComputedStyle* a, const Comput edStyle* b)
2058 { 2058 {
2059 ASSERT(a->cursors() != b->cursors()); 2059 ASSERT(a->cursors() != b->cursors());
2060 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors(); 2060 return a->cursors() && b->cursors() && *a->cursors() == *b->cursors();
2061 } 2061 }
2062 2062
2063 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle* b) 2063 static inline bool areCursorsEqual(const ComputedStyle* a, const ComputedStyle* b)
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2565 2565
2566 if (hasCounterNodeMap()) 2566 if (hasCounterNodeMap())
2567 LayoutCounter::destroyCounterNodes(*this); 2567 LayoutCounter::destroyCounterNodes(*this);
2568 2568
2569 // Remove the handler if node had touch-action set. Handlers are not added 2569 // 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 2570 // 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 2571 // m_style is null in cases of partial construction. Any handler we added
2572 // previously may have already been removed by the Document independently. 2572 // previously may have already been removed by the Document independently.
2573 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() != TouchActionAuto) { 2573 if (node() && !node()->isTextNode() && m_style && m_style->touchAction() != TouchActionAuto) {
2574 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry(); 2574 EventHandlerRegistry& registry = document().frameHost()->eventHandlerReg istry();
2575 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEvent)->cont ains(node())) 2575 if (registry.eventHandlerTargets(EventHandlerRegistry::TouchEventBlockin g)->contains(node()))
2576 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE vent); 2576 registry.didRemoveEventHandler(*node(), EventHandlerRegistry::TouchE ventBlocking);
2577 } 2577 }
2578 2578
2579 setAncestorLineBoxDirty(false); 2579 setAncestorLineBoxDirty(false);
2580 2580
2581 if (selectionPaintInvalidationMap) 2581 if (selectionPaintInvalidationMap)
2582 selectionPaintInvalidationMap->remove(this); 2582 selectionPaintInvalidationMap->remove(this);
2583 2583
2584 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 2584 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
2585 clearObjectPaintProperties(); 2585 clearObjectPaintProperties();
2586 2586
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3568 const blink::LayoutObject* root = object1; 3568 const blink::LayoutObject* root = object1;
3569 while (root->parent()) 3569 while (root->parent())
3570 root = root->parent(); 3570 root = root->parent();
3571 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3571 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3572 } else { 3572 } else {
3573 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3573 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3574 } 3574 }
3575 } 3575 }
3576 3576
3577 #endif 3577 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698