<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[207312] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/207312">207312</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-13 15:20:22 -0700 (Thu, 13 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Stepping highlight for dot/bracket expressions in if statements highlights subset of the expression
https://bugs.webkit.org/show_bug.cgi?id=163378
<rdar://problem/28749376>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-13
Reviewed by Saam Barati.
Source/JavaScriptCore:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseAssignmentExpression):
Since each expression builds on the previous, always keep the starting
location the first location.
LayoutTests:
* inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
* inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
* inspector/debugger/breakpoints/resources/dump-general.js:
* inspector/debugger/stepping/stepping-misc-expected.txt:
* inspector/debugger/stepping/stepping-misc.html:
Add tests for these kinds of special cases.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointsresolveddumpallpauselocationsexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointsresolveddumpeachlineexpectedtxt">trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggerbreakpointsresourcesdumpgeneraljs">trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-general.js</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingmiscexpectedtxt">trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordebuggersteppingsteppingmischtml">trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/ChangeLog        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-10-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Stepping highlight for dot/bracket expressions in if statements highlights subset of the expression
+ https://bugs.webkit.org/show_bug.cgi?id=163378
+ <rdar://problem/28749376>
+
+ Reviewed by Saam Barati.
+
+ * inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
+ * inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
+ * inspector/debugger/breakpoints/resources/dump-general.js:
+ * inspector/debugger/stepping/stepping-misc-expected.txt:
+ * inspector/debugger/stepping/stepping-misc.html:
+ Add tests for these kinds of special cases.
+
</ins><span class="cx"> 2016-10-13 Antoine Quint <graouts@apple.com>
</span><span class="cx">
</span><span class="cx"> [Modern Media Controls] MediaControls base class
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointsresolveddumpallpauselocationsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -1256,8 +1256,76 @@
</span><span class="cx"> 199
</span><span class="cx"> => 200 |a(a(), b());
</span><span class="cx"> 201
</span><ins>+ 202 if (o1.p1)
+ 203 a();
</ins><span class="cx">
</span><ins>+INSERTING AT: 200:1
+PAUSES AT: 202:4
+ 197 var t1 = `${1} ${x=1} ${a()}`;
+ 198 var t2 = a`${1} ${x=1} ${a()}`;
+ 199
+ -> 200 a#(a(), b());
+ 201
+ => 202 if (|o1.p1)
+ 203 a();
+ 204
+ 205 if (o1["p1"])
</ins><span class="cx">
</span><ins>+INSERTING AT: 202:5
+PAUSES AT: 203:4
+ 199
+ 200 a(a(), b());
+ 201
+ -> 202 if (o#1.p1)
+ => 203 |a();
+ 204
+ 205 if (o1["p1"])
+ 206 a();
+
+INSERTING AT: 203:5
+PAUSES AT: 205:4
+ 200 a(a(), b());
+ 201
+ 202 if (o1.p1)
+ -> 203 a#();
+ 204
+ => 205 if (|o1["p1"])
+ 206 a();
+ 207
+ 208 if (String.raw`test`)
+
+INSERTING AT: 205:5
+PAUSES AT: 206:4
+ 202 if (o1.p1)
+ 203 a();
+ 204
+ -> 205 if (o#1["p1"])
+ => 206 |a();
+ 207
+ 208 if (String.raw`test`)
+ 209 a();
+
+INSERTING AT: 206:5
+PAUSES AT: 208:4
+ 203 a();
+ 204
+ 205 if (o1["p1"])
+ -> 206 a#();
+ 207
+ => 208 if (|String.raw`test`)
+ 209 a();
+ 210
+
+INSERTING AT: 208:5
+PAUSES AT: 209:4
+ 205 if (o1["p1"])
+ 206 a();
+ 207
+ -> 208 if (S#tring.raw`test`)
+ => 209 |a();
+ 210
+
+
</ins><span class="cx"> -- Running test case: Debugger.resolvedBreakpoint.dumpAllLocations.Functions
</span><span class="cx">
</span><span class="cx"> INSERTING AT: 0:0
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointsresolveddumpeachlineexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -2926,6 +2926,8 @@
</span><span class="cx"> -> 199 #
</span><span class="cx"> => 200 |a(a(), b());
</span><span class="cx"> 201
</span><ins>+ 202 if (o1.p1)
+ 203 a();
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> INSERTING AT: 200:0
</span><span class="lines">@@ -2935,9 +2937,109 @@
</span><span class="cx"> 199
</span><span class="cx"> -=> 200 |a(a(), b());
</span><span class="cx"> 201
</span><ins>+ 202 if (o1.p1)
+ 203 a();
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> INSERTING AT: 201:0
</span><ins>+PAUSES AT: 202:4
+ 198 var t2 = a`${1} ${x=1} ${a()}`;
+ 199
+ 200 a(a(), b());
+ -> 201 #
+ => 202 if (|o1.p1)
+ 203 a();
+ 204
+ 205 if (o1["p1"])
+
+
+INSERTING AT: 202:0
+PAUSES AT: 202:4
+ 199
+ 200 a(a(), b());
+ 201
+-=> 202 #if (|o1.p1)
+ 203 a();
+ 204
+ 205 if (o1["p1"])
+
+
+INSERTING AT: 203:0
+PAUSES AT: 203:4
+ 200 a(a(), b());
+ 201
+ 202 if (o1.p1)
+-=> 203 # |a();
+ 204
+ 205 if (o1["p1"])
+ 206 a();
+
+
+INSERTING AT: 204:0
+PAUSES AT: 205:4
+ 201
+ 202 if (o1.p1)
+ 203 a();
+ -> 204 #
+ => 205 if (|o1["p1"])
+ 206 a();
+ 207
+ 208 if (String.raw`test`)
+
+
+INSERTING AT: 205:0
+PAUSES AT: 205:4
+ 202 if (o1.p1)
+ 203 a();
+ 204
+-=> 205 #if (|o1["p1"])
+ 206 a();
+ 207
+ 208 if (String.raw`test`)
+
+
+INSERTING AT: 206:0
+PAUSES AT: 206:4
+ 203 a();
+ 204
+ 205 if (o1["p1"])
+-=> 206 # |a();
+ 207
+ 208 if (String.raw`test`)
+ 209 a();
+
+
+INSERTING AT: 207:0
+PAUSES AT: 208:4
+ 204
+ 205 if (o1["p1"])
+ 206 a();
+ -> 207 #
+ => 208 if (|String.raw`test`)
+ 209 a();
+ 210
+
+
+INSERTING AT: 208:0
+PAUSES AT: 208:4
+ 205 if (o1["p1"])
+ 206 a();
+ 207
+-=> 208 #if (|String.raw`test`)
+ 209 a();
+ 210
+
+
+INSERTING AT: 209:0
+PAUSES AT: 209:4
+ 206 a();
+ 207
+ 208 if (String.raw`test`)
+-=> 209 # |a();
+ 210
+
+
+INSERTING AT: 210:0
</ins><span class="cx"> PRODUCES: Could not resolve breakpoint
</span><span class="cx">
</span><span class="cx"> -- Running test case: Debugger.resolvedBreakpoint.dumpEachLine.Functions
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggerbreakpointsresourcesdumpgeneraljs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-general.js (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-general.js        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-general.js        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -199,3 +199,12 @@
</span><span class="cx"> var t2 = a`${1} ${x=1} ${a()}`;
</span><span class="cx">
</span><span class="cx"> a(a(), b());
</span><ins>+
+if (o1.p1)
+ a();
+
+if (o1["p1"])
+ a();
+
+if (String.raw`test`)
+ a();
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingmiscexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-misc-expected.txt        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx"> -> 71 |var [w, z] = arr;
</span><span class="cx"> 72 }
</span><span class="cx"> 73
</span><del>- 74
</del><ins>+ 74 function entryIfWithDotExpression() {
</ins><span class="cx">
</span><span class="cx"> ACTION: step-in
</span><span class="cx"> PAUSE AT entryDestructuring:73:2
</span><span class="lines">@@ -484,10 +484,151 @@
</span><span class="cx"> 71 var [w, z] = arr;
</span><span class="cx"> -> 72 }|
</span><span class="cx"> 73
</span><del>- 74
- 75 // FIXME: Not Yet Tested
</del><ins>+ 74 function entryIfWithDotExpression() {
+ 75 var o = {condition: true};
</ins><span class="cx">
</span><span class="cx"> ACTION: resume
</span><span class="cx"> RESUMED
</span><span class="cx"> PASS: Should have used all steps.
</span><span class="cx">
</span><ins>+-- Running test case: Debugger.stepping.IfWithDotExpression
+EXPRESSION: setTimeout(entryIfWithDotExpression)
+STEPS: over, in, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfWithDotExpression:77:5
+ 73
+ 74 function entryIfWithDotExpression() {
+ 75 var o = {condition: true};
+ -> 76 |debugger;
+ 77 if (o.condition)
+ 78 a();
+ 79 }
+
+ACTION: step-over
+PAUSE AT entryIfWithDotExpression:78:9
+ 74 function entryIfWithDotExpression() {
+ 75 var o = {condition: true};
+ 76 debugger;
+ -> 77 if (|o.condition)
+ 78 a();
+ 79 }
+ 80
+
+ACTION: step-in
+PAUSE AT entryIfWithDotExpression:79:9
+ 75 var o = {condition: true};
+ 76 debugger;
+ 77 if (o.condition)
+ -> 78 |a();
+ 79 }
+ 80
+ 81 function entryIfWithBracketExpression() {
+
+ACTION: step-over
+PAUSE AT entryIfWithDotExpression:80:2
+ 76 debugger;
+ 77 if (o.condition)
+ 78 a();
+ -> 79 }|
+ 80
+ 81 function entryIfWithBracketExpression() {
+ 82 var o = {condition: true};
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfWithBracketExpression
+EXPRESSION: setTimeout(entryIfWithBracketExpression)
+STEPS: over, in, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfWithBracketExpression:84:5
+ 80
+ 81 function entryIfWithBracketExpression() {
+ 82 var o = {condition: true};
+ -> 83 |debugger;
+ 84 if (o["condition"])
+ 85 a();
+ 86 }
+
+ACTION: step-over
+PAUSE AT entryIfWithBracketExpression:85:9
+ 81 function entryIfWithBracketExpression() {
+ 82 var o = {condition: true};
+ 83 debugger;
+ -> 84 if (|o["condition"])
+ 85 a();
+ 86 }
+ 87
+
+ACTION: step-in
+PAUSE AT entryIfWithBracketExpression:86:9
+ 82 var o = {condition: true};
+ 83 debugger;
+ 84 if (o["condition"])
+ -> 85 |a();
+ 86 }
+ 87
+ 88 function entryIfWithTaggedTemplate() {
+
+ACTION: step-over
+PAUSE AT entryIfWithBracketExpression:87:2
+ 83 debugger;
+ 84 if (o["condition"])
+ 85 a();
+ -> 86 }|
+ 87
+ 88 function entryIfWithTaggedTemplate() {
+ 89 debugger;
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
+-- Running test case: Debugger.stepping.IfWithTaggedTemplate
+EXPRESSION: setTimeout(entryIfWithTaggedTemplate)
+STEPS: over, in, over, resume
+PAUSED (debugger-statement)
+PAUSE AT entryIfWithTaggedTemplate:90:5
+ 86 }
+ 87
+ 88 function entryIfWithTaggedTemplate() {
+ -> 89 |debugger;
+ 90 if (String.raw`test`)
+ 91 a();
+ 92 }
+
+ACTION: step-over
+PAUSE AT entryIfWithTaggedTemplate:91:9
+ 87
+ 88 function entryIfWithTaggedTemplate() {
+ 89 debugger;
+ -> 90 if (|String.raw`test`)
+ 91 a();
+ 92 }
+ 93
+
+ACTION: step-in
+PAUSE AT entryIfWithTaggedTemplate:92:9
+ 88 function entryIfWithTaggedTemplate() {
+ 89 debugger;
+ 90 if (String.raw`test`)
+ -> 91 |a();
+ 92 }
+ 93
+ 94
+
+ACTION: step-over
+PAUSE AT entryIfWithTaggedTemplate:93:2
+ 89 debugger;
+ 90 if (String.raw`test`)
+ 91 a();
+ -> 92 }|
+ 93
+ 94
+ 95 // FIXME: Not Yet Tested
+
+ACTION: resume
+RESUMED
+PASS: Should have used all steps.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsinspectordebuggersteppingsteppingmischtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/LayoutTests/inspector/debugger/stepping/stepping-misc.html        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -72,7 +72,27 @@
</span><span class="cx"> var [w, z] = arr;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function entryIfWithDotExpression() {
+ var o = {condition: true};
+ debugger;
+ if (o.condition)
+ a();
+}
</ins><span class="cx">
</span><ins>+function entryIfWithBracketExpression() {
+ var o = {condition: true};
+ debugger;
+ if (o["condition"])
+ a();
+}
+
+function entryIfWithTaggedTemplate() {
+ debugger;
+ if (String.raw`test`)
+ a();
+}
+
+
</ins><span class="cx"> // FIXME: Not Yet Tested
</span><span class="cx"> // - Iterators
</span><span class="cx"> // - Spread (...)
</span><span class="lines">@@ -188,6 +208,42 @@
</span><span class="cx"> ]
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+ addSteppingTestCase({
+ name: "Debugger.stepping.IfWithDotExpression",
+ description: "Should step to the entire expression, not the dot.",
+ expression: "setTimeout(entryIfWithDotExpression)",
+ steps: [
+ "over",
+ "in", // o.condition
+ "over", // a
+ "resume",
+ ]
+ });
+
+ addSteppingTestCase({
+ name: "Debugger.stepping.IfWithBracketExpression",
+ description: "Should step to the entire expression, not the bracket dot.",
+ expression: "setTimeout(entryIfWithBracketExpression)",
+ steps: [
+ "over",
+ "in", // o["condition"]
+ "over", // a
+ "resume",
+ ]
+ });
+
+ addSteppingTestCase({
+ name: "Debugger.stepping.IfWithTaggedTemplate",
+ description: "Should step to the entire expression, not the template.",
+ expression: "setTimeout(entryIfWithTaggedTemplate)",
+ steps: [
+ "over",
+ "in", // String.raw`test`
+ "over", // a
+ "resume",
+ ]
+ });
+
</ins><span class="cx"> loadMainPageContent().then(() => {
</span><span class="cx"> suite.runTestCasesAndFinish();
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-10-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Stepping highlight for dot/bracket expressions in if statements highlights subset of the expression
+ https://bugs.webkit.org/show_bug.cgi?id=163378
+ <rdar://problem/28749376>
+
+ Reviewed by Saam Barati.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseAssignmentExpression):
+ Since each expression builds on the previous, always keep the starting
+ location the first location.
+
</ins><span class="cx"> 2016-10-13 Per Arne Vollan <pvollan@apple.com>
</span><span class="cx">
</span><span class="cx"> [Win64] Compile fix.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (207311 => 207312)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-10-13 21:48:43 UTC (rev 207311)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-10-13 22:20:22 UTC (rev 207312)
</span><span class="lines">@@ -4484,7 +4484,7 @@
</span><span class="cx"> int initialAssignments = m_parserState.assignmentCount;
</span><span class="cx"> TreeExpression property = parseExpression(context);
</span><span class="cx"> failIfFalse(property, "Cannot parse subscript expression");
</span><del>- base = context.createBracketAccess(location, base, property, initialAssignments != m_parserState.assignmentCount, expressionStart, expressionEnd, tokenEndPosition());
</del><ins>+ base = context.createBracketAccess(startLocation, base, property, initialAssignments != m_parserState.assignmentCount, expressionStart, expressionEnd, tokenEndPosition());
</ins><span class="cx">
</span><span class="cx"> if (UNLIKELY(baseIsSuper && currentScope()->isArrowFunction()))
</span><span class="cx"> currentFunctionScope()->setInnerArrowFunctionUsesSuperProperty();
</span><span class="lines">@@ -4542,7 +4542,7 @@
</span><span class="cx"> JSTextPosition expressionEnd = lastTokenEndPosition();
</span><span class="cx"> nextExpectIdentifier(LexerFlagsIgnoreReservedWords | TreeBuilder::DontBuildKeywords);
</span><span class="cx"> matchOrFail(IDENT, "Expected a property name after '.'");
</span><del>- base = context.createDotAccess(location, base, m_token.m_data.ident, expressionStart, expressionEnd, tokenEndPosition());
</del><ins>+ base = context.createDotAccess(startLocation, base, m_token.m_data.ident, expressionStart, expressionEnd, tokenEndPosition());
</ins><span class="cx"> if (UNLIKELY(baseIsSuper && currentScope()->isArrowFunction()))
</span><span class="cx"> currentFunctionScope()->setInnerArrowFunctionUsesSuperProperty();
</span><span class="cx"> next();
</span><span class="lines">@@ -4554,7 +4554,7 @@
</span><span class="cx"> int nonLHSCount = m_parserState.nonLHSCount;
</span><span class="cx"> typename TreeBuilder::TemplateLiteral templateLiteral = parseTemplateLiteral(context, LexerType::RawStringsBuildMode::BuildRawStrings);
</span><span class="cx"> failIfFalse(templateLiteral, "Cannot parse template literal");
</span><del>- base = context.createTaggedTemplate(location, base, templateLiteral, expressionStart, expressionEnd, lastTokenEndPosition());
</del><ins>+ base = context.createTaggedTemplate(startLocation, base, templateLiteral, expressionStart, expressionEnd, lastTokenEndPosition());
</ins><span class="cx"> m_parserState.nonLHSCount = nonLHSCount;
</span><span class="cx"> break;
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>