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 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 ExceptionState& exceptionState) const { | 2054 ExceptionState& exceptionState) const { |
2055 DCHECK(document); | 2055 DCHECK(document); |
2056 if (!document->frame()) { | 2056 if (!document->frame()) { |
2057 exceptionState.throwDOMException(InvalidAccessError, | 2057 exceptionState.throwDOMException(InvalidAccessError, |
2058 "The document provided is invalid."); | 2058 "The document provided is invalid."); |
2059 return String(); | 2059 return String(); |
2060 } | 2060 } |
2061 | 2061 |
2062 document->frame()->view()->updateAllLifecyclePhases(); | 2062 document->frame()->view()->updateAllLifecyclePhases(); |
2063 | 2063 |
2064 Page* page = document->page(); | 2064 return document->frame()->view()->mainThreadScrollingReasonsAsText(); |
2065 if (!page) | |
2066 return String(); | |
2067 | |
2068 return page->mainThreadScrollingReasonsAsText(); | |
2069 } | 2065 } |
2070 | 2066 |
2071 ClientRectList* Internals::nonFastScrollableRects( | 2067 ClientRectList* Internals::nonFastScrollableRects( |
2072 Document* document, | 2068 Document* document, |
2073 ExceptionState& exceptionState) const { | 2069 ExceptionState& exceptionState) const { |
2074 DCHECK(document); | 2070 DCHECK(document); |
2075 if (!document->frame()) { | 2071 if (!document->frame()) { |
2076 exceptionState.throwDOMException(InvalidAccessError, | 2072 exceptionState.throwDOMException(InvalidAccessError, |
2077 "The document provided is invalid."); | 2073 "The document provided is invalid."); |
2078 return nullptr; | 2074 return nullptr; |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3084 | 3080 |
3085 void Internals::crash() { | 3081 void Internals::crash() { |
3086 CHECK(false) << "Intentional crash"; | 3082 CHECK(false) << "Intentional crash"; |
3087 } | 3083 } |
3088 | 3084 |
3089 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3085 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
3090 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3086 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
3091 } | 3087 } |
3092 | 3088 |
3093 } // namespace blink | 3089 } // namespace blink |
OLD | NEW |