Bug 95114 - Web Inspector: Refactor SourceFrame to delegate highlightLine() to _textEditor
Summary: Web Inspector: Refactor SourceFrame to delegate highlightLine() to _textEditor
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2012-08-27 12:07 PDT by johnjbarton
Modified: 2014-01-13 08:33 PST (History)
10 users (show)

See Also:

git format-patch (3.54 KB, patch)
2012-08-27 13:46 PDT, johnjbarton
no flags Details | Formatted Diff | Diff
Patch (4.67 KB, patch)
2012-08-27 14:18 PDT, johnjbarton
no flags Details | Formatted Diff | Diff
Patch (4.66 KB, patch)
2012-09-05 14:37 PDT, johnjbarton
pfeldman: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
Comment 4 johnjbarton 2012-09-05 14:37:35 PDT
Created attachment 162337 [details]
Comment 5 Pavel Feldman 2012-09-21 03:05:11 PDT
Comment on attachment 162337 [details]

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.