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: Source/core/loader/FrameLoader.cpp

Issue 46353003: Switch AutoscrollController to use animation system instead of timer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gclient
Patch Set: Created 7 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
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 571
572 void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip tValue> stateObject, bool isNewNavigation) 572 void FrameLoader::loadInSameDocument(const KURL& url, PassRefPtr<SerializedScrip tValue> stateObject, bool isNewNavigation)
573 { 573 {
574 // If we have a state object, we cannot also be a new navigation. 574 // If we have a state object, we cannot also be a new navigation.
575 ASSERT(!stateObject || (stateObject && !isNewNavigation)); 575 ASSERT(!stateObject || (stateObject && !isNewNavigation));
576 576
577 KURL oldURL = m_frame->document()->url(); 577 KURL oldURL = m_frame->document()->url();
578 // If we were in the autoscroll/panScroll mode we want to stop it before fol lowing the link to the anchor 578 // If we were in the autoscroll/panScroll mode we want to stop it before fol lowing the link to the anchor
579 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier(); 579 bool hashChange = equalIgnoringFragmentIdentifier(url, oldURL) && url.fragme ntIdentifier() != oldURL.fragmentIdentifier();
580 if (hashChange) { 580 if (hashChange) {
581 m_frame->eventHandler().stopAutoscrollTimer(); 581 m_frame->eventHandler().stopAutoscroll();
582 m_frame->domWindow()->enqueueHashchangeEvent(oldURL, url); 582 m_frame->domWindow()->enqueueHashchangeEvent(oldURL, url);
583 } 583 }
584 m_documentLoader->setIsClientRedirect((m_startingClientRedirect && !isNewNav igation) || !UserGestureIndicator::processingUserGesture()); 584 m_documentLoader->setIsClientRedirect((m_startingClientRedirect && !isNewNav igation) || !UserGestureIndicator::processingUserGesture());
585 m_documentLoader->setReplacesCurrentHistoryItem(!isNewNavigation); 585 m_documentLoader->setReplacesCurrentHistoryItem(!isNewNavigation);
586 UpdateBackForwardListPolicy updateBackForwardList = isNewNavigation && !shou ldTreatURLAsSameAsCurrent(url) && !stateObject ? UpdateBackForwardList : DoNotUp dateBackForwardList; 586 UpdateBackForwardListPolicy updateBackForwardList = isNewNavigation && !shou ldTreatURLAsSameAsCurrent(url) && !stateObject ? UpdateBackForwardList : DoNotUp dateBackForwardList;
587 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, 0, updat eBackForwardList); 587 updateForSameDocumentNavigation(url, SameDocumentNavigationDefault, 0, updat eBackForwardList);
588 588
589 // It's important to model this as a load that starts and immediately finish es. 589 // It's important to model this as a load that starts and immediately finish es.
590 // Otherwise, the parent frame may think we never finished loading. 590 // Otherwise, the parent frame may think we never finished loading.
591 started(); 591 started();
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 { 1601 {
1602 SandboxFlags flags = m_forcedSandboxFlags; 1602 SandboxFlags flags = m_forcedSandboxFlags;
1603 if (Frame* parentFrame = m_frame->tree().parent()) 1603 if (Frame* parentFrame = m_frame->tree().parent())
1604 flags |= parentFrame->document()->sandboxFlags(); 1604 flags |= parentFrame->document()->sandboxFlags();
1605 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement()) 1605 if (HTMLFrameOwnerElement* ownerElement = m_frame->ownerElement())
1606 flags |= ownerElement->sandboxFlags(); 1606 flags |= ownerElement->sandboxFlags();
1607 return flags; 1607 return flags;
1608 } 1608 }
1609 1609
1610 } // namespace WebCore 1610 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/page/AutoscrollController.h » ('j') | Source/core/page/AutoscrollController.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698