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

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

Issue 1530153002: Change how DOM Inspector fetches document's base URL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added documentation. Created 5 years 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 | « third_party/WebKit/Source/core/dom/Document.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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 // static 1468 // static
1469 String InspectorDOMAgent::documentURLString(Document* document) 1469 String InspectorDOMAgent::documentURLString(Document* document)
1470 { 1470 {
1471 if (!document || document->url().isNull()) 1471 if (!document || document->url().isNull())
1472 return ""; 1472 return "";
1473 return document->url().string(); 1473 return document->url().string();
1474 } 1474 }
1475 1475
1476 static String documentBaseURLString(Document* document) 1476 static String documentBaseURLString(Document* document)
1477 { 1477 {
1478 return document->completeURL("").string(); 1478 return document->baseURLForOverride(document->baseURL()).string();
1479 } 1479 }
1480 1480
1481 static TypeBuilder::DOM::ShadowRootType::Enum shadowRootType(ShadowRoot* shadowR oot) 1481 static TypeBuilder::DOM::ShadowRootType::Enum shadowRootType(ShadowRoot* shadowR oot)
1482 { 1482 {
1483 switch (shadowRoot->type()) { 1483 switch (shadowRoot->type()) {
1484 case ShadowRootType::UserAgent: 1484 case ShadowRootType::UserAgent:
1485 return TypeBuilder::DOM::ShadowRootType::User_agent; 1485 return TypeBuilder::DOM::ShadowRootType::User_agent;
1486 case ShadowRootType::V0: 1486 case ShadowRootType::V0:
1487 case ShadowRootType::Open: 1487 case ShadowRootType::Open:
1488 return TypeBuilder::DOM::ShadowRootType::Open; 1488 return TypeBuilder::DOM::ShadowRootType::Open;
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 visitor->trace(m_document); 2155 visitor->trace(m_document);
2156 visitor->trace(m_revalidateTask); 2156 visitor->trace(m_revalidateTask);
2157 visitor->trace(m_searchResults); 2157 visitor->trace(m_searchResults);
2158 #endif 2158 #endif
2159 visitor->trace(m_history); 2159 visitor->trace(m_history);
2160 visitor->trace(m_domEditor); 2160 visitor->trace(m_domEditor);
2161 InspectorBaseAgent::trace(visitor); 2161 InspectorBaseAgent::trace(visitor);
2162 } 2162 }
2163 2163
2164 } // namespace blink 2164 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698