Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 144063008: Use Node.isDocumentTypeNode more (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Start using isDocumentTypeNode Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 forcePushChildren = true; 1515 forcePushChildren = true;
1516 } 1516 }
1517 break; 1517 break;
1518 } 1518 }
1519 } 1519 }
1520 } else if (node->isDocumentNode()) { 1520 } else if (node->isDocumentNode()) {
1521 Document* document = toDocument(node); 1521 Document* document = toDocument(node);
1522 value->setDocumentURL(documentURLString(document)); 1522 value->setDocumentURL(documentURLString(document));
1523 value->setBaseURL(documentBaseURLString(document)); 1523 value->setBaseURL(documentBaseURLString(document));
1524 value->setXmlVersion(document->xmlVersion()); 1524 value->setXmlVersion(document->xmlVersion());
1525 } else if (node->nodeType() == Node::DOCUMENT_TYPE_NODE) { 1525 } else if (node->isDocumentTypeNode()) {
1526 DocumentType* docType = toDocumentType(node); 1526 DocumentType* docType = toDocumentType(node);
1527 value->setPublicId(docType->publicId()); 1527 value->setPublicId(docType->publicId());
1528 value->setSystemId(docType->systemId()); 1528 value->setSystemId(docType->systemId());
1529 value->setInternalSubset(docType->internalSubset()); 1529 value->setInternalSubset(docType->internalSubset());
1530 } else if (node->isAttributeNode()) { 1530 } else if (node->isAttributeNode()) {
1531 Attr* attribute = toAttr(node); 1531 Attr* attribute = toAttr(node);
1532 value->setName(attribute->name()); 1532 value->setName(attribute->name());
1533 value->setValue(attribute->value()); 1533 value->setValue(attribute->value());
1534 } else if (node->isShadowRoot()) { 1534 } else if (node->isShadowRoot()) {
1535 value->setShadowRootType(shadowRootType(toShadowRoot(node))); 1535 value->setShadowRootType(shadowRootType(toShadowRoot(node)));
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 if (!m_documentNodeToIdMap.contains(m_document)) { 2024 if (!m_documentNodeToIdMap.contains(m_document)) {
2025 RefPtr<TypeBuilder::DOM::Node> root; 2025 RefPtr<TypeBuilder::DOM::Node> root;
2026 getDocument(errorString, root); 2026 getDocument(errorString, root);
2027 return errorString->isEmpty(); 2027 return errorString->isEmpty();
2028 } 2028 }
2029 return true; 2029 return true;
2030 } 2030 }
2031 2031
2032 } // namespace WebCore 2032 } // namespace WebCore
2033 2033
OLDNEW
« no previous file with comments | « Source/core/editing/markup.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698