| 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 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 StyleResolver& resolver = ensureStyleResolver(); | 2045 StyleResolver& resolver = ensureStyleResolver(); |
| 2046 | 2046 |
| 2047 bool shouldRecordStats; | 2047 bool shouldRecordStats; |
| 2048 TRACE_EVENT_CATEGORY_GROUP_ENABLED("blink,blink_style", &shouldRecordStats); | 2048 TRACE_EVENT_CATEGORY_GROUP_ENABLED("blink,blink_style", &shouldRecordStats); |
| 2049 styleEngine().setStatsEnabled(shouldRecordStats); | 2049 styleEngine().setStatsEnabled(shouldRecordStats); |
| 2050 | 2050 |
| 2051 if (Element* documentElement = this->documentElement()) { | 2051 if (Element* documentElement = this->documentElement()) { |
| 2052 inheritHtmlAndBodyElementStyles(change); | 2052 inheritHtmlAndBodyElementStyles(change); |
| 2053 if (documentElement->shouldCallRecalcStyle(change)) | 2053 if (documentElement->shouldCallRecalcStyle(change)) |
| 2054 documentElement->recalcStyle(change); | 2054 documentElement->recalcStyle(change); |
| 2055 if (documentElement->needsReattachLayoutTree() || |
| 2056 documentElement->childNeedsReattachLayoutTree()) |
| 2057 documentElement->rebuildLayoutTree(); |
| 2055 } | 2058 } |
| 2056 | 2059 |
| 2057 view()->recalcOverflowAfterStyleChange(); | 2060 view()->recalcOverflowAfterStyleChange(); |
| 2058 | 2061 |
| 2059 // Only retain the HashMap for the duration of StyleRecalc and | 2062 // Only retain the HashMap for the duration of StyleRecalc and |
| 2060 // LayoutTreeConstruction. | 2063 // LayoutTreeConstruction. |
| 2061 m_styleReattachDataMap.clear(); | 2064 m_styleReattachDataMap.clear(); |
| 2062 clearChildNeedsStyleRecalc(); | 2065 clearChildNeedsStyleRecalc(); |
| 2063 clearChildNeedsReattachLayoutTree(); | 2066 clearChildNeedsReattachLayoutTree(); |
| 2064 | 2067 |
| (...skipping 4504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6569 } | 6572 } |
| 6570 | 6573 |
| 6571 void showLiveDocumentInstances() { | 6574 void showLiveDocumentInstances() { |
| 6572 WeakDocumentSet& set = liveDocumentSet(); | 6575 WeakDocumentSet& set = liveDocumentSet(); |
| 6573 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6576 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6574 for (blink::Document* document : set) | 6577 for (blink::Document* document : set) |
| 6575 fprintf(stderr, "- Document %p URL: %s\n", document, | 6578 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6576 document->url().getString().utf8().data()); | 6579 document->url().getString().utf8().data()); |
| 6577 } | 6580 } |
| 6578 #endif | 6581 #endif |
| OLD | NEW |