8219691: method summary table head should be enclosed in <thead>

Reviewed-by: jjg
This commit is contained in:
Derek Thomson 2019-03-14 13:33:10 -07:00 committed by Jonathan Gibbons
parent 16e03611f6
commit d8497d254a
11 changed files with 96 additions and 24 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -85,6 +85,7 @@ public enum HtmlTag {
SUB(BlockType.INLINE, EndTag.END),
TABLE,
TBODY,
THEAD,
TD,
TH,
TITLE(BlockType.OTHER, EndTag.END),

View file

@ -190,7 +190,6 @@ public class Table {
*
* <p>Notes:
* <ul>
* <li>This currently does not use a {@code <thead>} tag, but probably should, eventually
* <li>The column styles are not currently applied to the header, but probably should, eventually
* </ul>
*
@ -450,7 +449,9 @@ public class Table {
private Content getTableBody() {
ContentBuilder tableContent = new ContentBuilder();
tableContent.add(header.toContent());
Content thead = new HtmlTree(HtmlTag.THEAD);
thead.add(header.toContent());
tableContent.add(thead);
Content tbody = new HtmlTree(HtmlTag.TBODY);
bodyRows.forEach(row -> tbody.add(row));
tableContent.add(tbody);