Skip to content

Commit ae4fa22

Browse files
committed
introduce hgroup support
1 parent eb3b523 commit ae4fa22

6 files changed

Lines changed: 50 additions & 1 deletion

File tree

src/main/java/org/htmlunit/cyberneko/HTMLElements.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public class HTMLElements implements HTMLElementsProvider {
9898
public static final short H6 = H5 + 1;
9999
public static final short HEAD = H6 + 1;
100100
public static final short HEADER = HEAD + 1;
101-
public static final short HR = HEADER + 1;
101+
public static final short HGROUP = HEADER + 1;
102+
public static final short HR = HGROUP + 1;
102103
public static final short HTML = HR + 1;
103104
public static final short I = HTML + 1;
104105
public static final short IFRAME = I + 1;
@@ -337,6 +338,8 @@ public HTMLElements() {
337338

338339
new Element(HEADER, "HEADER", Element.BLOCK, BODY, new short[] {P}),
339340

341+
new Element(HGROUP, "HGROUP", Element.BLOCK, BODY, new short[] {P}),
342+
340343
// HR - O EMPTY
341344
new Element(HR, "HR", Element.EMPTY, new short[]{BODY, SELECT}, new short[]{P, SVG}),
342345
// HTML O O (%html.content;)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><p>foo<hgroup>bar<p>baz
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
!html
2+
(html
3+
(head
4+
)head
5+
(body
6+
(p
7+
"foo
8+
)p
9+
(hgroup
10+
"bar
11+
(p
12+
"baz
13+
)p
14+
)hgroup
15+
)body
16+
)html
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(p
2+
"foo
3+
)p
4+
(hgroup
5+
"bar
6+
(p
7+
"baz
8+
)p
9+
)hgroup
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<html><head></head><body><p>foo</p><hgroup>bar<p>baz</p></hgroup></body></html>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
startDocument [(1,1,0) (1,1,0) false]
2+
doctypeDecl [(1,1,0) (1,16,15) false]
3+
startElement (localpart="html",rawname="html",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
4+
startElement (localpart="head",rawname="head",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
5+
endElement (localpart="head",rawname="head",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
6+
startElement (localpart="body",rawname="body",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
7+
startElement (localpart="p",rawname="p") [(1,16,15) (1,19,18) false]
8+
characters 'foo'[(1,19,18) (1,22,21) false]
9+
endElement (localpart="p",rawname="p") [(-1,-1,-1) (-1,-1,-1) true]
10+
startElement (localpart="hgroup",rawname="hgroup") [(1,22,21) (1,30,29) false]
11+
characters 'bar'[(1,30,29) (1,33,32) false]
12+
startElement (localpart="p",rawname="p") [(1,33,32) (1,36,35) false]
13+
characters 'baz
14+
'[(1,36,35) (2,1,39) false]
15+
endElement (localpart="p",rawname="p") [(-1,-1,-1) (-1,-1,-1) true]
16+
endElement (localpart="hgroup",rawname="hgroup") [(-1,-1,-1) (-1,-1,-1) true]
17+
endElement (localpart="body",rawname="body",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
18+
endElement (localpart="html",rawname="html",uri="http://www.w3.org/1999/xhtml") [(-1,-1,-1) (-1,-1,-1) true]
19+
endDocument [(2,1,39) (2,1,39) false]

0 commit comments

Comments
 (0)