+2011-01-20 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ fix goofup in http://trac.webkit.org/changeset/76082
+ https://bugs.webkit.org/show_bug.cgi?id=52830
+
+ We were showing the revision number of the patch at the bottom
+ of the diff and expanding from the bottom of the diff would fail.
+
+ Also, removed an unused variable and scoped queries appropriatly
+ to the file_diff they should have been operating on.
+
+ * PrettyPatch/PrettyPatch.rb:
+ * code-review.js:
+
2011-01-19 Ojan Vafai <ojan@chromium.org>
Reviewed by Adam Barth.
top: -11%;
}
+.revision {
+ display: none;
+}
+
.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=25"></script>
+<script src="code-review.js?version=26"></script>
EOF
def self.revisionOrDescription(string)
var expand_bar_index = 0;
if (!$(first_line).hasClass('add') && !$(first_line).hasClass('remove'))
- $('h1', file_diff).after(expandBarHtml(file_name, BELOW))
+ $('h1', file_diff).after(expandBarHtml(BELOW))
- $('br').replaceWith(expandBarHtml(file_name));
+ $('br', file_diff).replaceWith(expandBarHtml());
var last_line = file_diff.querySelector('.LineContainer:last-of-type');
// Some patches for new files somehow end up with an empty context line at the end
// with a from line number of 0. Don't show expand links in that case either.
if (!$(last_line).hasClass('add') && !$(last_line).hasClass('remove') && fromLineNumber(last_line) != 0)
- $(file_diff).append(expandBarHtml(file_name, ABOVE));
+ $('.revision', file_diff).before(expandBarHtml(ABOVE));
}
- function expandBarHtml(file_name, opt_direction) {
+ function expandBarHtml(opt_direction) {
var html = '<div class="ExpandBar">' +
'<div class="ExpandArea Expand' + ABOVE + '"></div>' +
'<div class="ExpandLinkContainer LinkContainer"><span class="ExpandText">expand: </span>';