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

Side by Side Diff: sky/engine/core/dom/Document.cpp

Issue 687783003: More cleanup of dead code now that we don't have frame-level scrolling. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2302 event = (*it)->create(eventType); 2302 event = (*it)->create(eventType);
2303 if (event) 2303 if (event)
2304 return event.release(); 2304 return event.release();
2305 } 2305 }
2306 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid."); 2306 exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid.");
2307 return nullptr; 2307 return nullptr;
2308 } 2308 }
2309 2309
2310 void Document::addListenerTypeIfNeeded(const AtomicString& eventType) 2310 void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
2311 { 2311 {
2312 if (eventType == EventTypeNames::overflowchanged) { 2312 if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnabledFeat ures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::animations tart)) {
2313 UseCounter::countDeprecation(*this, UseCounter::OverflowChangedEvent);
2314 addListenerType(OVERFLOWCHANGED_LISTENER);
2315 } else if (eventType == EventTypeNames::webkitAnimationStart || (RuntimeEnab ledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::ani mationstart)) {
2316 addListenerType(ANIMATIONSTART_LISTENER); 2313 addListenerType(ANIMATIONSTART_LISTENER);
2317 } else if (eventType == EventTypeNames::webkitAnimationEnd || (RuntimeEnable dFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::anima tionend)) { 2314 } else if (eventType == EventTypeNames::webkitAnimationEnd || (RuntimeEnable dFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames::anima tionend)) {
2318 addListenerType(ANIMATIONEND_LISTENER); 2315 addListenerType(ANIMATIONEND_LISTENER);
2319 } else if (eventType == EventTypeNames::webkitAnimationIteration || (Runtime EnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames: :animationiteration)) { 2316 } else if (eventType == EventTypeNames::webkitAnimationIteration || (Runtime EnabledFeatures::cssAnimationUnprefixedEnabled() && eventType == EventTypeNames: :animationiteration)) {
2320 addListenerType(ANIMATIONITERATION_LISTENER); 2317 addListenerType(ANIMATIONITERATION_LISTENER);
2321 } else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) { 2318 } else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) {
2322 addListenerType(TRANSITIONEND_LISTENER); 2319 addListenerType(TRANSITIONEND_LISTENER);
2323 } else if (eventType == EventTypeNames::scroll) { 2320 } else if (eventType == EventTypeNames::scroll) {
2324 addListenerType(SCROLL_LISTENER); 2321 addListenerType(SCROLL_LISTENER);
2325 } 2322 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2594 setParsing(false); 2591 setParsing(false);
2595 dispatchEvent(Event::createBubble(EventTypeNames::DOMContentLoaded)); 2592 dispatchEvent(Event::createBubble(EventTypeNames::DOMContentLoaded));
2596 2593
2597 // The loader's finishedParsing() method may invoke script that causes this object to 2594 // The loader's finishedParsing() method may invoke script that causes this object to
2598 // be dereferenced (when this document is in an iframe and the onload causes the iframe's src to change). 2595 // be dereferenced (when this document is in an iframe and the onload causes the iframe's src to change).
2599 // Keep it alive until we are done. 2596 // Keep it alive until we are done.
2600 RefPtr<Document> protect(this); 2597 RefPtr<Document> protect(this);
2601 2598
2602 if (RefPtr<LocalFrame> f = frame()) { 2599 if (RefPtr<LocalFrame> f = frame()) {
2603 checkCompleted(); 2600 checkCompleted();
2604
2605 // Check if the scrollbars are really needed for the content.
2606 // If not, remove them, relayout, and repaint.
2607 if (m_frame->view())
2608 m_frame->view()->restoreScrollbar();
2609
2610 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Ma rkDOMContent", "data", InspectorMarkLoadEvent::data(f.get())); 2601 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Ma rkDOMContent", "data", InspectorMarkLoadEvent::data(f.get()));
2611 } 2602 }
2612 2603
2613 // Schedule dropping of the ElementDataCache. We keep it alive for a while a fter parsing finishes 2604 // Schedule dropping of the ElementDataCache. We keep it alive for a while a fter parsing finishes
2614 // so that dynamically inserted content can also benefit from sharing optimi zations. 2605 // so that dynamically inserted content can also benefit from sharing optimi zations.
2615 // Note that we don't refresh the timer on cache access since that could lea d to huge caches being kept 2606 // Note that we don't refresh the timer on cache access since that could lea d to huge caches being kept
2616 // alive indefinitely by something innocuous like JS setting .innerHTML repe atedly on a timer. 2607 // alive indefinitely by something innocuous like JS setting .innerHTML repe atedly on a timer.
2617 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE); 2608 m_elementDataCacheClearTimer.startOneShot(10, FROM_HERE);
2618 2609
2619 // Parser should have picked up all preloads by now 2610 // Parser should have picked up all preloads by now
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
3145 using namespace blink; 3136 using namespace blink;
3146 void showLiveDocumentInstances() 3137 void showLiveDocumentInstances()
3147 { 3138 {
3148 WeakDocumentSet& set = liveDocumentSet(); 3139 WeakDocumentSet& set = liveDocumentSet();
3149 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 3140 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
3150 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { 3141 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) {
3151 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); 3142 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data());
3152 } 3143 }
3153 } 3144 }
3154 #endif 3145 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698