diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
index a8bc226d64..5de9f3181e 100644
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -229,7 +229,6 @@ phutil_register_library_map(array(
'DifferentialChangesetParser' => 'applications/differential/parser/DifferentialChangesetParser.php',
'DifferentialChangesetParserTestCase' => 'applications/differential/parser/__tests__/DifferentialChangesetParserTestCase.php',
'DifferentialChangesetViewController' => 'applications/differential/controller/DifferentialChangesetViewController.php',
- 'DifferentialCodeWidthSensitiveView' => 'applications/differential/view/DifferentialCodeWidthSensitiveView.php',
'DifferentialComment' => 'applications/differential/storage/DifferentialComment.php',
'DifferentialCommentEditor' => 'applications/differential/editor/DifferentialCommentEditor.php',
'DifferentialCommentMail' => 'applications/differential/mail/DifferentialCommentMail.php',
@@ -1508,10 +1507,9 @@ phutil_register_library_map(array(
'DifferentialChangeSetTestCase' => 'PhabricatorTestCase',
'DifferentialChangeset' => 'DifferentialDAO',
'DifferentialChangesetDetailView' => 'AphrontView',
- 'DifferentialChangesetListView' => 'DifferentialCodeWidthSensitiveView',
+ 'DifferentialChangesetListView' => 'AphrontView',
'DifferentialChangesetParserTestCase' => 'ArcanistPhutilTestCase',
'DifferentialChangesetViewController' => 'DifferentialController',
- 'DifferentialCodeWidthSensitiveView' => 'AphrontView',
'DifferentialComment' =>
array(
0 => 'DifferentialDAO',
@@ -1563,7 +1561,7 @@ phutil_register_library_map(array(
'DifferentialManiphestTasksFieldSpecification' => 'DifferentialFieldSpecification',
'DifferentialNewDiffMail' => 'DifferentialReviewRequestMail',
'DifferentialPathFieldSpecification' => 'DifferentialFieldSpecification',
- 'DifferentialPrimaryPaneView' => 'DifferentialCodeWidthSensitiveView',
+ 'DifferentialPrimaryPaneView' => 'AphrontView',
'DifferentialReplyHandler' => 'PhabricatorMailReplyHandler',
'DifferentialResultsTableView' => 'AphrontView',
'DifferentialRevertPlanFieldSpecification' => 'DifferentialFieldSpecification',
diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php
index ce83be9cbc..437cd66d22 100644
--- a/src/applications/differential/controller/DifferentialChangesetViewController.php
+++ b/src/applications/differential/controller/DifferentialChangesetViewController.php
@@ -234,14 +234,11 @@ final class DifferentialChangesetViewController extends DifferentialController {
$detail->appendChild($output);
$detail->setVsChangesetID($left_source);
- $panel = id(new DifferentialPrimaryPaneView())
- ->setLineWidthFromChangesets(array($changeset));
-
+ $panel = new DifferentialPrimaryPaneView();
$panel->appendChild(phutil_render_tag('div',
array(
'class' => 'differential-review-stage',
'id' => 'differential-review-stage',
- 'style' => "max-width: {$panel->calculateSideBySideWidth()}px;"
), $detail->render())
);
diff --git a/src/applications/differential/controller/DifferentialDiffViewController.php b/src/applications/differential/controller/DifferentialDiffViewController.php
index 7a775d859e..c5bc4be9d7 100644
--- a/src/applications/differential/controller/DifferentialDiffViewController.php
+++ b/src/applications/differential/controller/DifferentialDiffViewController.php
@@ -130,14 +130,12 @@ final class DifferentialDiffViewController extends DifferentialController {
$details = id(new DifferentialChangesetListView())
->setChangesets($changesets)
->setVisibleChangesets($changesets)
- ->setLineWidthFromChangesets($changesets)
->setRenderingReferences($refs)
->setStandaloneURI('/differential/changeset/')
->setUser($request->getUser());
return $this->buildStandardPageResponse(
id(new DifferentialPrimaryPaneView())
- ->setLineWidthFromChangesets($changesets)
->appendChild(
array(
$top_panel->render(),
diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php
index 2f7f76fc7c..097d836eab 100644
--- a/src/applications/differential/controller/DifferentialRevisionViewController.php
+++ b/src/applications/differential/controller/DifferentialRevisionViewController.php
@@ -281,7 +281,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
}
$changeset_view = new DifferentialChangesetListView();
- $changeset_view->setLineWidthFromChangesets($changesets);
$changeset_view->setChangesets($changesets);
$changeset_view->setVisibleChangesets($visible_changesets);
@@ -382,7 +381,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
Javelin::initBehavior('differential-user-select');
$page_pane = id(new DifferentialPrimaryPaneView())
- ->setLineWidthFromChangesets($changesets)
->setID($pane_id)
->appendChild(
$comment_view->render().
diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php
index 4ad2c02f31..97a331fcca 100644
--- a/src/applications/differential/parser/DifferentialChangesetParser.php
+++ b/src/applications/differential/parser/DifferentialChangesetParser.php
@@ -38,7 +38,6 @@ final class DifferentialChangesetParser {
private $renderingReference;
private $isSubparser;
- private $lineWidth = 80;
private $isTopLevel;
private $coverage;
private $markupEngine;
@@ -185,17 +184,6 @@ final class DifferentialChangesetParser {
return $this;
}
- /**
- * Set the character width at which lines will be wrapped. Defaults to 80.
- *
- * @param int Hard-wrap line-width for diff display.
- * @return this
- */
- public function setLineWidth($width) {
- $this->lineWidth = $width;
- return $this;
- }
-
private function getRenderCacheKey() {
return $this->renderCacheKey;
}
@@ -204,7 +192,6 @@ final class DifferentialChangesetParser {
$this->changeset = $changeset;
$this->setFilename($changeset->getFilename());
- $this->setLineWidth($changeset->getWordWrapWidth());
return $this;
}
@@ -794,20 +781,12 @@ final class DifferentialChangesetParser {
protected function applyIntraline(&$render, $intra, $corpus) {
- $line_break = "\xE2\xAC\x85
";
-
foreach ($render as $key => $text) {
if (isset($intra[$key])) {
$render[$key] = ArcanistDiffUtils::applyIntralineDiff(
$text,
$intra[$key]);
}
- if (isset($corpus[$key]) &&
- strlen($corpus[$key]) > $this->lineWidth &&
- strlen(rtrim($corpus[$key], "\r\n")) > $this->lineWidth) {
- $lines = phutil_utf8_hard_wrap_html($render[$key], $this->lineWidth);
- $render[$key] = implode($line_break, $lines);
- }
}
}
@@ -1054,16 +1033,30 @@ final class DifferentialChangesetParser {
}
if ($file->getPHID() == $old_phid) {
$old = phutil_render_tag(
- 'img',
+ 'div',
array(
- 'src' => $file->getBestURI(),
- ));
+ 'class' => 'differential-image-stage'
+ ),
+ phutil_render_tag(
+ 'img',
+ array(
+ 'src' => $file->getBestURI(),
+ )
+ )
+ );
} else {
$cur = phutil_render_tag(
- 'img',
+ 'div',
array(
- 'src' => $file->getBestURI(),
- ));
+ 'class' => 'differential-image-stage'
+ ),
+ phutil_render_tag(
+ 'img',
+ array(
+ 'src' => $file->getBestURI(),
+ )
+ )
+ );
}
}
}
@@ -1084,28 +1077,33 @@ final class DifferentialChangesetParser {
foreach ($old_comments as $comment) {
$xhp = $this->renderInlineComment($comment);
$html_old[] =
- '