| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All Rights
Reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All Rights
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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 */ | 18 */ |
| 19 | 19 |
| 20 #include "config.h" | 20 #include "config.h" |
| 21 #include "Page.h" | 21 #include "Page.h" |
| 22 | 22 |
| 23 #include "AlternativeTextClient.h" | 23 #include "AlternativeTextClient.h" |
| 24 #include "BackForwardController.h" | 24 #include "BackForwardController.h" |
| 25 #include "BackForwardList.h" | 25 #include "BackForwardList.h" |
| 26 #include "Chrome.h" | 26 #include "Chrome.h" |
| 27 #include "ChromeClient.h" | 27 #include "ChromeClient.h" |
| 28 #include "ClientRectList.h" |
| 28 #include "ContextMenuClient.h" | 29 #include "ContextMenuClient.h" |
| 29 #include "ContextMenuController.h" | 30 #include "ContextMenuController.h" |
| 30 #include "DOMWindow.h" | 31 #include "DOMWindow.h" |
| 31 #include "DocumentMarkerController.h" | 32 #include "DocumentMarkerController.h" |
| 32 #include "DocumentStyleSheetCollection.h" | 33 #include "DocumentStyleSheetCollection.h" |
| 33 #include "DragController.h" | 34 #include "DragController.h" |
| 34 #include "EditorClient.h" | 35 #include "EditorClient.h" |
| 35 #include "Event.h" | 36 #include "Event.h" |
| 36 #include "EventNames.h" | 37 #include "EventNames.h" |
| 37 #include "ExceptionCode.h" | 38 #include "ExceptionCode.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 { | 263 { |
| 263 if (Document* document = m_mainFrame->document()) | 264 if (Document* document = m_mainFrame->document()) |
| 264 document->updateLayout(); | 265 document->updateLayout(); |
| 265 | 266 |
| 266 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) | 267 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) |
| 267 return scrollingCoordinator->mainThreadScrollingReasonsAsText(); | 268 return scrollingCoordinator->mainThreadScrollingReasonsAsText(); |
| 268 | 269 |
| 269 return String(); | 270 return String(); |
| 270 } | 271 } |
| 271 | 272 |
| 273 PassRefPtr<ClientRectList> Page::nonFastScrollableRects(const Frame* frame) |
| 274 { |
| 275 if (Document* document = m_mainFrame->document()) |
| 276 document->updateLayout(); |
| 277 |
| 278 Vector<IntRect> rects; |
| 279 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator(
)) |
| 280 rects = scrollingCoordinator->computeNonFastScrollableRegion(frame, IntP
oint()).rects(); |
| 281 |
| 282 Vector<FloatQuad> quads(rects.size()); |
| 283 for (size_t i = 0; i < rects.size(); ++i) |
| 284 quads[i] = FloatRect(rects[i]); |
| 285 return ClientRectList::create(quads); |
| 286 } |
| 287 |
| 272 struct ViewModeInfo { | 288 struct ViewModeInfo { |
| 273 const char* name; | 289 const char* name; |
| 274 Page::ViewMode type; | 290 Page::ViewMode type; |
| 275 }; | 291 }; |
| 276 static const int viewModeMapSize = 5; | 292 static const int viewModeMapSize = 5; |
| 277 static ViewModeInfo viewModeMap[viewModeMapSize] = { | 293 static ViewModeInfo viewModeMap[viewModeMapSize] = { |
| 278 {"windowed", Page::ViewModeWindowed}, | 294 {"windowed", Page::ViewModeWindowed}, |
| 279 {"floating", Page::ViewModeFloating}, | 295 {"floating", Page::ViewModeFloating}, |
| 280 {"fullscreen", Page::ViewModeFullscreen}, | 296 {"fullscreen", Page::ViewModeFullscreen}, |
| 281 {"maximized", Page::ViewModeMaximized}, | 297 {"maximized", Page::ViewModeMaximized}, |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 , plugInClient(0) | 1370 , plugInClient(0) |
| 1355 , validationMessageClient(0) | 1371 , validationMessageClient(0) |
| 1356 { | 1372 { |
| 1357 } | 1373 } |
| 1358 | 1374 |
| 1359 Page::PageClients::~PageClients() | 1375 Page::PageClients::~PageClients() |
| 1360 { | 1376 { |
| 1361 } | 1377 } |
| 1362 | 1378 |
| 1363 } // namespace WebCore | 1379 } // namespace WebCore |
| OLD | NEW |