Bug 143539

Summary: Web Inspector: Regression: Showing of color swatches no longer works in Details Sidebar
Product: WebKit Reporter: Tobias Reiss <tobi+webkit>
Component: Web InspectorAssignee: 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 Flags
patch none

Tobias Reiss
Reported 2015-04-08 16:15:48 PDT
I introduced a regression by trying to fix an ESLint issue. The ESLint report was correct but the fix was wrong. Commit that introduced the regression: http://svn.webkit.org/repository/webkit/trunk@182142 268f45cc-cd09-0410-ab3c-d52691b4dbfc https://github.com/WebKit/webkit/commit/b18ef637e495d9f64bca6e431d7ec71df8bc062d#diff-97910c4c4acd4a860a96c6592a3ab666L1013
Attachments
patch (1.89 KB, patch)
2015-04-08 16:24 PDT, Tobias Reiss
no flags
Radar WebKit Bug Importer
Comment 1 2015-04-08 16:16:22 PDT
Tobias Reiss
Comment 2 2015-04-08 16:24:02 PDT
Timothy Hatcher
Comment 3 2015-04-08 16:34:03 PDT
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?
Tobias Reiss
Comment 4 2015-04-08 16:52:47 PDT
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?
Timothy Hatcher
Comment 5 2015-04-08 17:14:56 PDT
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.
WebKit Commit Bot
Comment 6 2015-04-08 18:03:11 PDT
Comment on attachment 250393 [details] patch Clearing flags on attachment: 250393 Committed r182576: <http://trac.webkit.org/changeset/182576>
WebKit Commit Bot
Comment 7 2015-04-08 18:03:19 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.