| Summary: | Web Inspector: Regression: Showing of color swatches no longer works in Details Sidebar | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Tobias Reiss <tobi+webkit> | ||||
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, graouts, joepeck, jonowells, mattbaker, nvasilyev, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Tobias Reiss
2015-04-08 16:15:48 PDT
Created attachment 250393 [details]
patch
Comment on attachment 250393 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=250393&action=review > Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:396 > + this._codeMirror.setUniqueBookmark(codeMirrorTextMarker.find().from, swatchElement); I think codeMirrorTextMarker.find() can return null/undefined. Maybe this need a null check and early return? Comment on attachment 250393 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=250393&action=review >> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:396 >> + this._codeMirror.setUniqueBookmark(codeMirrorTextMarker.find().from, swatchElement); > > I think codeMirrorTextMarker.find() can return null/undefined. Maybe this need a null check and early return? Nit: If that's the case I would rather create a new bug because I just re-enabled the code that was here before I removed it. Just without the variable declaration that initially triggered the ESLint report. I can investigate into the missing null check afterwards, if that's okay for you? Comment on attachment 250393 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=250393&action=review >>> Source/WebInspectorUI/UserInterface/Views/CSSStyleDeclarationTextEditor.js:396 >>> + this._codeMirror.setUniqueBookmark(codeMirrorTextMarker.find().from, swatchElement); >> >> I think codeMirrorTextMarker.find() can return null/undefined. Maybe this need a null check and early return? > > Nit: If that's the case I would rather create a new bug because I just re-enabled the code that was here before I removed it. Just without the variable declaration that initially triggered the ESLint report. I can investigate into the missing null check afterwards, if that's okay for you? Fair enough. Comment on attachment 250393 [details] patch Clearing flags on attachment: 250393 Committed r182576: <http://trac.webkit.org/changeset/182576> All reviewed patches have been landed. Closing bug. |