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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 void Internals::toggleOverwriteModeEnabled(Document* document, ExceptionState&) | 1538 void Internals::toggleOverwriteModeEnabled(Document* document, ExceptionState&) |
1539 { | 1539 { |
1540 if (!document || !document->frame()) | 1540 if (!document || !document->frame()) |
1541 return; | 1541 return; |
1542 | 1542 |
1543 document->frame()->editor().toggleOverwriteModeEnabled(); | 1543 document->frame()->editor().toggleOverwriteModeEnabled(); |
1544 } | 1544 } |
1545 | 1545 |
1546 unsigned Internals::numberOfLiveNodes() const | 1546 unsigned Internals::numberOfLiveNodes() const |
1547 { | 1547 { |
1548 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) | |
1549 resolver->clearStyleSharingList(); | |
1550 | |
1551 return InspectorCounters::counterValue(InspectorCounters::NodeCounter); | 1548 return InspectorCounters::counterValue(InspectorCounters::NodeCounter); |
1552 } | 1549 } |
1553 | 1550 |
1554 unsigned Internals::numberOfLiveDocuments() const | 1551 unsigned Internals::numberOfLiveDocuments() const |
1555 { | 1552 { |
1556 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) | |
1557 resolver->clearStyleSharingList(); | |
1558 | |
1559 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); | 1553 return InspectorCounters::counterValue(InspectorCounters::DocumentCounter); |
1560 } | 1554 } |
1561 | 1555 |
1562 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const | 1556 Vector<String> Internals::consoleMessageArgumentCounts(Document* document) const |
1563 { | 1557 { |
1564 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document->
page()); | 1558 InstrumentingAgents* instrumentingAgents = instrumentationForPage(document->
page()); |
1565 if (!instrumentingAgents) | 1559 if (!instrumentingAgents) |
1566 return Vector<String>(); | 1560 return Vector<String>(); |
1567 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); | 1561 InspectorConsoleAgent* consoleAgent = instrumentingAgents->inspectorConsoleA
gent(); |
1568 if (!consoleAgent) | 1562 if (!consoleAgent) |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 return page->nonFastScrollableRects(document->frame()); | 1835 return page->nonFastScrollableRects(document->frame()); |
1842 } | 1836 } |
1843 | 1837 |
1844 void Internals::garbageCollectDocumentResources(Document* document, ExceptionSta
te& es) const | 1838 void Internals::garbageCollectDocumentResources(Document* document, ExceptionSta
te& es) const |
1845 { | 1839 { |
1846 if (!document) { | 1840 if (!document) { |
1847 es.throwDOMException(InvalidAccessError); | 1841 es.throwDOMException(InvalidAccessError); |
1848 return; | 1842 return; |
1849 } | 1843 } |
1850 | 1844 |
1851 if (StyleResolver* resolver = contextDocument()->styleResolverIfExists()) | |
1852 resolver->clearStyleSharingList(); | |
1853 if (StyleResolver* resolver = document->styleResolverIfExists()) | |
1854 resolver->clearStyleSharingList(); | |
1855 | |
1856 ResourceFetcher* fetcher = document->fetcher(); | 1845 ResourceFetcher* fetcher = document->fetcher(); |
1857 if (!fetcher) | 1846 if (!fetcher) |
1858 return; | 1847 return; |
1859 fetcher->garbageCollectDocumentResources(); | 1848 fetcher->garbageCollectDocumentResources(); |
1860 } | 1849 } |
1861 | 1850 |
1862 void Internals::evictAllResources() const | 1851 void Internals::evictAllResources() const |
1863 { | 1852 { |
1864 memoryCache()->evictResources(); | 1853 memoryCache()->evictResources(); |
1865 } | 1854 } |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 return false; | 2212 return false; |
2224 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); | 2213 sharedContext->getExtensions()->loseContextCHROMIUM(Extensions3D::GUILTY_CON
TEXT_RESET_ARB, Extensions3D::INNOCENT_CONTEXT_RESET_ARB); |
2225 // To prevent tests that call loseSharedGraphicsContext3D from being | 2214 // To prevent tests that call loseSharedGraphicsContext3D from being |
2226 // flaky, we call finish so that the context is guaranteed to be lost | 2215 // flaky, we call finish so that the context is guaranteed to be lost |
2227 // synchronously (i.e. before returning). | 2216 // synchronously (i.e. before returning). |
2228 sharedContext->finish(); | 2217 sharedContext->finish(); |
2229 return true; | 2218 return true; |
2230 } | 2219 } |
2231 | 2220 |
2232 } | 2221 } |
OLD | NEW |