Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 248062 Details for
Bug 448103
[CSSLint][Outline] Outline selects wrong ranges for rule names that don't start with period
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix with tests
Bug 448103 Outline selects wrong ranges.patch (text/plain), 4.31 KB, created by
Curtis Windatt
on 2014-10-21 13:09:28 EDT
(
hide
)
Description:
Fix with tests
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2014-10-21 13:09:28 EDT
Size:
4.31 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.webtools/web/js-tests/webtools/cssOutlinerTests.js b/bundles/org.eclipse.orion.client.webtools/web/js-tests/webtools/cssOutlinerTests.js >index d191672..04e5adb 100644 >--- a/bundles/org.eclipse.orion.client.webtools/web/js-tests/webtools/cssOutlinerTests.js >+++ b/bundles/org.eclipse.orion.client.webtools/web/js-tests/webtools/cssOutlinerTests.js >@@ -43,8 +43,8 @@ > if(!element.line) { > assert.fail("The outlined element must have a line number"); > } >- if(!element.offset) { >- assert.fail("The outlied element must have an offset"); >+ if(element.offset < 0) { >+ assert.fail("The outlined element must have a valid offset"); > } > assert.equal(element.label, label, "The label is not the same"); > assert.equal(element.length, length, "The length is not the same"); >@@ -59,7 +59,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".simple", 6, 1, 1); >+ assertElement(outline[0], ".simple", 7, 1, 0); > }); > > it('test_simpleContent', function() { >@@ -69,7 +69,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".simpleContent", 13, 1, 1); >+ assertElement(outline[0], ".simpleContent", 14, 1, 0); > }); > > it('test_simpleWhitespace', function() { >@@ -79,7 +79,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".simpleWhitespace", 16, 1, 7); >+ assertElement(outline[0], ".simpleWhitespace", 17, 1, 6); > }); > > it('test_simpleComment', function() { >@@ -89,7 +89,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".simpleComment", 13, 4, 1); >+ assertElement(outline[0], ".simpleComment", 14, 4, 0); > }); > > it('test_simpleContentNoSemiColon', function() { >@@ -99,7 +99,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".simpleContentNoSemiColon", 24, 1, 1); >+ assertElement(outline[0], ".simpleContentNoSemiColon", 25, 1, 0); > }); > > it('test_simpleID', function() { >@@ -109,7 +109,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], "#simpleID", 8, 1, 1); >+ assertElement(outline[0], "#simpleID", 9, 1, 0); > }); > > it('test_multiNoSymbol', function() { >@@ -120,7 +120,7 @@ > assert.fail("There should be one outline element"); > } > // TODO cssLint returns text with three spaces for unknown reason >- assertElement(outline[0], ".multi .multi2", 5, 1, 1); >+ assertElement(outline[0], ".multi .multi2", 6, 1, 0); > }); > > it('test_multiSymbol', function() { >@@ -130,7 +130,7 @@ > if(!outline || outline.length < 1) { > assert.fail("There should be one outline element"); > } >- assertElement(outline[0], ".multiSym, .multi2", 8, 1, 1); >+ assertElement(outline[0], ".multiSym, .multi2", 9, 1, 0); > }); > /* > it('test_', function() { >diff --git a/bundles/org.eclipse.orion.client.webtools/web/webtools/cssOutliner.js b/bundles/org.eclipse.orion.client.webtools/web/webtools/cssOutliner.js >index 0549e22..2324070 100644 >--- a/bundles/org.eclipse.orion.client.webtools/web/webtools/cssOutliner.js >+++ b/bundles/org.eclipse.orion.client.webtools/web/webtools/cssOutliner.js >@@ -62,18 +62,16 @@ > if (sel.parts && sel.parts.length > 0){ > var part = sel.parts[0]; // We want to check instanceof SelectorPart, but it is not API > if (line === null) { line = part.line; } >- if (col === null) { col = part.col; } >+ if (col === null) { col = part.col-1; } > if (length === null){ > length = part.text.length; >- if (length > 0){ length--; /*length range is inclusive*/} > } > } > // If no valid parts found, just use the entire selector text > if (line === null) { line = sel.line; } >- if (col === null) { col = sel.col; } >+ if (col === null) { col = sel.col-1; } > if (length === null) { > length = sel.text.length; >- if (length > 0){ length--; /*length range is inclusive*/} > } > selectorText.push(sel.text); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 448103
:
248059
| 248062