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 2372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2383 | 2383 |
| 2384 m_parser = createParser(); | 2384 m_parser = createParser(); |
| 2385 setParsingState(Parsing); | 2385 setParsingState(Parsing); |
| 2386 setReadyState(Loading); | 2386 setReadyState(Loading); |
| 2387 | 2387 |
| 2388 return m_parser; | 2388 return m_parser; |
| 2389 } | 2389 } |
| 2390 | 2390 |
| 2391 HTMLElement* Document::body() const | 2391 HTMLElement* Document::body() const |
| 2392 { | 2392 { |
| 2393 if (!documentElement()) | 2393 Element* documentElement = this->documentElement(); |
|
tkent
2014/12/15 01:09:29
Is this related to the topic of this CL?
| |
| 2394 if (!documentElement || !documentElement->hasTagName(htmlTag)) | |
| 2394 return 0; | 2395 return 0; |
| 2395 | 2396 |
| 2396 for (HTMLElement* child = Traversal<HTMLElement>::firstChild(*documentElemen t()); child; child = Traversal<HTMLElement>::nextSibling(*child)) { | 2397 for (HTMLElement* child = Traversal<HTMLElement>::firstChild(*documentElemen t); child; child = Traversal<HTMLElement>::nextSibling(*child)) { |
| 2397 if (isHTMLFrameSetElement(*child) || isHTMLBodyElement(*child)) | 2398 if (isHTMLFrameSetElement(*child) || isHTMLBodyElement(*child)) |
| 2398 return child; | 2399 return child; |
| 2399 } | 2400 } |
| 2400 | 2401 |
| 2401 return 0; | 2402 return 0; |
| 2402 } | 2403 } |
| 2403 | 2404 |
| 2404 void Document::setBody(PassRefPtrWillBeRawPtr<HTMLElement> prpNewBody, Exception State& exceptionState) | 2405 void Document::setBody(PassRefPtrWillBeRawPtr<HTMLElement> prpNewBody, Exception State& exceptionState) |
| 2405 { | 2406 { |
| 2406 RefPtrWillBeRawPtr<HTMLElement> newBody = prpNewBody; | 2407 RefPtrWillBeRawPtr<HTMLElement> newBody = prpNewBody; |
| (...skipping 3439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5846 #ifndef NDEBUG | 5847 #ifndef NDEBUG |
| 5847 using namespace blink; | 5848 using namespace blink; |
| 5848 void showLiveDocumentInstances() | 5849 void showLiveDocumentInstances() |
| 5849 { | 5850 { |
| 5850 WeakDocumentSet& set = liveDocumentSet(); | 5851 WeakDocumentSet& set = liveDocumentSet(); |
| 5851 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5852 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5852 for (Document* document : set) | 5853 for (Document* document : set) |
| 5853 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); | 5854 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); |
| 5854 } | 5855 } |
| 5855 #endif | 5856 #endif |
| OLD | NEW |