Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/b42d253f8697f8d2afa0d25367aa722f4a0c0812
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/b42d253f8697f8d2afa0d25367aa722f4a0c0812
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/b42d253f8697f8d2afa0d25367aa722f4a0c0812

The branch, master has been updated
       via  b42d253f8697f8d2afa0d25367aa722f4a0c0812 (commit)
      from  22d917c92d3f49379a57bad3dcd4b87817717848 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=b42d253f8697f8d2afa0d25367aa722f4a0c0812
commit b42d253f8697f8d2afa0d25367aa722f4a0c0812
Author: Michael Drake <t...@netsurf-browser.org>
Commit: Michael Drake <t...@netsurf-browser.org>

    Table cell nowrap attribute is presentational hint, not UA style.

diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 3892aff..464fcda 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -87,8 +87,6 @@ tr { display: table-row; vertical-align: inherit; }
 td, th { display: table-cell; vertical-align: inherit; padding: 1px; }
 th { font-weight: bold; text-align: center; }
 
-td[nowrap], th[nowrap] { white-space: nowrap; }
-
 a:link { color: #00f; text-decoration: underline; }
 a:visited { color: #609; }
 
diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c
index fd25d53..a962123 100644
--- a/content/handlers/css/hints.c
+++ b/content/handlers/css/hints.c
@@ -1497,6 +1497,22 @@ static void css_hint_bg_image(
        }
 }
 
+static void css_hint_white_space_nowrap(
+               nscss_select_ctx *ctx,
+               dom_node *node)
+{
+       struct css_hint *hint = &(hint_ctx.hints[hint_ctx.len]);
+       dom_exception err;
+       bool nowrap;
+
+       err = dom_element_has_attribute(node, corestring_dom_nowrap, &nowrap);
+       if (err == DOM_NO_ERR && nowrap == true) {
+               hint->prop = CSS_PROP_WHITE_SPACE;
+               hint->status = CSS_WHITE_SPACE_NOWRAP;
+               hint = css_hint_advance(hint);
+       }
+}
+
 
 /* Exported function, documeted in css/hints.h */
 css_error node_presentational_hint(void *pw, void *node,
@@ -1517,6 +1533,7 @@ css_error node_presentational_hint(void *pw, void *node,
        case DOM_HTML_ELEMENT_TYPE_TD:
                css_hint_width(pw, node);
                css_hint_table_cell_border_padding(pw, node);
+               css_hint_white_space_nowrap(pw, node);
                /* fallthrough */
        case DOM_HTML_ELEMENT_TYPE_TR:
                css_hint_height(pw, node);
diff --git a/utils/corestrings.c b/utils/corestrings.c
index 0afad9f..363c851 100644
--- a/utils/corestrings.c
+++ b/utils/corestrings.c
@@ -210,6 +210,7 @@ dom_string *corestring_dom_mousewheel;
 dom_string *corestring_dom_name;
 dom_string *corestring_dom_nohref;
 dom_string *corestring_dom_noresize;
+dom_string *corestring_dom_nowrap;
 dom_string *corestring_dom_offline;
 dom_string *corestring_dom_online;
 dom_string *corestring_dom_pagehide;
@@ -490,6 +491,7 @@ void corestrings_fini(void)
        CSS_DOM_STRING_UNREF(name);
        CSS_DOM_STRING_UNREF(nohref);
        CSS_DOM_STRING_UNREF(noresize);
+       CSS_DOM_STRING_UNREF(nowrap);
        CSS_DOM_STRING_UNREF(offline);
        CSS_DOM_STRING_UNREF(online);
        CSS_DOM_STRING_UNREF(pagehide);
@@ -823,6 +825,7 @@ nserror corestrings_init(void)
        CSS_DOM_STRING_INTERN(name);
        CSS_DOM_STRING_INTERN(nohref);
        CSS_DOM_STRING_INTERN(noresize);
+       CSS_DOM_STRING_INTERN(nowrap);
        CSS_DOM_STRING_INTERN(offline);
        CSS_DOM_STRING_INTERN(online);
        CSS_DOM_STRING_INTERN(pagehide);
diff --git a/utils/corestrings.h b/utils/corestrings.h
index 280098b..a02bdda 100644
--- a/utils/corestrings.h
+++ b/utils/corestrings.h
@@ -221,6 +221,7 @@ extern struct dom_string *corestring_dom_mousewheel;
 extern struct dom_string *corestring_dom_name;
 extern struct dom_string *corestring_dom_nohref;
 extern struct dom_string *corestring_dom_noresize;
+extern struct dom_string *corestring_dom_nowrap;
 extern struct dom_string *corestring_dom_offline;
 extern struct dom_string *corestring_dom_online;
 extern struct dom_string *corestring_dom_pagehide;


-----------------------------------------------------------------------

Summary of changes:
 !NetSurf/Resources/CSS,f79   |    2 --
 content/handlers/css/hints.c |   17 +++++++++++++++++
 utils/corestrings.c          |    3 +++
 utils/corestrings.h          |    1 +
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/!NetSurf/Resources/CSS,f79 b/!NetSurf/Resources/CSS,f79
index 3892aff..464fcda 100644
--- a/!NetSurf/Resources/CSS,f79
+++ b/!NetSurf/Resources/CSS,f79
@@ -87,8 +87,6 @@ tr { display: table-row; vertical-align: inherit; }
 td, th { display: table-cell; vertical-align: inherit; padding: 1px; }
 th { font-weight: bold; text-align: center; }
 
-td[nowrap], th[nowrap] { white-space: nowrap; }
-
 a:link { color: #00f; text-decoration: underline; }
 a:visited { color: #609; }
 
diff --git a/content/handlers/css/hints.c b/content/handlers/css/hints.c
index fd25d53..a962123 100644
--- a/content/handlers/css/hints.c
+++ b/content/handlers/css/hints.c
@@ -1497,6 +1497,22 @@ static void css_hint_bg_image(
        }
 }
 
+static void css_hint_white_space_nowrap(
+               nscss_select_ctx *ctx,
+               dom_node *node)
+{
+       struct css_hint *hint = &(hint_ctx.hints[hint_ctx.len]);
+       dom_exception err;
+       bool nowrap;
+
+       err = dom_element_has_attribute(node, corestring_dom_nowrap, &nowrap);
+       if (err == DOM_NO_ERR && nowrap == true) {
+               hint->prop = CSS_PROP_WHITE_SPACE;
+               hint->status = CSS_WHITE_SPACE_NOWRAP;
+               hint = css_hint_advance(hint);
+       }
+}
+
 
 /* Exported function, documeted in css/hints.h */
 css_error node_presentational_hint(void *pw, void *node,
@@ -1517,6 +1533,7 @@ css_error node_presentational_hint(void *pw, void *node,
        case DOM_HTML_ELEMENT_TYPE_TD:
                css_hint_width(pw, node);
                css_hint_table_cell_border_padding(pw, node);
+               css_hint_white_space_nowrap(pw, node);
                /* fallthrough */
        case DOM_HTML_ELEMENT_TYPE_TR:
                css_hint_height(pw, node);
diff --git a/utils/corestrings.c b/utils/corestrings.c
index 0afad9f..363c851 100644
--- a/utils/corestrings.c
+++ b/utils/corestrings.c
@@ -210,6 +210,7 @@ dom_string *corestring_dom_mousewheel;
 dom_string *corestring_dom_name;
 dom_string *corestring_dom_nohref;
 dom_string *corestring_dom_noresize;
+dom_string *corestring_dom_nowrap;
 dom_string *corestring_dom_offline;
 dom_string *corestring_dom_online;
 dom_string *corestring_dom_pagehide;
@@ -490,6 +491,7 @@ void corestrings_fini(void)
        CSS_DOM_STRING_UNREF(name);
        CSS_DOM_STRING_UNREF(nohref);
        CSS_DOM_STRING_UNREF(noresize);
+       CSS_DOM_STRING_UNREF(nowrap);
        CSS_DOM_STRING_UNREF(offline);
        CSS_DOM_STRING_UNREF(online);
        CSS_DOM_STRING_UNREF(pagehide);
@@ -823,6 +825,7 @@ nserror corestrings_init(void)
        CSS_DOM_STRING_INTERN(name);
        CSS_DOM_STRING_INTERN(nohref);
        CSS_DOM_STRING_INTERN(noresize);
+       CSS_DOM_STRING_INTERN(nowrap);
        CSS_DOM_STRING_INTERN(offline);
        CSS_DOM_STRING_INTERN(online);
        CSS_DOM_STRING_INTERN(pagehide);
diff --git a/utils/corestrings.h b/utils/corestrings.h
index 280098b..a02bdda 100644
--- a/utils/corestrings.h
+++ b/utils/corestrings.h
@@ -221,6 +221,7 @@ extern struct dom_string *corestring_dom_mousewheel;
 extern struct dom_string *corestring_dom_name;
 extern struct dom_string *corestring_dom_nohref;
 extern struct dom_string *corestring_dom_noresize;
+extern struct dom_string *corestring_dom_nowrap;
 extern struct dom_string *corestring_dom_offline;
 extern struct dom_string *corestring_dom_online;
 extern struct dom_string *corestring_dom_pagehide;


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
netsurf-commits@netsurf-browser.org
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to