RESOLVED FIXED52377
Web Inspector: provide script column offset to frontend
https://bugs.webkit.org/show_bug.cgi?id=52377
Summary Web Inspector: provide script column offset to frontend
Pavel Podivilov
Reported 2011-01-13 10:22:57 PST
Web Inspector: provide script column offset to frontend. This is needed for script beautification and live edit in HTML.
Attachments
Patch. (13.16 KB, patch)
2011-01-13 10:24 PST, Pavel Podivilov
yurys: review-
yurys: commit-queue-
Comments addressed. (12.96 KB, patch)
2011-01-14 05:11 PST, Pavel Podivilov
yurys: review+
Pavel Podivilov
Comment 1 2011-01-13 10:24:33 PST
Yury Semikhatsky
Comment 2 2011-01-14 03:02:40 PST
Comment on attachment 78825 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=78825&action=review > Source/JavaScriptCore/parser/SourceCode.h:33 > +#include <wtf/text/TextPosition.h> Mind alphabetical order. > Source/JavaScriptCore/parser/SourceCode.h:54 > + , m_columnOffset(0) Why not pass column as additional parameter? > Source/JavaScriptCore/parser/SourceCode.h:63 > + , m_columnOffset(0) Why not pass column as additional parameter? > Source/JavaScriptCore/parser/SourceCode.h:88 > + int lineOffset() const { return m_lineOffset; } There should be only one of firstLine/lineOffset. Also offset is already used as a linear position in the source string and using the same term for line/column might confuse people.
Pavel Podivilov
Comment 3 2011-01-14 05:11:09 PST
Created attachment 78928 [details] Comments addressed.
Yury Semikhatsky
Comment 4 2011-01-14 06:23:18 PST
Comment on attachment 78928 [details] Comments addressed. View in context: https://bugs.webkit.org/attachment.cgi?id=78928&action=review > Source/WebCore/inspector/front-end/Script.js:31 > + this.lineOffset = lineOffset; Consider using the same names as in SourceCode.h for consistency. > Source/WebCore/inspector/front-end/Script.js:36 > + this.startingLine = lineOffset + 1; Please remove this field and use only lineOffset, clients should add 1 when needed.
Pavel Podivilov
Comment 5 2011-01-14 07:50:06 PST
Note You need to log in before you can comment on or make changes to this bug.