OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 , m_updateFocusAppearanceRestoresSelection(false) | 449 , m_updateFocusAppearanceRestoresSelection(false) |
450 , m_containsPlugins(false) | 450 , m_containsPlugins(false) |
451 , m_ignoreDestructiveWriteCount(0) | 451 , m_ignoreDestructiveWriteCount(0) |
452 , m_titleSetExplicitly(false) | 452 , m_titleSetExplicitly(false) |
453 , m_markers(adoptPtrWillBeNoop(new DocumentMarkerController)) | 453 , m_markers(adoptPtrWillBeNoop(new DocumentMarkerController)) |
454 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi
red) | 454 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi
red) |
455 , m_cssTarget(nullptr) | 455 , m_cssTarget(nullptr) |
456 , m_loadEventProgress(LoadEventNotRun) | 456 , m_loadEventProgress(LoadEventNotRun) |
457 , m_startTime(currentTime()) | 457 , m_startTime(currentTime()) |
458 , m_scriptRunner(ScriptRunner::create(this)) | 458 , m_scriptRunner(ScriptRunner::create(this)) |
| 459 , m_scriptEnabled(Uninitialized) |
459 , m_xmlVersion("1.0") | 460 , m_xmlVersion("1.0") |
460 , m_xmlStandalone(StandaloneUnspecified) | 461 , m_xmlStandalone(StandaloneUnspecified) |
461 , m_hasXMLDeclaration(0) | 462 , m_hasXMLDeclaration(0) |
462 , m_designMode(inherit) | 463 , m_designMode(inherit) |
463 , m_hasAnnotatedRegions(false) | 464 , m_hasAnnotatedRegions(false) |
464 , m_annotatedRegionsDirty(false) | 465 , m_annotatedRegionsDirty(false) |
465 , m_useSecureKeyboardEntryWhenActive(false) | 466 , m_useSecureKeyboardEntryWhenActive(false) |
466 , m_documentClasses(documentClasses) | 467 , m_documentClasses(documentClasses) |
467 , m_isViewSource(false) | 468 , m_isViewSource(false) |
468 , m_sawElementsInKnownNamespaces(false) | 469 , m_sawElementsInKnownNamespaces(false) |
(...skipping 4397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4866 LocalFrame* frame = executingFrame(); | 4867 LocalFrame* frame = executingFrame(); |
4867 if (!frame) | 4868 if (!frame) |
4868 return false; | 4869 return false; |
4869 if (!node->document().executingFrame()) | 4870 if (!node->document().executingFrame()) |
4870 return false; | 4871 return false; |
4871 if (!frame->script().canExecuteScripts(AboutToExecuteScript)) | 4872 if (!frame->script().canExecuteScripts(AboutToExecuteScript)) |
4872 return false; | 4873 return false; |
4873 return true; | 4874 return true; |
4874 } | 4875 } |
4875 | 4876 |
| 4877 bool Document::scriptEnabled() |
| 4878 { |
| 4879 if (m_scriptEnabled == Uninitialized) |
| 4880 m_scriptEnabled = m_frame->loader().client()->allowScript(settings() &&
settings()->scriptEnabled()) ? Enabled : Disabled; |
| 4881 return m_scriptEnabled == Enabled; |
| 4882 } |
| 4883 |
4876 void Document::updateSecurityOrigin(PassRefPtr<SecurityOrigin> origin) | 4884 void Document::updateSecurityOrigin(PassRefPtr<SecurityOrigin> origin) |
4877 { | 4885 { |
4878 setSecurityOrigin(origin); | 4886 setSecurityOrigin(origin); |
4879 didUpdateSecurityOrigin(); | 4887 didUpdateSecurityOrigin(); |
4880 } | 4888 } |
4881 | 4889 |
4882 void Document::didUpdateSecurityOrigin() | 4890 void Document::didUpdateSecurityOrigin() |
4883 { | 4891 { |
4884 if (!m_frame) | 4892 if (!m_frame) |
4885 return; | 4893 return; |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5818 visitor->trace(m_compositorPendingAnimations); | 5826 visitor->trace(m_compositorPendingAnimations); |
5819 visitor->trace(m_contextDocument); | 5827 visitor->trace(m_contextDocument); |
5820 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5828 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5821 DocumentSupplementable::trace(visitor); | 5829 DocumentSupplementable::trace(visitor); |
5822 TreeScope::trace(visitor); | 5830 TreeScope::trace(visitor); |
5823 ContainerNode::trace(visitor); | 5831 ContainerNode::trace(visitor); |
5824 ExecutionContext::trace(visitor); | 5832 ExecutionContext::trace(visitor); |
5825 } | 5833 } |
5826 | 5834 |
5827 } // namespace WebCore | 5835 } // namespace WebCore |
OLD | NEW |