Editing inline styles causes a cascade of procedures ending in `fetchedStyleSheetContent` which expects the CSSStyleSheet to have a valid URL. This is never the case since inline styles neither have a "sourceURL" nor a "parent frame". Actually it looks like using the `CSSStyleSheet` class for inline styles is not what http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-htmlelementcss-h3 specifies.
<rdar://problem/20608788>
Created attachment 251139 [details] patch
Comment on attachment 251139 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=251139&action=review > Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js:-28 > - constructor(id, url, parentFrame) This change is not directly related to the bugfix. It turned out that "url" and "parentFrame" are never passed to the constructor. > Source/WebInspectorUI/UserInterface/Models/DOMNodeStyles.js:572 > + if (type === WebInspector.CSSStyleDeclaration.Type.Attribute) This fixes a linter error.
Comment on attachment 251139 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=251139&action=review Looks good! Make these tweaks and I can r+ this. > Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js:134 > + if (styleSheet.isCssInlineStyle) See below. This will need to change to: styleSheet.isInlineStyle() > Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js:87 > + get isCssInlineStyle() CSS should be all caps. No XMLHttpRequest precedent here. I don't think repeating CSS is needed either. We also don't use is for getters. This should be a function. I'd go with: isInlineStyle() > Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js:92 > + markAsCssInlineStyle() Ditto. Go with: markAsInlineStyle().
Created attachment 251637 [details] patch
Looking at the Changelog the "webkit-patch" script for some reasons generated the following: - "WebInspector.CSSStyleSheet.isInlineStyle" (not on prototype) - "WebInspector.CSSStyleSheet.prototype.markAsInlineStyle" (on prototype) But both functions are actually supposed to be on the prototype.
Comment on attachment 251637 [details] patch Nice!
Comment on attachment 251637 [details] patch Clearing flags on attachment: 251637 Committed r183311: <http://trac.webkit.org/changeset/183311>
All reviewed patches have been landed. Closing bug.