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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2289213002: Implement Middle Click Autoscroll on all platforms not just Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into panscroll Created 4 years, 3 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) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
8 * Copyright (C) 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2011 Google Inc. All rights reserved.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 // If we have a provisional request for a different document, a fragment scr oll should cancel it. 756 // If we have a provisional request for a different document, a fragment scr oll should cancel it.
757 detachDocumentLoader(m_provisionalDocumentLoader); 757 detachDocumentLoader(m_provisionalDocumentLoader);
758 if (!m_frame->host()) 758 if (!m_frame->host())
759 return; 759 return;
760 AutoReset<FrameLoadType> loadTypeChange(&m_loadType, frameLoadType); 760 AutoReset<FrameLoadType> loadTypeChange(&m_loadType, frameLoadType);
761 saveScrollState(); 761 saveScrollState();
762 762
763 KURL oldURL = m_frame->document()->url(); 763 KURL oldURL = m_frame->document()->url();
764 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier(); 764 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier();
765 if (hashChange) { 765 if (hashChange) {
766 // If we were in the autoscroll/panScroll mode we want to stop it before following the link to the anchor 766 // If we were in the autoscroll/middleClickAutoscroll mode we want to st op it before following the link to the anchor
767 m_frame->eventHandler().stopAutoscroll(); 767 m_frame->eventHandler().stopAutoscroll();
768 m_frame->localDOMWindow()->enqueueHashchangeEvent(oldURL, url); 768 m_frame->localDOMWindow()->enqueueHashchangeEvent(oldURL, url);
769 } 769 }
770 m_documentLoader->setIsClientRedirect(clientRedirect == ClientRedirectPolicy ::ClientRedirect); 770 m_documentLoader->setIsClientRedirect(clientRedirect == ClientRedirectPolicy ::ClientRedirect);
771 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, nullptr, ScrollRestorationAuto, frameLoadType, initiatingDocument); 771 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, nullptr, ScrollRestorationAuto, frameLoadType, initiatingDocument);
772 772
773 m_documentLoader->initialScrollState().wasScrolledByUser = false; 773 m_documentLoader->initialScrollState().wasScrolledByUser = false;
774 774
775 checkCompleted(); 775 checkCompleted();
776 776
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String()); 1615 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa der->url() : String());
1616 return tracedValue; 1616 return tracedValue;
1617 } 1617 }
1618 1618
1619 inline void FrameLoader::takeObjectSnapshot() const 1619 inline void FrameLoader::takeObjectSnapshot() const
1620 { 1620 {
1621 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value()); 1621 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced Value());
1622 } 1622 }
1623 1623
1624 } // namespace blink 1624 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/page/AutoscrollController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698