summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@dillo.org>2013-09-05 21:04:20 +0000
committercorvid <corvid@dillo.org>2013-09-05 21:04:20 +0000
commit8c1f63b7c4f53e4f4e00600120f1125564c83eeb (patch)
treeb7437c333aed102f58c120dbf3fa19bc55841321 /src
parent228834973c0e17f6dcfd23e4e2115074eeb00cb2 (diff)
html5 MARK element
Diffstat (limited to 'src')
-rw-r--r--src/css.hh6
-rw-r--r--src/html.cc1
-rw-r--r--src/styleengine.cc4
3 files changed, 8 insertions, 3 deletions
diff --git a/src/css.hh b/src/css.hh
index c29912b3..4ad75f73 100644
--- a/src/css.hh
+++ b/src/css.hh
@@ -451,10 +451,10 @@ class CssStyleSheet {
<lout::object::ConstString, RuleList > (true, true, 256) {};
};
- static const int ntags = 90 + 8; // \todo don't hardcode
+ static const int ntags = 90 + 9; // \todo don't hardcode
/* 90 is the full number of html4 elements, including those which we have
- * implemented. From html 5, let's add: article, header, footer, nav,
- * section, aside, figure, figcaption.
+ * implemented. From html 5, let's add: article, header, footer, mark,
+ * nav, section, aside, figure, figcaption.
*/
RuleList elementTable[ntags], anyTable;
diff --git a/src/html.cc b/src/html.cc
index ad3208b8..f267ac7a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3283,6 +3283,7 @@ const TagInfo Tags[] = {
{"link", B8(100001),'F',0, Html_tag_open_link, NULL, NULL},
{"map", B8(011001),'R',2, Html_tag_open_default, Html_tag_content_map,
Html_tag_close_map},
+ {"mark", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
/* menu 1010 -- TODO: not exactly 1010, it can contain LI and inline */
{"menu", B8(011010),'R',2, Html_tag_open_menu, NULL, Html_tag_close_par},
{"meta", B8(100001),'F',0, Html_tag_open_meta, NULL, NULL},
diff --git a/src/styleengine.cc b/src/styleengine.cc
index 1889bf3a..47bf6240 100644
--- a/src/styleengine.cc
+++ b/src/styleengine.cc
@@ -861,6 +861,10 @@ void StyleEngine::buildUserAgentStyle () {
"sub {vertical-align: sub}"
"sup {vertical-align: super}"
"s, strike, del {text-decoration: line-through}"
+ /* HTML5 spec notes that mark styling "is just a suggestion and can be
+ * changed based on implementation feedback"
+ */
+ "mark {background: yellow; color: black;}"
"table {border-spacing: 2px}"
"td, th {padding: 2px}"
"thead, tbody, tfoot {vertical-align: middle}"