Cut last few deps on gr-diff-comment-thread
Change-Id: Ib129088c43667b148d6027479205e81773f878b4
This commit is contained in:
@@ -18,7 +18,6 @@ limitations under the License.
|
|||||||
<link rel="import" href="../../core/gr-reporting/gr-reporting.html">
|
<link rel="import" href="../../core/gr-reporting/gr-reporting.html">
|
||||||
<link rel="import" href="../../shared/gr-js-api-interface/gr-js-api-interface.html">
|
<link rel="import" href="../../shared/gr-js-api-interface/gr-js-api-interface.html">
|
||||||
<link rel="import" href="../gr-diff-processor/gr-diff-processor.html">
|
<link rel="import" href="../gr-diff-processor/gr-diff-processor.html">
|
||||||
<link rel="import" href="../gr-diff-comment-thread/gr-diff-comment-thread.html">
|
|
||||||
<link rel="import" href="../gr-ranged-comment-layer/gr-ranged-comment-layer.html">
|
<link rel="import" href="../gr-ranged-comment-layer/gr-ranged-comment-layer.html">
|
||||||
<link rel="import" href="../gr-syntax-layer/gr-syntax-layer.html">
|
<link rel="import" href="../gr-syntax-layer/gr-syntax-layer.html">
|
||||||
|
|
||||||
|
@@ -293,7 +293,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
_rowHasThread(row) {
|
_rowHasThread(row) {
|
||||||
return row.querySelector('gr-diff-comment-thread');
|
return row.querySelector('.comment-thread');
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -256,7 +256,7 @@
|
|||||||
node = contentText;
|
node = contentText;
|
||||||
column = 0;
|
column = 0;
|
||||||
} else {
|
} else {
|
||||||
const thread = contentTd.querySelector('gr-diff-comment-thread');
|
const thread = contentTd.querySelector('.comment-thread');
|
||||||
if (thread && thread.contains(node)) {
|
if (thread && thread.contains(node)) {
|
||||||
column = this._getLength(contentText);
|
column = this._getLength(contentText);
|
||||||
node = contentText;
|
node = contentText;
|
||||||
|
@@ -72,9 +72,9 @@ limitations under the License.
|
|||||||
<tr class="diff-row side-by-side" left-type="remove" right-type="add">
|
<tr class="diff-row side-by-side" left-type="remove" right-type="add">
|
||||||
<td class="left lineNum" data-value="140"></td>
|
<td class="left lineNum" data-value="140"></td>
|
||||||
<!-- Next tag is formatted to eliminate zero-length text nodes. -->
|
<!-- Next tag is formatted to eliminate zero-length text nodes. -->
|
||||||
<td class="content remove"><div class="contentText">na💢ti <hl class="foo">te, inquit</hl>, sumus <hl class="bar">aliquando</hl> otiosum, <hl>certe</hl> a <hl><span class="tab-indicator" style="tab-size:8;"> </span></hl>udiam, <hl>quid</hl> sit, <span class="tab-indicator" style="tab-size:8;"> </span>quod <hl>Epicurum</hl></div><gr-diff-comment-thread>
|
<td class="content remove"><div class="contentText">na💢ti <hl class="foo">te, inquit</hl>, sumus <hl class="bar">aliquando</hl> otiosum, <hl>certe</hl> a <hl><span class="tab-indicator" style="tab-size:8;"> </span></hl>udiam, <hl>quid</hl> sit, <span class="tab-indicator" style="tab-size:8;"> </span>quod <hl>Epicurum</hl></div><div class="comment-thread">
|
||||||
[Yet another random diff thread content here]
|
[Yet another random diff thread content here]
|
||||||
</gr-diff-comment-thread></td>
|
</div></td>
|
||||||
<td class="right lineNum" data-value="120"></td>
|
<td class="right lineNum" data-value="120"></td>
|
||||||
<!-- Next tag is formatted to eliminate zero-length text nodes. -->
|
<!-- Next tag is formatted to eliminate zero-length text nodes. -->
|
||||||
<td class="content add"><div class="contentText">nacti , <hl>,</hl> sumus <hl><span class="tab-indicator" style="tab-size:8;"> </span></hl> otiosum, <span class="tab-indicator" style="tab-size:8;"> </span> audiam, sit, quod</div></td>
|
<td class="content add"><div class="contentText">nacti , <hl>,</hl> sumus <hl><span class="tab-indicator" style="tab-size:8;"> </span></hl> otiosum, <span class="tab-indicator" style="tab-size:8;"> </span> audiam, sit, quod</div></td>
|
||||||
@@ -503,7 +503,7 @@ limitations under the License.
|
|||||||
test('starts in comment thread element', () => {
|
test('starts in comment thread element', () => {
|
||||||
const startContent = stubContent(140, 'left');
|
const startContent = stubContent(140, 'left');
|
||||||
const comment = startContent.parentElement.querySelector(
|
const comment = startContent.parentElement.querySelector(
|
||||||
'gr-diff-comment-thread');
|
'.comment-thread');
|
||||||
const endContent = stubContent(141, 'left');
|
const endContent = stubContent(141, 'left');
|
||||||
emulateSelection(comment.firstChild, 2, endContent.firstChild, 4);
|
emulateSelection(comment.firstChild, 2, endContent.firstChild, 4);
|
||||||
assert.isTrue(element.isRangeSelected());
|
assert.isTrue(element.isRangeSelected());
|
||||||
@@ -519,7 +519,7 @@ limitations under the License.
|
|||||||
test('ends in comment thread element', () => {
|
test('ends in comment thread element', () => {
|
||||||
const content = stubContent(140, 'left');
|
const content = stubContent(140, 'left');
|
||||||
const comment = content.parentElement.querySelector(
|
const comment = content.parentElement.querySelector(
|
||||||
'gr-diff-comment-thread');
|
'.comment-thread');
|
||||||
emulateSelection(content.firstChild, 4, comment.firstChild, 1);
|
emulateSelection(content.firstChild, 4, comment.firstChild, 1);
|
||||||
assert.isTrue(element.isRangeSelected());
|
assert.isTrue(element.isRangeSelected());
|
||||||
assert.deepEqual(getActionRange(), {
|
assert.deepEqual(getActionRange(), {
|
||||||
|
@@ -36,7 +36,7 @@ limitations under the License.
|
|||||||
<td class="content">
|
<td class="content">
|
||||||
<div class="contentText" data-side="left">ba ba</div>
|
<div class="contentText" data-side="left">ba ba</div>
|
||||||
<div data-side="left">
|
<div data-side="left">
|
||||||
<div class="gr-diff-comment-thread">
|
<div class="comment-thread">
|
||||||
<div class="gr-formatted-text message">
|
<div class="gr-formatted-text message">
|
||||||
<span id="output" class="gr-linked-text">This is a comment</span>
|
<span id="output" class="gr-linked-text">This is a comment</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,7 +58,7 @@ limitations under the License.
|
|||||||
<td class="content">
|
<td class="content">
|
||||||
<div class="contentText" data-side="right">more more more</div>
|
<div class="contentText" data-side="right">more more more</div>
|
||||||
<div data-side="right">
|
<div data-side="right">
|
||||||
<div class="gr-diff-comment-thread">
|
<div class="comment-thread">
|
||||||
<div class="gr-formatted-text message">
|
<div class="gr-formatted-text message">
|
||||||
<span id="output" class="gr-linked-text">This is a comment on the right</span>
|
<span id="output" class="gr-linked-text">This is a comment on the right</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,7 +72,7 @@ limitations under the License.
|
|||||||
<td class="content">
|
<td class="content">
|
||||||
<div class="contentText" data-side="left">ga ga</div>
|
<div class="contentText" data-side="left">ga ga</div>
|
||||||
<div data-side="left">
|
<div data-side="left">
|
||||||
<div class="gr-diff-comment-thread">
|
<div class="comment-thread">
|
||||||
<div class="gr-formatted-text message">
|
<div class="gr-formatted-text message">
|
||||||
<span id="output" class="gr-linked-text">This is <a>a</a> different comment 💩 unicode is fun</span>
|
<span id="output" class="gr-linked-text">This is <a>a</a> different comment 💩 unicode is fun</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,7 +87,7 @@ limitations under the License.
|
|||||||
<td class="content">
|
<td class="content">
|
||||||
<div class="contentText" data-side="left">ga ga</div>
|
<div class="contentText" data-side="left">ga ga</div>
|
||||||
<div data-side="left">
|
<div data-side="left">
|
||||||
<div class="gr-diff-comment-thread">
|
<div class="comment-thread">
|
||||||
<textarea data-side="right">test for textarea copying</textarea>
|
<textarea data-side="right">test for textarea copying</textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user