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