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 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2487 } | 2487 } |
2488 | 2488 |
2489 m_frame->loader().checkCompleted(); | 2489 m_frame->loader().checkCompleted(); |
2490 } | 2490 } |
2491 | 2491 |
2492 void Document::implicitClose() | 2492 void Document::implicitClose() |
2493 { | 2493 { |
2494 ASSERT(!inStyleRecalc()); | 2494 ASSERT(!inStyleRecalc()); |
2495 if (processingLoadEvent() || !m_parser) | 2495 if (processingLoadEvent() || !m_parser) |
2496 return; | 2496 return; |
2497 if (frame() && frame()->navigationScheduler().locationChangePending()) | 2497 if (frame() && frame()->navigationScheduler().locationChangePending()) { |
2498 suppressLoadEvent(); | |
2498 return; | 2499 return; |
2500 } | |
2499 | 2501 |
2500 // The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cau se it (and its | 2502 // The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cau se it (and its |
2501 // attached Document) to be destroyed. | 2503 // attached Document) to be destroyed. |
2502 RefPtrWillBeRawPtr<LocalDOMWindow> protectedWindow(this->domWindow()); | 2504 RefPtrWillBeRawPtr<LocalDOMWindow> protectedWindow(this->domWindow()); |
2503 | 2505 |
2504 m_loadEventProgress = LoadEventInProgress; | 2506 m_loadEventProgress = LoadEventInProgress; |
2505 | 2507 |
2506 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 2508 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
2507 m_wellFormed = parser && parser->wellFormed(); | 2509 m_wellFormed = parser && parser->wellFormed(); |
2508 | 2510 |
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4420 | 4422 |
4421 void Document::applyXSLTransform(ProcessingInstruction* pi) | 4423 void Document::applyXSLTransform(ProcessingInstruction* pi) |
4422 { | 4424 { |
4423 ASSERT(!pi->isLoading()); | 4425 ASSERT(!pi->isLoading()); |
4424 UseCounter::count(*this, UseCounter::XSLProcessingInstruction); | 4426 UseCounter::count(*this, UseCounter::XSLProcessingInstruction); |
4425 RefPtrWillBeRawPtr<XSLTProcessor> processor = XSLTProcessor::create(*this); | 4427 RefPtrWillBeRawPtr<XSLTProcessor> processor = XSLTProcessor::create(*this); |
4426 processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet())); | 4428 processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet())); |
4427 String resultMIMEType; | 4429 String resultMIMEType; |
4428 String newSource; | 4430 String newSource; |
4429 String resultEncoding; | 4431 String resultEncoding; |
4430 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc oding)) | 4432 setParsing(true); |
Nate Chapin
2014/09/15 23:39:34
XSLT is processed after the main xml document has
| |
4433 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc oding)) { | |
4434 setParsing(false); | |
4431 return; | 4435 return; |
4436 } | |
4432 // FIXME: If the transform failed we should probably report an error (like M ozilla does). | 4437 // FIXME: If the transform failed we should probably report an error (like M ozilla does). |
4433 LocalFrame* ownerFrame = frame(); | 4438 LocalFrame* ownerFrame = frame(); |
4434 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp e, this, ownerFrame); | 4439 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp e, this, ownerFrame); |
4435 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); | 4440 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); |
4441 setParsing(false); | |
4436 } | 4442 } |
4437 | 4443 |
4438 void Document::setTransformSource(PassOwnPtr<TransformSource> source) | 4444 void Document::setTransformSource(PassOwnPtr<TransformSource> source) |
4439 { | 4445 { |
4440 m_transformSource = source; | 4446 m_transformSource = source; |
4441 } | 4447 } |
4442 | 4448 |
4443 void Document::setDesignMode(InheritedBool value) | 4449 void Document::setDesignMode(InheritedBool value) |
4444 { | 4450 { |
4445 m_designMode = value; | 4451 m_designMode = value; |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5827 using namespace blink; | 5833 using namespace blink; |
5828 void showLiveDocumentInstances() | 5834 void showLiveDocumentInstances() |
5829 { | 5835 { |
5830 WeakDocumentSet& set = liveDocumentSet(); | 5836 WeakDocumentSet& set = liveDocumentSet(); |
5831 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5837 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5832 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { | 5838 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { |
5833 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); | 5839 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); |
5834 } | 5840 } |
5835 } | 5841 } |
5836 #endif | 5842 #endif |
OLD | NEW |