| Class | HTML5::InTableBodyPhase |
| In: |
lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb
|
| Parent: | Phase |
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 66
66: def endTagIgnore(name)
67: parse_error("unexpected-end-tag-in-table-body",
68: {"name" => name})
69: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 71
71: def endTagOther(name)
72: @parser.phases[:inTable].processEndTag(name)
73: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 55
55: def endTagTable(name)
56: if in_scope?('tbody', true) or in_scope?('thead', true) or in_scope?('tfoot', true)
57: clearStackToTableBodyContext
58: endTagTableRowGroup(@tree.open_elements.last.name)
59: @parser.phase.processEndTag(name)
60: else
61: # inner_html case
62: parse_error
63: end
64: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 44
44: def endTagTableRowGroup(name)
45: if in_scope?(name, true)
46: clearStackToTableBodyContext
47: @tree.open_elements.pop
48: @parser.phase = @parser.phases[:inTable]
49: else
50: parse_error("unexpected-end-tag-in-table-body",
51: {"name" => name})
52: end
53: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 12
12: def processCharacters(data)
13: @parser.phases[:inTable].processCharacters(data)
14: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 40
40: def startTagOther(name, attributes)
41: @parser.phases[:inTable].processStartTag(name, attributes)
42: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 22
22: def startTagTableCell(name, attributes)
23: parse_error("unexpected-cell-in-table-body", {"name" => name})
24: startTagTr('tr', {})
25: @parser.phase.processStartTag(name, attributes)
26: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 28
28: def startTagTableOther(name, attributes)
29: # XXX AT Any ideas on how to share this with endTagTable?
30: if in_scope?('tbody', true) or in_scope?('thead', true) or in_scope?('tfoot', true)
31: clearStackToTableBodyContext
32: endTagTableRowGroup(@tree.open_elements.last.name)
33: @parser.phase.processStartTag(name, attributes)
34: else
35: # inner_html case
36: parse_error
37: end
38: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 16
16: def startTagTr(name, attributes)
17: clearStackToTableBodyContext
18: @tree.insert_element(name, attributes)
19: @parser.phase = @parser.phases[:inRow]
20: end
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_body_phase.rb, line 77
77: def clearStackToTableBodyContext
78: until %w[tbody tfoot thead html].include?(name = @tree.open_elements.last.name)
79: parse_error("unexpected-implied-end-tag-in-table",
80: {"name" => @tree.open_elements.last.name})
81: @tree.open_elements.pop
82: end
83: end