changeset 466:a5d7de7630d9

Added support for the Q element.
author Jorge Arellano Cid <jcid@dillo.org>
date Fri, 19 Dec 2008 15:56:51 -0300
parents 33593bfe1aea
children c029ea389ba7
files ChangeLog src/html.cc
diffstat 2 files changed, 28 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Dec 17 18:18:36 2008 +0000
+++ b/ChangeLog	Fri Dec 19 15:56:51 2008 -0300
@@ -18,6 +18,7 @@
  - Fix: recover page focus when clicking-out of a widget.
  - Fixed a segfault bug in the test/ directory.
  - Set middle click to submit in a new TAB. (Helps to keep form data!)
+ - Added support for the Q element.
    Patches: place (AKA corvid)
 +- Switched SSL-enabled to configure.in (./configure --enable-ssl).
  - Standardised the installation of dpid/dpidrc with auto* tools.
--- a/src/html.cc	Wed Dec 17 18:18:36 2008 +0000
+++ b/src/html.cc	Fri Dec 19 15:56:51 2008 -0300
@@ -2574,6 +2574,32 @@
 }
 
 /*
+ * <Q>
+ */
+static void Html_tag_open_q(DilloHtml *html, const char *tag, int tagsize)
+{
+    /*
+     * Left Double Quotation Mark, which is wrong in many cases, but
+     * should at least be widely recognized.
+     */
+    const char *U201C = "\xe2\x80\x9c";
+
+    DW2TB(html->dw)->addText (U201C, S_TOP(html)->style);
+}
+
+/*
+ * </Q>
+ */
+static void Html_tag_close_q(DilloHtml *html, int TagIdx)
+{
+   /* Right Double Quotation Mark */
+   const char *U201D = "\xe2\x80\x9d";
+
+   DW2TB(html->dw)->addText (U201D, S_TOP(html)->style);
+   a_Html_pop_tag(html, TagIdx);
+}
+
+/*
  * Handle the <UL> tag.
  */
 static void Html_tag_open_ul(DilloHtml *html, const char *tag, int tagsize)
@@ -3211,7 +3237,7 @@
  {"p", B8(010110),'O',1, Html_tag_open_p, Html_tag_close_par},
  /* param 010001 'F' */
  {"pre", B8(010110),'R',2, Html_tag_open_pre, Html_tag_close_pre},
- /* q 010101 */
+ {"q", B8(010101),'R',2, Html_tag_open_q, Html_tag_close_q},
  {"s", B8(010101),'R',2, Html_tag_open_strike, Html_tag_close_default},
  {"samp", B8(010101),'R',2, Html_tag_open_samp, Html_tag_close_default},
  {"script", B8(111001),'R',2, Html_tag_open_script, Html_tag_close_script},