RESOLVED FIXED Bug 143939
Web Inspector: assertion failure when editing inline styles
https://bugs.webkit.org/show_bug.cgi?id=143939
Summary Web Inspector: assertion failure when editing inline styles
Tobias Reiss
Reported 2015-04-19 16:53:41 PDT
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.
Attachments
patch (4.82 KB, patch)
2015-04-19 17:25 PDT, Tobias Reiss
no flags
patch (4.88 KB, patch)
2015-04-25 07:27 PDT, Tobias Reiss
no flags
Radar WebKit Bug Importer
Comment 1 2015-04-19 16:53:50 PDT
Tobias Reiss
Comment 2 2015-04-19 17:25:34 PDT
Tobias Reiss
Comment 3 2015-04-19 17:32:07 PDT
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.
Timothy Hatcher
Comment 4 2015-04-24 12:30:55 PDT
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().
Tobias Reiss
Comment 5 2015-04-25 07:27:06 PDT
Tobias Reiss
Comment 6 2015-04-25 07:36:27 PDT
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.
Timothy Hatcher
Comment 7 2015-04-25 08:42:09 PDT
Comment on attachment 251637 [details] patch Nice!
WebKit Commit Bot
Comment 8 2015-04-25 09:31:10 PDT
Comment on attachment 251637 [details] patch Clearing flags on attachment: 251637 Committed r183311: <http://trac.webkit.org/changeset/183311>
WebKit Commit Bot
Comment 9 2015-04-25 09:31:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.