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

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

Issue 2404393003: Tie scroll anchoring adjustments to frame lifecycle instead of layout. (Closed)
Patch Set: add DCHECK Created 4 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) 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 updateStyleAndLayoutTree(); 2018 updateStyleAndLayoutTree();
2019 2019
2020 if (!isActive()) 2020 if (!isActive())
2021 return; 2021 return;
2022 2022
2023 if (frameView->needsLayout()) 2023 if (frameView->needsLayout())
2024 frameView->layout(); 2024 frameView->layout();
2025 2025
2026 if (lifecycle().state() < DocumentLifecycle::LayoutClean) 2026 if (lifecycle().state() < DocumentLifecycle::LayoutClean)
2027 lifecycle().advanceTo(DocumentLifecycle::LayoutClean); 2027 lifecycle().advanceTo(DocumentLifecycle::LayoutClean);
2028
2029 if (FrameView* frameView = view())
2030 frameView->performScrollAnchoringAdjustments();
2028 } 2031 }
2029 2032
2030 void Document::layoutUpdated() { 2033 void Document::layoutUpdated() {
2031 // Plugins can run script inside layout which can detach the page. 2034 // Plugins can run script inside layout which can detach the page.
2032 // TODO(esprehn): Can this still happen now that all plugins are out of 2035 // TODO(esprehn): Can this still happen now that all plugins are out of
2033 // process? 2036 // process?
2034 if (frame() && frame()->page()) 2037 if (frame() && frame()->page())
2035 frame()->page()->chromeClient().layoutUpdated(frame()); 2038 frame()->page()->chromeClient().layoutUpdated(frame());
2036 2039
2037 markers().invalidateRectsForAllMarkers(); 2040 markers().invalidateRectsForAllMarkers();
(...skipping 4372 matching lines...) Expand 10 before | Expand all | Expand 10 after
6410 } 6413 }
6411 6414
6412 void showLiveDocumentInstances() { 6415 void showLiveDocumentInstances() {
6413 WeakDocumentSet& set = liveDocumentSet(); 6416 WeakDocumentSet& set = liveDocumentSet();
6414 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6417 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6415 for (Document* document : set) 6418 for (Document* document : set)
6416 fprintf(stderr, "- Document %p URL: %s\n", document, 6419 fprintf(stderr, "- Document %p URL: %s\n", document,
6417 document->url().getString().utf8().data()); 6420 document->url().getString().utf8().data());
6418 } 6421 }
6419 #endif 6422 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698