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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "core/css/StyleSheetList.h" | 55 #include "core/css/StyleSheetList.h" |
56 #include "core/css/resolver/FontBuilder.h" | 56 #include "core/css/resolver/FontBuilder.h" |
57 #include "core/css/resolver/StyleResolver.h" | 57 #include "core/css/resolver/StyleResolver.h" |
58 #include "core/css/resolver/StyleResolverStats.h" | 58 #include "core/css/resolver/StyleResolverStats.h" |
59 #include "core/dom/AddConsoleMessageTask.h" | 59 #include "core/dom/AddConsoleMessageTask.h" |
60 #include "core/dom/Attr.h" | 60 #include "core/dom/Attr.h" |
61 #include "core/dom/CDATASection.h" | 61 #include "core/dom/CDATASection.h" |
62 #include "core/dom/Comment.h" | 62 #include "core/dom/Comment.h" |
63 #include "core/dom/ContextFeatures.h" | 63 #include "core/dom/ContextFeatures.h" |
64 #include "core/dom/DOMImplementation.h" | 64 #include "core/dom/DOMImplementation.h" |
65 #include "core/dom/DOMNamedFlowCollection.h" | |
66 #include "core/dom/DocumentFragment.h" | 65 #include "core/dom/DocumentFragment.h" |
67 #include "core/dom/DocumentLifecycleNotifier.h" | 66 #include "core/dom/DocumentLifecycleNotifier.h" |
68 #include "core/dom/DocumentLifecycleObserver.h" | 67 #include "core/dom/DocumentLifecycleObserver.h" |
69 #include "core/dom/DocumentMarkerController.h" | 68 #include "core/dom/DocumentMarkerController.h" |
70 #include "core/dom/DocumentSharedObjectPool.h" | 69 #include "core/dom/DocumentSharedObjectPool.h" |
71 #include "core/dom/DocumentType.h" | 70 #include "core/dom/DocumentType.h" |
72 #include "core/dom/Element.h" | 71 #include "core/dom/Element.h" |
73 #include "core/dom/ElementTraversal.h" | 72 #include "core/dom/ElementTraversal.h" |
74 #include "core/dom/ExceptionCode.h" | 73 #include "core/dom/ExceptionCode.h" |
75 #include "core/dom/ExecutionContextTask.h" | 74 #include "core/dom/ExecutionContextTask.h" |
76 #include "core/dom/MainThreadTaskRunner.h" | 75 #include "core/dom/MainThreadTaskRunner.h" |
77 #include "core/dom/NamedFlowCollection.h" | |
78 #include "core/dom/NodeChildRemovalTracker.h" | 76 #include "core/dom/NodeChildRemovalTracker.h" |
79 #include "core/dom/NodeFilter.h" | 77 #include "core/dom/NodeFilter.h" |
80 #include "core/dom/NodeIterator.h" | 78 #include "core/dom/NodeIterator.h" |
81 #include "core/dom/NodeRareData.h" | 79 #include "core/dom/NodeRareData.h" |
82 #include "core/dom/NodeRenderStyle.h" | 80 #include "core/dom/NodeRenderStyle.h" |
83 #include "core/dom/NodeRenderingTraversal.h" | 81 #include "core/dom/NodeRenderingTraversal.h" |
84 #include "core/dom/NodeTraversal.h" | 82 #include "core/dom/NodeTraversal.h" |
85 #include "core/dom/NodeWithIndex.h" | 83 #include "core/dom/NodeWithIndex.h" |
86 #include "core/dom/PostAttachCallbacks.h" | 84 #include "core/dom/PostAttachCallbacks.h" |
87 #include "core/dom/ProcessingInstruction.h" | 85 #include "core/dom/ProcessingInstruction.h" |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 e = Element::create(qName, this); | 1022 e = Element::create(qName, this); |
1025 | 1023 |
1026 if (e->prefix() != qName.prefix()) | 1024 if (e->prefix() != qName.prefix()) |
1027 e->setTagNameForCreateElementNS(qName); | 1025 e->setTagNameForCreateElementNS(qName); |
1028 | 1026 |
1029 ASSERT(qName == e->tagQName()); | 1027 ASSERT(qName == e->tagQName()); |
1030 | 1028 |
1031 return e.release(); | 1029 return e.release(); |
1032 } | 1030 } |
1033 | 1031 |
1034 bool Document::regionBasedColumnsEnabled() const | |
1035 { | |
1036 return settings() && settings()->regionBasedColumnsEnabled(); | |
1037 } | |
1038 | |
1039 PassRefPtr<DOMNamedFlowCollection> Document::webkitGetNamedFlows() | |
1040 { | |
1041 if (!RuntimeEnabledFeatures::cssRegionsEnabled() || !renderView()) | |
1042 return 0; | |
1043 | |
1044 updateStyleIfNeeded(); | |
1045 | |
1046 return namedFlows()->createCSSOMSnapshot(); | |
1047 } | |
1048 | |
1049 NamedFlowCollection* Document::namedFlows() | |
1050 { | |
1051 if (!m_namedFlows) | |
1052 m_namedFlows = NamedFlowCollection::create(this); | |
1053 | |
1054 return m_namedFlows.get(); | |
1055 } | |
1056 | |
1057 PassRefPtr<Element> Document::createElementNS(const AtomicString& namespaceURI,
const AtomicString& qualifiedName, ExceptionState& exceptionState) | 1032 PassRefPtr<Element> Document::createElementNS(const AtomicString& namespaceURI,
const AtomicString& qualifiedName, ExceptionState& exceptionState) |
1058 { | 1033 { |
1059 AtomicString prefix, localName; | 1034 AtomicString prefix, localName; |
1060 if (!parseQualifiedName(qualifiedName, prefix, localName, exceptionState)) | 1035 if (!parseQualifiedName(qualifiedName, prefix, localName, exceptionState)) |
1061 return 0; | 1036 return 0; |
1062 | 1037 |
1063 QualifiedName qName(prefix, localName, namespaceURI); | 1038 QualifiedName qName(prefix, localName, namespaceURI); |
1064 if (!hasValidNamespaceForElements(qName)) { | 1039 if (!hasValidNamespaceForElements(qName)) { |
1065 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov
ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" +
qualifiedName + "')."); | 1040 exceptionState.throwDOMException(NamespaceError, "The namespace URI prov
ided ('" + namespaceURI + "') is not valid for the qualified name provided ('" +
qualifiedName + "')."); |
1066 return 0; | 1041 return 0; |
(...skipping 4250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5317 } | 5292 } |
5318 if (m_hasAutofocused) | 5293 if (m_hasAutofocused) |
5319 return; | 5294 return; |
5320 m_hasAutofocused = true; | 5295 m_hasAutofocused = true; |
5321 ASSERT(!m_autofocusElement); | 5296 ASSERT(!m_autofocusElement); |
5322 m_autofocusElement = element; | 5297 m_autofocusElement = element; |
5323 m_taskRunner->postTask(AutofocusTask::create()); | 5298 m_taskRunner->postTask(AutofocusTask::create()); |
5324 } | 5299 } |
5325 | 5300 |
5326 } // namespace WebCore | 5301 } // namespace WebCore |
OLD | NEW |