Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–16 unchanged (16 lines)
17 tb.insert(t.asComment());
18 } else if (t.isDoctype()) {
19 // todo: parse error check on expected doctypes
20 // todo: quirk state check on doctype ids
21 Token.Doctype d = t.asDoctype();
22 DocumentType doctype = new DocumentType(
23 tb.settings.normalizeTag(d.getName()), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
24 tb.getDocument().appendChild(doctype);
25 if (d.isForceQuirks())
26 tb.getDocument().quirksMode(Document.QuirksMode.quirks);
27 tb.transition(BeforeHtml);
28 } else {
29 // todo: check not iframe srcdoc
…lines 30–1514 unchanged (1485 lines)

After

…lines 1–16 unchanged (16 lines)
17 tb.insert(t.asComment());
18 } else if (t.isDoctype()) {
19 // todo: parse error check on expected doctypes
20 // todo: quirk state check on doctype ids
21 Token.Doctype d = t.asDoctype();
22 DocumentType doctype = new DocumentType(
23 tb.settings.normalizeTag(d.getName()), d.getPubSysKey(), d.getPublicIdentifier(), d.getSystemIdentifier(), tb.getBaseUri());
24 tb.getDocument().appendChild(doctype);
25 if (d.isForceQuirks())
26 tb.getDocument().quirksMode(Document.QuirksMode.quirks);
27 tb.transition(BeforeHtml);
28 } else {
29 // todo: check not iframe srcdoc
…lines 30–1514 unchanged (1485 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "StringUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
block_comment "/**\n * The Tree Builder's current state. Each state embodies"...
enum_declaration
enum "enum"
identifier "HtmlTreeBuilderState"
enum_body
{ "{"
enum_constant
identifier "Initial"
class_body
{ "{"
method_declaration
boolean_type "boolean"
identifier "process"
formal_parameters
( "("
formal_parameter
type_identifier "Token"
identifier "t"
, ","
formal_parameter
type_identifier "HtmlTreeBuilder"
identifier "tb"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "isWhitespace"
argument_list
( "("
identifier "t"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
line_comment "// ignore whitespace"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "t"
. "."
identifier "isComment"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "tb"
. "."
identifier "insert"
argument_list
( "("
method_invocation
identifier "t"
. "."
identifier "asComment"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "t"
. "."
identifier "isDoctype"
argument_list
( "("
) ")"
) ")"
block
{ "{"
line_comment "// todo: parse error check on expected doctypes"
line_comment "// todo: quirk state check on doctype ids"
local_variable_declaration
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "Doctype"
variable_declarator
identifier "d"
= "="
method_invocation
identifier "t"
. "."
identifier "asDoctype"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "DocumentType"
variable_declarator
identifier "doctype"
= "="
object_creation_expression
new "new"
type_identifier "DocumentType"
argument_list
( "("
method_invocation
field_access
identifier "tb"
. "."
identifier "settings"
. "."
identifier "normalizeTag"
argument_list
( "("
method_invocation
identifier "d"
. "."
identifier "getName"
argument_list
( "("
) ")"
) ")"
, ","
method_invocation
identifier "d"
. "."
identifier "getPublicIdentifier"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "d"
. "."
identifier "getSystemIdentifier"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "tb"
. "."
identifier "getBaseUri"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
method_invocation
method_invocation
identifier "tb"
. "."
identifier "getDocument"
argument_list
( "("
) ")"
. "."
identifier "appendChild"
argument_list
( "("
identifier "doctype"
) ")"
; ";"
if_statement (+34 nodes collapsed)
expression_statement
method_invocation
identifier "tb"
. "."
identifier "transition"
argument_list
( "("
identifier "BeforeHtml"
) ")"
; ";"
} "}"
else "else"
block (+26 nodes collapsed)
return_statement
return "return"
true "true"
; ";"
} "}"
} "}"
, ","
enum_constant (+342 nodes collapsed)
, ","
enum_constant (+384 nodes collapsed)
, ","
enum_constant (+729 nodes collapsed)
, ","
enum_constant (+469 nodes collapsed)
, ","
enum_constant (+593 nodes collapsed)
, ","
enum_constant (+5990 nodes collapsed)
, ","
enum_constant (+162 nodes collapsed)
, ","
enum_constant (+1162 nodes collapsed)
, ","
enum_constant (+389 nodes collapsed)
, ","
enum_constant (+494 nodes collapsed)
, ","
enum_constant (+476 nodes collapsed)
, ","
enum_constant (+670 nodes collapsed)
, ","
enum_constant (+640 nodes collapsed)
, ","
enum_constant (+634 nodes collapsed)
, ","
enum_constant (+1002 nodes collapsed)
, ","
enum_constant (+297 nodes collapsed)
, ","
enum_constant (+305 nodes collapsed)
, ","
enum_constant (+540 nodes collapsed)
, ","
enum_constant (+311 nodes collapsed)
, ","
enum_constant (+182 nodes collapsed)
, ","
enum_constant (+219 nodes collapsed)
, ","
enum_constant (+26 nodes collapsed)
enum_body_declarations (+1350 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "StringUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
block_comment "/**\n * The Tree Builder's current state. Each state embodies"...
enum_declaration
enum "enum"
identifier "HtmlTreeBuilderState"
enum_body
{ "{"
enum_constant
identifier "Initial"
class_body
{ "{"
method_declaration
boolean_type "boolean"
identifier "process"
formal_parameters
( "("
formal_parameter
type_identifier "Token"
identifier "t"
, ","
formal_parameter
type_identifier "HtmlTreeBuilder"
identifier "tb"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "isWhitespace"
argument_list
( "("
identifier "t"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
line_comment "// ignore whitespace"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "t"
. "."
identifier "isComment"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "tb"
. "."
identifier "insert"
argument_list
( "("
method_invocation
identifier "t"
. "."
identifier "asComment"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "t"
. "."
identifier "isDoctype"
argument_list
( "("
) ")"
) ")"
block
{ "{"
line_comment "// todo: parse error check on expected doctypes"
line_comment "// todo: quirk state check on doctype ids"
local_variable_declaration
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "Doctype"
variable_declarator
identifier "d"
= "="
method_invocation
identifier "t"
. "."
identifier "asDoctype"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "DocumentType"
variable_declarator
identifier "doctype"
= "="
object_creation_expression
new "new"
type_identifier "DocumentType"
argument_list
( "("
method_invocation
field_access
identifier "tb"
. "."
identifier "settings"
. "."
identifier "normalizeTag"
argument_list
( "("
method_invocation
identifier "d"
. "."
identifier "getName"
argument_list
( "("
) ")"
) ")"
, ","
method_invocation
identifier "d"
. "."
identifier "getPubSysKey"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "d"
. "."
identifier "getPublicIdentifier"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "d"
. "."
identifier "getSystemIdentifier"
argument_list
( "("
) ")"
, ","
method_invocation
identifier "tb"
. "."
identifier "getBaseUri"
argument_list
( "("
) ")"
) ")"
; ";"
expression_statement
method_invocation
method_invocation
identifier "tb"
. "."
identifier "getDocument"
argument_list
( "("
) ")"
. "."
identifier "appendChild"
argument_list
( "("
identifier "doctype"
) ")"
; ";"
if_statement (+34 nodes collapsed)
expression_statement
method_invocation
identifier "tb"
. "."
identifier "transition"
argument_list
( "("
identifier "BeforeHtml"
) ")"
; ";"
} "}"
else "else"
block (+26 nodes collapsed)
return_statement
return "return"
true "true"
; ";"
} "}"
} "}"
, ","
enum_constant (+342 nodes collapsed)
, ","
enum_constant (+384 nodes collapsed)
, ","
enum_constant (+729 nodes collapsed)
, ","
enum_constant (+469 nodes collapsed)
, ","
enum_constant (+593 nodes collapsed)
, ","
enum_constant (+5990 nodes collapsed)
, ","
enum_constant (+162 nodes collapsed)
, ","
enum_constant (+1162 nodes collapsed)
, ","
enum_constant (+389 nodes collapsed)
, ","
enum_constant (+494 nodes collapsed)
, ","
enum_constant (+476 nodes collapsed)
, ","
enum_constant (+670 nodes collapsed)
, ","
enum_constant (+640 nodes collapsed)
, ","
enum_constant (+634 nodes collapsed)
, ","
enum_constant (+1002 nodes collapsed)
, ","
enum_constant (+297 nodes collapsed)
, ","
enum_constant (+305 nodes collapsed)
, ","
enum_constant (+540 nodes collapsed)
, ","
enum_constant (+311 nodes collapsed)
, ","
enum_constant (+182 nodes collapsed)
, ","
enum_constant (+219 nodes collapsed)
, ","
enum_constant (+26 nodes collapsed)
enum_body_declarations (+1350 nodes collapsed)
} "}"