Chromium Code Reviews| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 #include "core/html/HTMLBodyElement.h" | 116 #include "core/html/HTMLBodyElement.h" |
| 117 #include "core/html/HTMLCanvasElement.h" | 117 #include "core/html/HTMLCanvasElement.h" |
| 118 #include "core/html/HTMLCollection.h" | 118 #include "core/html/HTMLCollection.h" |
| 119 #include "core/html/HTMLDocument.h" | 119 #include "core/html/HTMLDocument.h" |
| 120 #include "core/html/HTMLFrameOwnerElement.h" | 120 #include "core/html/HTMLFrameOwnerElement.h" |
| 121 #include "core/html/HTMLHeadElement.h" | 121 #include "core/html/HTMLHeadElement.h" |
| 122 #include "core/html/HTMLIFrameElement.h" | 122 #include "core/html/HTMLIFrameElement.h" |
| 123 #include "core/html/HTMLLinkElement.h" | 123 #include "core/html/HTMLLinkElement.h" |
| 124 #include "core/html/HTMLMapElement.h" | 124 #include "core/html/HTMLMapElement.h" |
| 125 #include "core/html/HTMLNameCollection.h" | 125 #include "core/html/HTMLNameCollection.h" |
| 126 #include "core/html/HTMLScriptElement.h" | |
| 126 #include "core/html/HTMLStyleElement.h" | 127 #include "core/html/HTMLStyleElement.h" |
| 127 #include "core/html/HTMLTitleElement.h" | 128 #include "core/html/HTMLTitleElement.h" |
| 128 #include "core/html/PluginDocument.h" | 129 #include "core/html/PluginDocument.h" |
| 129 #include "core/html/parser/HTMLDocumentParser.h" | 130 #include "core/html/parser/HTMLDocumentParser.h" |
| 130 #include "core/html/parser/HTMLParserIdioms.h" | 131 #include "core/html/parser/HTMLParserIdioms.h" |
| 131 #include "core/html/parser/NestingLevelIncrementer.h" | 132 #include "core/html/parser/NestingLevelIncrementer.h" |
| 132 #include "core/inspector/InspectorCounters.h" | 133 #include "core/inspector/InspectorCounters.h" |
| 133 #include "core/inspector/InspectorInstrumentation.h" | 134 #include "core/inspector/InspectorInstrumentation.h" |
| 134 #include "core/inspector/ScriptCallStack.h" | 135 #include "core/inspector/ScriptCallStack.h" |
| 135 #include "core/loader/CookieJar.h" | 136 #include "core/loader/CookieJar.h" |
| (...skipping 3776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3912 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa lIgnoringCase(linkElement->rel(), openSearchRelation)) | 3913 if (!equalIgnoringCase(linkElement->type(), openSearchMIMEType) || !equa lIgnoringCase(linkElement->rel(), openSearchRelation)) |
| 3913 continue; | 3914 continue; |
| 3914 if (linkElement->href().isEmpty()) | 3915 if (linkElement->href().isEmpty()) |
| 3915 continue; | 3916 continue; |
| 3916 return linkElement->href(); | 3917 return linkElement->href(); |
| 3917 } | 3918 } |
| 3918 | 3919 |
| 3919 return KURL(); | 3920 return KURL(); |
| 3920 } | 3921 } |
| 3921 | 3922 |
| 3923 void Document::setCurrentScript(PassRefPtr<HTMLScriptElement> newCurrentScript) | |
| 3924 { | |
| 3925 if (!newCurrentScript) { | |
| 3926 m_currentScript.clear(); | |
|
esprehn
2013/05/14 22:50:09
We usually prefer to do these in separate methods
| |
| 3927 return; | |
| 3928 } | |
| 3929 | |
| 3930 m_currentScript = newCurrentScript; | |
| 3931 } | |
| 3932 | |
| 3922 void Document::applyXSLTransform(ProcessingInstruction* pi) | 3933 void Document::applyXSLTransform(ProcessingInstruction* pi) |
| 3923 { | 3934 { |
| 3924 RefPtr<XSLTProcessor> processor = XSLTProcessor::create(); | 3935 RefPtr<XSLTProcessor> processor = XSLTProcessor::create(); |
| 3925 processor->setXSLStyleSheet(static_cast<XSLStyleSheet*>(pi->sheet())); | 3936 processor->setXSLStyleSheet(static_cast<XSLStyleSheet*>(pi->sheet())); |
| 3926 String resultMIMEType; | 3937 String resultMIMEType; |
| 3927 String newSource; | 3938 String newSource; |
| 3928 String resultEncoding; | 3939 String resultEncoding; |
| 3929 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc oding)) | 3940 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc oding)) |
| 3930 return; | 3941 return; |
| 3931 // FIXME: If the transform failed we should probably report an error (like M ozilla does). | 3942 // FIXME: If the transform failed we should probably report an error (like M ozilla does). |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5628 return; | 5639 return; |
| 5629 | 5640 |
| 5630 Vector<RefPtr<Element> > associatedFormControls; | 5641 Vector<RefPtr<Element> > associatedFormControls; |
| 5631 copyToVector(m_associatedFormControls, associatedFormControls); | 5642 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5632 | 5643 |
| 5633 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); | 5644 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); |
| 5634 m_associatedFormControls.clear(); | 5645 m_associatedFormControls.clear(); |
| 5635 } | 5646 } |
| 5636 | 5647 |
| 5637 } // namespace WebCore | 5648 } // namespace WebCore |
| OLD | NEW |