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 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 } | 1840 } |
1841 | 1841 |
1842 unsigned Internals::numberOfLiveDocuments() const { | 1842 unsigned Internals::numberOfLiveDocuments() const { |
1843 return InstanceCounters::counterValue(InstanceCounters::DocumentCounter); | 1843 return InstanceCounters::counterValue(InstanceCounters::DocumentCounter); |
1844 } | 1844 } |
1845 | 1845 |
1846 String Internals::dumpRefCountedInstanceCounts() const { | 1846 String Internals::dumpRefCountedInstanceCounts() const { |
1847 return WTF::dumpRefCountedInstanceCounts(); | 1847 return WTF::dumpRefCountedInstanceCounts(); |
1848 } | 1848 } |
1849 | 1849 |
1850 Vector<unsigned long> Internals::setMemoryCacheCapacities( | |
1851 unsigned long minDeadBytes, | |
1852 unsigned long maxDeadBytes, | |
1853 unsigned long totalBytes) { | |
1854 Vector<unsigned long> result; | |
1855 result.append(memoryCache()->minDeadCapacity()); | |
1856 result.append(memoryCache()->maxDeadCapacity()); | |
1857 result.append(memoryCache()->capacity()); | |
1858 memoryCache()->setCapacities(minDeadBytes, maxDeadBytes, totalBytes); | |
1859 return result; | |
1860 } | |
1861 | |
1862 bool Internals::hasGrammarMarker(Document* document, int from, int length) { | 1850 bool Internals::hasGrammarMarker(Document* document, int from, int length) { |
1863 ASSERT(document); | 1851 ASSERT(document); |
1864 if (!document->frame()) | 1852 if (!document->frame()) |
1865 return false; | 1853 return false; |
1866 | 1854 |
1867 document->updateStyleAndLayoutIgnorePendingStylesheets(); | 1855 document->updateStyleAndLayoutIgnorePendingStylesheets(); |
1868 return document->frame()->spellChecker().selectionStartHasMarkerFor( | 1856 return document->frame()->spellChecker().selectionStartHasMarkerFor( |
1869 DocumentMarker::Grammar, from, length); | 1857 DocumentMarker::Grammar, from, length); |
1870 } | 1858 } |
1871 | 1859 |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3027 return ClientRect::create(); | 3015 return ClientRect::create(); |
3028 | 3016 |
3029 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 3017 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
3030 } | 3018 } |
3031 | 3019 |
3032 void Internals::crash() { | 3020 void Internals::crash() { |
3033 CHECK(false) << "Intentional crash"; | 3021 CHECK(false) << "Intentional crash"; |
3034 } | 3022 } |
3035 | 3023 |
3036 } // namespace blink | 3024 } // namespace blink |
OLD | NEW |