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 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2056 StyleResolver& resolver = ensureStyleResolver(); | 2056 StyleResolver& resolver = ensureStyleResolver(); |
2057 | 2057 |
2058 bool shouldRecordStats; | 2058 bool shouldRecordStats; |
2059 TRACE_EVENT_CATEGORY_GROUP_ENABLED("blink,blink_style", &shouldRecordStats); | 2059 TRACE_EVENT_CATEGORY_GROUP_ENABLED("blink,blink_style", &shouldRecordStats); |
2060 styleEngine().setStatsEnabled(shouldRecordStats); | 2060 styleEngine().setStatsEnabled(shouldRecordStats); |
2061 | 2061 |
2062 if (Element* documentElement = this->documentElement()) { | 2062 if (Element* documentElement = this->documentElement()) { |
2063 inheritHtmlAndBodyElementStyles(change); | 2063 inheritHtmlAndBodyElementStyles(change); |
2064 if (documentElement->shouldCallRecalcStyle(change)) | 2064 if (documentElement->shouldCallRecalcStyle(change)) |
2065 documentElement->recalcStyle(change); | 2065 documentElement->recalcStyle(change); |
| 2066 if (documentElement->needsReattachLayoutTree() || |
| 2067 documentElement->childNeedsReattachLayoutTree()) |
| 2068 documentElement->rebuildLayoutTree(); |
2066 } | 2069 } |
2067 | 2070 |
2068 view()->recalcOverflowAfterStyleChange(); | 2071 view()->recalcOverflowAfterStyleChange(); |
2069 | 2072 |
2070 // Only retain the HashMap for the duration of StyleRecalc and | 2073 // Only retain the HashMap for the duration of StyleRecalc and |
2071 // LayoutTreeConstruction. | 2074 // LayoutTreeConstruction. |
2072 m_styleReattachDataMap.clear(); | 2075 m_styleReattachDataMap.clear(); |
2073 clearChildNeedsStyleRecalc(); | 2076 clearChildNeedsStyleRecalc(); |
2074 clearChildNeedsReattachLayoutTree(); | 2077 clearChildNeedsReattachLayoutTree(); |
2075 | 2078 |
(...skipping 4527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6603 } | 6606 } |
6604 | 6607 |
6605 void showLiveDocumentInstances() { | 6608 void showLiveDocumentInstances() { |
6606 WeakDocumentSet& set = liveDocumentSet(); | 6609 WeakDocumentSet& set = liveDocumentSet(); |
6607 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6610 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6608 for (blink::Document* document : set) | 6611 for (blink::Document* document : set) |
6609 fprintf(stderr, "- Document %p URL: %s\n", document, | 6612 fprintf(stderr, "- Document %p URL: %s\n", document, |
6610 document->url().getString().utf8().data()); | 6613 document->url().getString().utf8().data()); |
6611 } | 6614 } |
6612 #endif | 6615 #endif |
OLD | NEW |