Fix unified patch view

When we moved the CSS into the CssBundle we lost the ability to
scan for style names by literal text without first looking up the
style name in the CssBundle.

Change-Id: I1e611235a8d0a5bd572cd1e9fb7474ae0dc1b05a
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2009-12-30 07:25:45 -08:00
parent 0d57df4e73
commit 7872ad0b62

View File

@@ -181,7 +181,20 @@ public class UnifiedDiffTable extends AbstractPatchContentTable {
final Iterator<PatchLine> iLine = lines.iterator();
while (iLine.hasNext()) {
final PatchLine l = iLine.next();
final String n = "DiffText-" + l.getType().name();
final String n;
switch (l.getType()) {
case CONTEXT:
n = Gerrit.RESOURCES.css().diffTextCONTEXT();
break;
case DELETE:
n = Gerrit.RESOURCES.css().diffTextDELETE();
break;
case INSERT:
n = Gerrit.RESOURCES.css().diffTextINSERT();
break;
default:
continue;
}
while (!fmt.getStyleName(row, PC).contains(n)) {
row++;
}