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

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

Issue 2741633002: Remove FrameHost::eventHandlerRegistry() (Closed)
Patch Set: Rebase Created 3 years, 9 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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 // a touchstart handler that must be reported. 1807 // a touchstart handler that must be reported.
1808 // 1808 //
1809 // Since a CSS property cannot be applied directly to a text node, a 1809 // Since a CSS property cannot be applied directly to a text node, a
1810 // handler will have already been added for its parent so ignore it. 1810 // handler will have already been added for its parent so ignore it.
1811 // TODO: Remove this blocking event handler; crbug.com/318381 1811 // TODO: Remove this blocking event handler; crbug.com/318381
1812 TouchAction oldTouchAction = 1812 TouchAction oldTouchAction =
1813 m_style ? m_style->getTouchAction() : TouchActionAuto; 1813 m_style ? m_style->getTouchAction() : TouchActionAuto;
1814 if (node() && !node()->isTextNode() && 1814 if (node() && !node()->isTextNode() &&
1815 (oldTouchAction == TouchActionAuto) != 1815 (oldTouchAction == TouchActionAuto) !=
1816 (newStyle.getTouchAction() == TouchActionAuto)) { 1816 (newStyle.getTouchAction() == TouchActionAuto)) {
1817 EventHandlerRegistry& registry = 1817 EventHandlerRegistry& registry = document().page()->eventHandlerRegistry();
1818 document().frameHost()->eventHandlerRegistry();
1819 if (newStyle.getTouchAction() != TouchActionAuto) 1818 if (newStyle.getTouchAction() != TouchActionAuto)
1820 registry.didAddEventHandler( 1819 registry.didAddEventHandler(
1821 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking); 1820 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking);
1822 else 1821 else
1823 registry.didRemoveEventHandler( 1822 registry.didRemoveEventHandler(
1824 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking); 1823 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking);
1825 } 1824 }
1826 } 1825 }
1827 1826
1828 void LayoutObject::clearBaseComputedStyle() { 1827 void LayoutObject::clearBaseComputedStyle() {
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2622 2621
2623 if (hasCounterNodeMap()) 2622 if (hasCounterNodeMap())
2624 LayoutCounter::destroyCounterNodes(*this); 2623 LayoutCounter::destroyCounterNodes(*this);
2625 2624
2626 // Remove the handler if node had touch-action set. Handlers are not added 2625 // Remove the handler if node had touch-action set. Handlers are not added
2627 // for text nodes so don't try removing for one too. Need to check if 2626 // for text nodes so don't try removing for one too. Need to check if
2628 // m_style is null in cases of partial construction. Any handler we added 2627 // m_style is null in cases of partial construction. Any handler we added
2629 // previously may have already been removed by the Document independently. 2628 // previously may have already been removed by the Document independently.
2630 if (node() && !node()->isTextNode() && m_style && 2629 if (node() && !node()->isTextNode() && m_style &&
2631 m_style->getTouchAction() != TouchActionAuto) { 2630 m_style->getTouchAction() != TouchActionAuto) {
2632 EventHandlerRegistry& registry = 2631 EventHandlerRegistry& registry = document().page()->eventHandlerRegistry();
2633 document().frameHost()->eventHandlerRegistry();
2634 if (registry 2632 if (registry
2635 .eventHandlerTargets( 2633 .eventHandlerTargets(
2636 EventHandlerRegistry::TouchStartOrMoveEventBlocking) 2634 EventHandlerRegistry::TouchStartOrMoveEventBlocking)
2637 ->contains(node())) 2635 ->contains(node()))
2638 registry.didRemoveEventHandler( 2636 registry.didRemoveEventHandler(
2639 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking); 2637 *node(), EventHandlerRegistry::TouchStartOrMoveEventBlocking);
2640 } 2638 }
2641 2639
2642 setAncestorLineBoxDirty(false); 2640 setAncestorLineBoxDirty(false);
2643 2641
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after
3596 const blink::LayoutObject* root = object1; 3594 const blink::LayoutObject* root = object1;
3597 while (root->parent()) 3595 while (root->parent())
3598 root = root->parent(); 3596 root = root->parent();
3599 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3597 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3600 } else { 3598 } else {
3601 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3599 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3602 } 3600 }
3603 } 3601 }
3604 3602
3605 #endif 3603 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698