+2011-06-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ [reviewtool] Expanding lines "below" does not remove purple context line
+ https://bugs.webkit.org/show_bug.cgi?id=63695
+
+ Honestly, this is the last bug in the review tool that bothers me.
+
+ * PrettyPatch/PrettyPatch.rb:
+ - Jump straight to version 42, because, well, you know.
+ * code-review.js:
+ - In addition to removing the context bar when we expand all, we
+ now remove it when we expand below (but not when we expand
+ above).
+
2011-06-21 Adam Barth <abarth@webkit.org>
Reviewed by Darin Adler.
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-<script src="code-review.js?version=40"></script>
+<script src="code-review.js?version=42"></script>
EOF
def self.revisionOrDescription(string)
}
}
+ function removeContextBarBelow(expand_bar) {
+ $('.context', expand_bar.nextElementSibling).detach();
+ }
+
function expand(expand_bar, file_name, direction, amount) {
if (file_name in original_file_contents && !patched_file_contents[file_name]) {
// FIXME: In this case, try fetching the source file at the revision the patch was created at.
if (start_line_num == above_last_line_num && end_line_num == below_first_line_num) {
$('.ExpandLinkContainer', expand_bar).detach();
below_expansion.insertBefore(lines, below_expansion.firstChild);
- // Now that we're filling in all the lines, the context line following this expand bar is no longer needed.
- $('.context', expand_bar.nextElementSibling).detach();
+ removeContextBarBelow(expand_bar);
} else if (direction == ABOVE) {
above_expansion.appendChild(lines);
} else {
below_expansion.insertBefore(lines, below_expansion.firstChild);
+ removeContextBarBelow(expand_bar);
}
}