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

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

Issue 1679943002: Fix internals method to return Layout Viewport scrollable area for FrameView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 static ScrollableArea* scrollableAreaForNode(Node* node) 191 static ScrollableArea* scrollableAreaForNode(Node* node)
192 { 192 {
193 if (!node) 193 if (!node)
194 return nullptr; 194 return nullptr;
195 195
196 if (node->isDocumentNode()) { 196 if (node->isDocumentNode()) {
197 // This can be removed after root layer scrolling is enabled. 197 // This can be removed after root layer scrolling is enabled.
198 if (FrameView* frameView = toDocument(node)->view()) 198 if (FrameView* frameView = toDocument(node)->view())
199 return frameView->scrollableArea(); 199 return frameView->layoutViewportScrollableArea();
200 } 200 }
201 201
202 LayoutObject* layoutObject = node->layoutObject(); 202 LayoutObject* layoutObject = node->layoutObject();
203 if (!layoutObject || !layoutObject->isBox()) 203 if (!layoutObject || !layoutObject->isBox())
204 return nullptr; 204 return nullptr;
205 205
206 return toLayoutBox(layoutObject)->scrollableArea(); 206 return toLayoutBox(layoutObject)->scrollableArea();
207 } 207 }
208 208
209 const char* Internals::internalsId = "internals"; 209 const char* Internals::internalsId = "internals";
(...skipping 2350 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 } 2560 }
2561 2561
2562 int Internals::getScrollAnimationState(Node* node) const 2562 int Internals::getScrollAnimationState(Node* node) const
2563 { 2563 {
2564 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) 2564 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node))
2565 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); 2565 return static_cast<int>(scrollableArea->scrollAnimator().m_runState);
2566 return -1; 2566 return -1;
2567 } 2567 }
2568 2568
2569 } // namespace blink 2569 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698