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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2087653003: DevTools:Don't lowercase SVG and other XML-like elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reformat test Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/elements-panel-correct-case-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index 499a0113e86e516147a40344ffc916c63f69515d..bfa5d48f9d4ca9b9b9cebba7c48672a8f29e0e29 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -349,7 +349,17 @@ WebInspector.DOMNode.prototype = {
var shadowRootType = this.shadowRootType();
if (shadowRootType)
return "#shadow-root (" + shadowRootType + ")";
- return this.isXMLNode() ? this.nodeName() : this.nodeName().toLowerCase();
+
+ // If there is no local name, it's case sensitive
+ if (!this.localName())
+ return this.nodeName();
+
+ // If the names are different lengths, there is a prefix and it's case sensitive
+ if (this.localName().length !== this.nodeName().length)
+ return this.nodeName();
+
+ // Return the localname, which will be case insensitive if its an html node
+ return this.localName();
},
/**
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/elements/elements-panel-correct-case-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698