Changeset 160585 in webkit


Ignore:
Timestamp:
Dec 13, 2013 8:55:55 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Exception: TypeError: undefined is not a function (evaluating 'marker.find()')
https://bugs.webkit.org/show_bug.cgi?id=125724

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2013-12-13
Reviewed by Darin Adler.

  • UserInterface/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype.):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
The callback changed to returning WebInspector.TextMarkers, however
this class expected a raw CodeMirror marker. Since this class knows
about CodeMirror and expects to access these markers later go
directly to the CodeMirror marker.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r160557 r160585  
     12013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Exception: TypeError: undefined is not a function (evaluating 'marker.find()')
     4        https://bugs.webkit.org/show_bug.cgi?id=125724
     5
     6        Reviewed by Darin Adler.
     7
     8        * UserInterface/CSSStyleDeclarationTextEditor.js:
     9        (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
     10        (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
     11        The callback changed to returning WebInspector.TextMarkers, however
     12        this class expected a raw CodeMirror marker. Since this class knows
     13        about CodeMirror and expects to access these markers later go
     14        directly to the CodeMirror marker.
     15
    1162013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/CSSStyleDeclarationTextEditor.js

    r160483 r160585  
    401401                swatchInnerElement.style.backgroundColor = colorString;
    402402                swatchElement.appendChild(swatchInnerElement);
    403                            
    404                 var swatchMarker = this._codeMirror.setUniqueBookmark(marker.find().from, swatchElement);
    405                            
    406                 swatchInnerElement.__colorTextMarker = marker;
     403
     404                var codeMirrorTextMarker = marker.codeMirrorTextMarker;
     405                var swatchMarker = this._codeMirror.setUniqueBookmark(codeMirrorTextMarker.find().from, swatchElement);
     406
     407                swatchInnerElement.__colorTextMarker = codeMirrorTextMarker;
    407408                swatchInnerElement.__color = color;
    408409            }.bind(this));
Note: See TracChangeset for help on using the changeset viewer.