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) | |
132 , m_openedByDOM(false) | 131 , m_openedByDOM(false) |
133 , m_tabKeyCyclesThroughElements(true) | 132 , m_tabKeyCyclesThroughElements(true) |
134 , m_defersLoading(false) | 133 , m_defersLoading(false) |
135 , m_deviceScaleFactor(1) | 134 , m_deviceScaleFactor(1) |
136 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) | 135 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) |
137 , m_visibilityState(PageVisibilityStateVisible) | 136 , m_visibilityState(PageVisibilityStateVisible) |
138 , m_isCursorVisible(true) | 137 , m_isCursorVisible(true) |
139 #if ENABLE(ASSERT) | 138 #if ENABLE(ASSERT) |
140 , m_isPainting(false) | 139 , m_isPainting(false) |
141 #endif | 140 #endif |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 if (frame->isLocalFrame() && toLocalFrame(frame)->document()) | 433 if (frame->isLocalFrame() && toLocalFrame(frame)->document()) |
435 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval(); | 434 toLocalFrame(frame)->document()->didChangeTimerAlignmentInterval(); |
436 } | 435 } |
437 } | 436 } |
438 | 437 |
439 double Page::timerAlignmentInterval() const | 438 double Page::timerAlignmentInterval() const |
440 { | 439 { |
441 return m_timerAlignmentInterval; | 440 return m_timerAlignmentInterval; |
442 } | 441 } |
443 | 442 |
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 | |
457 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) | 443 void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
lState) |
458 { | 444 { |
459 if (m_visibilityState == visibilityState) | 445 if (m_visibilityState == visibilityState) |
460 return; | 446 return; |
461 m_visibilityState = visibilityState; | 447 m_visibilityState = visibilityState; |
462 | 448 |
463 if (visibilityState == blink::PageVisibilityStateVisible) | 449 if (visibilityState == blink::PageVisibilityStateVisible) |
464 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); | 450 setTimerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()); |
465 else | 451 else |
466 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); | 452 setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval()); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 , spellCheckerClient(0) | 656 , spellCheckerClient(0) |
671 , storageClient(0) | 657 , storageClient(0) |
672 { | 658 { |
673 } | 659 } |
674 | 660 |
675 Page::PageClients::~PageClients() | 661 Page::PageClients::~PageClients() |
676 { | 662 { |
677 } | 663 } |
678 | 664 |
679 } // namespace blink | 665 } // namespace blink |
OLD | NEW |