Parent

Class/Module Index [+]

Quicksearch

HTML5::InTablePhase

Public Instance Methods

endTagIgnore(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 89
def endTagIgnore(name)
  parse_error("unexpected-end-tag", {"name" => name})
end
endTagOther(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 93
def endTagOther(name)
  parse_error("unexpected-end-tag-implies-table-voodoo", {"name" => name})
  # Make all the special element rearranging voodoo kick in
  @tree.insert_from_table = true
  # Process the end tag in the "in body" mode
  @parser.phases[:inBody].processEndTag(name)
  @tree.insert_from_table = false
end
endTagTable(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 69
def endTagTable(name)
  if in_scope?('table', true)
    @tree.generateImpliedEndTags

    unless @tree.open_elements.last.name == 'table'
      parse_error("end-tag-too-early-named",
                {"gotName" => "table",
                 "expectedName" => @tree.open_elements.last.name})
    end

    remove_open_elements_until('table')

    @parser.reset_insertion_mode
  else
    # inner_html case
    assert @parser.inner_html
    parse_error
  end
end
processCharacters(data) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 14
def processCharacters(data)
  parse_error("unexpected-char-implies-table-voodoo")
  # Make all the special element rearranging voodoo kick in
  @tree.insert_from_table = true
  # Process the character in the "in body" mode
  @parser.phases[:inBody].processCharacters(data)
  @tree.insert_from_table = false
end
startTagCaption(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 23
def startTagCaption(name, attributes)
  clearStackToTableContext
  @tree.activeFormattingElements.push(Marker)
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inCaption]
end
startTagCol(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 36
def startTagCol(name, attributes)
  startTagColgroup('colgroup', {})
  @parser.phase.processStartTag(name, attributes)
end
startTagColgroup(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 30
def startTagColgroup(name, attributes)
  clearStackToTableContext
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inColumnGroup]
end
startTagImplyTbody(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 47
def startTagImplyTbody(name, attributes)
  startTagRowGroup('tbody', {})
  @parser.phase.processStartTag(name, attributes)
end
startTagOther(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 59
def startTagOther(name, attributes)
  parse_error("unexpected-start-tag-implies-table-voodoo",
          {"name" => name})
  # Make all the special element rearranging voodoo kick in
  @tree.insert_from_table = true
  # Process the start tag in the "in body" mode
  @parser.phases[:inBody].processStartTag(name, attributes)
  @tree.insert_from_table = false
end
startTagRowGroup(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 41
def startTagRowGroup(name, attributes)
  clearStackToTableContext
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inTableBody]
end
startTagTable(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_table_phase.rb, line 52
def startTagTable(name, attributes)
  parse_error("unexpected-start-tag-implies-end-tag",
        {"startName" => "table", "endName" => "table"})
  @parser.phase.processEndTag('table')
  @parser.phase.processStartTag(name, attributes) unless @parser.inner_html
end

Protected Instance Methods

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.