| 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 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2483 } | 2483 } |
| 2484 | 2484 |
| 2485 m_frame->loader().checkCompleted(); | 2485 m_frame->loader().checkCompleted(); |
| 2486 } | 2486 } |
| 2487 | 2487 |
| 2488 void Document::implicitClose() | 2488 void Document::implicitClose() |
| 2489 { | 2489 { |
| 2490 ASSERT(!inStyleRecalc()); | 2490 ASSERT(!inStyleRecalc()); |
| 2491 if (processingLoadEvent() || !m_parser) | 2491 if (processingLoadEvent() || !m_parser) |
| 2492 return; | 2492 return; |
| 2493 if (frame() && frame()->navigationScheduler().locationChangePending()) | 2493 if (frame() && frame()->navigationScheduler().locationChangePending()) { |
| 2494 suppressLoadEvent(); |
| 2494 return; | 2495 return; |
| 2496 } |
| 2495 | 2497 |
| 2496 // The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cau
se it (and its | 2498 // The call to dispatchWindowLoadEvent can detach the LocalDOMWindow and cau
se it (and its |
| 2497 // attached Document) to be destroyed. | 2499 // attached Document) to be destroyed. |
| 2498 RefPtrWillBeRawPtr<LocalDOMWindow> protectedWindow(this->domWindow()); | 2500 RefPtrWillBeRawPtr<LocalDOMWindow> protectedWindow(this->domWindow()); |
| 2499 | 2501 |
| 2500 m_loadEventProgress = LoadEventInProgress; | 2502 m_loadEventProgress = LoadEventInProgress; |
| 2501 | 2503 |
| 2502 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 2504 ScriptableDocumentParser* parser = scriptableDocumentParser(); |
| 2503 m_wellFormed = parser && parser->wellFormed(); | 2505 m_wellFormed = parser && parser->wellFormed(); |
| 2504 | 2506 |
| (...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4410 | 4412 |
| 4411 void Document::applyXSLTransform(ProcessingInstruction* pi) | 4413 void Document::applyXSLTransform(ProcessingInstruction* pi) |
| 4412 { | 4414 { |
| 4413 ASSERT(!pi->isLoading()); | 4415 ASSERT(!pi->isLoading()); |
| 4414 UseCounter::count(*this, UseCounter::XSLProcessingInstruction); | 4416 UseCounter::count(*this, UseCounter::XSLProcessingInstruction); |
| 4415 RefPtrWillBeRawPtr<XSLTProcessor> processor = XSLTProcessor::create(*this); | 4417 RefPtrWillBeRawPtr<XSLTProcessor> processor = XSLTProcessor::create(*this); |
| 4416 processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet())); | 4418 processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet())); |
| 4417 String resultMIMEType; | 4419 String resultMIMEType; |
| 4418 String newSource; | 4420 String newSource; |
| 4419 String resultEncoding; | 4421 String resultEncoding; |
| 4420 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc
oding)) | 4422 setParsing(true); |
| 4423 if (!processor->transformToString(this, resultMIMEType, newSource, resultEnc
oding)) { |
| 4424 setParsing(false); |
| 4421 return; | 4425 return; |
| 4426 } |
| 4422 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). | 4427 // FIXME: If the transform failed we should probably report an error (like M
ozilla does). |
| 4423 LocalFrame* ownerFrame = frame(); | 4428 LocalFrame* ownerFrame = frame(); |
| 4424 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, this, ownerFrame); | 4429 processor->createDocumentFromSource(newSource, resultEncoding, resultMIMETyp
e, this, ownerFrame); |
| 4425 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); | 4430 InspectorInstrumentation::frameDocumentUpdated(ownerFrame); |
| 4431 setParsing(false); |
| 4426 } | 4432 } |
| 4427 | 4433 |
| 4428 void Document::setTransformSource(PassOwnPtr<TransformSource> source) | 4434 void Document::setTransformSource(PassOwnPtr<TransformSource> source) |
| 4429 { | 4435 { |
| 4430 m_transformSource = source; | 4436 m_transformSource = source; |
| 4431 } | 4437 } |
| 4432 | 4438 |
| 4433 void Document::setDesignMode(InheritedBool value) | 4439 void Document::setDesignMode(InheritedBool value) |
| 4434 { | 4440 { |
| 4435 m_designMode = value; | 4441 m_designMode = value; |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5817 #ifndef NDEBUG | 5823 #ifndef NDEBUG |
| 5818 using namespace blink; | 5824 using namespace blink; |
| 5819 void showLiveDocumentInstances() | 5825 void showLiveDocumentInstances() |
| 5820 { | 5826 { |
| 5821 WeakDocumentSet& set = liveDocumentSet(); | 5827 WeakDocumentSet& set = liveDocumentSet(); |
| 5822 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5828 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5823 for (Document* document : set) | 5829 for (Document* document : set) |
| 5824 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5830 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
| 5825 } | 5831 } |
| 5826 #endif | 5832 #endif |
| OLD | NEW |