Bug 141334

Summary: Web Inspector: BasicBlockAnnotator ranges should be inclusive of both the start and end offset
Product: WebKit Reporter: Saam Barati <saam>
Component: Web InspectorAssignee: Saam Barati <saam>
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   
Bug Depends on: 141095    
Bug Blocks:    
Attachments:
Description Flags
the patch
joepeck: review+
patch none

Description Saam Barati 2015-02-06 11:11:16 PST
This should land in concert with this JSC change:
https://bugs.webkit.org/show_bug.cgi?id=141095
Comment 1 Radar WebKit Bug Importer 2015-02-06 11:11:41 PST
<rdar://problem/19747067>
Comment 2 Saam Barati 2015-02-06 11:47:30 PST
Created attachment 246168 [details]
the patch
Comment 3 Joseph Pecoraro 2015-02-06 11:50:14 PST
Comment on attachment 246168 [details]
the patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/TextEditor.js:464
> +        var options = {

Meh, could be inlined still =)
Comment 4 Saam Barati 2015-02-10 12:05:39 PST
Created attachment 246334 [details]
patch

Patch slightly changed.
I don't think CodeMirror Actually respects the inclusiveLeft/Right options.
I tried all variations of the 2^2=4 assignments to inclusiveLeft/Right and I couldn't
get the text marking to behave any differently. I couldn't figure out why this is, it may
be worth filing a bug with CodeMirror if this is indeed the case. Anyways, I found that
if you have a text range [start, end], then the range that CodeMirror actually marks is such:
[start, end).

This patch compensates for this by adding one to the end position's offset.
Comment 5 Timothy Hatcher 2015-02-10 13:10:26 PST
Comment on attachment 246334 [details]
patch

You should file a CodeMirror bug with a simple test case.
Comment 6 WebKit Commit Bot 2015-02-23 15:18:45 PST
Comment on attachment 246334 [details]
patch

Clearing flags on attachment: 246334

Committed r180526: <http://trac.webkit.org/changeset/180526>
Comment 7 WebKit Commit Bot 2015-02-23 15:18:50 PST
All reviewed patches have been landed.  Closing bug.