[Webkit-unassigned] [Bug 26210] PrettyPatch should display added images inline
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 5 07:38:35 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26210
aroben at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #30997|review? |review+
Flag| |
------- Comment #6 from aroben at apple.com 2009-06-05 07:38 PDT -------
(From update of attachment 30997)
> +.image {
> + border: 2px solid black;
> +}
Why not just key this off the img tag?
> +
> .context, .context .lineNumber {
> color: #849;
> background-color: #fef;
> @@ -191,17 +197,25 @@ EOF
> break
> when BINARY_FILE_MARKER_FORMAT
> @binary = true
> + if (IMAGE_FILE_MARKER_FORMAT.match(lines[i + 1])) then
This will probably do something bad on the last iteration of the loop when i ==
lines.length - 1. But maybe we know that isn't the case given that we just saw
a binary file marker?
> + lines_with_contents = lines[startOfSections...lines.length]
> + @sections = DiffSection.parse(lines_with_contents) unless @binary
> + @image_url = "data:image/png;base64," + lines_with_contents.join if @image
I'm surprised you didn't have to chomp the newlines off each line.
> + if @image then
> + str += "<img class='image' src='" + @image_url + "' />"
No need for the space or the slash before the right angle bracket.
r=me
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list