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 |
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 "core/page/Page.h" | 20 #include "core/page/Page.h" |
21 | 21 |
| 22 #include "bindings/core/v8/ScriptController.h" |
22 #include "core/css/resolver/ViewportStyleResolver.h" | 23 #include "core/css/resolver/ViewportStyleResolver.h" |
23 #include "core/dom/ClientRectList.h" | 24 #include "core/dom/ClientRectList.h" |
24 #include "core/dom/StyleChangeReason.h" | 25 #include "core/dom/StyleChangeReason.h" |
25 #include "core/dom/VisitedLinkState.h" | 26 #include "core/dom/VisitedLinkState.h" |
26 #include "core/editing/DragCaretController.h" | 27 #include "core/editing/DragCaretController.h" |
27 #include "core/editing/markers/DocumentMarkerController.h" | 28 #include "core/editing/markers/DocumentMarkerController.h" |
28 #include "core/events/Event.h" | 29 #include "core/events/Event.h" |
29 #include "core/fetch/ResourceFetcher.h" | 30 #include "core/fetch/ResourceFetcher.h" |
30 #include "core/frame/DOMTimer.h" | 31 #include "core/frame/DOMTimer.h" |
31 #include "core/frame/FrameConsole.h" | 32 #include "core/frame/FrameConsole.h" |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 break; | 415 break; |
415 case SettingsDelegate::TextTrackKindUserPreferenceChange: | 416 case SettingsDelegate::TextTrackKindUserPreferenceChange: |
416 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { | 417 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNe
xt()) { |
417 if (frame->isLocalFrame()) { | 418 if (frame->isLocalFrame()) { |
418 Document* doc = toLocalFrame(frame)->document(); | 419 Document* doc = toLocalFrame(frame)->document(); |
419 if (doc) | 420 if (doc) |
420 HTMLMediaElement::setTextTrackKindUserPreferenceForAllMediaE
lements(doc); | 421 HTMLMediaElement::setTextTrackKindUserPreferenceForAllMediaE
lements(doc); |
421 } | 422 } |
422 } | 423 } |
423 break; | 424 break; |
| 425 case SettingsDelegate::DOMWorldsChange: |
| 426 { |
| 427 if (!settings().forceMainWorldInitialization()) |
| 428 break; |
| 429 if (!mainFrame() || !mainFrame()->isLocalFrame()) |
| 430 break; |
| 431 if (!toLocalFrame(mainFrame())->loader().stateMachine()->committedFi
rstRealDocumentLoad()) |
| 432 break; |
| 433 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traver
seNext()) { |
| 434 if (frame->isLocalFrame()) |
| 435 toLocalFrame(frame)->script().initializeMainWorld(); |
| 436 } |
| 437 } |
| 438 break; |
424 } | 439 } |
425 } | 440 } |
426 | 441 |
427 void Page::updateAcceleratedCompositingSettings() | 442 void Page::updateAcceleratedCompositingSettings() |
428 { | 443 { |
429 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { | 444 for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()
) { |
430 if (!frame->isLocalFrame()) | 445 if (!frame->isLocalFrame()) |
431 continue; | 446 continue; |
432 if (FrameView* view = toLocalFrame(frame)->view()) | 447 if (FrameView* view = toLocalFrame(frame)->view()) |
433 view->updateAcceleratedCompositingSettings(); | 448 view->updateAcceleratedCompositingSettings(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 { | 547 { |
533 } | 548 } |
534 | 549 |
535 Page::PageClients::~PageClients() | 550 Page::PageClients::~PageClients() |
536 { | 551 { |
537 } | 552 } |
538 | 553 |
539 template class CORE_TEMPLATE_EXPORT Supplement<Page>; | 554 template class CORE_TEMPLATE_EXPORT Supplement<Page>; |
540 | 555 |
541 } // namespace blink | 556 } // namespace blink |
OLD | NEW |