| OLD | NEW |
| 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 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 .setLocalName(localName) | 1490 .setLocalName(localName) |
| 1491 .setNodeValue(nodeValue); | 1491 .setNodeValue(nodeValue); |
| 1492 | 1492 |
| 1493 bool forcePushChildren = false; | 1493 bool forcePushChildren = false; |
| 1494 if (node->isElementNode()) { | 1494 if (node->isElementNode()) { |
| 1495 Element* element = toElement(node); | 1495 Element* element = toElement(node); |
| 1496 value->setAttributes(buildArrayForElementAttributes(element)); | 1496 value->setAttributes(buildArrayForElementAttributes(element)); |
| 1497 | 1497 |
| 1498 if (node->isFrameOwnerElement()) { | 1498 if (node->isFrameOwnerElement()) { |
| 1499 HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node); | 1499 HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node); |
| 1500 if (LocalFrame* frame = frameOwner->contentFrame()) | 1500 LocalFrame* frame = (frameOwner->contentFrame() && frameOwner->conte
ntFrame()->isLocalFrame()) ? toLocalFrame(frameOwner->contentFrame()) : 0; |
| 1501 if (frame) |
| 1501 value->setFrameId(m_pageAgent->frameId(frame)); | 1502 value->setFrameId(m_pageAgent->frameId(frame)); |
| 1502 if (Document* doc = frameOwner->contentDocument()) | 1503 if (Document* doc = frameOwner->contentDocument()) |
| 1503 value->setContentDocument(buildObjectForNode(doc, 0, nodesMap)); | 1504 value->setContentDocument(buildObjectForNode(doc, 0, nodesMap)); |
| 1504 } | 1505 } |
| 1505 | 1506 |
| 1506 ElementShadow* shadow = element->shadow(); | 1507 ElementShadow* shadow = element->shadow(); |
| 1507 if (shadow) { | 1508 if (shadow) { |
| 1508 RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > shadowRoots = Ty
peBuilder::Array<TypeBuilder::DOM::Node>::create(); | 1509 RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > shadowRoots = Ty
peBuilder::Array<TypeBuilder::DOM::Node>::create(); |
| 1509 for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = r
oot->olderShadowRoot()) | 1510 for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = r
oot->olderShadowRoot()) |
| 1510 shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap)); | 1511 shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap)); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 if (!m_documentNodeToIdMap.contains(m_document)) { | 2052 if (!m_documentNodeToIdMap.contains(m_document)) { |
| 2052 RefPtr<TypeBuilder::DOM::Node> root; | 2053 RefPtr<TypeBuilder::DOM::Node> root; |
| 2053 getDocument(errorString, root); | 2054 getDocument(errorString, root); |
| 2054 return errorString->isEmpty(); | 2055 return errorString->isEmpty(); |
| 2055 } | 2056 } |
| 2056 return true; | 2057 return true; |
| 2057 } | 2058 } |
| 2058 | 2059 |
| 2059 } // namespace WebCore | 2060 } // namespace WebCore |
| 2060 | 2061 |
| OLD | NEW |