| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R
ights Reserved. |
| 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 ScrollingCoordinator* Page::scrollingCoordinator() | 137 ScrollingCoordinator* Page::scrollingCoordinator() |
| 138 { | 138 { |
| 139 if (!m_scrollingCoordinator) | 139 if (!m_scrollingCoordinator) |
| 140 m_scrollingCoordinator = ScrollingCoordinator::create(this); | 140 m_scrollingCoordinator = ScrollingCoordinator::create(this); |
| 141 | 141 |
| 142 return m_scrollingCoordinator.get(); | 142 return m_scrollingCoordinator.get(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 PassRefPtr<ClientRectList> Page::nonFastScrollableRects(const LocalFrame* frame) | |
| 146 { | |
| 147 if (mainFrame()->document()) | |
| 148 mainFrame()->document()->updateLayout(); | |
| 149 | |
| 150 Vector<IntRect> rects; | |
| 151 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) | |
| 152 rects = scrollingCoordinator->computeShouldHandleScrollGestureOnMainThre
adRegion(frame, IntPoint()).rects(); | |
| 153 | |
| 154 Vector<FloatQuad> quads(rects.size()); | |
| 155 for (size_t i = 0; i < rects.size(); ++i) | |
| 156 quads[i] = FloatRect(rects[i]); | |
| 157 return ClientRectList::create(quads); | |
| 158 } | |
| 159 | |
| 160 void Page::setMainFrame(LocalFrame* mainFrame) | 145 void Page::setMainFrame(LocalFrame* mainFrame) |
| 161 { | 146 { |
| 162 // Should only be called during initialization or swaps between local and | 147 // Should only be called during initialization or swaps between local and |
| 163 // remote frames. | 148 // remote frames. |
| 164 // FIXME: Unfortunately we can't assert on this at the moment, because this | 149 // FIXME: Unfortunately we can't assert on this at the moment, because this |
| 165 // is called in the base constructor for both LocalFrame and RemoteFrame, | 150 // is called in the base constructor for both LocalFrame and RemoteFrame, |
| 166 // when the vtables for the derived classes have not yet been setup. | 151 // when the vtables for the derived classes have not yet been setup. |
| 167 m_mainFrame = mainFrame; | 152 m_mainFrame = mainFrame; |
| 168 } | 153 } |
| 169 | 154 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 , editorClient(0) | 363 , editorClient(0) |
| 379 , spellCheckerClient(0) | 364 , spellCheckerClient(0) |
| 380 { | 365 { |
| 381 } | 366 } |
| 382 | 367 |
| 383 Page::PageClients::~PageClients() | 368 Page::PageClients::~PageClients() |
| 384 { | 369 { |
| 385 } | 370 } |
| 386 | 371 |
| 387 } // namespace blink | 372 } // namespace blink |
| OLD | NEW |