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

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

Issue 2123663003: Moved RootFrameViewport creation to happen after document attachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved RootFrameViewport creation to happen after document attachment Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/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 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 m_layoutView->compositor()->setNeedsCompositingUpdate(CompositingUpdateAfter CompositingInputChange); 2114 m_layoutView->compositor()->setNeedsCompositingUpdate(CompositingUpdateAfter CompositingInputChange);
2115 2115
2116 ContainerNode::attach(context); 2116 ContainerNode::attach(context);
2117 2117
2118 // The TextAutosizer can't update layout view info while the Document is det ached, so update now in case anything changed. 2118 // The TextAutosizer can't update layout view info while the Document is det ached, so update now in case anything changed.
2119 if (TextAutosizer* autosizer = textAutosizer()) 2119 if (TextAutosizer* autosizer = textAutosizer())
2120 autosizer->updatePageInfo(); 2120 autosizer->updatePageInfo();
2121 2121
2122 m_frame->selection().documentAttached(this); 2122 m_frame->selection().documentAttached(this);
2123 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean); 2123 m_lifecycle.advanceTo(DocumentLifecycle::StyleClean);
2124
2125 if (FrameView* frameView = view())
2126 frameView->didAttachDocument();
tdresser 2016/07/06 18:28:33 I'd be just as happy with: if (view()) view()->d
bokan 2016/07/06 18:43:52 Done.
2124 } 2127 }
2125 2128
2126 void Document::detach(const AttachContext& context) 2129 void Document::detach(const AttachContext& context)
2127 { 2130 {
2128 TRACE_EVENT0("blink", "Document::detach"); 2131 TRACE_EVENT0("blink", "Document::detach");
2129 RELEASE_ASSERT(!m_frame || m_frame->tree().childCount() == 0); 2132 RELEASE_ASSERT(!m_frame || m_frame->tree().childCount() == 0);
2130 if (!isActive()) 2133 if (!isActive())
2131 return; 2134 return;
2132 2135
2133 // Frame navigation can cause a new Document to be attached. Don't allow tha t, since that will 2136 // Frame navigation can cause a new Document to be attached. Don't allow tha t, since that will
(...skipping 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after
6030 } 6033 }
6031 6034
6032 void showLiveDocumentInstances() 6035 void showLiveDocumentInstances()
6033 { 6036 {
6034 WeakDocumentSet& set = liveDocumentSet(); 6037 WeakDocumentSet& set = liveDocumentSet();
6035 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6038 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6036 for (Document* document : set) 6039 for (Document* document : set)
6037 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6040 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6038 } 6041 }
6039 #endif 6042 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698