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

Side by Side Diff: Source/WebCore/inspector/front-end/StylesSidebarPane.js

Issue 9242032: Merge 105070 - Web Inspector: styles sidebar rendering is broken (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 8 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/WebCore/ChangeLog ('k') | Source/WebCore/inspector/front-end/elementsPanel.css » ('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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 mediaText = "media=\"" + media.text + "\""; 865 mediaText = "media=\"" + media.text + "\"";
866 break; 866 break;
867 case WebInspector.CSSMedia.Source.MEDIA_RULE: 867 case WebInspector.CSSMedia.Source.MEDIA_RULE:
868 mediaText = "@media " + media.text; 868 mediaText = "@media " + media.text;
869 break; 869 break;
870 case WebInspector.CSSMedia.Source.IMPORT_RULE: 870 case WebInspector.CSSMedia.Source.IMPORT_RULE:
871 mediaText = "@import " + media.text; 871 mediaText = "@import " + media.text;
872 break; 872 break;
873 } 873 }
874 874
875 var mediaTextElement = mediaDataElement.createChild("span");
876 mediaTextElement.textContent = mediaText;
877 mediaTextElement.title = media.text;
878
879 if (media.sourceURL) { 875 if (media.sourceURL) {
880 var refElement = mediaDataElement.createChild("div", "subtitle") ; 876 var refElement = mediaDataElement.createChild("div", "subtitle") ;
881 var anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, media.sourceLine < 0 ? undefined : media.sourceLine, "subtitle"); 877 var anchor = WebInspector.linkifyResourceAsNode(media.sourceURL, media.sourceLine < 0 ? undefined : media.sourceLine, "subtitle");
882 anchor.style.float = "right"; 878 anchor.style.float = "right";
883 refElement.appendChild(anchor); 879 refElement.appendChild(anchor);
884 } 880 }
881
882 var mediaTextElement = mediaDataElement.createChild("span");
883 mediaTextElement.textContent = mediaText;
884 mediaTextElement.title = media.text;
885 } 885 }
886 } 886 }
887 887
888 var selectorContainer = document.createElement("div"); 888 var selectorContainer = document.createElement("div");
889 this._selectorElement = document.createElement("span"); 889 this._selectorElement = document.createElement("span");
890 this._selectorElement.textContent = styleRule.selectorText; 890 this._selectorElement.textContent = styleRule.selectorText;
891 selectorContainer.appendChild(this._selectorElement); 891 selectorContainer.appendChild(this._selectorElement);
892 892
893 var openBrace = document.createElement("span"); 893 var openBrace = document.createElement("span");
894 openBrace.textContent = " {"; 894 openBrace.textContent = " {";
(...skipping 17 matching lines...) Expand all
912 if (this.rule.isUserAgent || this.rule.isUser) 912 if (this.rule.isUserAgent || this.rule.isUser)
913 this.editable = false; 913 this.editable = false;
914 this.titleElement.addStyleClass("styles-selector"); 914 this.titleElement.addStyleClass("styles-selector");
915 } 915 }
916 916
917 this._usedProperties = styleRule.usedProperties; 917 this._usedProperties = styleRule.usedProperties;
918 918
919 this._selectorRefElement = document.createElement("div"); 919 this._selectorRefElement = document.createElement("div");
920 this._selectorRefElement.className = "subtitle"; 920 this._selectorRefElement.className = "subtitle";
921 this._selectorRefElement.appendChild(this._createRuleOriginNode()); 921 this._selectorRefElement.appendChild(this._createRuleOriginNode());
922 selectorContainer.appendChild(this._selectorRefElement); 922 selectorContainer.insertBefore(this._selectorRefElement, selectorContainer.f irstChild);
923 this.titleElement.appendChild(selectorContainer); 923 this.titleElement.appendChild(selectorContainer);
924 924
925 if (isInherited) 925 if (isInherited)
926 this.element.addStyleClass("show-inherited"); // This one is related to inherited rules, not compted style. 926 this.element.addStyleClass("show-inherited"); // This one is related to inherited rules, not compted style.
927 927
928 if (!this.editable) 928 if (!this.editable)
929 this.element.addStyleClass("read-only"); 929 this.element.addStyleClass("read-only");
930 } 930 }
931 931
932 WebInspector.StylePropertiesSection.prototype = { 932 WebInspector.StylePropertiesSection.prototype = {
(...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 var prefix = wordRange.toString().toLowerCase(); 2344 var prefix = wordRange.toString().toLowerCase();
2345 if (!prefix && !force) 2345 if (!prefix && !force)
2346 return; 2346 return;
2347 2347
2348 var results = this._cssCompletions.startsWith(prefix); 2348 var results = this._cssCompletions.startsWith(prefix);
2349 completionsReadyCallback(results); 2349 completionsReadyCallback(results);
2350 } 2350 }
2351 } 2351 }
2352 2352
2353 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec tor.TextPrompt.prototype; 2353 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec tor.TextPrompt.prototype;
OLDNEW
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | Source/WebCore/inspector/front-end/elementsPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698