Class HTML5::InTablePhase
In: lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb
Parent: Phase

Methods

Public Instance methods

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 89
89:     def endTagIgnore(name)
90:       parse_error("unexpected-end-tag", {"name" => name})
91:     end

[Source]

     # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 93
 93:     def endTagOther(name)
 94:       parse_error("unexpected-end-tag-implies-table-voodoo", {"name" => name})
 95:       # Make all the special element rearranging voodoo kick in
 96:       @tree.insert_from_table = true
 97:       # Process the end tag in the "in body" mode
 98:       @parser.phases[:inBody].processEndTag(name)
 99:       @tree.insert_from_table = false
100:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 69
69:     def endTagTable(name)
70:       if in_scope?('table', true)
71:         @tree.generateImpliedEndTags
72: 
73:         unless @tree.open_elements.last.name == 'table'
74:           parse_error("end-tag-too-early-named",
75:                     {"gotName" => "table",
76:                      "expectedName" => @tree.open_elements.last.name})
77:         end
78: 
79:         remove_open_elements_until('table')
80: 
81:         @parser.reset_insertion_mode
82:       else
83:         # inner_html case
84:         assert @parser.inner_html
85:         parse_error
86:       end
87:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 14
14:     def processCharacters(data)
15:       parse_error("unexpected-char-implies-table-voodoo")
16:       # Make all the special element rearranging voodoo kick in
17:       @tree.insert_from_table = true
18:       # Process the character in the "in body" mode
19:       @parser.phases[:inBody].processCharacters(data)
20:       @tree.insert_from_table = false
21:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 23
23:     def startTagCaption(name, attributes)
24:       clearStackToTableContext
25:       @tree.activeFormattingElements.push(Marker)
26:       @tree.insert_element(name, attributes)
27:       @parser.phase = @parser.phases[:inCaption]
28:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 36
36:     def startTagCol(name, attributes)
37:       startTagColgroup('colgroup', {})
38:       @parser.phase.processStartTag(name, attributes)
39:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 30
30:     def startTagColgroup(name, attributes)
31:       clearStackToTableContext
32:       @tree.insert_element(name, attributes)
33:       @parser.phase = @parser.phases[:inColumnGroup]
34:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 47
47:     def startTagImplyTbody(name, attributes)
48:       startTagRowGroup('tbody', {})
49:       @parser.phase.processStartTag(name, attributes)
50:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 59
59:     def startTagOther(name, attributes)
60:       parse_error("unexpected-start-tag-implies-table-voodoo",
61:               {"name" => name})
62:       # Make all the special element rearranging voodoo kick in
63:       @tree.insert_from_table = true
64:       # Process the start tag in the "in body" mode
65:       @parser.phases[:inBody].processStartTag(name, attributes)
66:       @tree.insert_from_table = false
67:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 41
41:     def startTagRowGroup(name, attributes)
42:       clearStackToTableContext
43:       @tree.insert_element(name, attributes)
44:       @parser.phase = @parser.phases[:inTableBody]
45:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 52
52:     def startTagTable(name, attributes)
53:       parse_error("unexpected-start-tag-implies-end-tag",
54:             {"startName" => "table", "endName" => "table"})
55:       @parser.phase.processEndTag('table')
56:       @parser.phase.processStartTag(name, attributes) unless @parser.inner_html
57:     end

Protected Instance methods

[Source]

     # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 104
104:     def clearStackToTableContext
105:       # "clear the stack back to a table context"
106:       until %w[table html].include?(name = @tree.open_elements.last.name)
107:         parse_error("unexpected-implied-end-tag-in-table",
108:                 {"name" =>  @tree.open_elements.last.name})
109:         @tree.open_elements.pop
110:       end
111:       # When the current node is <html> it's an inner_html case
112:     end

[Validate]