Changeset 185789 in webkit
- Timestamp:
- Jun 19, 2015, 11:20:21 PM (11 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/CSSStyleDeclarationTextEditor.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r185784 r185789 1 2015-06-19 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Duplication of style attribute in rules panel for shadow content 4 https://bugs.webkit.org/show_bug.cgi?id=146176 5 6 Reviewed by Timothy Hatcher. 7 8 * UserInterface/Views/CSSStyleDeclarationTextEditor.js: 9 The styleText can be non-empty for a readonly editor if the editor is for 10 the style attribute of a shadow dom node. Instead of assuming it is empty 11 we can just clear the editor ourselves and regenerate from properties. 12 1 13 2015-06-19 Devin Rousso <drousso@apple.com> 2 14 -
trunk/Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js
r185757 r185789 1053 1053 var findWhitespace = /\s+/g; 1054 1054 1055 // Only format non-empty styles. Keep in mind that styleText is always empty 1056 // for "readOnly" Editors. But prepare Checkbox placeholders in any case. 1057 // Because that will indent the cursor when the User starts typing. 1055 // We only need to format non-empty styles, but prepare checkbox placeholders 1056 // in any case because that will indent the cursor when the User starts typing. 1058 1057 if (!styleText && !isEditorReadOnly) { 1059 1058 this._markLinesWithCheckboxPlaceholder(); … … 1061 1060 } 1062 1061 1063 // Set non-optimized, valid and invalid styles in preparation for the Formatter. 1064 // Set empty string in case of readonly styles. 1065 this._codeMirror.setValue(styleText); 1066 1062 // Generate formatted content for readonly editors by iterating properties. 1067 1063 if (isEditorReadOnly) { 1064 this._codeMirror.setValue(""); 1068 1065 var lineNumber = 0; 1069 1066 this._iterateOverProperties(false, function(property) { … … 1075 1072 lineNumber++; 1076 1073 }); 1077 1078 1074 return; 1079 1075 } 1076 1077 // Set non-optimized, valid and invalid styles in preparation for the Formatter. 1078 this._codeMirror.setValue(styleText); 1080 1079 1081 1080 // Now the Formatter pretty prints the styles.
Note:
See TracChangeset
for help on using the changeset viewer.