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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 , m_focusController(FocusController::create(this)) | 121 , m_focusController(FocusController::create(this)) |
122 , m_contextMenuController(ContextMenuController::create(this, pageClients.co
ntextMenuClient)) | 122 , m_contextMenuController(ContextMenuController::create(this, pageClients.co
ntextMenuClient)) |
123 , m_inspectorController(InspectorController::create(this, pageClients.inspec
torClient)) | 123 , m_inspectorController(InspectorController::create(this, pageClients.inspec
torClient)) |
124 , m_pointerLockController(PointerLockController::create(this)) | 124 , m_pointerLockController(PointerLockController::create(this)) |
125 , m_undoStack(UndoStack::create()) | 125 , m_undoStack(UndoStack::create()) |
126 , m_mainFrame(nullptr) | 126 , m_mainFrame(nullptr) |
127 , m_backForwardClient(pageClients.backForwardClient) | 127 , m_backForwardClient(pageClients.backForwardClient) |
128 , m_editorClient(pageClients.editorClient) | 128 , m_editorClient(pageClients.editorClient) |
129 , m_spellCheckerClient(pageClients.spellCheckerClient) | 129 , m_spellCheckerClient(pageClients.spellCheckerClient) |
130 , m_storageClient(pageClients.storageClient) | 130 , m_storageClient(pageClients.storageClient) |
| 131 , m_subframeCount(0) |
131 , m_openedByDOM(false) | 132 , m_openedByDOM(false) |
132 , m_tabKeyCyclesThroughElements(true) | 133 , m_tabKeyCyclesThroughElements(true) |
133 , m_defersLoading(false) | 134 , m_defersLoading(false) |
134 , m_deviceScaleFactor(1) | 135 , m_deviceScaleFactor(1) |
135 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) | 136 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) |
136 , m_visibilityState(PageVisibilityStateVisible) | 137 , m_visibilityState(PageVisibilityStateVisible) |
137 , m_isCursorVisible(true) | 138 , m_isCursorVisible(true) |
138 #if ENABLE(ASSERT) | 139 #if ENABLE(ASSERT) |
139 , m_isPainting(false) | 140 , m_isPainting(false) |
140 #endif | 141 #endif |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (frame->isLocalFrame() && toLocalFrame(frame)->document()) | 434 if (frame->isLocalFrame() && toLocalFrame(frame)->document()) |
434 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval(); | 435 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval(); |
435 } | 436 } |
436 } | 437 } |
437 | 438 |
438 double Page::timerAlignmentInterval() const | 439 double Page::timerAlignmentInterval() const |
439 { | 440 { |
440 return m_timerAlignmentInterval; | 441 return m_timerAlignmentInterval; |
441 } | 442 } |
442 | 443 |
| 444 #if ENABLE(ASSERT) |
| 445 void Page::checkSubframeCountConsistency() const |
| 446 { |
| 447 ASSERT(m_subframeCount >= 0); |
| 448 |
| 449 int subframeCount = 0; |
| 450 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) |
| 451 ++subframeCount; |
| 452 |
| 453 ASSERT(m_subframeCount + 1 == subframeCount); |
| 454 } |
| 455 #endif |
| 456 |
443 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) | 457 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) |
444 { | 458 { |
445 if (m_visibilityState == visibilityState) | 459 if (m_visibilityState == visibilityState) |
446 return; | 460 return; |
447 m_visibilityState = visibilityState; | 461 m_visibilityState = visibilityState; |
448 | 462 |
449 if (visibilityState == blink::PageVisibilityStateVisible) | 463 if (visibilityState == blink::PageVisibilityStateVisible) |
450 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); | 464 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); |
451 else | 465 else |
452 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); | 466 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 , spellCheckerClient(0) | 665 , spellCheckerClient(0) |
652 , storageClient(0) | 666 , storageClient(0) |
653 { | 667 { |
654 } | 668 } |
655 | 669 |
656 Page::PageClients::~PageClients() | 670 Page::PageClients::~PageClients() |
657 { | 671 { |
658 } | 672 } |
659 | 673 |
660 } // namespace blink | 674 } // namespace blink |
OLD | NEW |