Class HTML5::InRowPhase
In: lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb
Parent: Phase

Methods

Public Instance methods

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 64
64:     def endTagIgnore(name)
65:       parse_error("unexpected-end-tag-in-table-row",
66:               {"name" => name})
67:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 69
69:     def endTagOther(name)
70:       @parser.phases[:inTable].processEndTag(name)
71:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 46
46:     def endTagTable(name)
47:       ignoreEndTag = ignoreEndTagTr
48:       endTagTr('tr')
49:       # Reprocess the current tag if the tr end tag was not ignored
50:       # XXX how are we sure it's always ignored in the inner_html case?
51:       @parser.phase.processEndTag(name) unless ignoreEndTag
52:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 54
54:     def endTagTableRowGroup(name)
55:       if in_scope?(name, true)
56:         endTagTr('tr')
57:         @parser.phase.processEndTag(name)
58:       else
59:         # inner_html case
60:         parse_error
61:       end
62:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 34
34:     def endTagTr(name)
35:       if ignoreEndTagTr
36:         # inner_html case
37:         assert @parser.inner_html
38:         parse_error
39:       else
40:         clearStackToTableRowContext
41:         @tree.open_elements.pop
42:         @parser.phase = @parser.phases[:inTableBody]
43:       end
44:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 12
12:     def processCharacters(data)
13:       @parser.phases[:inTable].processCharacters(data)
14:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 30
30:     def startTagOther(name, attributes)
31:       @parser.phases[:inTable].processStartTag(name, attributes)
32:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 16
16:     def startTagTableCell(name, attributes)
17:       clearStackToTableRowContext
18:       @tree.insert_element(name, attributes)
19:       @parser.phase = @parser.phases[:inCell]
20:       @tree.activeFormattingElements.push(Marker)
21:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 23
23:     def startTagTableOther(name, attributes)
24:       ignoreEndTag = ignoreEndTagTr
25:       endTagTr('tr')
26:       # XXX how are we sure it's always ignored in the inner_html case?
27:       @parser.phase.processStartTag(name, attributes) unless ignoreEndTag
28:     end

Protected Instance methods

XXX unify this with other table helper methods

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 76
76:     def clearStackToTableRowContext
77:       until %w[tr html].include?(name = @tree.open_elements.last.name)
78:         parse_error("unexpected-implied-end-tag-in-table-row",
79:                 {"name" => @tree.open_elements.last.name})
80:         @tree.open_elements.pop
81:       end
82:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 84
84:     def ignoreEndTagTr
85:       not in_scope?('tr', :tableVariant => true)
86:     end

[Validate]