Cut last few deps on gr-diff-comment-thread

Change-Id: Ib129088c43667b148d6027479205e81773f878b4
This commit is contained in:
Ole Rehmsen
2018-11-19 21:34:32 +01:00
parent a970d4e834
commit 71e09f25a8
5 changed files with 10 additions and 11 deletions

View File

@@ -18,7 +18,6 @@ limitations under the License.
<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="../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-syntax-layer/gr-syntax-layer.html">

View File

@@ -293,7 +293,7 @@
},
_rowHasThread(row) {
return row.querySelector('gr-diff-comment-thread');
return row.querySelector('.comment-thread');
},
/**

View File

@@ -256,7 +256,7 @@
node = contentText;
column = 0;
} else {
const thread = contentTd.querySelector('gr-diff-comment-thread');
const thread = contentTd.querySelector('.comment-thread');
if (thread && thread.contains(node)) {
column = this._getLength(contentText);
node = contentText;

View File

@@ -72,9 +72,9 @@ limitations under the License.
<tr class="diff-row side-by-side" left-type="remove" right-type="add">
<td class="left lineNum" data-value="140"></td>
<!-- 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]
</gr-diff-comment-thread></td>
</div></td>
<td class="right lineNum" data-value="120"></td>
<!-- 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>
@@ -503,7 +503,7 @@ limitations under the License.
test('starts in comment thread element', () => {
const startContent = stubContent(140, 'left');
const comment = startContent.parentElement.querySelector(
'gr-diff-comment-thread');
'.comment-thread');
const endContent = stubContent(141, 'left');
emulateSelection(comment.firstChild, 2, endContent.firstChild, 4);
assert.isTrue(element.isRangeSelected());
@@ -519,7 +519,7 @@ limitations under the License.
test('ends in comment thread element', () => {
const content = stubContent(140, 'left');
const comment = content.parentElement.querySelector(
'gr-diff-comment-thread');
'.comment-thread');
emulateSelection(content.firstChild, 4, comment.firstChild, 1);
assert.isTrue(element.isRangeSelected());
assert.deepEqual(getActionRange(), {

View File

@@ -36,7 +36,7 @@ limitations under the License.
<td class="content">
<div class="contentText" data-side="left">ba ba</div>
<div data-side="left">
<div class="gr-diff-comment-thread">
<div class="comment-thread">
<div class="gr-formatted-text message">
<span id="output" class="gr-linked-text">This is a comment</span>
</div>
@@ -58,7 +58,7 @@ limitations under the License.
<td class="content">
<div class="contentText" data-side="right">more more more</div>
<div data-side="right">
<div class="gr-diff-comment-thread">
<div class="comment-thread">
<div class="gr-formatted-text message">
<span id="output" class="gr-linked-text">This is a comment on the right</span>
</div>
@@ -72,7 +72,7 @@ limitations under the License.
<td class="content">
<div class="contentText" data-side="left">ga ga</div>
<div data-side="left">
<div class="gr-diff-comment-thread">
<div class="comment-thread">
<div class="gr-formatted-text message">
<span id="output" class="gr-linked-text">This is <a>a</a> different comment 💩 unicode is fun</span>
</div>
@@ -87,7 +87,7 @@ limitations under the License.
<td class="content">
<div class="contentText" data-side="left">ga ga</div>
<div data-side="left">
<div class="gr-diff-comment-thread">
<div class="comment-thread">
<textarea data-side="right">test for textarea copying</textarea>
</div>
</div>