| 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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 if (LocalDOMWindow* domWindow = this->domWindow()) | 1442 if (LocalDOMWindow* domWindow = this->domWindow()) |
| 1443 domWindow->removeAllEventListeners(); | 1443 domWindow->removeAllEventListeners(); |
| 1444 } | 1444 } |
| 1445 | 1445 |
| 1446 PassRefPtrWillBeRawPtr<DocumentParser> Document::createParser() | 1446 PassRefPtrWillBeRawPtr<DocumentParser> Document::createParser() |
| 1447 { | 1447 { |
| 1448 // FIXME(sky): Should we pass true for report errors like the inspector did? | 1448 // FIXME(sky): Should we pass true for report errors like the inspector did? |
| 1449 return HTMLDocumentParser::create(toHTMLDocument(*this), false); | 1449 return HTMLDocumentParser::create(toHTMLDocument(*this), false); |
| 1450 } | 1450 } |
| 1451 | 1451 |
| 1452 ScriptableDocumentParser* Document::scriptableDocumentParser() const | 1452 HTMLDocumentParser* Document::scriptableDocumentParser() const |
| 1453 { | 1453 { |
| 1454 return parser() ? parser()->asScriptableDocumentParser() : 0; | 1454 return parser() ? parser()->asHTMLDocumentParser() : 0; |
| 1455 } | 1455 } |
| 1456 | 1456 |
| 1457 void Document::detachParser() | 1457 void Document::detachParser() |
| 1458 { | 1458 { |
| 1459 if (!m_parser) | 1459 if (!m_parser) |
| 1460 return; | 1460 return; |
| 1461 m_parser->detach(); | 1461 m_parser->detach(); |
| 1462 m_parser.clear(); | 1462 m_parser.clear(); |
| 1463 } | 1463 } |
| 1464 | 1464 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1736 m_executeScriptsWaitingForResourcesTimer.startOneShot(0, FROM_HERE); | 1736 m_executeScriptsWaitingForResourcesTimer.startOneShot(0, FROM_HERE); |
| 1737 | 1737 |
| 1738 if (frame()) | 1738 if (frame()) |
| 1739 frame()->loaderClient()->didRemoveAllPendingStylesheet(); | 1739 frame()->loaderClient()->didRemoveAllPendingStylesheet(); |
| 1740 } | 1740 } |
| 1741 | 1741 |
| 1742 void Document::executeScriptsWaitingForResourcesTimerFired(Timer<Document>*) | 1742 void Document::executeScriptsWaitingForResourcesTimerFired(Timer<Document>*) |
| 1743 { | 1743 { |
| 1744 if (!isRenderingReady()) | 1744 if (!isRenderingReady()) |
| 1745 return; | 1745 return; |
| 1746 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) | 1746 if (HTMLDocumentParser* parser = scriptableDocumentParser()) |
| 1747 parser->executeScriptsWaitingForResources(); | 1747 parser->executeScriptsWaitingForResources(); |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 CSSStyleSheet& Document::elementSheet() | 1750 CSSStyleSheet& Document::elementSheet() |
| 1751 { | 1751 { |
| 1752 if (!m_elemSheet) | 1752 if (!m_elemSheet) |
| 1753 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); | 1753 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); |
| 1754 return *m_elemSheet; | 1754 return *m_elemSheet; |
| 1755 } | 1755 } |
| 1756 | 1756 |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2760 } | 2760 } |
| 2761 | 2761 |
| 2762 void Document::addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage) | 2762 void Document::addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage) |
| 2763 { | 2763 { |
| 2764 if (!m_frame) | 2764 if (!m_frame) |
| 2765 return; | 2765 return; |
| 2766 | 2766 |
| 2767 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { | 2767 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { |
| 2768 consoleMessage->setURL(url().string()); | 2768 consoleMessage->setURL(url().string()); |
| 2769 if (parsing() && scriptableDocumentParser()) { | 2769 if (parsing() && scriptableDocumentParser()) { |
| 2770 ScriptableDocumentParser* parser = scriptableDocumentParser(); | 2770 HTMLDocumentParser* parser = scriptableDocumentParser(); |
| 2771 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) | 2771 if (!parser->isWaitingForScripts() && !parser->isExecutingScript()) |
| 2772 consoleMessage->setLineNumber(parser->lineNumber().oneBasedInt()
); | 2772 consoleMessage->setLineNumber(parser->lineNumber().oneBasedInt()
); |
| 2773 } | 2773 } |
| 2774 } | 2774 } |
| 2775 m_frame->console().addMessage(consoleMessage); | 2775 m_frame->console().addMessage(consoleMessage); |
| 2776 } | 2776 } |
| 2777 | 2777 |
| 2778 void Document::decrementLoadEventDelayCount() | 2778 void Document::decrementLoadEventDelayCount() |
| 2779 { | 2779 { |
| 2780 ASSERT(m_loadEventDelayCount); | 2780 ASSERT(m_loadEventDelayCount); |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3273 using namespace blink; | 3273 using namespace blink; |
| 3274 void showLiveDocumentInstances() | 3274 void showLiveDocumentInstances() |
| 3275 { | 3275 { |
| 3276 WeakDocumentSet& set = liveDocumentSet(); | 3276 WeakDocumentSet& set = liveDocumentSet(); |
| 3277 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 3277 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 3278 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 3278 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 3279 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 3279 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 3280 } | 3280 } |
| 3281 } | 3281 } |
| 3282 #endif | 3282 #endif |
| OLD | NEW |