Bug 95114

Summary: Web Inspector: Refactor SourceFrame to delegate highlightLine() to _textEditor
Product: WebKit Reporter: johnjbarton <johnjbarton>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: apavlov, bburg, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
git format-patch
none
Patch
none
Patch pfeldman: review-

Description johnjbarton 2012-08-27 12:07:56 PDT
One path to accomplish Bug 93444 - Web Inspector: SourceFrame shouldn't be a View 
would move the View methods in SourceFrame to _textEditor.  One set of such methods is
  highlightLine() canHighlightLine()

clearLineHighlight() is not a View method but it is part of DefaultTextEditor.
Comment 1 johnjbarton 2012-08-27 13:46:15 PDT
Created attachment 160794 [details]
git format-patch 

I am not able to get webkit-patch upload to work
Comment 2 johnjbarton 2012-08-27 13:55:10 PDT
ChangeLog message:

Incremental step towards bug 93444. Refactor SourceFrame methods related to highlightLine() to delegate to its ._textEditor, a View object. DefaultTextEditor gets a new method as the delegatee, canHighlightLine().

No change in function; no new tests; compile-front-end.py passes these files.
Comment 3 johnjbarton 2012-08-27 14:18:34 PDT
Created attachment 160804 [details]
Patch
Comment 4 johnjbarton 2012-09-05 14:37:35 PDT
Created attachment 162337 [details]
Patch
Comment 5 Pavel Feldman 2012-09-21 03:05:11 PDT
Comment on attachment 162337 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=162337&action=review

> Source/WebCore/inspector/front-end/SourceFrame.js:173
> +        return this._textEditor.canHighlightLine();

SourceFrame should be always able to highlight the line.

> Source/WebCore/inspector/front-end/SourceFrame.js:-193
> -                delete this._lineToHighlight

What about the case when we get request for the line highlight before the content has loaded into the text editor? Like stopping on a breakpoint that leads to the SourceFrame being opened.