Class HTML5::InCaptionPhase
In: lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb
Parent: Phase

Methods

Public Instance methods

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 32
32:     def endTagCaption(name)
33:       if ignoreEndTagCaption
34:         # inner_html case
35:         assert @parser.inner_html
36:         parse_error "unexpected-end-tag", {"name" => name}
37:       else
38:         # AT this code is quite similar to endTagTable in "InTable"
39:         @tree.generateImpliedEndTags
40: 
41:         unless @tree.open_elements[-1].name == 'caption'
42:           parse_error("expected-one-end-tag-but-got-another",
43:                     {"gotName" => "caption",
44:                      "expectedName" => @tree.open_elements.last.name})
45:         end
46: 
47:         remove_open_elements_until('caption')
48: 
49:         @tree.clearActiveFormattingElements
50:         @parser.phase = @parser.phases[:inTable]
51:       end
52:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 61
61:     def endTagIgnore(name)
62:       parse_error("unexpected-end-tag", {"name" => name})
63:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 65
65:     def endTagOther(name)
66:       @parser.phases[:inBody].processEndTag(name)
67:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 54
54:     def endTagTable(name)
55:       parse_error "unexpected-end-table-in-caption"
56:       ignoreEndTag = ignoreEndTagCaption
57:       @parser.phase.processEndTag('caption')
58:       @parser.phase.processEndTag(name) unless ignoreEndTag
59:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 12
12:     def ignoreEndTagCaption
13:       !in_scope?('caption', true)
14:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 16
16:     def processCharacters(data)
17:       @parser.phases[:inBody].processCharacters(data)
18:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 28
28:     def startTagOther(name, attributes)
29:       @parser.phases[:inBody].processStartTag(name, attributes)
30:     end

[Source]

    # File lib/feed_tools/vendor/html5/lib/html5/html5parser/in_caption_phase.rb, line 20
20:     def startTagTableElement(name, attributes)
21:       parse_error "unexpected-end-tag", {"name" => name}
22:       #XXX Have to duplicate logic here to find out if the tag is ignored
23:       ignoreEndTag = ignoreEndTagCaption
24:       @parser.phase.processEndTag('caption')
25:       @parser.phase.processStartTag(name, attributes) unless ignoreEndTag
26:     end

[Validate]