Parent

Class/Module Index [+]

Quicksearch

HTML5::InRowPhase

Public Instance Methods

endTagIgnore(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 64
def endTagIgnore(name)
  parse_error("unexpected-end-tag-in-table-row",
          {"name" => name})
end
endTagOther(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 69
def endTagOther(name)
  @parser.phases[:inTable].processEndTag(name)
end
endTagTable(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 46
def endTagTable(name)
  ignoreEndTag = ignoreEndTagTr
  endTagTr('tr')
  # Reprocess the current tag if the tr end tag was not ignored
  # XXX how are we sure it's always ignored in the inner_html case?
  @parser.phase.processEndTag(name) unless ignoreEndTag
end
endTagTableRowGroup(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 54
def endTagTableRowGroup(name)
  if in_scope?(name, true)
    endTagTr('tr')
    @parser.phase.processEndTag(name)
  else
    # inner_html case
    parse_error
  end
end
endTagTr(name) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 34
def endTagTr(name)
  if ignoreEndTagTr
    # inner_html case
    assert @parser.inner_html
    parse_error
  else
    clearStackToTableRowContext
    @tree.open_elements.pop
    @parser.phase = @parser.phases[:inTableBody]
  end
end
processCharacters(data) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 12
def processCharacters(data)
  @parser.phases[:inTable].processCharacters(data)
end
startTagOther(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 30
def startTagOther(name, attributes)
  @parser.phases[:inTable].processStartTag(name, attributes)
end
startTagTableCell(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 16
def startTagTableCell(name, attributes)
  clearStackToTableRowContext
  @tree.insert_element(name, attributes)
  @parser.phase = @parser.phases[:inCell]
  @tree.activeFormattingElements.push(Marker)
end
startTagTableOther(name, attributes) click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 23
def startTagTableOther(name, attributes)
  ignoreEndTag = ignoreEndTagTr
  endTagTr('tr')
  # XXX how are we sure it's always ignored in the inner_html case?
  @parser.phase.processStartTag(name, attributes) unless ignoreEndTag
end

Protected Instance Methods

clearStackToTableRowContext() click to toggle source

XXX unify this with other table helper methods

# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 76
def clearStackToTableRowContext
  until ]tr html].include?(name = @tree.open_elements.last.name)
    parse_error("unexpected-implied-end-tag-in-table-row",
            {"name" => @tree.open_elements.last.name})
    @tree.open_elements.pop
  end
end
ignoreEndTagTr() click to toggle source
# File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_row_phase.rb, line 84
def ignoreEndTagTr
  not in_scope?('tr', :tableVariant => true)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.