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

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

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed a null check Created 6 years, 8 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/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 .setLocalName(localName) 1526 .setLocalName(localName)
1527 .setNodeValue(nodeValue); 1527 .setNodeValue(nodeValue);
1528 1528
1529 bool forcePushChildren = false; 1529 bool forcePushChildren = false;
1530 if (node->isElementNode()) { 1530 if (node->isElementNode()) {
1531 Element* element = toElement(node); 1531 Element* element = toElement(node);
1532 value->setAttributes(buildArrayForElementAttributes(element)); 1532 value->setAttributes(buildArrayForElementAttributes(element));
1533 1533
1534 if (node->isFrameOwnerElement()) { 1534 if (node->isFrameOwnerElement()) {
1535 HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node); 1535 HTMLFrameOwnerElement* frameOwner = toHTMLFrameOwnerElement(node);
1536 if (LocalFrame* frame = frameOwner->contentFrame()) 1536 LocalFrame* frame = (frameOwner->contentFrame() && frameOwner->conte ntFrame()->isLocalFrame()) ? toLocalFrame(frameOwner->contentFrame()) : 0;
1537 if (frame)
1537 value->setFrameId(m_pageAgent->frameId(frame)); 1538 value->setFrameId(m_pageAgent->frameId(frame));
1538 if (Document* doc = frameOwner->contentDocument()) 1539 if (Document* doc = frameOwner->contentDocument())
1539 value->setContentDocument(buildObjectForNode(doc, 0, nodesMap)); 1540 value->setContentDocument(buildObjectForNode(doc, 0, nodesMap));
1540 } 1541 }
1541 1542
1542 ElementShadow* shadow = element->shadow(); 1543 ElementShadow* shadow = element->shadow();
1543 if (shadow) { 1544 if (shadow) {
1544 RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > shadowRoots = Ty peBuilder::Array<TypeBuilder::DOM::Node>::create(); 1545 RefPtr<TypeBuilder::Array<TypeBuilder::DOM::Node> > shadowRoots = Ty peBuilder::Array<TypeBuilder::DOM::Node>::create();
1545 for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = r oot->olderShadowRoot()) 1546 for (ShadowRoot* root = shadow->youngestShadowRoot(); root; root = r oot->olderShadowRoot())
1546 shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap)); 1547 shadowRoots->addItem(buildObjectForNode(root, 0, nodesMap));
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2114 if (!m_documentNodeToIdMap.contains(m_document)) { 2115 if (!m_documentNodeToIdMap.contains(m_document)) {
2115 RefPtr<TypeBuilder::DOM::Node> root; 2116 RefPtr<TypeBuilder::DOM::Node> root;
2116 getDocument(errorString, root); 2117 getDocument(errorString, root);
2117 return errorString->isEmpty(); 2118 return errorString->isEmpty();
2118 } 2119 }
2119 return true; 2120 return true;
2120 } 2121 }
2121 2122
2122 } // namespace WebCore 2123 } // namespace WebCore
2123 2124
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698