OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 void Internals::toggleOverwriteModeEnabled(Document* document, ExceptionState&) | 1535 void Internals::toggleOverwriteModeEnabled(Document* document, ExceptionState&) |
1536 { | 1536 { |
1537 if (!document || !document->frame()) | 1537 if (!document || !document->frame()) |
1538 return; | 1538 return; |
1539 | 1539 |
1540 document->frame()->editor()->toggleOverwriteModeEnabled(); | 1540 document->frame()->editor()->toggleOverwriteModeEnabled(); |
1541 } | 1541 } |
1542 | 1542 |
1543 unsigned Internals::numberOfLiveNodes() const | 1543 unsigned Internals::numberOfLiveNodes() const |
1544 { | 1544 { |
| 1545 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) |
| 1546 resolver->clearStyleSharingList(); |
| 1547 |
1545 return InspectorCounters::counterValue(InspectorCounters::NodeCounter); | 1548 return InspectorCounters::counterValue(InspectorCounters::NodeCounter); |
1546 } | 1549 } |
1547 | 1550 |
1548 unsigned Internals::numberOfLiveDocuments() const | 1551 unsigned Internals::numberOfLiveDocuments() const |
1549 { | 1552 { |
| 1553 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) |
| 1554 resolver->clearStyleSharingList(); |
| 1555 |
1550 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); | 1556 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); |
1551 } | 1557 } |
1552 | 1558 |
1553 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const | 1559 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const |
1554 { | 1560 { |
1555 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document->
page()); | 1561 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document->
page()); |
1556 if (!instrumentingAgents) | 1562 if (!instrumentingAgents) |
1557 return Vector<String>(); | 1563 return Vector<String>(); |
1558 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); | 1564 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); |
1559 if (!consoleAgent) | 1565 if (!consoleAgent) |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 return page->nonFastScrollableRects(document->frame()); | 1812 return page->nonFastScrollableRects(document->frame()); |
1807 } | 1813 } |
1808 | 1814 |
1809 void Internals::garbageCollectDocumentResources(Document* document, ExceptionSta
te& es) const | 1815 void Internals::garbageCollectDocumentResources(Document* document, ExceptionSta
te& es) const |
1810 { | 1816 { |
1811 if (!document) { | 1817 if (!document) { |
1812 es.throwDOMException(InvalidAccessError); | 1818 es.throwDOMException(InvalidAccessError); |
1813 return; | 1819 return; |
1814 } | 1820 } |
1815 | 1821 |
| 1822 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) |
| 1823 resolver->clearStyleSharingList(); |
| 1824 if (StyleResolver* resolver = document->styleResolverIfExists()) |
| 1825 resolver->clearStyleSharingList(); |
| 1826 |
1816 ResourceFetcher* fetcher = document->fetcher(); | 1827 ResourceFetcher* fetcher = document->fetcher(); |
1817 if (!fetcher) | 1828 if (!fetcher) |
1818 return; | 1829 return; |
1819 fetcher->garbageCollectDocumentResources(); | 1830 fetcher->garbageCollectDocumentResources(); |
1820 } | 1831 } |
1821 | 1832 |
1822 void Internals::evictAllResources() const | 1833 void Internals::evictAllResources() const |
1823 { | 1834 { |
1824 memoryCache()->evictResources(); | 1835 memoryCache()->evictResources(); |
1825 } | 1836 } |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2177 return false; | 2188 return false; |
2178 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2189 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
2179 // To prevent tests that call loseSharedGraphicsContext3D from being | 2190 // To prevent tests that call loseSharedGraphicsContext3D from being |
2180 // flaky, we call finish so that the context is guaranteed to be lost | 2191 // flaky, we call finish so that the context is guaranteed to be lost |
2181 // synchronously (i.e. before returning). | 2192 // synchronously (i.e. before returning). |
2182 sharedContext->finish(); | 2193 sharedContext->finish(); |
2183 return true; | 2194 return true; |
2184 } | 2195 } |
2185 | 2196 |
2186 } | 2197 } |
OLD | NEW |