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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 1142283004: Implement a Hit Test Cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust comments in HitTestCache.h Created 5 years, 6 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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1737 notifyLayoutTreeOfSubtreeChanges(); 1737 notifyLayoutTreeOfSubtreeChanges();
1738 1738
1739 // As a result of the style recalculation, the currently hovered element mig ht have been 1739 // As a result of the style recalculation, the currently hovered element mig ht have been
1740 // detached (for example, by setting display:none in the :hover style), sche dule another mouseMove event 1740 // detached (for example, by setting display:none in the :hover style), sche dule another mouseMove event
1741 // to check if any other elements ended up under the mouse pointer due to re -layout. 1741 // to check if any other elements ended up under the mouse pointer due to re -layout.
1742 if (hoverNode() && !hoverNode()->layoutObject() && frame()) 1742 if (hoverNode() && !hoverNode()->layoutObject() && frame())
1743 frame()->eventHandler().dispatchFakeMouseMoveEventSoon(); 1743 frame()->eventHandler().dispatchFakeMouseMoveEventSoon();
1744 1744
1745 if (m_focusedElement && !m_focusedElement->isFocusable()) 1745 if (m_focusedElement && !m_focusedElement->isFocusable())
1746 clearFocusedElementSoon(); 1746 clearFocusedElementSoon();
1747 layoutView()->clearHitTestCache();
1747 1748
1748 ASSERT(!m_timeline->hasOutdatedAnimation()); 1749 ASSERT(!m_timeline->hasOutdatedAnimation());
1749 1750
1750 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", "elementCoun t", m_styleRecalcElementCounter); 1751 TRACE_EVENT_END1("blink,devtools.timeline", "UpdateLayoutTree", "elementCoun t", m_styleRecalcElementCounter);
1751 InspectorInstrumentation::didRecalculateStyle(cookie, m_styleRecalcElementCo unter); 1752 InspectorInstrumentation::didRecalculateStyle(cookie, m_styleRecalcElementCo unter);
1752 } 1753 }
1753 1754
1754 void Document::updateStyle(StyleRecalcChange change) 1755 void Document::updateStyle(StyleRecalcChange change)
1755 { 1756 {
1756 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle"); 1757 TRACE_EVENT_BEGIN0("blink,blink_style", "Document::updateStyle");
(...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after
5710 #ifndef NDEBUG 5711 #ifndef NDEBUG
5711 using namespace blink; 5712 using namespace blink;
5712 void showLiveDocumentInstances() 5713 void showLiveDocumentInstances()
5713 { 5714 {
5714 WeakDocumentSet& set = liveDocumentSet(); 5715 WeakDocumentSet& set = liveDocumentSet();
5715 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5716 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5716 for (Document* document : set) 5717 for (Document* document : set)
5717 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5718 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5718 } 5719 }
5719 #endif 5720 #endif
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/TreeScope.h » ('j') | Source/core/dom/TreeScope.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698