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

Side by Side Diff: third_party/WebKit/Source/core/page/Page.cpp

Issue 2651793012: [RootLayerScrolls] Annotate non-fast-scroll regions to correct layer (Closed)
Patch Set: Get rid of nonFastScrollableRects plumbing. Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All
3 * Rights Reserved. 3 * Rights Reserved.
4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 ScrollingCoordinator* Page::scrollingCoordinator() { 168 ScrollingCoordinator* Page::scrollingCoordinator() {
169 if (!m_scrollingCoordinator && m_settings->getAcceleratedCompositingEnabled()) 169 if (!m_scrollingCoordinator && m_settings->getAcceleratedCompositingEnabled())
170 m_scrollingCoordinator = ScrollingCoordinator::create(this); 170 m_scrollingCoordinator = ScrollingCoordinator::create(this);
171 171
172 return m_scrollingCoordinator.get(); 172 return m_scrollingCoordinator.get();
173 } 173 }
174 174
175 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame) { 175 ClientRectList* Page::nonFastScrollableRects(const LocalFrame* frame) {
176 DisableCompositingQueryAsserts disabler;
176 if (ScrollingCoordinator* scrollingCoordinator = 177 if (ScrollingCoordinator* scrollingCoordinator =
177 this->scrollingCoordinator()) { 178 this->scrollingCoordinator()) {
178 // Hits in compositing/iframes/iframe-composited-scrolling.html 179 // Hits in compositing/iframes/iframe-composited-scrolling.html
179 DisableCompositingQueryAsserts disabler;
180 scrollingCoordinator->updateAfterCompositingChangeIfNeeded(); 180 scrollingCoordinator->updateAfterCompositingChangeIfNeeded();
181 } 181 }
182 182
183 if (!frame->view()->layerForScrolling()) 183 GraphicsLayer* layer =
184 frame->view()->layoutViewportScrollableArea()->layerForScrolling();
185 if (!layer)
184 return ClientRectList::create(); 186 return ClientRectList::create();
185 187 return ClientRectList::create(
186 // Now retain non-fast scrollable regions 188 layer->platformLayer()->nonFastScrollableRegion());
187 return ClientRectList::create(frame->view()
188 ->layerForScrolling()
189 ->platformLayer()
190 ->nonFastScrollableRegion());
191 } 189 }
192 190
193 void Page::setMainFrame(Frame* mainFrame) { 191 void Page::setMainFrame(Frame* mainFrame) {
194 // Should only be called during initialization or swaps between local and 192 // Should only be called during initialization or swaps between local and
195 // remote frames. 193 // remote frames.
196 // FIXME: Unfortunately we can't assert on this at the moment, because this 194 // FIXME: Unfortunately we can't assert on this at the moment, because this
197 // is called in the base constructor for both LocalFrame and RemoteFrame, 195 // is called in the base constructor for both LocalFrame and RemoteFrame,
198 // when the vtables for the derived classes have not yet been setup. 196 // when the vtables for the derived classes have not yet been setup.
199 m_mainFrame = mainFrame; 197 m_mainFrame = mainFrame;
200 } 198 }
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 : chromeClient(nullptr), 541 : chromeClient(nullptr),
544 contextMenuClient(nullptr), 542 contextMenuClient(nullptr),
545 editorClient(nullptr), 543 editorClient(nullptr),
546 spellCheckerClient(nullptr) {} 544 spellCheckerClient(nullptr) {}
547 545
548 Page::PageClients::~PageClients() {} 546 Page::PageClients::~PageClients() {}
549 547
550 template class CORE_TEMPLATE_EXPORT Supplement<Page>; 548 template class CORE_TEMPLATE_EXPORT Supplement<Page>;
551 549
552 } // namespace blink 550 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698