+2011-01-14 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ put remove lines to the left of add lines in sidebyside view
+ https://bugs.webkit.org/show_bug.cgi?id=52458
+
+ Also, sneaking in a fix to make long lines with no whitespace wrap.
+
+ * PrettyPatch/PrettyPatch.rb:
+ * code-review.js:
+
2011-01-14 Ojan Vafai <ojan@chromium.org>
Fix bad merge in r75816.
border-width: 1px 0px;
}
-.LineSide {
+.sidebyside .DiffBlockPart.add:first-child {
+ float: right;
+}
+
+.LineSide,
+.sidebyside .DiffBlockPart.remove,
+.sidebyside .DiffBlockPart.add {
display:inline-block;
width:50%;
vertical-align: top;
}
+.sidebyside .DiffBlockPart.remove .to,
+.sidebyside .DiffBlockPart.add .from {
+ display: none;
+}
+
.lineNumber, .expansionLineNumber {
border-bottom: 1px solid #998;
border-right: 1px solid #ddd;
.text {
padding-left: 5px;
- white-space: pre;
white-space: pre-wrap;
+ word-wrap: break-word;
}
.image {
position: absolute;
top: -11%;
}
+
+.clear_float {
+ clear: both;
+}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-<script src="code-review.js?version=23"></script>
+<script src="code-review.js?version=24"></script>
EOF
def self.revisionOrDescription(string)
def to_html
str = "<div class='DiffBlock'>\n"
str += @parts.collect{ |part| part.to_html }.join
- str += "</div>\n"
+ str += "<div class='clear_float'></div></div>\n"
end
end
def to_html
str = "<div class='DiffBlockPart %s'>\n" % @className
str += @lines.collect{ |line| line.to_html }.join
- str += "</div>\n"
+ # Don't put white-space after this so adjacent inline-block DiffBlockParts will not wrap.
+ str += "</div>"
end
end
if (diffState(file_diff) == diff_type)
return;
+ $(file_diff).removeClass('sidebyside unified');
+ $(file_diff).addClass(diff_type);
+
$(file_diff).attr('data-diffstate', diff_type);
updateDiffLinkVisibility(file_diff);
- $('.Line', file_diff).each(function() {
+ $('.shared .Line', file_diff).each(function() {
convertLine(diff_type, this);
});