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

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

Issue 2069713002: Make all gesture scrolls use customization path internally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Gesture scrolls are now on scroll customization path Created 4 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); 473 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
474 } else if (m_importsController) { 474 } else if (m_importsController) {
475 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this); 475 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr, this);
476 } else { 476 } else {
477 m_fetcher = ResourceFetcher::create(nullptr); 477 m_fetcher = ResourceFetcher::create(nullptr);
478 } 478 }
479 479
480 ViewportScrollCallback* applyScroll = nullptr; 480 ViewportScrollCallback* applyScroll = nullptr;
481 if (isInMainFrame()) { 481 if (isInMainFrame()) {
482 applyScroll = RootScrollerController::createViewportApplyScroll( 482 applyScroll = RootScrollerController::createViewportApplyScroll(
483 frameHost()->topControls(), frameHost()->overscrollController()); 483 &frameHost()->topControls(), &frameHost()->overscrollController());
484 } else {
485 applyScroll =
486 RootScrollerController::createViewportApplyScroll(nullptr, nullptr);
484 } 487 }
488
485 m_rootScrollerController = 489 m_rootScrollerController =
486 RootScrollerController::create(*this, applyScroll); 490 RootScrollerController::create(*this, applyScroll);
487 491
488 // We depend on the url getting immediately set in subframes, but we 492 // We depend on the url getting immediately set in subframes, but we
489 // also depend on the url NOT getting immediately set in opened windows. 493 // also depend on the url NOT getting immediately set in opened windows.
490 // See fast/dom/early-frame-url.html 494 // See fast/dom/early-frame-url.html
491 // and fast/dom/location-new-window-no-crash.html, respectively. 495 // and fast/dom/location-new-window-no-crash.html, respectively.
492 // FIXME: Can/should we unify this behavior? 496 // FIXME: Can/should we unify this behavior?
493 if (initializer.shouldSetURL()) 497 if (initializer.shouldSetURL())
494 setURL(initializer.url()); 498 setURL(initializer.url());
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 void Document::setRootScroller(Element* newScroller, ExceptionState& exceptionSt ate) 615 void Document::setRootScroller(Element* newScroller, ExceptionState& exceptionSt ate)
612 { 616 {
613 m_rootScrollerController->set(newScroller); 617 m_rootScrollerController->set(newScroller);
614 } 618 }
615 619
616 Element* Document::rootScroller() const 620 Element* Document::rootScroller() const
617 { 621 {
618 return m_rootScrollerController->get(); 622 return m_rootScrollerController->get();
619 } 623 }
620 624
621 bool Document::isEffectiveRootScroller(const Element& element) const 625 Element* Document::effectiveRootScroller() const
622 { 626 {
623 return m_rootScrollerController->effectiveRootScroller() == element; 627 return m_rootScrollerController->effectiveRootScroller();
624 } 628 }
625 629
626 bool Document::isInMainFrame() const 630 bool Document::isInMainFrame() const
627 { 631 {
628 return frame() && frame()->isMainFrame(); 632 return frame() && frame()->isMainFrame();
629 } 633 }
630 634
631 AtomicString Document::convertLocalName(const AtomicString& name) 635 AtomicString Document::convertLocalName(const AtomicString& name)
632 { 636 {
633 return isHTMLDocument() ? name.lower() : name; 637 return isHTMLDocument() ? name.lower() : name;
(...skipping 5372 matching lines...) Expand 10 before | Expand all | Expand 10 after
6006 } 6010 }
6007 6011
6008 void showLiveDocumentInstances() 6012 void showLiveDocumentInstances()
6009 { 6013 {
6010 WeakDocumentSet& set = liveDocumentSet(); 6014 WeakDocumentSet& set = liveDocumentSet();
6011 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6015 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6012 for (Document* document : set) 6016 for (Document* document : set)
6013 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6017 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6014 } 6018 }
6015 #endif 6019 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698