Chromium Code Reviews| 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 3658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3669 | 3669 |
| 3670 void Document::notifyResizeForViewportUnits() { | 3670 void Document::notifyResizeForViewportUnits() { |
| 3671 if (m_mediaQueryMatcher) | 3671 if (m_mediaQueryMatcher) |
| 3672 m_mediaQueryMatcher->viewportChanged(); | 3672 m_mediaQueryMatcher->viewportChanged(); |
| 3673 if (!hasViewportUnits()) | 3673 if (!hasViewportUnits()) |
| 3674 return; | 3674 return; |
| 3675 ensureStyleResolver().notifyResizeForViewportUnits(); | 3675 ensureStyleResolver().notifyResizeForViewportUnits(); |
| 3676 setNeedsStyleRecalcForViewportUnits(); | 3676 setNeedsStyleRecalcForViewportUnits(); |
| 3677 } | 3677 } |
| 3678 | 3678 |
| 3679 void Document::styleResolverMayHaveChanged() { | 3679 void Document::styleResolverMayHaveChanged() { |
|
rune
2016/11/15 10:39:03
This is a confusing name for this method, but I ha
meade_UTC10
2016/11/16 18:10:31
D:
| |
| 3680 styleEngine().resolverChanged( | 3680 styleEngine().resolverChanged(AnalyzedStyleUpdate); |
| 3681 hasNodesWithPlaceholderStyle() ? FullStyleUpdate : AnalyzedStyleUpdate); | 3681 |
| 3682 if (hasNodesWithPlaceholderStyle()) { | |
| 3683 setNeedsStyleRecalc(SubtreeStyleChange, | |
| 3684 StyleChangeReasonForTracing::create( | |
| 3685 StyleChangeReason::CleanupPlaceholderStyles)); | |
| 3686 } | |
| 3682 | 3687 |
| 3683 if (didLayoutWithPendingStylesheets() && | 3688 if (didLayoutWithPendingStylesheets() && |
| 3684 !styleEngine().hasPendingScriptBlockingSheets()) { | 3689 !styleEngine().hasPendingScriptBlockingSheets()) { |
| 3685 // We need to manually repaint because we avoid doing all repaints in layout | 3690 // We need to manually repaint because we avoid doing all repaints in layout |
| 3686 // or style recalc while sheets are still loading to avoid FOUC. | 3691 // or style recalc while sheets are still loading to avoid FOUC. |
| 3687 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; | 3692 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; |
| 3688 | 3693 |
| 3689 DCHECK(!layoutViewItem().isNull() || importsController()); | 3694 DCHECK(!layoutViewItem().isNull() || importsController()); |
| 3690 if (!layoutViewItem().isNull()) | 3695 if (!layoutViewItem().isNull()) |
| 3691 layoutViewItem().invalidatePaintForViewAndCompositedLayers(); | 3696 layoutViewItem().invalidatePaintForViewAndCompositedLayers(); |
| (...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6437 } | 6442 } |
| 6438 | 6443 |
| 6439 void showLiveDocumentInstances() { | 6444 void showLiveDocumentInstances() { |
| 6440 WeakDocumentSet& set = liveDocumentSet(); | 6445 WeakDocumentSet& set = liveDocumentSet(); |
| 6441 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6446 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6442 for (Document* document : set) | 6447 for (Document* document : set) |
| 6443 fprintf(stderr, "- Document %p URL: %s\n", document, | 6448 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6444 document->url().getString().utf8().data()); | 6449 document->url().getString().utf8().data()); |
| 6445 } | 6450 } |
| 6446 #endif | 6451 #endif |
| OLD | NEW |