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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
189 #include "core/loader/appcache/ApplicationCacheHost.h" | 189 #include "core/loader/appcache/ApplicationCacheHost.h" |
190 #include "core/page/ChromeClient.h" | 190 #include "core/page/ChromeClient.h" |
191 #include "core/page/EventWithHitTestResults.h" | 191 #include "core/page/EventWithHitTestResults.h" |
192 #include "core/page/FocusController.h" | 192 #include "core/page/FocusController.h" |
193 #include "core/page/FrameTree.h" | 193 #include "core/page/FrameTree.h" |
194 #include "core/page/Page.h" | 194 #include "core/page/Page.h" |
195 #include "core/page/PointerLockController.h" | 195 #include "core/page/PointerLockController.h" |
196 #include "core/page/scrolling/RootScroller.h" | 196 #include "core/page/scrolling/RootScroller.h" |
197 #include "core/page/scrolling/ScrollingCoordinator.h" | 197 #include "core/page/scrolling/ScrollingCoordinator.h" |
198 #include "core/svg/SVGDocumentExtensions.h" | 198 #include "core/svg/SVGDocumentExtensions.h" |
199 #include "core/svg/SVGScriptElement.h" | |
199 #include "core/svg/SVGTitleElement.h" | 200 #include "core/svg/SVGTitleElement.h" |
200 #include "core/svg/SVGUseElement.h" | 201 #include "core/svg/SVGUseElement.h" |
201 #include "core/timing/DOMWindowPerformance.h" | 202 #include "core/timing/DOMWindowPerformance.h" |
202 #include "core/timing/Performance.h" | 203 #include "core/timing/Performance.h" |
203 #include "core/workers/SharedWorkerRepositoryClient.h" | 204 #include "core/workers/SharedWorkerRepositoryClient.h" |
204 #include "core/xml/parser/XMLDocumentParser.h" | 205 #include "core/xml/parser/XMLDocumentParser.h" |
205 #include "platform/DateComponents.h" | 206 #include "platform/DateComponents.h" |
206 #include "platform/EventDispatchForbiddenScope.h" | 207 #include "platform/EventDispatchForbiddenScope.h" |
207 #include "platform/Histogram.h" | 208 #include "platform/Histogram.h" |
208 #include "platform/Language.h" | 209 #include "platform/Language.h" |
(...skipping 4366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4575 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa lIgnoringCase(linkElement->rel(), openSearchRelation)) | 4576 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa lIgnoringCase(linkElement->rel(), openSearchRelation)) |
4576 continue; | 4577 continue; |
4577 if (linkElement->href().isEmpty()) | 4578 if (linkElement->href().isEmpty()) |
4578 continue; | 4579 continue; |
4579 return linkElement->href(); | 4580 return linkElement->href(); |
4580 } | 4581 } |
4581 | 4582 |
4582 return KURL(); | 4583 return KURL(); |
4583 } | 4584 } |
4584 | 4585 |
4585 HTMLScriptElement* Document::currentScriptForBinding() const | 4586 void Document::currentScriptForBinding(HTMLScriptElementOrSVGScriptElement& scri ptElement) const |
4586 { | 4587 { |
4587 if (HTMLScriptElement* script = currentScript()) | 4588 if (Element* script = currentScript()) { |
4588 return script->isInV1ShadowTree() ? nullptr : script; | 4589 if (script->isInV1ShadowTree()) |
4589 return nullptr; | 4590 return; |
4591 if (isHTMLScriptElement(script)) | |
4592 scriptElement.setHTMLScriptElement(toHTMLScriptElement(script)); | |
4593 else if (isSVGScriptElement(script)) | |
4594 scriptElement.setSVGScriptElement(toSVGScriptElement(script)); | |
4595 } | |
4590 } | 4596 } |
4591 | 4597 |
4592 void Document::pushCurrentScript(HTMLScriptElement* newCurrentScript) | 4598 void Document::pushCurrentScript(Element* newCurrentScript) |
4593 { | 4599 { |
4594 DCHECK(newCurrentScript); | 4600 DCHECK(newCurrentScript); |
4595 m_currentScriptStack.append(newCurrentScript); | 4601 m_currentScriptStack.append(newCurrentScript); |
fs
2016/05/04 08:42:54
Add a DCHECK here that |newCurrentScript| is one o
ramya.v
2016/05/04 09:35:51
Done.
| |
4596 } | 4602 } |
4597 | 4603 |
4598 void Document::popCurrentScript() | 4604 void Document::popCurrentScript() |
4599 { | 4605 { |
4600 DCHECK(!m_currentScriptStack.isEmpty()); | 4606 DCHECK(!m_currentScriptStack.isEmpty()); |
4601 m_currentScriptStack.removeLast(); | 4607 m_currentScriptStack.removeLast(); |
4602 } | 4608 } |
4603 | 4609 |
4604 void Document::setTransformSource(PassOwnPtr<TransformSource> source) | 4610 void Document::setTransformSource(PassOwnPtr<TransformSource> source) |
4605 { | 4611 { |
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5973 #ifndef NDEBUG | 5979 #ifndef NDEBUG |
5974 using namespace blink; | 5980 using namespace blink; |
5975 void showLiveDocumentInstances() | 5981 void showLiveDocumentInstances() |
5976 { | 5982 { |
5977 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5983 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5978 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5984 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5979 for (Document* document : set) | 5985 for (Document* document : set) |
5980 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); | 5986 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); |
5981 } | 5987 } |
5982 #endif | 5988 #endif |
OLD | NEW |