Page MenuHomePhabricator

D20188.id48196.diff
No OneTemporary

D20188.id48196.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -11,8 +11,8 @@
'conpherence.pkg.js' => '020aebcf',
'core.pkg.css' => 'f2319e1f',
'core.pkg.js' => '5c737607',
- 'differential.pkg.css' => 'b8df73d4',
- 'differential.pkg.js' => '67c9ea4c',
+ 'differential.pkg.css' => 'd3118e7c',
+ 'differential.pkg.js' => '44b9438a',
'diffusion.pkg.css' => '42c75c37',
'diffusion.pkg.js' => '91192d85',
'maniphest.pkg.css' => '35995d6d',
@@ -61,7 +61,7 @@
'rsrc/css/application/dashboard/dashboard.css' => '4267d6c6',
'rsrc/css/application/diff/inline-comment-summary.css' => '81eb368d',
'rsrc/css/application/differential/add-comment.css' => '7e5900d9',
- 'rsrc/css/application/differential/changeset-view.css' => '73660575',
+ 'rsrc/css/application/differential/changeset-view.css' => 'd14c317d',
'rsrc/css/application/differential/core.css' => 'bdb93065',
'rsrc/css/application/differential/phui-inline-comment.css' => '48acce5b',
'rsrc/css/application/differential/revision-comment.css' => '7dbc8d1d',
@@ -373,7 +373,7 @@
'rsrc/js/application/dashboard/behavior-dashboard-query-panel-select.js' => '1e413dc9',
'rsrc/js/application/dashboard/behavior-dashboard-tab-panel.js' => '9b1cbd76',
'rsrc/js/application/diff/DiffChangeset.js' => 'e7cf10d6',
- 'rsrc/js/application/diff/DiffChangesetList.js' => 'b91204e9',
+ 'rsrc/js/application/diff/DiffChangesetList.js' => '26fb79ba',
'rsrc/js/application/diff/DiffInline.js' => 'a4a14a94',
'rsrc/js/application/diff/behavior-preview-link.js' => 'f51e9c17',
'rsrc/js/application/differential/behavior-diff-radios.js' => '925fe8cd',
@@ -539,7 +539,7 @@
'conpherence-thread-manager' => 'aec8e38c',
'conpherence-transaction-css' => '3a3f5e7e',
'd3' => 'd67475f5',
- 'differential-changeset-view-css' => '73660575',
+ 'differential-changeset-view-css' => 'd14c317d',
'differential-core-view-css' => 'bdb93065',
'differential-revision-add-comment-css' => '7e5900d9',
'differential-revision-comment-css' => '7dbc8d1d',
@@ -752,7 +752,7 @@
'phabricator-darkmessage' => '26cd4b73',
'phabricator-dashboard-css' => '4267d6c6',
'phabricator-diff-changeset' => 'e7cf10d6',
- 'phabricator-diff-changeset-list' => 'b91204e9',
+ 'phabricator-diff-changeset-list' => '26fb79ba',
'phabricator-diff-inline' => 'a4a14a94',
'phabricator-drag-and-drop-file-upload' => '4370900d',
'phabricator-draggable-list' => '3c6bd549',
@@ -1085,6 +1085,10 @@
'javelin-json',
'phabricator-draggable-list',
),
+ '26fb79ba' => array(
+ 'javelin-install',
+ 'phuix-button-view',
+ ),
'27daef73' => array(
'multirow-row-manager',
'javelin-install',
@@ -1484,9 +1488,6 @@
'javelin-dom',
'javelin-uri',
),
- 73660575 => array(
- 'phui-inline-comment-view-css',
- ),
'73ecc1f8' => array(
'javelin-behavior',
'javelin-behavior-device',
@@ -1881,10 +1882,6 @@
'javelin-uri',
'phabricator-notification',
),
- 'b91204e9' => array(
- 'javelin-install',
- 'phuix-button-view',
- ),
'bd546a49' => array(
'phui-workcard-view-css',
),
@@ -1978,6 +1975,9 @@
'javelin-workflow',
'javelin-util',
),
+ 'd14c317d' => array(
+ 'phui-inline-comment-view-css',
+ ),
'd3799cb4' => array(
'javelin-install',
),
diff --git a/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php b/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
--- a/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
+++ b/src/applications/differential/render/DifferentialChangesetOneUpRenderer.php
@@ -92,19 +92,23 @@
$line = $p['line'];
$cells[] = phutil_tag(
- 'th',
+ 'td',
array(
'id' => $left_id,
- 'class' => $class,
- ),
- $line);
+ 'class' => $class.' n',
+ 'data-n' => $line,
+ ));
$render = $p['render'];
if ($aural !== null) {
$render = array($aural, $render);
}
- $cells[] = phutil_tag('th', array('class' => $class));
+ $cells[] = phutil_tag(
+ 'td',
+ array(
+ 'class' => $class.' n',
+ ));
$cells[] = $no_copy;
$cells[] = phutil_tag('td', array('class' => $class), $render);
$cells[] = $no_coverage;
@@ -115,7 +119,11 @@
} else {
$class = 'right new';
}
- $cells[] = phutil_tag('th', array('class' => $class));
+ $cells[] = phutil_tag(
+ 'td',
+ array(
+ 'class' => $class.' n',
+ ));
$aural = $aural_plus;
} else {
$class = 'right';
@@ -127,7 +135,13 @@
$oline = $p['oline'];
- $cells[] = phutil_tag('th', array('id' => $left_id), $oline);
+ $cells[] = phutil_tag(
+ 'td',
+ array(
+ 'id' => $left_id,
+ 'class' => 'n',
+ 'data-n' => $oline,
+ ));
$aural = null;
}
@@ -144,12 +158,12 @@
$line = $p['line'];
$cells[] = phutil_tag(
- 'th',
+ 'td',
array(
'id' => $right_id,
- 'class' => $class,
- ),
- $line);
+ 'class' => $class.' n',
+ 'data-n' => $line,
+ ));
$render = $p['render'];
if ($aural !== null) {
diff --git a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
--- a/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
+++ b/src/applications/differential/render/DifferentialChangesetTwoUpRenderer.php
@@ -280,10 +280,26 @@
// clipboard. See the 'phabricator-oncopy' behavior.
$zero_space = "\xE2\x80\x8B";
+ $old_number = phutil_tag(
+ 'td',
+ array(
+ 'id' => $o_id,
+ 'class' => $o_classes.' n',
+ 'data-n' => $o_num,
+ ));
+
+ $new_number = phutil_tag(
+ 'td',
+ array(
+ 'id' => $n_id,
+ 'class' => $n_classes.' n',
+ 'data-n' => $n_num,
+ ));
+
$html[] = phutil_tag('tr', array(), array(
- phutil_tag('th', array('id' => $o_id, 'class' => $o_classes), $o_num),
+ $old_number,
phutil_tag('td', array('class' => $o_classes), $o_text),
- phutil_tag('th', array('id' => $n_id, 'class' => $n_classes), $n_num),
+ $new_number,
$n_copy,
phutil_tag(
'td',
diff --git a/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php b/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
--- a/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
+++ b/src/infrastructure/diff/view/PHUIDiffOneUpInlineCommentRowScaffold.php
@@ -31,8 +31,8 @@
}
$cells = array(
- phutil_tag('th', array(), $left_hidden),
- phutil_tag('th', array(), $right_hidden),
+ phutil_tag('td', array('class' => 'n'), $left_hidden),
+ phutil_tag('td', array('class' => 'n'), $right_hidden),
phutil_tag('td', $attrs, $inline),
);
diff --git a/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php b/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
--- a/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
+++ b/src/infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php
@@ -71,9 +71,9 @@
);
$cells = array(
- phutil_tag('th', array(), $left_hidden),
+ phutil_tag('td', array('class' => 'n'), $left_hidden),
phutil_tag('td', $left_attrs, $left_side),
- phutil_tag('th', array(), $right_hidden),
+ phutil_tag('td', array('class' => 'n'), $right_hidden),
phutil_tag('td', $right_attrs, $right_side),
);
diff --git a/webroot/rsrc/css/application/differential/changeset-view.css b/webroot/rsrc/css/application/differential/changeset-view.css
--- a/webroot/rsrc/css/application/differential/changeset-view.css
+++ b/webroot/rsrc/css/application/differential/changeset-view.css
@@ -72,23 +72,6 @@
width: 0;
}
-.differential-diff th {
- text-align: right;
- padding: 1px 6px 1px 0;
- vertical-align: top;
- background: {$lightbluebackground};
- color: {$bluetext};
- cursor: pointer;
- border-right: 1px solid {$thinblueborder};
- overflow: hidden;
-
- -moz-user-select: -moz-none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
.prose-diff {
padding: 12px 0;
white-space: pre-wrap;
@@ -161,6 +144,34 @@
background: #dddddd;
}
+.differential-diff .inline > td {
+ padding: 0;
+}
+
+/* Specify line number behaviors after other behaviors because line numbers
+should always have a boring grey background. */
+
+.differential-diff td.n {
+ text-align: right;
+ padding: 1px 6px 1px 0;
+ vertical-align: top;
+ background: {$lightbluebackground};
+ color: {$bluetext};
+ cursor: pointer;
+ border-right: 1px solid {$thinblueborder};
+ overflow: hidden;
+
+ -moz-user-select: -moz-none;
+ -khtml-user-select: none;
+ -webkit-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.differential-diff td.n::before {
+ content: attr(data-n);
+}
+
.differential-diff td.cov {
padding: 0;
}
@@ -295,10 +306,6 @@
pointer-events: none;
}
-.differential-diff .inline > td {
- padding: 0;
-}
-
.differential-loading {
border-top: 1px solid {$gentle.highlight.border};
border-bottom: 1px solid {$gentle.highlight.border};
diff --git a/webroot/rsrc/js/application/diff/DiffChangesetList.js b/webroot/rsrc/js/application/diff/DiffChangesetList.js
--- a/webroot/rsrc/js/application/diff/DiffChangesetList.js
+++ b/webroot/rsrc/js/application/diff/DiffChangesetList.js
@@ -70,13 +70,13 @@
var onrangedown = JX.bind(this, this._ifawake, this._onrangedown);
JX.Stratcom.listen(
'mousedown',
- ['differential-changeset', 'tag:th'],
+ ['differential-changeset', 'tag:td'],
onrangedown);
var onrangemove = JX.bind(this, this._ifawake, this._onrangemove);
JX.Stratcom.listen(
['mouseover', 'mouseout'],
- ['differential-changeset', 'tag:th'],
+ ['differential-changeset', 'tag:td'],
onrangemove);
var onrangeup = JX.bind(this, this._ifawake, this._onrangeup);
@@ -360,7 +360,7 @@
while (row) {
var header = row.firstChild;
while (header) {
- if (JX.DOM.isType(header, 'th')) {
+ if (this.getLineNumberFromHeader(header)) {
if (header.className.indexOf('old') !== -1) {
old_list.push(header);
} else if (header.className.indexOf('new') !== -1) {
@@ -1247,11 +1247,7 @@
},
getLineNumberFromHeader: function(th) {
- try {
- return parseInt(th.id.match(/^C\d+[ON]L(\d+)$/)[1], 10);
- } catch (x) {
- return null;
- }
+ return parseInt(th.getAttribute('data-n'));
},
getDisplaySideFromHeader: function(th) {

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 25, 6:01 PM (9 h, 25 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6927346
Default Alt Text
D20188.id48196.diff (11 KB)

Event Timeline