OLD | NEW |
---|---|
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 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2177 | 2177 |
2178 resolver.ClearStyleSharingList(); | 2178 resolver.ClearStyleSharingList(); |
2179 | 2179 |
2180 DCHECK(!NeedsStyleRecalc()); | 2180 DCHECK(!NeedsStyleRecalc()); |
2181 DCHECK(!ChildNeedsStyleRecalc()); | 2181 DCHECK(!ChildNeedsStyleRecalc()); |
2182 DCHECK(!NeedsReattachLayoutTree()); | 2182 DCHECK(!NeedsReattachLayoutTree()); |
2183 DCHECK(!ChildNeedsReattachLayoutTree()); | 2183 DCHECK(!ChildNeedsReattachLayoutTree()); |
2184 DCHECK(InStyleRecalc()); | 2184 DCHECK(InStyleRecalc()); |
2185 DCHECK_EQ(GetStyleResolver(), &resolver); | 2185 DCHECK_EQ(GetStyleResolver(), &resolver); |
2186 lifecycle_.AdvanceTo(DocumentLifecycle::kStyleClean); | 2186 lifecycle_.AdvanceTo(DocumentLifecycle::kStyleClean); |
2187 | |
2187 if (should_record_stats) { | 2188 if (should_record_stats) { |
2188 TRACE_EVENT_END2( | 2189 TRACE_EVENT_END2( |
2189 "blink,blink_style", "Document::updateStyle", "resolverAccessCount", | 2190 "blink,blink_style", "Document::updateStyle", "resolverAccessCount", |
2190 GetStyleEngine().StyleForElementCount() - initial_element_count, | 2191 GetStyleEngine().StyleForElementCount() - initial_element_count, |
2191 "counters", GetStyleEngine().Stats()->ToTracedValue()); | 2192 "counters", GetStyleEngine().Stats()->ToTracedValue()); |
2192 } else { | 2193 } else { |
2193 TRACE_EVENT_END1( | 2194 TRACE_EVENT_END1( |
2194 "blink,blink_style", "Document::updateStyle", "resolverAccessCount", | 2195 "blink,blink_style", "Document::updateStyle", "resolverAccessCount", |
2195 GetStyleEngine().StyleForElementCount() - initial_element_count); | 2196 GetStyleEngine().StyleForElementCount() - initial_element_count); |
2196 } | 2197 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2253 | 2254 |
2254 ScriptForbiddenScope forbid_script; | 2255 ScriptForbiddenScope forbid_script; |
2255 | 2256 |
2256 LocalFrameView* frame_view = View(); | 2257 LocalFrameView* frame_view = View(); |
2257 if (frame_view && frame_view->IsInPerformLayout()) { | 2258 if (frame_view && frame_view->IsInPerformLayout()) { |
2258 // View layout should not be re-entrant. | 2259 // View layout should not be re-entrant. |
2259 NOTREACHED(); | 2260 NOTREACHED(); |
2260 return; | 2261 return; |
2261 } | 2262 } |
2262 | 2263 |
2263 if (HTMLFrameOwnerElement* owner = LocalOwner()) | 2264 HTMLFrameOwnerElement* owner = LocalOwner(); |
2265 if (owner) | |
2264 owner->GetDocument().UpdateStyleAndLayout(); | 2266 owner->GetDocument().UpdateStyleAndLayout(); |
2265 | 2267 |
2266 UpdateStyleAndLayoutTree(); | 2268 UpdateStyleAndLayoutTree(); |
2267 | 2269 |
2270 if (owner) | |
2271 GetFrame()->SetIsInert(owner->IsInert()); | |
tkent
2017/06/08 23:53:48
This was added to fix "!node.NeedsDistributionReca
kenrb
2017/06/09 15:15:48
Correct, and I'm not sure it is the right fix eith
hayato
2017/06/13 09:48:00
Using UpdateStyleAndLayout() as a hook for SetIsIn
| |
2272 | |
2268 if (!IsActive()) | 2273 if (!IsActive()) |
2269 return; | 2274 return; |
2270 | 2275 |
2271 if (frame_view->NeedsLayout()) | 2276 if (frame_view->NeedsLayout()) |
2272 frame_view->UpdateLayout(); | 2277 frame_view->UpdateLayout(); |
2273 | 2278 |
2274 if (Lifecycle().GetState() < DocumentLifecycle::kLayoutClean) | 2279 if (Lifecycle().GetState() < DocumentLifecycle::kLayoutClean) |
2275 Lifecycle().AdvanceTo(DocumentLifecycle::kLayoutClean); | 2280 Lifecycle().AdvanceTo(DocumentLifecycle::kLayoutClean); |
2276 | 2281 |
2277 if (LocalFrameView* frame_view = View()) | 2282 if (LocalFrameView* frame_view = View()) |
(...skipping 4565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6843 } | 6848 } |
6844 | 6849 |
6845 void showLiveDocumentInstances() { | 6850 void showLiveDocumentInstances() { |
6846 WeakDocumentSet& set = liveDocumentSet(); | 6851 WeakDocumentSet& set = liveDocumentSet(); |
6847 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6852 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6848 for (blink::Document* document : set) | 6853 for (blink::Document* document : set) |
6849 fprintf(stderr, "- Document %p URL: %s\n", document, | 6854 fprintf(stderr, "- Document %p URL: %s\n", document, |
6850 document->Url().GetString().Utf8().data()); | 6855 document->Url().GetString().Utf8().data()); |
6851 } | 6856 } |
6852 #endif | 6857 #endif |
OLD | NEW |