Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: third_party/WebKit/Source/core/testing/Internals.cpp

Issue 2531603003: Only scroll on main if the targeted frames need to scroll on main (Closed)
Patch Set: Moving mainThreadScrollingReason related function from ScrollingCoordinator to FrameView to indicat… Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 ExceptionState& exceptionState) const { 2052 ExceptionState& exceptionState) const {
2053 ASSERT(document); 2053 ASSERT(document);
2054 if (!document->frame()) { 2054 if (!document->frame()) {
2055 exceptionState.throwDOMException(InvalidAccessError, 2055 exceptionState.throwDOMException(InvalidAccessError,
2056 "The document provided is invalid."); 2056 "The document provided is invalid.");
2057 return String(); 2057 return String();
2058 } 2058 }
2059 2059
2060 document->frame()->view()->updateAllLifecyclePhases(); 2060 document->frame()->view()->updateAllLifecyclePhases();
2061 2061
2062 Page* page = document->page(); 2062 return document->frame()->view()->mainThreadScrollingReasonsAsText();
2063 if (!page)
2064 return String();
2065
2066 return page->mainThreadScrollingReasonsAsText();
2067 } 2063 }
2068 2064
2069 ClientRectList* Internals::nonFastScrollableRects( 2065 ClientRectList* Internals::nonFastScrollableRects(
2070 Document* document, 2066 Document* document,
2071 ExceptionState& exceptionState) const { 2067 ExceptionState& exceptionState) const {
2072 ASSERT(document); 2068 ASSERT(document);
2073 if (!document->frame()) { 2069 if (!document->frame()) {
2074 exceptionState.throwDOMException(InvalidAccessError, 2070 exceptionState.throwDOMException(InvalidAccessError,
2075 "The document provided is invalid."); 2071 "The document provided is invalid.");
2076 return nullptr; 2072 return nullptr;
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 3055
3060 void Internals::crash() { 3056 void Internals::crash() {
3061 CHECK(false) << "Intentional crash"; 3057 CHECK(false) << "Intentional crash";
3062 } 3058 }
3063 3059
3064 void Internals::setIsLowEndDevice(bool isLowEndDevice) { 3060 void Internals::setIsLowEndDevice(bool isLowEndDevice) {
3065 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); 3061 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice);
3066 } 3062 }
3067 3063
3068 } // namespace blink 3064 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698