netsurf: branch master updated. release/3.3-494-g0397a66
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/0397a6637d53907b2c572...
...commit http://git.netsurf-browser.org/netsurf.git/commit/0397a6637d53907b2c5720a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/0397a6637d53907b2c5720a7d...
The branch, master has been updated
via 0397a6637d53907b2c5720a7dd71f6db7741a061 (commit)
via 5e4011bee724326e5a2d779b50b72b27e18d9054 (commit)
from c3b7e650c5efb8262bc0998babaf9947ad29797a (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=0397a6637d53907b2c5...
commit 0397a6637d53907b2c5720a7dd71f6db7741a061
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Use automatic generation for all HTMLElement event handler attributes
diff --git a/Docs/UnimplementedJavascript.txt b/Docs/UnimplementedJavascript.txt
index d81c34f..4f2ad09 100644
--- a/Docs/UnimplementedJavascript.txt
+++ b/Docs/UnimplementedJavascript.txt
@@ -83,8 +83,8 @@ method CanvasRenderingContext2D::drawImage();\n
method CanvasRenderingContext2D::ellipse();\n
method CanvasRenderingContext2D::fill();\n
method CanvasRenderingContext2D::fillRect();\n
-getter CanvasRenderingContext2D::fillStyle(string);\n
-setter CanvasRenderingContext2D::fillStyle(string);\n
+getter CanvasRenderingContext2D::fillStyle(multiple);\n
+setter CanvasRenderingContext2D::fillStyle(multiple);\n
method CanvasRenderingContext2D::fillText();\n
getter CanvasRenderingContext2D::font(string);\n
setter CanvasRenderingContext2D::font(string);\n
@@ -138,8 +138,8 @@ getter CanvasRenderingContext2D::shadowOffsetY(double);\n
setter CanvasRenderingContext2D::shadowOffsetY(double);\n
method CanvasRenderingContext2D::stroke();\n
method CanvasRenderingContext2D::strokeRect();\n
-getter CanvasRenderingContext2D::strokeStyle(string);\n
-setter CanvasRenderingContext2D::strokeStyle(string);\n
+getter CanvasRenderingContext2D::strokeStyle(multiple);\n
+setter CanvasRenderingContext2D::strokeStyle(multiple);\n
method CanvasRenderingContext2D::strokeText();\n
getter CanvasRenderingContext2D::textAlign(string);\n
setter CanvasRenderingContext2D::textAlign(string);\n
@@ -752,130 +752,8 @@ method HTMLElement::forceSpellCheck();\n
getter HTMLElement::hidden(boolean);\n
setter HTMLElement::hidden(boolean);\n
getter HTMLElement::isContentEditable(boolean);\n
-getter HTMLElement::onabort(user);\n
-setter HTMLElement::onabort(user);\n
-getter HTMLElement::onautocompleteerror(user);\n
-setter HTMLElement::onautocompleteerror(user);\n
-getter HTMLElement::onautocomplete(user);\n
-setter HTMLElement::onautocomplete(user);\n
-getter HTMLElement::onblur(user);\n
-setter HTMLElement::onblur(user);\n
-getter HTMLElement::oncancel(user);\n
-setter HTMLElement::oncancel(user);\n
-getter HTMLElement::oncanplaythrough(user);\n
-setter HTMLElement::oncanplaythrough(user);\n
-getter HTMLElement::oncanplay(user);\n
-setter HTMLElement::oncanplay(user);\n
-getter HTMLElement::onchange(user);\n
-setter HTMLElement::onchange(user);\n
-getter HTMLElement::onclose(user);\n
-setter HTMLElement::onclose(user);\n
-getter HTMLElement::oncontextmenu(user);\n
-setter HTMLElement::oncontextmenu(user);\n
-getter HTMLElement::oncuechange(user);\n
-setter HTMLElement::oncuechange(user);\n
-getter HTMLElement::ondblclick(user);\n
-setter HTMLElement::ondblclick(user);\n
-getter HTMLElement::ondragend(user);\n
-setter HTMLElement::ondragend(user);\n
-getter HTMLElement::ondragenter(user);\n
-setter HTMLElement::ondragenter(user);\n
-getter HTMLElement::ondragexit(user);\n
-setter HTMLElement::ondragexit(user);\n
-getter HTMLElement::ondragleave(user);\n
-setter HTMLElement::ondragleave(user);\n
-getter HTMLElement::ondragover(user);\n
-setter HTMLElement::ondragover(user);\n
-getter HTMLElement::ondragstart(user);\n
-setter HTMLElement::ondragstart(user);\n
-getter HTMLElement::ondrag(user);\n
-setter HTMLElement::ondrag(user);\n
-getter HTMLElement::ondrop(user);\n
-setter HTMLElement::ondrop(user);\n
-getter HTMLElement::ondurationchange(user);\n
-setter HTMLElement::ondurationchange(user);\n
-getter HTMLElement::onemptied(user);\n
-setter HTMLElement::onemptied(user);\n
-getter HTMLElement::onended(user);\n
-setter HTMLElement::onended(user);\n
getter HTMLElement::onerror(user);\n
setter HTMLElement::onerror(user);\n
-getter HTMLElement::onfocus(user);\n
-setter HTMLElement::onfocus(user);\n
-getter HTMLElement::oninput(user);\n
-setter HTMLElement::oninput(user);\n
-getter HTMLElement::oninvalid(user);\n
-setter HTMLElement::oninvalid(user);\n
-getter HTMLElement::onkeydown(user);\n
-setter HTMLElement::onkeydown(user);\n
-getter HTMLElement::onkeypress(user);\n
-setter HTMLElement::onkeypress(user);\n
-getter HTMLElement::onkeyup(user);\n
-setter HTMLElement::onkeyup(user);\n
-getter HTMLElement::onloadeddata(user);\n
-setter HTMLElement::onloadeddata(user);\n
-getter HTMLElement::onloadedmetadata(user);\n
-setter HTMLElement::onloadedmetadata(user);\n
-getter HTMLElement::onloadstart(user);\n
-setter HTMLElement::onloadstart(user);\n
-getter HTMLElement::onload(user);\n
-setter HTMLElement::onload(user);\n
-getter HTMLElement::onmousedown(user);\n
-setter HTMLElement::onmousedown(user);\n
-getter HTMLElement::onmouseenter(user);\n
-setter HTMLElement::onmouseenter(user);\n
-getter HTMLElement::onmouseleave(user);\n
-setter HTMLElement::onmouseleave(user);\n
-getter HTMLElement::onmousemove(user);\n
-setter HTMLElement::onmousemove(user);\n
-getter HTMLElement::onmouseout(user);\n
-setter HTMLElement::onmouseout(user);\n
-getter HTMLElement::onmouseover(user);\n
-setter HTMLElement::onmouseover(user);\n
-getter HTMLElement::onmouseup(user);\n
-setter HTMLElement::onmouseup(user);\n
-getter HTMLElement::onpause(user);\n
-setter HTMLElement::onpause(user);\n
-getter HTMLElement::onplaying(user);\n
-setter HTMLElement::onplaying(user);\n
-getter HTMLElement::onplay(user);\n
-setter HTMLElement::onplay(user);\n
-getter HTMLElement::onprogress(user);\n
-setter HTMLElement::onprogress(user);\n
-getter HTMLElement::onratechange(user);\n
-setter HTMLElement::onratechange(user);\n
-getter HTMLElement::onreset(user);\n
-setter HTMLElement::onreset(user);\n
-getter HTMLElement::onresize(user);\n
-setter HTMLElement::onresize(user);\n
-getter HTMLElement::onscroll(user);\n
-setter HTMLElement::onscroll(user);\n
-getter HTMLElement::onseeked(user);\n
-setter HTMLElement::onseeked(user);\n
-getter HTMLElement::onseeking(user);\n
-setter HTMLElement::onseeking(user);\n
-getter HTMLElement::onselect(user);\n
-setter HTMLElement::onselect(user);\n
-getter HTMLElement::onshow(user);\n
-setter HTMLElement::onshow(user);\n
-getter HTMLElement::onsort(user);\n
-setter HTMLElement::onsort(user);\n
-getter HTMLElement::onstalled(user);\n
-setter HTMLElement::onstalled(user);\n
-getter HTMLElement::onsubmit(user);\n
-setter HTMLElement::onsubmit(user);\n
-getter HTMLElement::onsuspend(user);\n
-setter HTMLElement::onsuspend(user);\n
-getter HTMLElement::ontimeupdate(user);\n
-setter HTMLElement::ontimeupdate(user);\n
-getter HTMLElement::ontoggle(user);\n
-setter HTMLElement::ontoggle(user);\n
-getter HTMLElement::onvolumechange(user);\n
-setter HTMLElement::onvolumechange(user);\n
-getter HTMLElement::onwaiting(user);\n
-setter HTMLElement::onwaiting(user);\n
-getter HTMLElement::onwheel(user);\n
-setter HTMLElement::onwheel(user);\n
getter HTMLElement::spellcheck(boolean);\n
setter HTMLElement::spellcheck(boolean);\n
getter HTMLElement::style(user);\n
@@ -1488,7 +1366,7 @@ method MessageEvent::initMessageEvent();\n
getter MessageEvent::lastEventId(string);\n
getter MessageEvent::origin(string);\n
getter MessageEvent::ports(user);\n
-getter MessageEvent::source(user);\n
+getter MessageEvent::source(multiple);\n
method MessagePort::close();\n
getter MessagePort::onmessage(user);\n
setter MessagePort::onmessage(user);\n
@@ -1647,7 +1525,7 @@ getter StyleSheet::href(string);\n
method StyleSheetList::item();\n
getter StyleSheetList::length(unsigned long);\n
getter StyleSheet::media(user);\n
-getter StyleSheet::ownerNode(user);\n
+getter StyleSheet::ownerNode(multiple);\n
getter StyleSheet::parentStyleSheet(user);\n
getter StyleSheet::title(string);\n
getter StyleSheet::type(string);\n
@@ -1706,7 +1584,7 @@ method TimeRanges::end();\n
getter TimeRanges::length(unsigned long);\n
method TimeRanges::start();\n
getter Touch::region(string);\n
-getter TrackEvent::track(user);\n
+getter TrackEvent::track(multiple);\n
getter TreeWalker::currentNode(user);\n
setter TreeWalker::currentNode(user);\n
getter TreeWalker::filter(user);\n
diff --git a/javascript/duktape/HTMLElement.bnd b/javascript/duktape/HTMLElement.bnd
index ce1a925..3b8b873 100644
--- a/javascript/duktape/HTMLElement.bnd
+++ b/javascript/duktape/HTMLElement.bnd
@@ -25,43 +25,129 @@ setter HTMLElement::lang();
getter HTMLElement::title();
setter HTMLElement::title();
-setter HTMLElement::onclick()
-%{
- /* handlerfn */
- duk_push_this(ctx);
- /* handlerfn this */
- duk_get_prop_string(ctx, -1, HANDLER_MAGIC);
- /* handlerfn this handlers */
- duk_push_lstring(ctx, "click", 5);
- /* handlerfn this handlers click */
- duk_dup(ctx, -4);
- /* handlerfn this handlers click handlerfn */
- duk_put_prop(ctx, -3);
- /* handlerfn this handlers */
- dukky_register_event_listener_for(ctx,
- (dom_element *)((node_private_t *)priv)->node,
- corestring_dom_click);
- return 0;
-%}
+getter HTMLElement::onchange();
+setter HTMLElement::onchange();
-getter HTMLElement::onclick()
-%{
- dom_event_target *et = (dom_event_target *)(((node_private_t *)priv)->node);
- dom_string *name;
- dom_exception exc;
+setter HTMLElement::onclick();
+getter HTMLElement::onclick();
- exc = dom_string_create((const uint8_t *)"click", 5, &name);
- if (exc != DOM_NO_ERR) return 0;
-
- duk_push_this(ctx);
- /* ... node */
- if (dukky_get_current_value_of_event_handler(ctx, name, et) == false) {
- dom_string_unref(name);
- return 0;
- }
- dom_string_unref(name);
- /* ... handler node */
- duk_pop(ctx);
- /* ... handler */
- return 1;
-%}
+getter HTMLElement::onabort();
+setter HTMLElement::onabort();
+getter HTMLElement::onautocompleteerror();
+setter HTMLElement::onautocompleteerror();
+getter HTMLElement::onautocomplete();
+setter HTMLElement::onautocomplete();
+getter HTMLElement::onblur();
+setter HTMLElement::onblur();
+getter HTMLElement::oncancel();
+setter HTMLElement::oncancel();
+getter HTMLElement::oncanplaythrough();
+setter HTMLElement::oncanplaythrough();
+getter HTMLElement::oncanplay();
+setter HTMLElement::oncanplay();
+getter HTMLElement::onclose();
+setter HTMLElement::onclose();
+getter HTMLElement::oncontextmenu();
+setter HTMLElement::oncontextmenu();
+getter HTMLElement::oncuechange();
+setter HTMLElement::oncuechange();
+getter HTMLElement::ondblclick();
+setter HTMLElement::ondblclick();
+getter HTMLElement::ondragend();
+setter HTMLElement::ondragend();
+getter HTMLElement::ondragenter();
+setter HTMLElement::ondragenter();
+getter HTMLElement::ondragexit();
+setter HTMLElement::ondragexit();
+getter HTMLElement::ondragleave();
+setter HTMLElement::ondragleave();
+getter HTMLElement::ondragover();
+setter HTMLElement::ondragover();
+getter HTMLElement::ondragstart();
+setter HTMLElement::ondragstart();
+getter HTMLElement::ondrag();
+setter HTMLElement::ondrag();
+getter HTMLElement::ondrop();
+setter HTMLElement::ondrop();
+getter HTMLElement::ondurationchange();
+setter HTMLElement::ondurationchange();
+getter HTMLElement::onemptied();
+setter HTMLElement::onemptied();
+getter HTMLElement::onended();
+setter HTMLElement::onended();
+getter HTMLElement::onfocus();
+setter HTMLElement::onfocus();
+getter HTMLElement::oninput();
+setter HTMLElement::oninput();
+getter HTMLElement::oninvalid();
+setter HTMLElement::oninvalid();
+getter HTMLElement::onkeydown();
+setter HTMLElement::onkeydown();
+getter HTMLElement::onkeypress();
+setter HTMLElement::onkeypress();
+getter HTMLElement::onkeyup();
+setter HTMLElement::onkeyup();
+getter HTMLElement::onloadeddata();
+setter HTMLElement::onloadeddata();
+getter HTMLElement::onloadedmetadata();
+setter HTMLElement::onloadedmetadata();
+getter HTMLElement::onloadstart();
+setter HTMLElement::onloadstart();
+getter HTMLElement::onload();
+setter HTMLElement::onload();
+getter HTMLElement::onmousedown();
+setter HTMLElement::onmousedown();
+getter HTMLElement::onmouseenter();
+setter HTMLElement::onmouseenter();
+getter HTMLElement::onmouseleave();
+setter HTMLElement::onmouseleave();
+getter HTMLElement::onmousemove();
+setter HTMLElement::onmousemove();
+getter HTMLElement::onmouseout();
+setter HTMLElement::onmouseout();
+getter HTMLElement::onmouseover();
+setter HTMLElement::onmouseover();
+getter HTMLElement::onmouseup();
+setter HTMLElement::onmouseup();
+getter HTMLElement::onpause();
+setter HTMLElement::onpause();
+getter HTMLElement::onplaying();
+setter HTMLElement::onplaying();
+getter HTMLElement::onplay();
+setter HTMLElement::onplay();
+getter HTMLElement::onprogress();
+setter HTMLElement::onprogress();
+getter HTMLElement::onratechange();
+setter HTMLElement::onratechange();
+getter HTMLElement::onreset();
+setter HTMLElement::onreset();
+getter HTMLElement::onresize();
+setter HTMLElement::onresize();
+getter HTMLElement::onscroll();
+setter HTMLElement::onscroll();
+getter HTMLElement::onseeked();
+setter HTMLElement::onseeked();
+getter HTMLElement::onseeking();
+setter HTMLElement::onseeking();
+getter HTMLElement::onselect();
+setter HTMLElement::onselect();
+getter HTMLElement::onshow();
+setter HTMLElement::onshow();
+getter HTMLElement::onsort();
+setter HTMLElement::onsort();
+getter HTMLElement::onstalled();
+setter HTMLElement::onstalled();
+getter HTMLElement::onsubmit();
+setter HTMLElement::onsubmit();
+getter HTMLElement::onsuspend();
+setter HTMLElement::onsuspend();
+getter HTMLElement::ontimeupdate();
+setter HTMLElement::ontimeupdate();
+getter HTMLElement::ontoggle();
+setter HTMLElement::ontoggle();
+getter HTMLElement::onvolumechange();
+setter HTMLElement::onvolumechange();
+getter HTMLElement::onwaiting();
+setter HTMLElement::onwaiting();
+getter HTMLElement::onwheel();
+setter HTMLElement::onwheel();
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=5e4011bee724326e5a2...
commit 5e4011bee724326e5a2d779b50b72b27e18d9054
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Improve the manual section in the gtk manual page
diff --git a/Docs/netsurf-gtk.1 b/Docs/netsurf-gtk.1
index 6043398..7b2f4f4 100644
--- a/Docs/netsurf-gtk.1
+++ b/Docs/netsurf-gtk.1
@@ -7,7 +7,7 @@
.\"
.\"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.Dd December 26, 2014
-.Dt NETSURF 1
+.Dt NETSURF 1 CON
.Os
.Sh NAME
.Nm netsurf
-----------------------------------------------------------------------
Summary of changes:
Docs/UnimplementedJavascript.txt | 136 ++----------------------------
Docs/netsurf-gtk.1 | 2 +-
javascript/duktape/HTMLElement.bnd | 162 +++++++++++++++++++++++++++---------
3 files changed, 132 insertions(+), 168 deletions(-)
diff --git a/Docs/UnimplementedJavascript.txt b/Docs/UnimplementedJavascript.txt
index d81c34f..4f2ad09 100644
--- a/Docs/UnimplementedJavascript.txt
+++ b/Docs/UnimplementedJavascript.txt
@@ -83,8 +83,8 @@ method CanvasRenderingContext2D::drawImage();\n
method CanvasRenderingContext2D::ellipse();\n
method CanvasRenderingContext2D::fill();\n
method CanvasRenderingContext2D::fillRect();\n
-getter CanvasRenderingContext2D::fillStyle(string);\n
-setter CanvasRenderingContext2D::fillStyle(string);\n
+getter CanvasRenderingContext2D::fillStyle(multiple);\n
+setter CanvasRenderingContext2D::fillStyle(multiple);\n
method CanvasRenderingContext2D::fillText();\n
getter CanvasRenderingContext2D::font(string);\n
setter CanvasRenderingContext2D::font(string);\n
@@ -138,8 +138,8 @@ getter CanvasRenderingContext2D::shadowOffsetY(double);\n
setter CanvasRenderingContext2D::shadowOffsetY(double);\n
method CanvasRenderingContext2D::stroke();\n
method CanvasRenderingContext2D::strokeRect();\n
-getter CanvasRenderingContext2D::strokeStyle(string);\n
-setter CanvasRenderingContext2D::strokeStyle(string);\n
+getter CanvasRenderingContext2D::strokeStyle(multiple);\n
+setter CanvasRenderingContext2D::strokeStyle(multiple);\n
method CanvasRenderingContext2D::strokeText();\n
getter CanvasRenderingContext2D::textAlign(string);\n
setter CanvasRenderingContext2D::textAlign(string);\n
@@ -752,130 +752,8 @@ method HTMLElement::forceSpellCheck();\n
getter HTMLElement::hidden(boolean);\n
setter HTMLElement::hidden(boolean);\n
getter HTMLElement::isContentEditable(boolean);\n
-getter HTMLElement::onabort(user);\n
-setter HTMLElement::onabort(user);\n
-getter HTMLElement::onautocompleteerror(user);\n
-setter HTMLElement::onautocompleteerror(user);\n
-getter HTMLElement::onautocomplete(user);\n
-setter HTMLElement::onautocomplete(user);\n
-getter HTMLElement::onblur(user);\n
-setter HTMLElement::onblur(user);\n
-getter HTMLElement::oncancel(user);\n
-setter HTMLElement::oncancel(user);\n
-getter HTMLElement::oncanplaythrough(user);\n
-setter HTMLElement::oncanplaythrough(user);\n
-getter HTMLElement::oncanplay(user);\n
-setter HTMLElement::oncanplay(user);\n
-getter HTMLElement::onchange(user);\n
-setter HTMLElement::onchange(user);\n
-getter HTMLElement::onclose(user);\n
-setter HTMLElement::onclose(user);\n
-getter HTMLElement::oncontextmenu(user);\n
-setter HTMLElement::oncontextmenu(user);\n
-getter HTMLElement::oncuechange(user);\n
-setter HTMLElement::oncuechange(user);\n
-getter HTMLElement::ondblclick(user);\n
-setter HTMLElement::ondblclick(user);\n
-getter HTMLElement::ondragend(user);\n
-setter HTMLElement::ondragend(user);\n
-getter HTMLElement::ondragenter(user);\n
-setter HTMLElement::ondragenter(user);\n
-getter HTMLElement::ondragexit(user);\n
-setter HTMLElement::ondragexit(user);\n
-getter HTMLElement::ondragleave(user);\n
-setter HTMLElement::ondragleave(user);\n
-getter HTMLElement::ondragover(user);\n
-setter HTMLElement::ondragover(user);\n
-getter HTMLElement::ondragstart(user);\n
-setter HTMLElement::ondragstart(user);\n
-getter HTMLElement::ondrag(user);\n
-setter HTMLElement::ondrag(user);\n
-getter HTMLElement::ondrop(user);\n
-setter HTMLElement::ondrop(user);\n
-getter HTMLElement::ondurationchange(user);\n
-setter HTMLElement::ondurationchange(user);\n
-getter HTMLElement::onemptied(user);\n
-setter HTMLElement::onemptied(user);\n
-getter HTMLElement::onended(user);\n
-setter HTMLElement::onended(user);\n
getter HTMLElement::onerror(user);\n
setter HTMLElement::onerror(user);\n
-getter HTMLElement::onfocus(user);\n
-setter HTMLElement::onfocus(user);\n
-getter HTMLElement::oninput(user);\n
-setter HTMLElement::oninput(user);\n
-getter HTMLElement::oninvalid(user);\n
-setter HTMLElement::oninvalid(user);\n
-getter HTMLElement::onkeydown(user);\n
-setter HTMLElement::onkeydown(user);\n
-getter HTMLElement::onkeypress(user);\n
-setter HTMLElement::onkeypress(user);\n
-getter HTMLElement::onkeyup(user);\n
-setter HTMLElement::onkeyup(user);\n
-getter HTMLElement::onloadeddata(user);\n
-setter HTMLElement::onloadeddata(user);\n
-getter HTMLElement::onloadedmetadata(user);\n
-setter HTMLElement::onloadedmetadata(user);\n
-getter HTMLElement::onloadstart(user);\n
-setter HTMLElement::onloadstart(user);\n
-getter HTMLElement::onload(user);\n
-setter HTMLElement::onload(user);\n
-getter HTMLElement::onmousedown(user);\n
-setter HTMLElement::onmousedown(user);\n
-getter HTMLElement::onmouseenter(user);\n
-setter HTMLElement::onmouseenter(user);\n
-getter HTMLElement::onmouseleave(user);\n
-setter HTMLElement::onmouseleave(user);\n
-getter HTMLElement::onmousemove(user);\n
-setter HTMLElement::onmousemove(user);\n
-getter HTMLElement::onmouseout(user);\n
-setter HTMLElement::onmouseout(user);\n
-getter HTMLElement::onmouseover(user);\n
-setter HTMLElement::onmouseover(user);\n
-getter HTMLElement::onmouseup(user);\n
-setter HTMLElement::onmouseup(user);\n
-getter HTMLElement::onpause(user);\n
-setter HTMLElement::onpause(user);\n
-getter HTMLElement::onplaying(user);\n
-setter HTMLElement::onplaying(user);\n
-getter HTMLElement::onplay(user);\n
-setter HTMLElement::onplay(user);\n
-getter HTMLElement::onprogress(user);\n
-setter HTMLElement::onprogress(user);\n
-getter HTMLElement::onratechange(user);\n
-setter HTMLElement::onratechange(user);\n
-getter HTMLElement::onreset(user);\n
-setter HTMLElement::onreset(user);\n
-getter HTMLElement::onresize(user);\n
-setter HTMLElement::onresize(user);\n
-getter HTMLElement::onscroll(user);\n
-setter HTMLElement::onscroll(user);\n
-getter HTMLElement::onseeked(user);\n
-setter HTMLElement::onseeked(user);\n
-getter HTMLElement::onseeking(user);\n
-setter HTMLElement::onseeking(user);\n
-getter HTMLElement::onselect(user);\n
-setter HTMLElement::onselect(user);\n
-getter HTMLElement::onshow(user);\n
-setter HTMLElement::onshow(user);\n
-getter HTMLElement::onsort(user);\n
-setter HTMLElement::onsort(user);\n
-getter HTMLElement::onstalled(user);\n
-setter HTMLElement::onstalled(user);\n
-getter HTMLElement::onsubmit(user);\n
-setter HTMLElement::onsubmit(user);\n
-getter HTMLElement::onsuspend(user);\n
-setter HTMLElement::onsuspend(user);\n
-getter HTMLElement::ontimeupdate(user);\n
-setter HTMLElement::ontimeupdate(user);\n
-getter HTMLElement::ontoggle(user);\n
-setter HTMLElement::ontoggle(user);\n
-getter HTMLElement::onvolumechange(user);\n
-setter HTMLElement::onvolumechange(user);\n
-getter HTMLElement::onwaiting(user);\n
-setter HTMLElement::onwaiting(user);\n
-getter HTMLElement::onwheel(user);\n
-setter HTMLElement::onwheel(user);\n
getter HTMLElement::spellcheck(boolean);\n
setter HTMLElement::spellcheck(boolean);\n
getter HTMLElement::style(user);\n
@@ -1488,7 +1366,7 @@ method MessageEvent::initMessageEvent();\n
getter MessageEvent::lastEventId(string);\n
getter MessageEvent::origin(string);\n
getter MessageEvent::ports(user);\n
-getter MessageEvent::source(user);\n
+getter MessageEvent::source(multiple);\n
method MessagePort::close();\n
getter MessagePort::onmessage(user);\n
setter MessagePort::onmessage(user);\n
@@ -1647,7 +1525,7 @@ getter StyleSheet::href(string);\n
method StyleSheetList::item();\n
getter StyleSheetList::length(unsigned long);\n
getter StyleSheet::media(user);\n
-getter StyleSheet::ownerNode(user);\n
+getter StyleSheet::ownerNode(multiple);\n
getter StyleSheet::parentStyleSheet(user);\n
getter StyleSheet::title(string);\n
getter StyleSheet::type(string);\n
@@ -1706,7 +1584,7 @@ method TimeRanges::end();\n
getter TimeRanges::length(unsigned long);\n
method TimeRanges::start();\n
getter Touch::region(string);\n
-getter TrackEvent::track(user);\n
+getter TrackEvent::track(multiple);\n
getter TreeWalker::currentNode(user);\n
setter TreeWalker::currentNode(user);\n
getter TreeWalker::filter(user);\n
diff --git a/Docs/netsurf-gtk.1 b/Docs/netsurf-gtk.1
index 6043398..7b2f4f4 100644
--- a/Docs/netsurf-gtk.1
+++ b/Docs/netsurf-gtk.1
@@ -7,7 +7,7 @@
.\"
.\"THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.Dd December 26, 2014
-.Dt NETSURF 1
+.Dt NETSURF 1 CON
.Os
.Sh NAME
.Nm netsurf
diff --git a/javascript/duktape/HTMLElement.bnd b/javascript/duktape/HTMLElement.bnd
index ce1a925..3b8b873 100644
--- a/javascript/duktape/HTMLElement.bnd
+++ b/javascript/duktape/HTMLElement.bnd
@@ -25,43 +25,129 @@ setter HTMLElement::lang();
getter HTMLElement::title();
setter HTMLElement::title();
-setter HTMLElement::onclick()
-%{
- /* handlerfn */
- duk_push_this(ctx);
- /* handlerfn this */
- duk_get_prop_string(ctx, -1, HANDLER_MAGIC);
- /* handlerfn this handlers */
- duk_push_lstring(ctx, "click", 5);
- /* handlerfn this handlers click */
- duk_dup(ctx, -4);
- /* handlerfn this handlers click handlerfn */
- duk_put_prop(ctx, -3);
- /* handlerfn this handlers */
- dukky_register_event_listener_for(ctx,
- (dom_element *)((node_private_t *)priv)->node,
- corestring_dom_click);
- return 0;
-%}
+getter HTMLElement::onchange();
+setter HTMLElement::onchange();
-getter HTMLElement::onclick()
-%{
- dom_event_target *et = (dom_event_target *)(((node_private_t *)priv)->node);
- dom_string *name;
- dom_exception exc;
+setter HTMLElement::onclick();
+getter HTMLElement::onclick();
- exc = dom_string_create((const uint8_t *)"click", 5, &name);
- if (exc != DOM_NO_ERR) return 0;
-
- duk_push_this(ctx);
- /* ... node */
- if (dukky_get_current_value_of_event_handler(ctx, name, et) == false) {
- dom_string_unref(name);
- return 0;
- }
- dom_string_unref(name);
- /* ... handler node */
- duk_pop(ctx);
- /* ... handler */
- return 1;
-%}
+getter HTMLElement::onabort();
+setter HTMLElement::onabort();
+getter HTMLElement::onautocompleteerror();
+setter HTMLElement::onautocompleteerror();
+getter HTMLElement::onautocomplete();
+setter HTMLElement::onautocomplete();
+getter HTMLElement::onblur();
+setter HTMLElement::onblur();
+getter HTMLElement::oncancel();
+setter HTMLElement::oncancel();
+getter HTMLElement::oncanplaythrough();
+setter HTMLElement::oncanplaythrough();
+getter HTMLElement::oncanplay();
+setter HTMLElement::oncanplay();
+getter HTMLElement::onclose();
+setter HTMLElement::onclose();
+getter HTMLElement::oncontextmenu();
+setter HTMLElement::oncontextmenu();
+getter HTMLElement::oncuechange();
+setter HTMLElement::oncuechange();
+getter HTMLElement::ondblclick();
+setter HTMLElement::ondblclick();
+getter HTMLElement::ondragend();
+setter HTMLElement::ondragend();
+getter HTMLElement::ondragenter();
+setter HTMLElement::ondragenter();
+getter HTMLElement::ondragexit();
+setter HTMLElement::ondragexit();
+getter HTMLElement::ondragleave();
+setter HTMLElement::ondragleave();
+getter HTMLElement::ondragover();
+setter HTMLElement::ondragover();
+getter HTMLElement::ondragstart();
+setter HTMLElement::ondragstart();
+getter HTMLElement::ondrag();
+setter HTMLElement::ondrag();
+getter HTMLElement::ondrop();
+setter HTMLElement::ondrop();
+getter HTMLElement::ondurationchange();
+setter HTMLElement::ondurationchange();
+getter HTMLElement::onemptied();
+setter HTMLElement::onemptied();
+getter HTMLElement::onended();
+setter HTMLElement::onended();
+getter HTMLElement::onfocus();
+setter HTMLElement::onfocus();
+getter HTMLElement::oninput();
+setter HTMLElement::oninput();
+getter HTMLElement::oninvalid();
+setter HTMLElement::oninvalid();
+getter HTMLElement::onkeydown();
+setter HTMLElement::onkeydown();
+getter HTMLElement::onkeypress();
+setter HTMLElement::onkeypress();
+getter HTMLElement::onkeyup();
+setter HTMLElement::onkeyup();
+getter HTMLElement::onloadeddata();
+setter HTMLElement::onloadeddata();
+getter HTMLElement::onloadedmetadata();
+setter HTMLElement::onloadedmetadata();
+getter HTMLElement::onloadstart();
+setter HTMLElement::onloadstart();
+getter HTMLElement::onload();
+setter HTMLElement::onload();
+getter HTMLElement::onmousedown();
+setter HTMLElement::onmousedown();
+getter HTMLElement::onmouseenter();
+setter HTMLElement::onmouseenter();
+getter HTMLElement::onmouseleave();
+setter HTMLElement::onmouseleave();
+getter HTMLElement::onmousemove();
+setter HTMLElement::onmousemove();
+getter HTMLElement::onmouseout();
+setter HTMLElement::onmouseout();
+getter HTMLElement::onmouseover();
+setter HTMLElement::onmouseover();
+getter HTMLElement::onmouseup();
+setter HTMLElement::onmouseup();
+getter HTMLElement::onpause();
+setter HTMLElement::onpause();
+getter HTMLElement::onplaying();
+setter HTMLElement::onplaying();
+getter HTMLElement::onplay();
+setter HTMLElement::onplay();
+getter HTMLElement::onprogress();
+setter HTMLElement::onprogress();
+getter HTMLElement::onratechange();
+setter HTMLElement::onratechange();
+getter HTMLElement::onreset();
+setter HTMLElement::onreset();
+getter HTMLElement::onresize();
+setter HTMLElement::onresize();
+getter HTMLElement::onscroll();
+setter HTMLElement::onscroll();
+getter HTMLElement::onseeked();
+setter HTMLElement::onseeked();
+getter HTMLElement::onseeking();
+setter HTMLElement::onseeking();
+getter HTMLElement::onselect();
+setter HTMLElement::onselect();
+getter HTMLElement::onshow();
+setter HTMLElement::onshow();
+getter HTMLElement::onsort();
+setter HTMLElement::onsort();
+getter HTMLElement::onstalled();
+setter HTMLElement::onstalled();
+getter HTMLElement::onsubmit();
+setter HTMLElement::onsubmit();
+getter HTMLElement::onsuspend();
+setter HTMLElement::onsuspend();
+getter HTMLElement::ontimeupdate();
+setter HTMLElement::ontimeupdate();
+getter HTMLElement::ontoggle();
+setter HTMLElement::ontoggle();
+getter HTMLElement::onvolumechange();
+setter HTMLElement::onvolumechange();
+getter HTMLElement::onwaiting();
+setter HTMLElement::onwaiting();
+getter HTMLElement::onwheel();
+setter HTMLElement::onwheel();
--
NetSurf Browser
7 years, 6 months
nsgenbind: branch master updated. release/0.1.2-85-ge87ed9a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/nsgenbind.git/shortlog/e87ed9a82296b8481b0...
...commit http://git.netsurf-browser.org/nsgenbind.git/commit/e87ed9a82296b8481b0d8...
...tree http://git.netsurf-browser.org/nsgenbind.git/tree/e87ed9a82296b8481b0d867...
The branch, master has been updated
via e87ed9a82296b8481b0d867e41bbfb65ea5fae9f (commit)
via 35fe42358429770a4a305dff991b8090736e4957 (commit)
via ce20b3bef865c015890b7a499c7547606e724037 (commit)
via cb53cae2230eedbba7807ea4c60f469fea08ccb7 (commit)
from 70a95724ab5c4629a9c37cfdc5db750684f48b05 (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/nsgenbind.git/commit/?id=e87ed9a82296b8481...
commit e87ed9a82296b8481b0d867e41bbfb65ea5fae9f
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Use attribute types from IR for generated event handlers
diff --git a/src/duk-libdom-generated.c b/src/duk-libdom-generated.c
index cf70758..e40c43e 100644
--- a/src/duk-libdom-generated.c
+++ b/src/duk-libdom-generated.c
@@ -28,13 +28,60 @@
#include "ir.h"
#include "duk-libdom.h"
+static int
+output_generated_attribute_user_getter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ interfacee = interfacee;
+
+ if ((atributee->typev[0].name != NULL) &&
+ strcmp(atributee->typev[0].name, "EventHandler") == 0) {
+
+ /* this can generate for onxxx event handlers */
+ if ((atributee->name[0] != 'o') ||
+ (atributee->name[1] != 'n')) {
+ return -1; /* not onxxx */
+ }
+
+ fprintf(outf,
+ "\tdom_event_target *et = (dom_event_target *)(((node_private_t *)priv)->node);\n"
+ "\tdom_string *name;\n"
+ "\tdom_exception exc;\n\n"
+ "\texc = dom_string_create((const uint8_t *)\"%s\", %ld, &name);\n"
+ "\tif (exc != DOM_NO_ERR) return 0;\n\n"
+ "\tduk_push_this(ctx);\n"
+ "\t/* ... node */\n"
+ "\tif (dukky_get_current_value_of_event_handler(ctx, name, et) == false) {\n"
+ "\t\tdom_string_unref(name);\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\tdom_string_unref(name);\n"
+ "\t/* ... handler node */\n"
+ "\tduk_pop(ctx);\n"
+ "\t/* ... handler */\n"
+ "\treturn 1;\n",
+ atributee->name + 2,
+ strlen(atributee->name + 2));
+ return 0;
+ }
+ return -1;
+}
+
/* exported function documented in duk-libdom.h */
int
output_generated_attribute_getter(FILE* outf,
struct ir_entry *interfacee,
struct ir_attribute_entry *atributee)
{
- switch (atributee->base_type) {
+ int res = 0;
+
+ /* generation can only cope with a single type on the attribute */
+ if (atributee->typec != 1) {
+ return -1;
+ }
+
+ switch (atributee->typev[0].base) {
case WEBIDL_TYPE_STRING:
fprintf(outf,
"\tdom_exception exc;\n"
@@ -59,7 +106,7 @@ output_generated_attribute_getter(FILE* outf,
break;
case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
fprintf(outf, "\tdom_ulong l;\n");
} else {
fprintf(outf, "\tdom_long l;\n");
@@ -83,7 +130,7 @@ output_generated_attribute_getter(FILE* outf,
break;
case WEBIDL_TYPE_SHORT:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
fprintf(outf, "\tdom_ushort s;\n");
} else {
fprintf(outf, "\tdom_short s;\n");
@@ -126,25 +173,81 @@ output_generated_attribute_getter(FILE* outf,
"\treturn 1;\n");
break;
+ case WEBIDL_TYPE_USER:
+ res = output_generated_attribute_user_getter(outf,
+ interfacee,
+ atributee);
+ break;
+
default:
- return -1;
+ res = -1;
+ break;
}
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
+ if (res >= 0) {
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+ }
+
+ return res;
+}
+
+static int
+output_generated_attribute_user_setter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ interfacee = interfacee;
- return 0;
+ if ((atributee->typev[0].name != NULL) &&
+ strcmp(atributee->typev[0].name, "EventHandler") == 0) {
+
+ /* this can generate for onxxx event handlers */
+ if ((atributee->name[0] != 'o') ||
+ (atributee->name[1] != 'n')) {
+ return -1; /* not onxxx */
+ }
+
+ fprintf(outf,
+ "\t/* handlerfn */\n"
+ "\tduk_push_this(ctx);\n"
+ "\t/* handlerfn this */\n"
+ "\tduk_get_prop_string(ctx, -1, HANDLER_MAGIC);\n"
+ "\t/* handlerfn this handlers */\n"
+ "\tduk_push_lstring(ctx, \"%s\", %ld);\n"
+ "\t/* handlerfn this handlers click */\n"
+ "\tduk_dup(ctx, -4);\n"
+ "\t/* handlerfn this handlers click handlerfn */\n"
+ "\tduk_put_prop(ctx, -3);\n"
+ "\t/* handlerfn this handlers */\n"
+ "\tdukky_register_event_listener_for(ctx,\n"
+ "\t\t(dom_element *)((node_private_t *)priv)->node,\n"
+ "\t\tcorestring_dom_click);\n"
+ "\treturn 0;\n",
+ atributee->name + 2,
+ strlen(atributee->name + 2));
+ return 0;
+ }
+ return -1;
}
+
/* exported function documented in duk-libdom.h */
int
output_generated_attribute_setter(FILE* outf,
struct ir_entry *interfacee,
struct ir_attribute_entry *atributee)
{
- switch (atributee->base_type) {
+ int res = 0;
+
+ /* generation can only cope with a single type on the attribute */
+ if (atributee->typec != 1) {
+ return -1;
+ }
+
+ switch (atributee->typev[0].base) {
case WEBIDL_TYPE_STRING:
fprintf(outf,
"\tdom_exception exc;\n"
@@ -173,7 +276,7 @@ output_generated_attribute_setter(FILE* outf,
break;
case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
fprintf(outf,
"\tdom_exception exc;\n"
"\tdom_ulong l;\n"
@@ -202,7 +305,7 @@ output_generated_attribute_setter(FILE* outf,
break;
case WEBIDL_TYPE_SHORT:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
fprintf(outf,
"\tdom_exception exc;\n"
"\tdom_ushort s;\n"
@@ -250,14 +353,23 @@ output_generated_attribute_setter(FILE* outf,
"\treturn 0;\n");
break;
+ case WEBIDL_TYPE_USER:
+ res = output_generated_attribute_user_setter(outf,
+ interfacee,
+ atributee);
+ break;
+
default:
- return -1;
+ res = -1;
+ break;
}
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
+ if (res >= 0) {
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+ }
- return 0;
+ return res;
}
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index d7214e3..8741815 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -1231,13 +1231,21 @@ output_attribute_getter(FILE* outf,
}
/* no implementation so generate default and warnings if required */
+ const char *type_str;
+ if (atributee->typec == 0) {
+ type_str = "";
+ } else if (atributee->typec == 1) {
+ type_str = webidl_type_to_str(atributee->typev[0].modifier,
+ atributee->typev[0].base);
+ } else {
+ type_str = "multiple";
+ }
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: getter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->type_modifier,
- atributee->base_type));
+ type_str);
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
@@ -1321,12 +1329,21 @@ output_attribute_setter(FILE* outf,
/* implementation not generated from any other source */
if (res < 0) {
+ const char *type_str;
+ if (atributee->typec == 0) {
+ type_str = "";
+ } else if (atributee->typec == 1) {
+ type_str = webidl_type_to_str(
+ atributee->typev[0].modifier,
+ atributee->typev[0].base);
+ } else {
+ type_str = "multiple";
+ }
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: setter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->type_modifier,
- atributee->base_type));
+ type_str);
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
}
commitdiff http://git.netsurf-browser.org/nsgenbind.git/commit/?id=35fe42358429770a4...
commit 35fe42358429770a4a305dff991b8090736e4957
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
extend IR to have a separate map for attribute types
diff --git a/src/ir.c b/src/ir.c
index 566ac17..8084c40 100644
--- a/src/ir.c
+++ b/src/ir.c
@@ -427,6 +427,84 @@ get_extended_value(struct webidl_node *node, const char *key)
return NULL;
}
+
+/**
+ * Create IR entry for a type
+ */
+static int
+type_map_new(struct webidl_node *node,
+ int *typec_out,
+ struct ir_type_entry **typev_out)
+{
+ int typec;
+ struct webidl_node *type_node;
+ struct ir_type_entry *typev;
+ struct ir_type_entry *cure;
+
+ typec = webidl_node_enumerate_type(
+ webidl_node_getnode(node),
+ WEBIDL_NODE_TYPE_TYPE);
+ if (typec == 0) {
+ *typec_out = 0;
+ *typev_out = NULL;
+ return 0;
+ }
+
+ typev = calloc(typec, sizeof(*typev));
+ cure = typev;
+
+ type_node = webidl_node_find_type(webidl_node_getnode(node),
+ NULL,
+ WEBIDL_NODE_TYPE_TYPE);
+
+ while (type_node != NULL) {
+ enum webidl_type *base;
+ enum webidl_type_modifier *modifier;
+
+ /* type base */
+ base = (enum webidl_type *)webidl_node_getint(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_TYPE_BASE));
+ if (base != NULL) {
+ cure->base = *base;
+ }
+
+ /* type modifier */
+ modifier = (enum webidl_type_modifier *)webidl_node_getint(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_MODIFIER));
+ if (modifier != NULL) {
+ cure->modifier = *modifier;
+ } else {
+ cure->modifier = WEBIDL_TYPE_MODIFIER_NONE;
+ }
+
+ /* type name */
+ cure->name = webidl_node_gettext(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_IDENT));
+
+ /* next entry */
+ cure++;
+
+ type_node = webidl_node_find_type(
+ webidl_node_getnode(node),
+ type_node,
+ WEBIDL_NODE_TYPE_TYPE);
+ }
+
+ *typec_out = typec;
+ *typev_out = typev;
+
+ return 0;
+}
+
/**
* Create a new ir entry for an attribute
*/
@@ -472,13 +550,10 @@ attribute_map_new(struct webidl_node *interface,
WEBIDL_NODE_TYPE_ATTRIBUTE);
while (at_node != NULL) {
- struct webidl_node *type_node; /* type of attribute */
- enum webidl_type *type_base;
+ /* process attribute node into an entry */
enum webidl_type_modifier *modifier;
- /* process attribute node into an entry */
-
cure->node = at_node;
cure->name = webidl_node_gettext(
@@ -493,32 +568,8 @@ attribute_map_new(struct webidl_node *interface,
GENBIND_METHOD_TYPE_GETTER,
cure->name);
- /* find attributes first base type */
- type_node = webidl_node_find_type(
- webidl_node_getnode(at_node),
- NULL,
- WEBIDL_NODE_TYPE_TYPE);
- type_base = (enum webidl_type *)webidl_node_getint(
- webidl_node_find_type(
- webidl_node_getnode(type_node),
- NULL,
- WEBIDL_NODE_TYPE_TYPE_BASE));
- if (type_base != NULL) {
- enum webidl_type_modifier *type_modifier;
-
- cure->base_type = *type_base;
-
- type_modifier = (enum webidl_type_modifier *)webidl_node_getint(
- webidl_node_find_type(
- webidl_node_getnode(type_node),
- NULL,
- WEBIDL_NODE_TYPE_MODIFIER));
- if (type_modifier != NULL) {
- cure->type_modifier = *type_modifier;
- } else {
- cure->type_modifier = WEBIDL_TYPE_MODIFIER_NONE;
- }
- }
+ /* create attribute type vector */
+ type_map_new(at_node, &cure->typec, &cure->typev);
/* get binding node for read/write attributes */
diff --git a/src/ir.h b/src/ir.h
index 87c72c3..d3dd5d0 100644
--- a/src/ir.h
+++ b/src/ir.h
@@ -48,14 +48,23 @@ struct ir_operation_entry {
};
/**
+ * ir entry for type of attributes or arguments.
+ */
+struct ir_type_entry {
+ enum webidl_type base; /**< base of the type (long, short, user etc.) */
+ enum webidl_type_modifier modifier; /**< modifier for the type */
+ const char *name; /**< name of type for user types */
+};
+
+/**
* ir entry for attributes on an interface
*/
struct ir_attribute_entry {
const char *name; /**< attribute name */
struct webidl_node *node; /**< AST attribute node */
- enum webidl_type base_type; /**< type of attribute */
- enum webidl_type_modifier type_modifier; /**< modifier for the type */
+ int typec; /**< number of types for attribute */
+ struct ir_type_entry *typev; /**< types on attribute */
enum webidl_type_modifier modifier; /**< modifier for the attribute intself */
const char *putforwards; /**< putforwards attribute */
commitdiff http://git.netsurf-browser.org/nsgenbind.git/commit/?id=ce20b3bef865c0158...
commit ce20b3bef865c015890b7a499c7547606e724037
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Add generated code for short integer values
diff --git a/src/duk-libdom-generated.c b/src/duk-libdom-generated.c
index dd294ca..cf70758 100644
--- a/src/duk-libdom-generated.c
+++ b/src/duk-libdom-generated.c
@@ -82,6 +82,30 @@ output_generated_attribute_getter(FILE* outf,
"\treturn 1;\n");
break;
+ case WEBIDL_TYPE_SHORT:
+ if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf, "\tdom_ushort s;\n");
+ } else {
+ fprintf(outf, "\tdom_short s;\n");
+ }
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &s);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_number(ctx, (duk_double_t)s);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
case WEBIDL_TYPE_BOOL:
fprintf(outf,
"\tdom_exception exc;\n"
@@ -177,6 +201,35 @@ output_generated_attribute_setter(FILE* outf,
"\treturn 0;\n");
break;
+ case WEBIDL_TYPE_SHORT:
+ if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_ushort s;\n"
+ "\n"
+ "\ts = duk_get_uint(ctx, 0);\n"
+ "\n");
+ } else {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_short s;\n"
+ "\n"
+ "\ts = duk_get_int(ctx, 0);\n"
+ "\n");
+ }
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, s);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
case WEBIDL_TYPE_BOOL:
fprintf(outf,
"\tdom_exception exc;\n"
commitdiff http://git.netsurf-browser.org/nsgenbind.git/commit/?id=cb53cae2230eedbba...
commit cb53cae2230eedbba7807ea4c60f469fea08ccb7
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
split heuristic code generation out from interface logic
diff --git a/src/Makefile b/src/Makefile
index 3ecfbe1..15095de 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,8 @@ CFLAGS := $(CFLAGS) -I$(BUILDDIR) -Isrc/ -g -DYYENABLE_NLS=0
# Sources in this directory
DIR_SOURCES := nsgenbind.c utils.c webidl-ast.c nsgenbind-ast.c ir.c \
- duk-libdom.c duk-libdom-interface.c duk-libdom-dictionary.c duk-libdom-common.c
+ duk-libdom.c duk-libdom-interface.c duk-libdom-dictionary.c \
+ duk-libdom-common.c duk-libdom-generated.c
# jsapi-libdom.c jsapi-libdom-function.c jsapi-libdom-property.c jsapi-libdom-init.c jsapi-libdom-new.c jsapi-libdom-infmap.c jsapi-libdom-jsclass.c
diff --git a/src/duk-libdom-generated.c b/src/duk-libdom-generated.c
new file mode 100644
index 0000000..dd294ca
--- /dev/null
+++ b/src/duk-libdom-generated.c
@@ -0,0 +1,210 @@
+/* duktape and libdom binding generation implementation
+ *
+ * This file is part of nsgenbind.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
+ */
+
+/**
+ * \file
+ * functions that automatically generate binding contents based on heuristics
+ * with explicit knowledge about libdom and how IDL data types map to it.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "options.h"
+#include "utils.h"
+#include "nsgenbind-ast.h"
+#include "webidl-ast.h"
+#include "ir.h"
+#include "duk-libdom.h"
+
+/* exported function documented in duk-libdom.h */
+int
+output_generated_attribute_getter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ switch (atributee->base_type) {
+ case WEBIDL_TYPE_STRING:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_string *str;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &str);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_lstring(ctx,\n"
+ "\t\tdom_string_data(str),\n"
+ "\t\tdom_string_length(str));\n"
+ "\tdom_string_unref(str);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_LONG:
+ if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf, "\tdom_ulong l;\n");
+ } else {
+ fprintf(outf, "\tdom_long l;\n");
+ }
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &l);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_number(ctx, (duk_double_t)l);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_BOOL:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tbool b;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &b);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_boolean(ctx, b);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ default:
+ return -1;
+
+ }
+
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+
+ return 0;
+}
+
+/* exported function documented in duk-libdom.h */
+int
+output_generated_attribute_setter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ switch (atributee->base_type) {
+ case WEBIDL_TYPE_STRING:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_string *str;\n"
+ "\tduk_size_t slen;\n"
+ "\tconst char *s;\n"
+ "\ts = duk_safe_to_lstring(ctx, 0, &slen);\n"
+ "\n"
+ "\texc = dom_string_create((const uint8_t *)s, slen, &str);\n"
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, str);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tdom_string_unref(str);\n"
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_LONG:
+ if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_ulong l;\n"
+ "\n"
+ "\tl = duk_get_uint(ctx, 0);\n"
+ "\n");
+ } else {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_long l;\n"
+ "\n"
+ "\tl = duk_get_int(ctx, 0);\n"
+ "\n");
+ }
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, l);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_BOOL:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tbool b;\n"
+ "\n"
+ "\tb = duk_get_boolean(ctx, 0);\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, b);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ default:
+ return -1;
+
+ }
+
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+
+ return 0;
+}
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index 553a213..d7214e3 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -1161,6 +1161,11 @@ output_interface_operation(FILE* outf,
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: method %s::%s();",
interfacee->name, operatione->name);
+
+ if (options->dbglog) {
+ fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+ }
+
fprintf(outf,"\treturn 0;\n");
}
@@ -1192,93 +1197,6 @@ output_interface_operations(FILE* outf, struct ir_entry *ife)
}
-/**
- * Generate class property getter for a single attribute
- */
-static int
-output_generated_attribute_getter(FILE* outf,
- struct ir_entry *interfacee,
- struct ir_attribute_entry *atributee)
-{
- switch (atributee->base_type) {
- case WEBIDL_TYPE_STRING:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_string *str;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &str);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_lstring(ctx,\n"
- "\t\tdom_string_data(str),\n"
- "\t\tdom_string_length(str));\n"
- "\tdom_string_unref(str);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
- fprintf(outf, "\tdom_ulong l;\n");
- } else {
- fprintf(outf, "\tdom_long l;\n");
- }
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &l);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_number(ctx, (duk_double_t)l);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- case WEBIDL_TYPE_BOOL:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tbool b;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &b);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_boolean(ctx, b);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- default:
- return -1;
-
- }
-
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
-
- return 0;
-}
/**
* Output class property getter for a single attribute
@@ -1312,6 +1230,8 @@ output_attribute_getter(FILE* outf,
}
}
+ /* no implementation so generate default and warnings if required */
+
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: getter %s::%s(%s);",
interfacee->name,
@@ -1323,7 +1243,6 @@ output_attribute_getter(FILE* outf,
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
}
- /* no implementation so generate default */
fprintf(outf,
"\treturn 0;\n"
"}\n\n");
@@ -1331,102 +1250,6 @@ output_attribute_getter(FILE* outf,
return 0;
}
-/**
- * Generate class property setter for a single attribute
- */
-static int
-output_generated_attribute_setter(FILE* outf,
- struct ir_entry *interfacee,
- struct ir_attribute_entry *atributee)
-{
- switch (atributee->base_type) {
- case WEBIDL_TYPE_STRING:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_string *str;\n"
- "\tduk_size_t slen;\n"
- "\tconst char *s;\n"
- "\ts = duk_safe_to_lstring(ctx, 0, &slen);\n"
- "\n"
- "\texc = dom_string_create((const uint8_t *)s, slen, &str);\n"
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, str);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tdom_string_unref(str);\n"
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_ulong l;\n"
- "\n"
- "\tl = duk_get_uint(ctx, 0);\n"
- "\n");
- } else {
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_long l;\n"
- "\n"
- "\tl = duk_get_int(ctx, 0);\n"
- "\n");
- }
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, l);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- case WEBIDL_TYPE_BOOL:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tbool b;\n"
- "\n"
- "\tb = duk_get_boolean(ctx, 0);\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, b);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- default:
- return -1;
-
- }
-
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
-
- return 0;
-}
/**
* Generate class property setter for a putforwards attribute
diff --git a/src/duk-libdom.h b/src/duk-libdom.h
index 73b7233..51d4327 100644
--- a/src/duk-libdom.h
+++ b/src/duk-libdom.h
@@ -111,4 +111,15 @@ int output_ctype(FILE *outf, struct genbind_node *node, bool identifier);
*/
char *gen_idl2c_name(const char *idlname);
+/**
+ * Generate class property setter for a single attribute.
+ */
+int output_generated_attribute_setter(FILE* outf, struct ir_entry *interfacee, struct ir_attribute_entry *atributee);
+
+/**
+ * Generate class property getter for a single attribute.
+ */
+int output_generated_attribute_getter(FILE* outf, struct ir_entry *interfacee, struct ir_attribute_entry *atributee);
+
+
#endif
-----------------------------------------------------------------------
Summary of changes:
src/Makefile | 3 +-
src/duk-libdom-generated.c | 375 ++++++++++++++++++++++++++++++++++++++++++++
src/duk-libdom-interface.c | 216 ++++---------------------
src/duk-libdom.h | 11 ++
src/ir.c | 111 +++++++++----
src/ir.h | 13 +-
6 files changed, 508 insertions(+), 221 deletions(-)
create mode 100644 src/duk-libdom-generated.c
diff --git a/src/Makefile b/src/Makefile
index 3ecfbe1..15095de 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,8 @@ CFLAGS := $(CFLAGS) -I$(BUILDDIR) -Isrc/ -g -DYYENABLE_NLS=0
# Sources in this directory
DIR_SOURCES := nsgenbind.c utils.c webidl-ast.c nsgenbind-ast.c ir.c \
- duk-libdom.c duk-libdom-interface.c duk-libdom-dictionary.c duk-libdom-common.c
+ duk-libdom.c duk-libdom-interface.c duk-libdom-dictionary.c \
+ duk-libdom-common.c duk-libdom-generated.c
# jsapi-libdom.c jsapi-libdom-function.c jsapi-libdom-property.c jsapi-libdom-init.c jsapi-libdom-new.c jsapi-libdom-infmap.c jsapi-libdom-jsclass.c
diff --git a/src/duk-libdom-generated.c b/src/duk-libdom-generated.c
new file mode 100644
index 0000000..e40c43e
--- /dev/null
+++ b/src/duk-libdom-generated.c
@@ -0,0 +1,375 @@
+/* duktape and libdom binding generation implementation
+ *
+ * This file is part of nsgenbind.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
+ */
+
+/**
+ * \file
+ * functions that automatically generate binding contents based on heuristics
+ * with explicit knowledge about libdom and how IDL data types map to it.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <errno.h>
+#include <ctype.h>
+
+#include "options.h"
+#include "utils.h"
+#include "nsgenbind-ast.h"
+#include "webidl-ast.h"
+#include "ir.h"
+#include "duk-libdom.h"
+
+static int
+output_generated_attribute_user_getter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ interfacee = interfacee;
+
+ if ((atributee->typev[0].name != NULL) &&
+ strcmp(atributee->typev[0].name, "EventHandler") == 0) {
+
+ /* this can generate for onxxx event handlers */
+ if ((atributee->name[0] != 'o') ||
+ (atributee->name[1] != 'n')) {
+ return -1; /* not onxxx */
+ }
+
+ fprintf(outf,
+ "\tdom_event_target *et = (dom_event_target *)(((node_private_t *)priv)->node);\n"
+ "\tdom_string *name;\n"
+ "\tdom_exception exc;\n\n"
+ "\texc = dom_string_create((const uint8_t *)\"%s\", %ld, &name);\n"
+ "\tif (exc != DOM_NO_ERR) return 0;\n\n"
+ "\tduk_push_this(ctx);\n"
+ "\t/* ... node */\n"
+ "\tif (dukky_get_current_value_of_event_handler(ctx, name, et) == false) {\n"
+ "\t\tdom_string_unref(name);\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\tdom_string_unref(name);\n"
+ "\t/* ... handler node */\n"
+ "\tduk_pop(ctx);\n"
+ "\t/* ... handler */\n"
+ "\treturn 1;\n",
+ atributee->name + 2,
+ strlen(atributee->name + 2));
+ return 0;
+ }
+ return -1;
+}
+
+/* exported function documented in duk-libdom.h */
+int
+output_generated_attribute_getter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ int res = 0;
+
+ /* generation can only cope with a single type on the attribute */
+ if (atributee->typec != 1) {
+ return -1;
+ }
+
+ switch (atributee->typev[0].base) {
+ case WEBIDL_TYPE_STRING:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_string *str;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &str);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_lstring(ctx,\n"
+ "\t\tdom_string_data(str),\n"
+ "\t\tdom_string_length(str));\n"
+ "\tdom_string_unref(str);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_LONG:
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf, "\tdom_ulong l;\n");
+ } else {
+ fprintf(outf, "\tdom_long l;\n");
+ }
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &l);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_number(ctx, (duk_double_t)l);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_SHORT:
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf, "\tdom_ushort s;\n");
+ } else {
+ fprintf(outf, "\tdom_short s;\n");
+ }
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &s);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_number(ctx, (duk_double_t)s);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_BOOL:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tbool b;\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &b);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\tduk_push_boolean(ctx, b);\n"
+ "\n"
+ "\treturn 1;\n");
+ break;
+
+ case WEBIDL_TYPE_USER:
+ res = output_generated_attribute_user_getter(outf,
+ interfacee,
+ atributee);
+ break;
+
+ default:
+ res = -1;
+ break;
+
+ }
+
+ if (res >= 0) {
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+ }
+
+ return res;
+}
+
+static int
+output_generated_attribute_user_setter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ interfacee = interfacee;
+
+ if ((atributee->typev[0].name != NULL) &&
+ strcmp(atributee->typev[0].name, "EventHandler") == 0) {
+
+ /* this can generate for onxxx event handlers */
+ if ((atributee->name[0] != 'o') ||
+ (atributee->name[1] != 'n')) {
+ return -1; /* not onxxx */
+ }
+
+ fprintf(outf,
+ "\t/* handlerfn */\n"
+ "\tduk_push_this(ctx);\n"
+ "\t/* handlerfn this */\n"
+ "\tduk_get_prop_string(ctx, -1, HANDLER_MAGIC);\n"
+ "\t/* handlerfn this handlers */\n"
+ "\tduk_push_lstring(ctx, \"%s\", %ld);\n"
+ "\t/* handlerfn this handlers click */\n"
+ "\tduk_dup(ctx, -4);\n"
+ "\t/* handlerfn this handlers click handlerfn */\n"
+ "\tduk_put_prop(ctx, -3);\n"
+ "\t/* handlerfn this handlers */\n"
+ "\tdukky_register_event_listener_for(ctx,\n"
+ "\t\t(dom_element *)((node_private_t *)priv)->node,\n"
+ "\t\tcorestring_dom_click);\n"
+ "\treturn 0;\n",
+ atributee->name + 2,
+ strlen(atributee->name + 2));
+ return 0;
+ }
+ return -1;
+}
+
+
+/* exported function documented in duk-libdom.h */
+int
+output_generated_attribute_setter(FILE* outf,
+ struct ir_entry *interfacee,
+ struct ir_attribute_entry *atributee)
+{
+ int res = 0;
+
+ /* generation can only cope with a single type on the attribute */
+ if (atributee->typec != 1) {
+ return -1;
+ }
+
+ switch (atributee->typev[0].base) {
+ case WEBIDL_TYPE_STRING:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_string *str;\n"
+ "\tduk_size_t slen;\n"
+ "\tconst char *s;\n"
+ "\ts = duk_safe_to_lstring(ctx, 0, &slen);\n"
+ "\n"
+ "\texc = dom_string_create((const uint8_t *)s, slen, &str);\n"
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, str);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tdom_string_unref(str);\n"
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_LONG:
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_ulong l;\n"
+ "\n"
+ "\tl = duk_get_uint(ctx, 0);\n"
+ "\n");
+ } else {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_long l;\n"
+ "\n"
+ "\tl = duk_get_int(ctx, 0);\n"
+ "\n");
+ }
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, l);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_SHORT:
+ if (atributee->typev[0].modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_ushort s;\n"
+ "\n"
+ "\ts = duk_get_uint(ctx, 0);\n"
+ "\n");
+ } else {
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tdom_short s;\n"
+ "\n"
+ "\ts = duk_get_int(ctx, 0);\n"
+ "\n");
+ }
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, s);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_BOOL:
+ fprintf(outf,
+ "\tdom_exception exc;\n"
+ "\tbool b;\n"
+ "\n"
+ "\tb = duk_get_boolean(ctx, 0);\n"
+ "\n");
+ fprintf(outf,
+ "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, b);\n",
+ interfacee->class_name,
+ atributee->property_name,
+ interfacee->class_name);
+ fprintf(outf,
+ "\tif (exc != DOM_NO_ERR) {\n"
+ "\t\treturn 0;\n"
+ "\t}\n"
+ "\n"
+ "\treturn 0;\n");
+ break;
+
+ case WEBIDL_TYPE_USER:
+ res = output_generated_attribute_user_setter(outf,
+ interfacee,
+ atributee);
+ break;
+
+ default:
+ res = -1;
+ break;
+
+ }
+
+ if (res >= 0) {
+ WARN(WARNING_GENERATED,
+ "Generated: getter %s::%s();",
+ interfacee->name, atributee->name);
+ }
+
+ return res;
+}
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index 553a213..8741815 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -1161,6 +1161,11 @@ output_interface_operation(FILE* outf,
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: method %s::%s();",
interfacee->name, operatione->name);
+
+ if (options->dbglog) {
+ fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
+ }
+
fprintf(outf,"\treturn 0;\n");
}
@@ -1192,93 +1197,6 @@ output_interface_operations(FILE* outf, struct ir_entry *ife)
}
-/**
- * Generate class property getter for a single attribute
- */
-static int
-output_generated_attribute_getter(FILE* outf,
- struct ir_entry *interfacee,
- struct ir_attribute_entry *atributee)
-{
- switch (atributee->base_type) {
- case WEBIDL_TYPE_STRING:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_string *str;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &str);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_lstring(ctx,\n"
- "\t\tdom_string_data(str),\n"
- "\t\tdom_string_length(str));\n"
- "\tdom_string_unref(str);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
- fprintf(outf, "\tdom_ulong l;\n");
- } else {
- fprintf(outf, "\tdom_long l;\n");
- }
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &l);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_number(ctx, (duk_double_t)l);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- case WEBIDL_TYPE_BOOL:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tbool b;\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_get_%s((struct dom_%s *)((node_private_t*)priv)->node, &b);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\tduk_push_boolean(ctx, b);\n"
- "\n"
- "\treturn 1;\n");
- break;
-
- default:
- return -1;
-
- }
-
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
-
- return 0;
-}
/**
* Output class property getter for a single attribute
@@ -1312,18 +1230,27 @@ output_attribute_getter(FILE* outf,
}
}
+ /* no implementation so generate default and warnings if required */
+ const char *type_str;
+ if (atributee->typec == 0) {
+ type_str = "";
+ } else if (atributee->typec == 1) {
+ type_str = webidl_type_to_str(atributee->typev[0].modifier,
+ atributee->typev[0].base);
+ } else {
+ type_str = "multiple";
+ }
+
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: getter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->type_modifier,
- atributee->base_type));
+ type_str);
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
}
- /* no implementation so generate default */
fprintf(outf,
"\treturn 0;\n"
"}\n\n");
@@ -1331,102 +1258,6 @@ output_attribute_getter(FILE* outf,
return 0;
}
-/**
- * Generate class property setter for a single attribute
- */
-static int
-output_generated_attribute_setter(FILE* outf,
- struct ir_entry *interfacee,
- struct ir_attribute_entry *atributee)
-{
- switch (atributee->base_type) {
- case WEBIDL_TYPE_STRING:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_string *str;\n"
- "\tduk_size_t slen;\n"
- "\tconst char *s;\n"
- "\ts = duk_safe_to_lstring(ctx, 0, &slen);\n"
- "\n"
- "\texc = dom_string_create((const uint8_t *)s, slen, &str);\n"
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, str);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tdom_string_unref(str);\n"
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- case WEBIDL_TYPE_LONG:
- if (atributee->type_modifier == WEBIDL_TYPE_MODIFIER_UNSIGNED) {
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_ulong l;\n"
- "\n"
- "\tl = duk_get_uint(ctx, 0);\n"
- "\n");
- } else {
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tdom_long l;\n"
- "\n"
- "\tl = duk_get_int(ctx, 0);\n"
- "\n");
- }
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, l);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- case WEBIDL_TYPE_BOOL:
- fprintf(outf,
- "\tdom_exception exc;\n"
- "\tbool b;\n"
- "\n"
- "\tb = duk_get_boolean(ctx, 0);\n"
- "\n");
- fprintf(outf,
- "\texc = dom_%s_set_%s((struct dom_%s *)((node_private_t*)priv)->node, b);\n",
- interfacee->class_name,
- atributee->property_name,
- interfacee->class_name);
- fprintf(outf,
- "\tif (exc != DOM_NO_ERR) {\n"
- "\t\treturn 0;\n"
- "\t}\n"
- "\n"
- "\treturn 0;\n");
- break;
-
- default:
- return -1;
-
- }
-
- WARN(WARNING_GENERATED,
- "Generated: getter %s::%s();",
- interfacee->name, atributee->name);
-
- return 0;
-}
/**
* Generate class property setter for a putforwards attribute
@@ -1498,12 +1329,21 @@ output_attribute_setter(FILE* outf,
/* implementation not generated from any other source */
if (res < 0) {
+ const char *type_str;
+ if (atributee->typec == 0) {
+ type_str = "";
+ } else if (atributee->typec == 1) {
+ type_str = webidl_type_to_str(
+ atributee->typev[0].modifier,
+ atributee->typev[0].base);
+ } else {
+ type_str = "multiple";
+ }
WARN(WARNING_UNIMPLEMENTED,
"Unimplemented: setter %s::%s(%s);",
interfacee->name,
atributee->name,
- webidl_type_to_str(atributee->type_modifier,
- atributee->base_type));
+ type_str);
if (options->dbglog) {
fprintf(outf, "\tLOG(\"Unimplemented\");\n" );
}
diff --git a/src/duk-libdom.h b/src/duk-libdom.h
index 73b7233..51d4327 100644
--- a/src/duk-libdom.h
+++ b/src/duk-libdom.h
@@ -111,4 +111,15 @@ int output_ctype(FILE *outf, struct genbind_node *node, bool identifier);
*/
char *gen_idl2c_name(const char *idlname);
+/**
+ * Generate class property setter for a single attribute.
+ */
+int output_generated_attribute_setter(FILE* outf, struct ir_entry *interfacee, struct ir_attribute_entry *atributee);
+
+/**
+ * Generate class property getter for a single attribute.
+ */
+int output_generated_attribute_getter(FILE* outf, struct ir_entry *interfacee, struct ir_attribute_entry *atributee);
+
+
#endif
diff --git a/src/ir.c b/src/ir.c
index 566ac17..8084c40 100644
--- a/src/ir.c
+++ b/src/ir.c
@@ -427,6 +427,84 @@ get_extended_value(struct webidl_node *node, const char *key)
return NULL;
}
+
+/**
+ * Create IR entry for a type
+ */
+static int
+type_map_new(struct webidl_node *node,
+ int *typec_out,
+ struct ir_type_entry **typev_out)
+{
+ int typec;
+ struct webidl_node *type_node;
+ struct ir_type_entry *typev;
+ struct ir_type_entry *cure;
+
+ typec = webidl_node_enumerate_type(
+ webidl_node_getnode(node),
+ WEBIDL_NODE_TYPE_TYPE);
+ if (typec == 0) {
+ *typec_out = 0;
+ *typev_out = NULL;
+ return 0;
+ }
+
+ typev = calloc(typec, sizeof(*typev));
+ cure = typev;
+
+ type_node = webidl_node_find_type(webidl_node_getnode(node),
+ NULL,
+ WEBIDL_NODE_TYPE_TYPE);
+
+ while (type_node != NULL) {
+ enum webidl_type *base;
+ enum webidl_type_modifier *modifier;
+
+ /* type base */
+ base = (enum webidl_type *)webidl_node_getint(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_TYPE_BASE));
+ if (base != NULL) {
+ cure->base = *base;
+ }
+
+ /* type modifier */
+ modifier = (enum webidl_type_modifier *)webidl_node_getint(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_MODIFIER));
+ if (modifier != NULL) {
+ cure->modifier = *modifier;
+ } else {
+ cure->modifier = WEBIDL_TYPE_MODIFIER_NONE;
+ }
+
+ /* type name */
+ cure->name = webidl_node_gettext(
+ webidl_node_find_type(
+ webidl_node_getnode(type_node),
+ NULL,
+ WEBIDL_NODE_TYPE_IDENT));
+
+ /* next entry */
+ cure++;
+
+ type_node = webidl_node_find_type(
+ webidl_node_getnode(node),
+ type_node,
+ WEBIDL_NODE_TYPE_TYPE);
+ }
+
+ *typec_out = typec;
+ *typev_out = typev;
+
+ return 0;
+}
+
/**
* Create a new ir entry for an attribute
*/
@@ -472,13 +550,10 @@ attribute_map_new(struct webidl_node *interface,
WEBIDL_NODE_TYPE_ATTRIBUTE);
while (at_node != NULL) {
- struct webidl_node *type_node; /* type of attribute */
- enum webidl_type *type_base;
+ /* process attribute node into an entry */
enum webidl_type_modifier *modifier;
- /* process attribute node into an entry */
-
cure->node = at_node;
cure->name = webidl_node_gettext(
@@ -493,32 +568,8 @@ attribute_map_new(struct webidl_node *interface,
GENBIND_METHOD_TYPE_GETTER,
cure->name);
- /* find attributes first base type */
- type_node = webidl_node_find_type(
- webidl_node_getnode(at_node),
- NULL,
- WEBIDL_NODE_TYPE_TYPE);
- type_base = (enum webidl_type *)webidl_node_getint(
- webidl_node_find_type(
- webidl_node_getnode(type_node),
- NULL,
- WEBIDL_NODE_TYPE_TYPE_BASE));
- if (type_base != NULL) {
- enum webidl_type_modifier *type_modifier;
-
- cure->base_type = *type_base;
-
- type_modifier = (enum webidl_type_modifier *)webidl_node_getint(
- webidl_node_find_type(
- webidl_node_getnode(type_node),
- NULL,
- WEBIDL_NODE_TYPE_MODIFIER));
- if (type_modifier != NULL) {
- cure->type_modifier = *type_modifier;
- } else {
- cure->type_modifier = WEBIDL_TYPE_MODIFIER_NONE;
- }
- }
+ /* create attribute type vector */
+ type_map_new(at_node, &cure->typec, &cure->typev);
/* get binding node for read/write attributes */
diff --git a/src/ir.h b/src/ir.h
index 87c72c3..d3dd5d0 100644
--- a/src/ir.h
+++ b/src/ir.h
@@ -48,14 +48,23 @@ struct ir_operation_entry {
};
/**
+ * ir entry for type of attributes or arguments.
+ */
+struct ir_type_entry {
+ enum webidl_type base; /**< base of the type (long, short, user etc.) */
+ enum webidl_type_modifier modifier; /**< modifier for the type */
+ const char *name; /**< name of type for user types */
+};
+
+/**
* ir entry for attributes on an interface
*/
struct ir_attribute_entry {
const char *name; /**< attribute name */
struct webidl_node *node; /**< AST attribute node */
- enum webidl_type base_type; /**< type of attribute */
- enum webidl_type_modifier type_modifier; /**< modifier for the type */
+ int typec; /**< number of types for attribute */
+ struct ir_type_entry *typev; /**< types on attribute */
enum webidl_type_modifier modifier; /**< modifier for the attribute intself */
const char *putforwards; /**< putforwards attribute */
--
NetSurf Generator for JavaScript bindings
7 years, 6 months
netsurf: branch master updated. release/3.3-492-gc3b7e65
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/c3b7e650c5efb8262bc09...
...commit http://git.netsurf-browser.org/netsurf.git/commit/c3b7e650c5efb8262bc0998...
...tree http://git.netsurf-browser.org/netsurf.git/tree/c3b7e650c5efb8262bc0998ba...
The branch, master has been updated
via c3b7e650c5efb8262bc0998babaf9947ad29797a (commit)
from b54174e54a7f55cb6e11b6fb20f6615b37f5b65a (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=c3b7e650c5efb8262bc...
commit c3b7e650c5efb8262bc0998babaf9947ad29797a
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Fix segmentation fault when a string option is set to NULL
The check for a user option being a default value was not protecting
against the value being set to NULL.
diff --git a/utils/nsoption.c b/utils/nsoption.c
index 416e18d..1309ed8 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Option reading and saving (implementation).
*
* Options are stored in the format key:value, one per line.
@@ -232,6 +233,8 @@ nsoption_is_set(const struct nsoption_s *opts,
*/
if (((defs[entry].value.s == NULL) &&
(opts[entry].value.s != NULL)) ||
+ ((defs[entry].value.s != NULL) &&
+ (opts[entry].value.s == NULL)) ||
((defs[entry].value.s != opts[entry].value.s) &&
(strcmp(opts[entry].value.s, defs[entry].value.s) != 0))) {
ret = true;
-----------------------------------------------------------------------
Summary of changes:
utils/nsoption.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utils/nsoption.c b/utils/nsoption.c
index 416e18d..1309ed8 100644
--- a/utils/nsoption.c
+++ b/utils/nsoption.c
@@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
+/**
+ * \file
* Option reading and saving (implementation).
*
* Options are stored in the format key:value, one per line.
@@ -232,6 +233,8 @@ nsoption_is_set(const struct nsoption_s *opts,
*/
if (((defs[entry].value.s == NULL) &&
(opts[entry].value.s != NULL)) ||
+ ((defs[entry].value.s != NULL) &&
+ (opts[entry].value.s == NULL)) ||
((defs[entry].value.s != opts[entry].value.s) &&
(strcmp(opts[entry].value.s, defs[entry].value.s) != 0))) {
ret = true;
--
NetSurf Browser
7 years, 6 months
netsurf: branch master updated. release/3.3-491-gb54174e
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/b54174e54a7f55cb6e11b...
...commit http://git.netsurf-browser.org/netsurf.git/commit/b54174e54a7f55cb6e11b6f...
...tree http://git.netsurf-browser.org/netsurf.git/tree/b54174e54a7f55cb6e11b6fb2...
The branch, master has been updated
via b54174e54a7f55cb6e11b6fb20f6615b37f5b65a (commit)
from a7324d39a46a561535dcb26fac3fbd8f593dbf94 (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=b54174e54a7f55cb6e1...
commit b54174e54a7f55cb6e11b6fb20f6615b37f5b65a
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Add CSS object model and DOM parsing IDL ready for implementation
diff --git a/Docs/UnimplementedJavascript.txt b/Docs/UnimplementedJavascript.txt
index c99c580..d81c34f 100644
--- a/Docs/UnimplementedJavascript.txt
+++ b/Docs/UnimplementedJavascript.txt
@@ -168,6 +168,50 @@ getter CloseEvent::reason(string);\n
getter CloseEvent::wasClean(boolean);\n
getter CompositionEvent::data(string);\n
method CompositionEvent::initCompositionEvent();\n
+method CSS::escape();\n
+getter CSSGroupingRule::cssRules(user);\n
+method CSSGroupingRule::deleteRule();\n
+method CSSGroupingRule::insertRule();\n
+getter CSSImportRule::href(string);\n
+getter CSSImportRule::media(user);\n
+getter CSSImportRule::styleSheet(user);\n
+getter CSSMarginRule::name(string);\n
+getter CSSMarginRule::style(user);\n
+getter CSSMediaRule::media(user);\n
+getter CSSNamespaceRule::namespaceURI(string);\n
+getter CSSNamespaceRule::prefix(string);\n
+getter CSSPageRule::selectorText(string);\n
+setter CSSPageRule::selectorText(string);\n
+getter CSSPageRule::style(user);\n
+getter CSSRule::cssText(string);\n
+setter CSSRule::cssText(string);\n
+method CSSRuleList::item();\n
+getter CSSRuleList::length(unsigned long);\n
+getter CSSRule::parentRule(user);\n
+getter CSSRule::parentStyleSheet(user);\n
+getter CSSRule::type(unsigned short);\n
+getter CSSStyleDeclaration::cssFloat(string);\n
+setter CSSStyleDeclaration::cssFloat(string);\n
+getter CSSStyleDeclaration::cssText(string);\n
+setter CSSStyleDeclaration::cssText(string);\n
+getter CSSStyleDeclaration::dashed_attribute(string);\n
+setter CSSStyleDeclaration::dashed_attribute(string);\n
+method CSSStyleDeclaration::getPropertyPriority();\n
+method CSSStyleDeclaration::getPropertyValue();\n
+method CSSStyleDeclaration::item();\n
+getter CSSStyleDeclaration::length(unsigned long);\n
+getter CSSStyleDeclaration::parentRule(user);\n
+method CSSStyleDeclaration::removeProperty();\n
+method CSSStyleDeclaration::setProperty();\n
+method CSSStyleDeclaration::setPropertyPriority();\n
+method CSSStyleDeclaration::setPropertyValue();\n
+getter CSSStyleRule::selectorText(string);\n
+setter CSSStyleRule::selectorText(string);\n
+getter CSSStyleRule::style(user);\n
+getter CSSStyleSheet::cssRules(user);\n
+method CSSStyleSheet::deleteRule();\n
+method CSSStyleSheet::insertRule();\n
+getter CSSStyleSheet::ownerRule(user);\n
getter CustomEvent::detail(any);\n
method CustomEvent::initCustomEvent();\n
method DataTransfer::clearData();\n
@@ -235,6 +279,7 @@ getter Document::documentURI(string);\n
getter Document::domain(string);\n
setter Document::domain(string);\n
getter Document::embeds(user);\n
+method Document::enableStyleSheetsForSet();\n
method Document::execCommand();\n
getter Document::fgColor(string);\n
setter Document::fgColor(string);\n
@@ -261,6 +306,7 @@ method Document::importNode();\n
getter Document::inputEncoding(string);\n
getter Document::lastElementChild(user);\n
getter Document::lastModified(string);\n
+getter Document::lastStyleSheetSet(string);\n
getter Document::linkColor(string);\n
setter Document::linkColor(string);\n
getter Document::links(user);\n
@@ -395,6 +441,7 @@ setter Document::onwheel(user);\n
method Document::open();\n
getter Document::origin(string);\n
getter Document::plugins(user);\n
+getter Document::preferredStyleSheetSet(string);\n
method Document::prepend();\n
method Document::query();\n
method Document::queryAll();\n
@@ -409,6 +456,10 @@ getter Document::readyState(user);\n
getter Document::referrer(string);\n
method Document::releaseEvents();\n
getter Document::scripts(user);\n
+getter Document::selectedStyleSheetSet(string);\n
+setter Document::selectedStyleSheetSet(string);\n
+getter Document::styleSheetSets(string);\n
+getter Document::styleSheets(user);\n
getter Document::title(string);\n
setter Document::title(string);\n
method DocumentType::after();\n
@@ -425,6 +476,7 @@ method DOMImplementation::createDocument();\n
method DOMImplementation::createDocumentType();\n
method DOMImplementation::createHTMLDocument();\n
method DOMImplementation::hasFeature();\n
+method DOMParser::parseFromString();\n
getter DOMSettableTokenList::value(string);\n
setter DOMSettableTokenList::value(string);\n
method DOMTokenList::add();\n
@@ -458,9 +510,11 @@ method Element::after();\n
method Element::append();\n
getter Element::attributes(user);\n
method Element::before();\n
+getter Element::cascadedStyle(user);\n
getter Element::children(user);\n
getter Element::classList(user);\n
method Element::closest();\n
+getter Element::defaultStyle(user);\n
method Element::getAttributeNode();\n
method Element::getAttributeNodeNS();\n
method Element::getAttributeNS();\n
@@ -468,15 +522,22 @@ method Element::getElementsByClassName();\n
method Element::getElementsByTagNameNS();\n
method Element::hasAttributeNS();\n
method Element::hasAttributes();\n
+getter Element::innerHTML(string);\n
+setter Element::innerHTML(string);\n
+method Element::insertAdjacentHTML();\n
getter Element::localName(string);\n
method Element::matches();\n
getter Element::namespaceURI(string);\n
+getter Element::outerHTML(string);\n
+setter Element::outerHTML(string);\n
getter Element::prefix(string);\n
method Element::prepend();\n
+method Element::pseudo();\n
method Element::query();\n
method Element::queryAll();\n
method Element::querySelector();\n
method Element::querySelectorAll();\n
+getter Element::rawComputedStyle(user);\n
method Element::remove();\n
method Element::removeAttributeNode();\n
method Element::removeAttributeNS();\n
@@ -485,20 +546,15 @@ method Element::setAttributeNode();\n
method Element::setAttributeNodeNS();\n
method Element::setAttributeNS();\n
getter Element::tagName(string);\n
+getter Element::usedStyle(user);\n
getter ErrorEvent::colno(unsigned long);\n
getter ErrorEvent::error(any);\n
getter ErrorEvent::filename(string);\n
getter ErrorEvent::lineno(unsigned long);\n
getter ErrorEvent::message(string);\n
-getter Event::bubbles(boolean);\n
-getter Event::cancelable(boolean);\n
-getter Event::currentTarget(user);\n
-getter Event::defaultPrevented(boolean);\n
-getter Event::eventPhase(unsigned short);\n
method Event::initEvent();\n
getter Event::isTrusted(boolean);\n
method EventListener::handleEvent();\n
-method Event::preventDefault();\n
method EventSource::close();\n
getter EventSource::onerror(user);\n
setter EventSource::onerror(user);\n
@@ -509,14 +565,10 @@ setter EventSource::onopen(user);\n
getter EventSource::readyState(unsigned short);\n
getter EventSource::url(string);\n
getter EventSource::withCredentials(boolean);\n
-method Event::stopImmediatePropagation();\n
-method Event::stopPropagation();\n
method EventTarget::addEventListener();\n
method EventTarget::dispatchEvent();\n
method EventTarget::removeEventListener();\n
-getter Event::target(user);\n
getter Event::timeStamp(user);\n
-getter Event::type(string);\n
method External::AddSearchProvider();\n
method External::IsSearchProviderInstalled();\n
method FocusEvent::initFocusEvent();\n
@@ -716,8 +768,6 @@ getter HTMLElement::oncanplay(user);\n
setter HTMLElement::oncanplay(user);\n
getter HTMLElement::onchange(user);\n
setter HTMLElement::onchange(user);\n
-getter HTMLElement::onclick(user);\n
-setter HTMLElement::onclick(user);\n
getter HTMLElement::onclose(user);\n
setter HTMLElement::onclose(user);\n
getter HTMLElement::oncontextmenu(user);\n
@@ -828,6 +878,7 @@ getter HTMLElement::onwheel(user);\n
setter HTMLElement::onwheel(user);\n
getter HTMLElement::spellcheck(boolean);\n
setter HTMLElement::spellcheck(boolean);\n
+getter HTMLElement::style(user);\n
getter HTMLElement::tabIndex(long);\n
setter HTMLElement::tabIndex(long);\n
getter HTMLElement::translate(boolean);\n
@@ -1021,6 +1072,7 @@ getter HTMLLegendElement::form(user);\n
getter HTMLLinkElement::crossOrigin(string);\n
setter HTMLLinkElement::crossOrigin(string);\n
getter HTMLLinkElement::relList(user);\n
+getter HTMLLinkElement::sheet(user);\n
getter HTMLLinkElement::sizes(user);\n
getter HTMLMapElement::areas(user);\n
getter HTMLMarqueeElement::behavior(string);\n
@@ -1239,6 +1291,7 @@ getter HTMLStyleElement::nonce(string);\n
setter HTMLStyleElement::nonce(string);\n
getter HTMLStyleElement::scoped(boolean);\n
setter HTMLStyleElement::scoped(boolean);\n
+getter HTMLStyleElement::sheet(user);\n
getter HTMLTableCellElement::headers(user);\n
getter HTMLTableColElement::span(unsigned long);\n
setter HTMLTableColElement::span(unsigned long);\n
@@ -1422,6 +1475,12 @@ method MediaController::unpause();\n
getter MediaController::volume(double);\n
setter MediaController::volume(double);\n
getter MediaError::code(unsigned short);\n
+method MediaList::appendMedium();\n
+method MediaList::deleteMedium();\n
+method MediaList::item();\n
+getter MediaList::length(unsigned long);\n
+getter MediaList::mediaText(string);\n
+setter MediaList::mediaText(string);\n
getter MessageChannel::port1(user);\n
getter MessageChannel::port2(user);\n
getter MessageEvent::data(any);\n
@@ -1528,7 +1587,12 @@ getter Plugin::length(unsigned long);\n
method Plugin::namedItem();\n
getter Plugin::name(string);\n
getter PopStateEvent::state(any);\n
+getter ProcessingInstruction::sheet(user);\n
getter ProcessingInstruction::target(string);\n
+getter PseudoElement::cascadedStyle(user);\n
+getter PseudoElement::defaultStyle(user);\n
+getter PseudoElement::rawComputedStyle(user);\n
+getter PseudoElement::usedStyle(user);\n
getter RadioNodeList::value(string);\n
setter RadioNodeList::value(string);\n
method Range::cloneContents();\n
@@ -1538,6 +1602,7 @@ getter Range::collapsed(boolean);\n
getter Range::commonAncestorContainer(user);\n
method Range::compareBoundaryPoints();\n
method Range::comparePoint();\n
+method Range::createContextualFragment();\n
method Range::deleteContents();\n
method Range::detach();\n
getter Range::endContainer(user);\n
@@ -1576,6 +1641,17 @@ method Storage::key();\n
getter Storage::length(unsigned long);\n
method Storage::removeItem();\n
method Storage::setItem();\n
+getter StyleSheet::disabled(boolean);\n
+setter StyleSheet::disabled(boolean);\n
+getter StyleSheet::href(string);\n
+method StyleSheetList::item();\n
+getter StyleSheetList::length(unsigned long);\n
+getter StyleSheet::media(user);\n
+getter StyleSheet::ownerNode(user);\n
+getter StyleSheet::parentStyleSheet(user);\n
+getter StyleSheet::title(string);\n
+getter StyleSheet::type(string);\n
+getter SVGElement::style(user);\n
getter TextMetrics::actualBoundingBoxAscent(double);\n
getter TextMetrics::actualBoundingBoxDescent(double);\n
getter TextMetrics::actualBoundingBoxLeft(double);\n
@@ -1741,6 +1817,7 @@ getter Window::external(user);\n
method Window::focus();\n
getter Window::frameElement(user);\n
getter Window::frames(user);\n
+method Window::getComputedStyle();\n
getter Window::history(user);\n
getter Window::length(unsigned long);\n
getter Window::localStorage(user);\n
@@ -1969,4 +2046,5 @@ setter Worker::onmessage(user);\n
method Worker::postMessage();\n
method Worker::terminate();\n
method XMLDocument::load();\n
+method XMLSerializer::serializeToString();\n
*/
diff --git a/javascript/WebIDL/Makefile b/javascript/WebIDL/Makefile
index 6319bbd..7d901ce 100644
--- a/javascript/WebIDL/Makefile
+++ b/javascript/WebIDL/Makefile
@@ -16,12 +16,13 @@
.PHONY:all clean
-all: dom.idl html.idl uievents.idl
+all: dom.idl html.idl uievents.idl cssom.idl
-.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
+.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
.INTERMEDIATE:html-spec.html html-spec.xml html-idl.html
.INTERMEDIATE:uievents-spec.html uievents-spec.xml uievents-idl.html
.INTERMEDIATE:urlutils-spec.html urlutils-spec.xml urlutils-idl.html
+.INTERMEDIATE:cssom-spec.html cssom-spec.xml cssom-idl.html
dom-spec.html:
curl -s https://dom.spec.whatwg.org/ -o $@
@@ -35,8 +36,11 @@ uievents-spec.html:
urlutils-spec.html:
curl -s https://url.spec.whatwg.org/ -o $@
+cssom-spec.html:
+ curl -s https://drafts.csswg.org/cssom-1/ -o $@
+
%-spec.xml: %-spec.html
- -tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section -o $@ -asxml $<
+ -tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section,g,path,circle -o $@ -asxml $<
%-idl.html: %-spec.xml
hxselect 'pre[class="idl"]' < $< > $@
diff --git a/javascript/WebIDL/cssom.idl b/javascript/WebIDL/cssom.idl
new file mode 100644
index 0000000..95c97e4
--- /dev/null
+++ b/javascript/WebIDL/cssom.idl
@@ -0,0 +1,157 @@
+// Retrived from https://drafts.csswg.org/cssom-1/
+// Wed Nov 4 15:39:43 GMT 2015
+// Removed duplicate IDL from appendix
+
+
+[ArrayClass]interface MediaList {
+ [TreatNullAs=EmptyString] stringifier attribute DOMString mediaText;
+ readonly attribute unsigned long length;
+ getter DOMString? item(unsigned long index );
+ void appendMedium(DOMString medium );
+ void deleteMedium(DOMString medium );
+};
+
+interface StyleSheet {
+ readonly attribute DOMString type;
+ readonly attribute DOMString? href;
+ readonly attribute (Element or ProcessingInstruction)? ownerNode;
+ readonly attribute StyleSheet? parentStyleSheet;
+ readonly attribute DOMString? title;
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+ attribute boolean disabled;
+};
+
+interface CSSStyleSheet : StyleSheet {
+ readonly attribute CSSRule? ownerRule;
+ [SameObject] readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(DOMString rule , unsigned long index );
+ void deleteRule(unsigned long index );
+};
+
+[ArrayClass]interface StyleSheetList {
+ getter StyleSheet? item(unsigned long index );
+ readonly attribute unsigned long length;
+};
+
+partial interface Document {
+ [SameObject] readonly attribute StyleSheetList styleSheets;
+ attribute DOMString? selectedStyleSheetSet;
+ readonly attribute DOMString? lastStyleSheetSet;
+ readonly attribute DOMString? preferredStyleSheetSet;
+ readonly attribute DOMString[] styleSheetSets;
+ void enableStyleSheetsForSet(DOMString? name );
+};
+
+[NoInterfaceObject]interface LinkStyle {
+ readonly attribute StyleSheet? sheet;
+};
+
+ProcessingInstruction implements LinkStyle;
+
+[ArrayClass]interface CSSRuleList {
+ getter CSSRule? item(unsigned long index );
+ readonly attribute unsigned long length;
+};
+
+interface CSSRule {
+ const unsigned short STYLE_RULE = 1;
+ const unsigned short CHARSET_RULE = 2; // historical
+ const unsigned short IMPORT_RULE = 3;
+ const unsigned short MEDIA_RULE = 4;
+ const unsigned short FONT_FACE_RULE = 5;
+ const unsigned short PAGE_RULE = 6;
+ const unsigned short MARGIN_RULE = 9;
+ const unsigned short NAMESPACE_RULE = 10;
+ readonly attribute unsigned short type;
+ attribute DOMString cssText;
+ readonly attribute CSSRule? parentRule;
+ readonly attribute CSSStyleSheet? parentStyleSheet;
+};
+
+interface CSSStyleRule : CSSRule {
+ attribute DOMString selectorText;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+interface CSSImportRule : CSSRule {
+ readonly attribute DOMString href;
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+ [SameObject] readonly attribute CSSStyleSheet styleSheet;
+};
+
+interface CSSGroupingRule : CSSRule {
+ [SameObject] readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(DOMString rule , unsigned long index );
+ void deleteRule(unsigned long index );
+};
+
+interface CSSMediaRule : CSSGroupingRule {
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media ;
+};
+
+interface CSSPageRule : CSSGroupingRule {
+ attribute DOMString selectorText ;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style ;
+};
+
+interface CSSMarginRule : CSSRule {
+ readonly attribute DOMString name;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+interface CSSNamespaceRule : CSSRule {
+ readonly attribute DOMString namespaceURI;
+ readonly attribute DOMString prefix;
+};
+
+interface CSSStyleDeclaration {
+ attribute DOMString cssText;
+ readonly attribute unsigned long length;
+ getter DOMString item(unsigned long index );
+ DOMString getPropertyValue(DOMString property );
+ DOMString getPropertyPriority(DOMString property );
+ void setProperty(DOMString property , [TreatNullAs=EmptyString] DOMString value , [TreatNullAs=EmptyString] optional DOMString priority = "");
+ void setPropertyValue(DOMString property , [TreatNullAs=EmptyString] DOMString value );
+ void setPropertyPriority(DOMString property , [TreatNullAs=EmptyString] DOMString priority );
+ DOMString removeProperty(DOMString property );
+ readonly attribute CSSRule? parentRule;
+ [TreatNullAs=EmptyString] attribute DOMString cssFloat;
+};
+
+partial interface CSSStyleDeclaration {
+ [TreatNullAs=EmptyString] attribute DOMString _dashed_attribute ;
+};
+
+[NoInterfaceObject]interface ElementCSSInlineStyle {
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+HTMLElement implements ElementCSSInlineStyle;
+
+SVGElement implements ElementCSSInlineStyle;
+
+partial interface Window {
+ [NewObject] CSSStyleDeclaration getComputedStyle(Element elt , optional DOMString? pseudoElt );
+};
+
+[NoInterfaceObject]interface GetStyleUtils {
+ [SameObject] readonly attribute CSSStyleDeclaration cascadedStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration defaultStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration rawComputedStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration usedStyle;
+};
+
+partial interface Element {
+ PseudoElement? pseudo(DOMString pseudoElt );
+};
+
+Element implements GetStyleUtils;
+
+interface PseudoElement {
+};
+
+PseudoElement implements GetStyleUtils;
+
+interface CSS {
+ static DOMString escape(DOMString ident );
+};
diff --git a/javascript/WebIDL/dom-parsing.idl b/javascript/WebIDL/dom-parsing.idl
new file mode 100644
index 0000000..d258132
--- /dev/null
+++ b/javascript/WebIDL/dom-parsing.idl
@@ -0,0 +1,35 @@
+// Retrived from http://www.w3.org/TR/DOM-Parsing/
+// Wed Nov 4 15:39:43 GMT 2015
+// Manually extracted IDL
+
+enum SupportedType {
+ "text/html",
+ "text/xml",
+ "application/xml",
+ "application/xhtml+xml",
+ "image/svg+xml"
+};
+
+[Constructor]
+interface DOMParser {
+ [NewObject]
+ Document parseFromString (DOMString str, SupportedType type);
+};
+
+[Constructor]
+interface XMLSerializer {
+ DOMString serializeToString (Node root);
+};
+
+partial interface Element {
+ [TreatNullAs=EmptyString]
+ attribute DOMString innerHTML;
+ [TreatNullAs=EmptyString]
+ attribute DOMString outerHTML;
+ void insertAdjacentHTML (DOMString position, DOMString text);
+};
+
+partial interface Range {
+ [NewObject]
+ DocumentFragment createContextualFragment (DOMString fragment);
+};
diff --git a/javascript/duktape/netsurf.bnd b/javascript/duktape/netsurf.bnd
index 1f39386..4aca475 100644
--- a/javascript/duktape/netsurf.bnd
+++ b/javascript/duktape/netsurf.bnd
@@ -10,7 +10,9 @@
binding duk_libdom {
webidl "dom.idl";
+ webidl "dom-parsing.idl";
webidl "html.idl";
+ webidl "cssom.idl";
webidl "uievents.idl";
webidl "urlutils.idl";
webidl "console.idl";
-----------------------------------------------------------------------
Summary of changes:
Docs/UnimplementedJavascript.txt | 102 +++++++++++++++++++++---
javascript/WebIDL/Makefile | 10 ++-
javascript/WebIDL/cssom.idl | 157 +++++++++++++++++++++++++++++++++++++
javascript/WebIDL/dom-parsing.idl | 35 +++++++++
javascript/duktape/netsurf.bnd | 2 +
5 files changed, 291 insertions(+), 15 deletions(-)
create mode 100644 javascript/WebIDL/cssom.idl
create mode 100644 javascript/WebIDL/dom-parsing.idl
diff --git a/Docs/UnimplementedJavascript.txt b/Docs/UnimplementedJavascript.txt
index c99c580..d81c34f 100644
--- a/Docs/UnimplementedJavascript.txt
+++ b/Docs/UnimplementedJavascript.txt
@@ -168,6 +168,50 @@ getter CloseEvent::reason(string);\n
getter CloseEvent::wasClean(boolean);\n
getter CompositionEvent::data(string);\n
method CompositionEvent::initCompositionEvent();\n
+method CSS::escape();\n
+getter CSSGroupingRule::cssRules(user);\n
+method CSSGroupingRule::deleteRule();\n
+method CSSGroupingRule::insertRule();\n
+getter CSSImportRule::href(string);\n
+getter CSSImportRule::media(user);\n
+getter CSSImportRule::styleSheet(user);\n
+getter CSSMarginRule::name(string);\n
+getter CSSMarginRule::style(user);\n
+getter CSSMediaRule::media(user);\n
+getter CSSNamespaceRule::namespaceURI(string);\n
+getter CSSNamespaceRule::prefix(string);\n
+getter CSSPageRule::selectorText(string);\n
+setter CSSPageRule::selectorText(string);\n
+getter CSSPageRule::style(user);\n
+getter CSSRule::cssText(string);\n
+setter CSSRule::cssText(string);\n
+method CSSRuleList::item();\n
+getter CSSRuleList::length(unsigned long);\n
+getter CSSRule::parentRule(user);\n
+getter CSSRule::parentStyleSheet(user);\n
+getter CSSRule::type(unsigned short);\n
+getter CSSStyleDeclaration::cssFloat(string);\n
+setter CSSStyleDeclaration::cssFloat(string);\n
+getter CSSStyleDeclaration::cssText(string);\n
+setter CSSStyleDeclaration::cssText(string);\n
+getter CSSStyleDeclaration::dashed_attribute(string);\n
+setter CSSStyleDeclaration::dashed_attribute(string);\n
+method CSSStyleDeclaration::getPropertyPriority();\n
+method CSSStyleDeclaration::getPropertyValue();\n
+method CSSStyleDeclaration::item();\n
+getter CSSStyleDeclaration::length(unsigned long);\n
+getter CSSStyleDeclaration::parentRule(user);\n
+method CSSStyleDeclaration::removeProperty();\n
+method CSSStyleDeclaration::setProperty();\n
+method CSSStyleDeclaration::setPropertyPriority();\n
+method CSSStyleDeclaration::setPropertyValue();\n
+getter CSSStyleRule::selectorText(string);\n
+setter CSSStyleRule::selectorText(string);\n
+getter CSSStyleRule::style(user);\n
+getter CSSStyleSheet::cssRules(user);\n
+method CSSStyleSheet::deleteRule();\n
+method CSSStyleSheet::insertRule();\n
+getter CSSStyleSheet::ownerRule(user);\n
getter CustomEvent::detail(any);\n
method CustomEvent::initCustomEvent();\n
method DataTransfer::clearData();\n
@@ -235,6 +279,7 @@ getter Document::documentURI(string);\n
getter Document::domain(string);\n
setter Document::domain(string);\n
getter Document::embeds(user);\n
+method Document::enableStyleSheetsForSet();\n
method Document::execCommand();\n
getter Document::fgColor(string);\n
setter Document::fgColor(string);\n
@@ -261,6 +306,7 @@ method Document::importNode();\n
getter Document::inputEncoding(string);\n
getter Document::lastElementChild(user);\n
getter Document::lastModified(string);\n
+getter Document::lastStyleSheetSet(string);\n
getter Document::linkColor(string);\n
setter Document::linkColor(string);\n
getter Document::links(user);\n
@@ -395,6 +441,7 @@ setter Document::onwheel(user);\n
method Document::open();\n
getter Document::origin(string);\n
getter Document::plugins(user);\n
+getter Document::preferredStyleSheetSet(string);\n
method Document::prepend();\n
method Document::query();\n
method Document::queryAll();\n
@@ -409,6 +456,10 @@ getter Document::readyState(user);\n
getter Document::referrer(string);\n
method Document::releaseEvents();\n
getter Document::scripts(user);\n
+getter Document::selectedStyleSheetSet(string);\n
+setter Document::selectedStyleSheetSet(string);\n
+getter Document::styleSheetSets(string);\n
+getter Document::styleSheets(user);\n
getter Document::title(string);\n
setter Document::title(string);\n
method DocumentType::after();\n
@@ -425,6 +476,7 @@ method DOMImplementation::createDocument();\n
method DOMImplementation::createDocumentType();\n
method DOMImplementation::createHTMLDocument();\n
method DOMImplementation::hasFeature();\n
+method DOMParser::parseFromString();\n
getter DOMSettableTokenList::value(string);\n
setter DOMSettableTokenList::value(string);\n
method DOMTokenList::add();\n
@@ -458,9 +510,11 @@ method Element::after();\n
method Element::append();\n
getter Element::attributes(user);\n
method Element::before();\n
+getter Element::cascadedStyle(user);\n
getter Element::children(user);\n
getter Element::classList(user);\n
method Element::closest();\n
+getter Element::defaultStyle(user);\n
method Element::getAttributeNode();\n
method Element::getAttributeNodeNS();\n
method Element::getAttributeNS();\n
@@ -468,15 +522,22 @@ method Element::getElementsByClassName();\n
method Element::getElementsByTagNameNS();\n
method Element::hasAttributeNS();\n
method Element::hasAttributes();\n
+getter Element::innerHTML(string);\n
+setter Element::innerHTML(string);\n
+method Element::insertAdjacentHTML();\n
getter Element::localName(string);\n
method Element::matches();\n
getter Element::namespaceURI(string);\n
+getter Element::outerHTML(string);\n
+setter Element::outerHTML(string);\n
getter Element::prefix(string);\n
method Element::prepend();\n
+method Element::pseudo();\n
method Element::query();\n
method Element::queryAll();\n
method Element::querySelector();\n
method Element::querySelectorAll();\n
+getter Element::rawComputedStyle(user);\n
method Element::remove();\n
method Element::removeAttributeNode();\n
method Element::removeAttributeNS();\n
@@ -485,20 +546,15 @@ method Element::setAttributeNode();\n
method Element::setAttributeNodeNS();\n
method Element::setAttributeNS();\n
getter Element::tagName(string);\n
+getter Element::usedStyle(user);\n
getter ErrorEvent::colno(unsigned long);\n
getter ErrorEvent::error(any);\n
getter ErrorEvent::filename(string);\n
getter ErrorEvent::lineno(unsigned long);\n
getter ErrorEvent::message(string);\n
-getter Event::bubbles(boolean);\n
-getter Event::cancelable(boolean);\n
-getter Event::currentTarget(user);\n
-getter Event::defaultPrevented(boolean);\n
-getter Event::eventPhase(unsigned short);\n
method Event::initEvent();\n
getter Event::isTrusted(boolean);\n
method EventListener::handleEvent();\n
-method Event::preventDefault();\n
method EventSource::close();\n
getter EventSource::onerror(user);\n
setter EventSource::onerror(user);\n
@@ -509,14 +565,10 @@ setter EventSource::onopen(user);\n
getter EventSource::readyState(unsigned short);\n
getter EventSource::url(string);\n
getter EventSource::withCredentials(boolean);\n
-method Event::stopImmediatePropagation();\n
-method Event::stopPropagation();\n
method EventTarget::addEventListener();\n
method EventTarget::dispatchEvent();\n
method EventTarget::removeEventListener();\n
-getter Event::target(user);\n
getter Event::timeStamp(user);\n
-getter Event::type(string);\n
method External::AddSearchProvider();\n
method External::IsSearchProviderInstalled();\n
method FocusEvent::initFocusEvent();\n
@@ -716,8 +768,6 @@ getter HTMLElement::oncanplay(user);\n
setter HTMLElement::oncanplay(user);\n
getter HTMLElement::onchange(user);\n
setter HTMLElement::onchange(user);\n
-getter HTMLElement::onclick(user);\n
-setter HTMLElement::onclick(user);\n
getter HTMLElement::onclose(user);\n
setter HTMLElement::onclose(user);\n
getter HTMLElement::oncontextmenu(user);\n
@@ -828,6 +878,7 @@ getter HTMLElement::onwheel(user);\n
setter HTMLElement::onwheel(user);\n
getter HTMLElement::spellcheck(boolean);\n
setter HTMLElement::spellcheck(boolean);\n
+getter HTMLElement::style(user);\n
getter HTMLElement::tabIndex(long);\n
setter HTMLElement::tabIndex(long);\n
getter HTMLElement::translate(boolean);\n
@@ -1021,6 +1072,7 @@ getter HTMLLegendElement::form(user);\n
getter HTMLLinkElement::crossOrigin(string);\n
setter HTMLLinkElement::crossOrigin(string);\n
getter HTMLLinkElement::relList(user);\n
+getter HTMLLinkElement::sheet(user);\n
getter HTMLLinkElement::sizes(user);\n
getter HTMLMapElement::areas(user);\n
getter HTMLMarqueeElement::behavior(string);\n
@@ -1239,6 +1291,7 @@ getter HTMLStyleElement::nonce(string);\n
setter HTMLStyleElement::nonce(string);\n
getter HTMLStyleElement::scoped(boolean);\n
setter HTMLStyleElement::scoped(boolean);\n
+getter HTMLStyleElement::sheet(user);\n
getter HTMLTableCellElement::headers(user);\n
getter HTMLTableColElement::span(unsigned long);\n
setter HTMLTableColElement::span(unsigned long);\n
@@ -1422,6 +1475,12 @@ method MediaController::unpause();\n
getter MediaController::volume(double);\n
setter MediaController::volume(double);\n
getter MediaError::code(unsigned short);\n
+method MediaList::appendMedium();\n
+method MediaList::deleteMedium();\n
+method MediaList::item();\n
+getter MediaList::length(unsigned long);\n
+getter MediaList::mediaText(string);\n
+setter MediaList::mediaText(string);\n
getter MessageChannel::port1(user);\n
getter MessageChannel::port2(user);\n
getter MessageEvent::data(any);\n
@@ -1528,7 +1587,12 @@ getter Plugin::length(unsigned long);\n
method Plugin::namedItem();\n
getter Plugin::name(string);\n
getter PopStateEvent::state(any);\n
+getter ProcessingInstruction::sheet(user);\n
getter ProcessingInstruction::target(string);\n
+getter PseudoElement::cascadedStyle(user);\n
+getter PseudoElement::defaultStyle(user);\n
+getter PseudoElement::rawComputedStyle(user);\n
+getter PseudoElement::usedStyle(user);\n
getter RadioNodeList::value(string);\n
setter RadioNodeList::value(string);\n
method Range::cloneContents();\n
@@ -1538,6 +1602,7 @@ getter Range::collapsed(boolean);\n
getter Range::commonAncestorContainer(user);\n
method Range::compareBoundaryPoints();\n
method Range::comparePoint();\n
+method Range::createContextualFragment();\n
method Range::deleteContents();\n
method Range::detach();\n
getter Range::endContainer(user);\n
@@ -1576,6 +1641,17 @@ method Storage::key();\n
getter Storage::length(unsigned long);\n
method Storage::removeItem();\n
method Storage::setItem();\n
+getter StyleSheet::disabled(boolean);\n
+setter StyleSheet::disabled(boolean);\n
+getter StyleSheet::href(string);\n
+method StyleSheetList::item();\n
+getter StyleSheetList::length(unsigned long);\n
+getter StyleSheet::media(user);\n
+getter StyleSheet::ownerNode(user);\n
+getter StyleSheet::parentStyleSheet(user);\n
+getter StyleSheet::title(string);\n
+getter StyleSheet::type(string);\n
+getter SVGElement::style(user);\n
getter TextMetrics::actualBoundingBoxAscent(double);\n
getter TextMetrics::actualBoundingBoxDescent(double);\n
getter TextMetrics::actualBoundingBoxLeft(double);\n
@@ -1741,6 +1817,7 @@ getter Window::external(user);\n
method Window::focus();\n
getter Window::frameElement(user);\n
getter Window::frames(user);\n
+method Window::getComputedStyle();\n
getter Window::history(user);\n
getter Window::length(unsigned long);\n
getter Window::localStorage(user);\n
@@ -1969,4 +2046,5 @@ setter Worker::onmessage(user);\n
method Worker::postMessage();\n
method Worker::terminate();\n
method XMLDocument::load();\n
+method XMLSerializer::serializeToString();\n
*/
diff --git a/javascript/WebIDL/Makefile b/javascript/WebIDL/Makefile
index 6319bbd..7d901ce 100644
--- a/javascript/WebIDL/Makefile
+++ b/javascript/WebIDL/Makefile
@@ -16,12 +16,13 @@
.PHONY:all clean
-all: dom.idl html.idl uievents.idl
+all: dom.idl html.idl uievents.idl cssom.idl
-.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
+.INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html
.INTERMEDIATE:html-spec.html html-spec.xml html-idl.html
.INTERMEDIATE:uievents-spec.html uievents-spec.xml uievents-idl.html
.INTERMEDIATE:urlutils-spec.html urlutils-spec.xml urlutils-idl.html
+.INTERMEDIATE:cssom-spec.html cssom-spec.xml cssom-idl.html
dom-spec.html:
curl -s https://dom.spec.whatwg.org/ -o $@
@@ -35,8 +36,11 @@ uievents-spec.html:
urlutils-spec.html:
curl -s https://url.spec.whatwg.org/ -o $@
+cssom-spec.html:
+ curl -s https://drafts.csswg.org/cssom-1/ -o $@
+
%-spec.xml: %-spec.html
- -tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section -o $@ -asxml $<
+ -tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure,time,main,nav,svg,rect,text,image,mark,figcaption,section,g,path,circle -o $@ -asxml $<
%-idl.html: %-spec.xml
hxselect 'pre[class="idl"]' < $< > $@
diff --git a/javascript/WebIDL/cssom.idl b/javascript/WebIDL/cssom.idl
new file mode 100644
index 0000000..95c97e4
--- /dev/null
+++ b/javascript/WebIDL/cssom.idl
@@ -0,0 +1,157 @@
+// Retrived from https://drafts.csswg.org/cssom-1/
+// Wed Nov 4 15:39:43 GMT 2015
+// Removed duplicate IDL from appendix
+
+
+[ArrayClass]interface MediaList {
+ [TreatNullAs=EmptyString] stringifier attribute DOMString mediaText;
+ readonly attribute unsigned long length;
+ getter DOMString? item(unsigned long index );
+ void appendMedium(DOMString medium );
+ void deleteMedium(DOMString medium );
+};
+
+interface StyleSheet {
+ readonly attribute DOMString type;
+ readonly attribute DOMString? href;
+ readonly attribute (Element or ProcessingInstruction)? ownerNode;
+ readonly attribute StyleSheet? parentStyleSheet;
+ readonly attribute DOMString? title;
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+ attribute boolean disabled;
+};
+
+interface CSSStyleSheet : StyleSheet {
+ readonly attribute CSSRule? ownerRule;
+ [SameObject] readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(DOMString rule , unsigned long index );
+ void deleteRule(unsigned long index );
+};
+
+[ArrayClass]interface StyleSheetList {
+ getter StyleSheet? item(unsigned long index );
+ readonly attribute unsigned long length;
+};
+
+partial interface Document {
+ [SameObject] readonly attribute StyleSheetList styleSheets;
+ attribute DOMString? selectedStyleSheetSet;
+ readonly attribute DOMString? lastStyleSheetSet;
+ readonly attribute DOMString? preferredStyleSheetSet;
+ readonly attribute DOMString[] styleSheetSets;
+ void enableStyleSheetsForSet(DOMString? name );
+};
+
+[NoInterfaceObject]interface LinkStyle {
+ readonly attribute StyleSheet? sheet;
+};
+
+ProcessingInstruction implements LinkStyle;
+
+[ArrayClass]interface CSSRuleList {
+ getter CSSRule? item(unsigned long index );
+ readonly attribute unsigned long length;
+};
+
+interface CSSRule {
+ const unsigned short STYLE_RULE = 1;
+ const unsigned short CHARSET_RULE = 2; // historical
+ const unsigned short IMPORT_RULE = 3;
+ const unsigned short MEDIA_RULE = 4;
+ const unsigned short FONT_FACE_RULE = 5;
+ const unsigned short PAGE_RULE = 6;
+ const unsigned short MARGIN_RULE = 9;
+ const unsigned short NAMESPACE_RULE = 10;
+ readonly attribute unsigned short type;
+ attribute DOMString cssText;
+ readonly attribute CSSRule? parentRule;
+ readonly attribute CSSStyleSheet? parentStyleSheet;
+};
+
+interface CSSStyleRule : CSSRule {
+ attribute DOMString selectorText;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+interface CSSImportRule : CSSRule {
+ readonly attribute DOMString href;
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media;
+ [SameObject] readonly attribute CSSStyleSheet styleSheet;
+};
+
+interface CSSGroupingRule : CSSRule {
+ [SameObject] readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(DOMString rule , unsigned long index );
+ void deleteRule(unsigned long index );
+};
+
+interface CSSMediaRule : CSSGroupingRule {
+ [SameObject, PutForwards=mediaText] readonly attribute MediaList media ;
+};
+
+interface CSSPageRule : CSSGroupingRule {
+ attribute DOMString selectorText ;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style ;
+};
+
+interface CSSMarginRule : CSSRule {
+ readonly attribute DOMString name;
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+interface CSSNamespaceRule : CSSRule {
+ readonly attribute DOMString namespaceURI;
+ readonly attribute DOMString prefix;
+};
+
+interface CSSStyleDeclaration {
+ attribute DOMString cssText;
+ readonly attribute unsigned long length;
+ getter DOMString item(unsigned long index );
+ DOMString getPropertyValue(DOMString property );
+ DOMString getPropertyPriority(DOMString property );
+ void setProperty(DOMString property , [TreatNullAs=EmptyString] DOMString value , [TreatNullAs=EmptyString] optional DOMString priority = "");
+ void setPropertyValue(DOMString property , [TreatNullAs=EmptyString] DOMString value );
+ void setPropertyPriority(DOMString property , [TreatNullAs=EmptyString] DOMString priority );
+ DOMString removeProperty(DOMString property );
+ readonly attribute CSSRule? parentRule;
+ [TreatNullAs=EmptyString] attribute DOMString cssFloat;
+};
+
+partial interface CSSStyleDeclaration {
+ [TreatNullAs=EmptyString] attribute DOMString _dashed_attribute ;
+};
+
+[NoInterfaceObject]interface ElementCSSInlineStyle {
+ [SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
+};
+
+HTMLElement implements ElementCSSInlineStyle;
+
+SVGElement implements ElementCSSInlineStyle;
+
+partial interface Window {
+ [NewObject] CSSStyleDeclaration getComputedStyle(Element elt , optional DOMString? pseudoElt );
+};
+
+[NoInterfaceObject]interface GetStyleUtils {
+ [SameObject] readonly attribute CSSStyleDeclaration cascadedStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration defaultStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration rawComputedStyle;
+ [SameObject] readonly attribute CSSStyleDeclaration usedStyle;
+};
+
+partial interface Element {
+ PseudoElement? pseudo(DOMString pseudoElt );
+};
+
+Element implements GetStyleUtils;
+
+interface PseudoElement {
+};
+
+PseudoElement implements GetStyleUtils;
+
+interface CSS {
+ static DOMString escape(DOMString ident );
+};
diff --git a/javascript/WebIDL/dom-parsing.idl b/javascript/WebIDL/dom-parsing.idl
new file mode 100644
index 0000000..d258132
--- /dev/null
+++ b/javascript/WebIDL/dom-parsing.idl
@@ -0,0 +1,35 @@
+// Retrived from http://www.w3.org/TR/DOM-Parsing/
+// Wed Nov 4 15:39:43 GMT 2015
+// Manually extracted IDL
+
+enum SupportedType {
+ "text/html",
+ "text/xml",
+ "application/xml",
+ "application/xhtml+xml",
+ "image/svg+xml"
+};
+
+[Constructor]
+interface DOMParser {
+ [NewObject]
+ Document parseFromString (DOMString str, SupportedType type);
+};
+
+[Constructor]
+interface XMLSerializer {
+ DOMString serializeToString (Node root);
+};
+
+partial interface Element {
+ [TreatNullAs=EmptyString]
+ attribute DOMString innerHTML;
+ [TreatNullAs=EmptyString]
+ attribute DOMString outerHTML;
+ void insertAdjacentHTML (DOMString position, DOMString text);
+};
+
+partial interface Range {
+ [NewObject]
+ DocumentFragment createContextualFragment (DOMString fragment);
+};
diff --git a/javascript/duktape/netsurf.bnd b/javascript/duktape/netsurf.bnd
index 1f39386..4aca475 100644
--- a/javascript/duktape/netsurf.bnd
+++ b/javascript/duktape/netsurf.bnd
@@ -10,7 +10,9 @@
binding duk_libdom {
webidl "dom.idl";
+ webidl "dom-parsing.idl";
webidl "html.idl";
+ webidl "cssom.idl";
webidl "uievents.idl";
webidl "urlutils.idl";
webidl "console.idl";
--
NetSurf Browser
7 years, 6 months
netsurf: branch master updated. release/3.3-490-ga7324d3
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/a7324d39a46a561535dcb...
...commit http://git.netsurf-browser.org/netsurf.git/commit/a7324d39a46a561535dcb26...
...tree http://git.netsurf-browser.org/netsurf.git/tree/a7324d39a46a561535dcb26fa...
The branch, master has been updated
via a7324d39a46a561535dcb26fac3fbd8f593dbf94 (commit)
from ed5fd918438ca3f564a5e27f363eddc1439dd58e (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=a7324d39a46a561535d...
commit a7324d39a46a561535dcb26fac3fbd8f593dbf94
Author: Dick Tanis <dtanis(a)ymail.com>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Updated Dutch messages for NetSurf
diff --git a/resources/FatMessages b/resources/FatMessages
index bed740e..ffa0315 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -284,12 +284,12 @@ en.ro.Reload:Reload this page ^F5
de.ro.Reload:Seite erneut laden ^F5
fr.ro.Reload:Recharger cette page ^F5
it.ro.Reload:Ricarica ^F5
-nl.ro.Reload:Laad pag. opnieuw ^F5
+nl.ro.Reload:Herlaad pagina ^F5
en.beos.Reload:Reload this page
de.beos.Reload:Seite erneut laden
fr.beos.Reload:Recharger cette page
it.beos.Reload:Ricarica
-nl.beos.Reload:Laad pag. opnieuw
+nl.beos.Reload:Herlaad pagina
en.all.Stop:Stop loading this page
de.all.Stop:Ladevorgang abbrechen
fr.all.Stop:Arrêter le chargement de la page
@@ -662,7 +662,7 @@ en.all.ProxyBasic:Basic authentication
de.all.ProxyBasic:mit Authentifizierung
fr.all.ProxyBasic:Authentification de base
it.all.ProxyBasic:Autentificato di base
-nl.all.ProxyBasic:Basis-authenticatie
+nl.all.ProxyBasic:Basisauthenticatie
en.all.ProxyNTLM:NTLM authentication
de.all.ProxyNTLM:NTLM Authentifizierung
fr.all.ProxyNTLM:Authentification NTLM
@@ -816,12 +816,12 @@ en.ami.Undo:Undo
de.ami.Undo:Undo
fr.ami.Undo:Annuler
it.ami.Undo:Annulla
-nl.ami.Undo:Undo
+nl.ami.Undo:Maak ongedaan
en.ami.Redo:Redo
de.ami.Redo:Redo
fr.ami.Redo:Rétablir
it.ami.Redo:Ripristina
-nl.ami.Redo:Redo
+nl.ami.Redo:Opnieuw
# Browser menu
#
@@ -918,7 +918,7 @@ en.ami.ARexxExecute:Execute script...
de.ami.ARexxExecute:Script ausführen...
fr.ami.ARexxExecute:Executer script...
it.ami.ARexxExecute:Esegui script...
-nl.ami.ARexxExecute:Execute script...
+nl.ami.ARexxExecute:Voer script uit...
# Context menu
#
@@ -956,7 +956,7 @@ en.ami.SaveIFF:Save as IFF...
de.ami.SaveIFF:Speichern als IFF...
fr.ami.SaveIFF:Enregistrer sous IFF...
it.ami.SaveIFF:Salva come IFF...
-nl.ami.SaveIFF:Save as IFF...
+nl.ami.SaveIFF:Bewaar als IFF...
en.all.SaveComplete:Save complete...
de.all.SaveComplete:Speichern abgeschlossen...
fr.all.SaveComplete:Enregistrement terminé...
@@ -1152,7 +1152,7 @@ en.ami.TreeEdit:Edit title
de.ami.TreeEdit:Edit title
fr.ami.TreeEdit:Modifier le titre
it.ami.TreeEdit:Modifica titolo
-nl.ami.TreeEdit:Edit title
+nl.ami.TreeEdit:Wijzig titel
# Treeview field labels
#
@@ -1329,10 +1329,12 @@ nl.all.TreeHotlist:NetSurf-favorieten
en.ami.NetSurfDesc:Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.
fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plate-forme libre.
it.ami.NetSurfDesc:Piccolo come un mouse, veloce come un ghepardo. NetSurf è un browser web opensource e multi-piattaforma.
+nl.ami.NetSurfDesc:Klein als een muis, snel als een cheetah en gratis beschikbaar. NetSurf is een multi-platform webbrowser.
en.gtk.AboutDesc:NetSurf is a small and fast web browser.
fr.gtk.AboutDesc:NetSurf est un navigateur Web multi-plate-forme libre.
it.gtk.AboutDesc:NetSurf è un browser web opensource e multi-piattaforma.
+nl.gtk.AboutDesc:NetSurf is een kleine, snelle webbrowser met open broncode.
# Hotlist user interface tokens
# =============================
@@ -1398,12 +1400,12 @@ en.ami.HotlistMenu:Hotlist menu
de.ami.HotlistMenu:Hotlist menu
fr.ami.HotlistMenu:Hotlist menu
it.ami.HotlistMenu:Menu segnalibri
-nl.ami.HotlistMenu:Hotlist menu
+nl.ami.HotlistMenu:Favorietenmenu
en.ami.HotlistToolbar:Hotlist toolbar
de.ami.HotlistToolbar:Hotlist toolbar
fr.ami.HotlistToolbar:Hotlist toolbar
it.ami.HotlistToolbar:Barra segnalibri
-nl.ami.HotlistToolbar:Hotlist toolbar
+nl.ami.HotlistToolbar:Favorietenwerkbalk
# Global history user interface tokens
@@ -1551,17 +1553,17 @@ en.ami.amiDownload:%ld of %ld bytes downloaded
de.ami.amiDownload:%ld von %ld Bytes heruntergeladen
fr.ami.amiDownload:%ld of %ld bytes downloaded
it.ami.amiDownload:%ld di %ld byte scaricati
-nl.ami.amiDownload:%ld of %ld bytes downloaded
+nl.ami.amiDownload:%ld van %ld bytes opgehaald
en.ami.amiDownloadU:%ld bytes downloaded
de.ami.amiDownloadU:%ld Bytes heruntergeladen
fr.ami.amiDownloadU:%ld bytes downloaded
it.ami.amiDownloadU:%ld byte scaricati
-nl.ami.amiDownloadU:%ld bytes downloaded
+nl.ami.amiDownloadU:%ld bytes opgehaald
en.ami.amiDownloadComplete:NetSurf: Download completed
de.ami.amiDownloadComplete:NetSurf: Download vollständig
fr.ami.amiDownloadComplete:NetSurf: Download completed
it.ami.amiDownloadComplete:NetSurf: Download completato
-nl.ami.amiDownloadComplete:NetSurf: Download completed
+nl.ami.amiDownloadComplete:NetSurf: Download voltooid
# Requesters
#
@@ -1569,12 +1571,12 @@ en.ami.amiSizeExisting:Existing file size:
de.ami.amiSizeExisting:Größe der vorhandenen Datei:
fr.ami.amiSizeExisting:Existing file size:
it.ami.amiSizeExisting:Dimensione del file esistente:
-nl.ami.amiSizeExisting:Existing file size:
+nl.ami.amiSizeExisting:Bestaande bestandsgrootte:
en.ami.amiSizeNew:New file size:
de.ami.amiSizeNew:Größe der neuen Datei:
fr.ami.amiSizeNew:New file size:
it.ami.amiSizeNew:Nuova dimensione del file:
-nl.ami.amiSizeNew:New file size:
+nl.ami.amiSizeNew:Nieuwe bestandsgrootte:
# GTK download window tokens
#
@@ -2157,10 +2159,10 @@ fr.gtk.gtkAddBookMarks:_Ajouter un marque-page..
it.gtk.gtkAddBookMarks:_Aggiungi ai segnalibri...
nl.gtk.gtkAddBookMarks:_Aan bladwijzers toevoegen...
en.gtk.gtkAddBookMarksAccel:<ctrl>d
-de.gtk.gtkGlobalHistoryAccel:<ctrl>d
-fr.gtk.gtkGlobalHistoryAccel:<ctrl>d
-it.gtk.gtkGlobalHistoryAccel:<ctrl>d
-nl.gtk.gtkGlobalHistoryAccel:<ctrl>d
+de.gtk.gtkAddBookMarksAccel:<ctrl>d
+fr.gtk.gtkAddBookMarksAccel:<ctrl>d
+it.gtk.gtkAddBookMarksAccel:<ctrl>d
+nl.gtk.gtkAddBookMarksAccel:<ctrl>d
en.gtk.gtkShowBookMarks:_Show Bookmarks…
de.gtk.gtkShowBookMarks:Le_sezeichen anzeigen..
fr.gtk.gtkShowBookMarks:_Montrer les marques-pages...
@@ -2448,170 +2450,242 @@ nl.gtk.preferencesButtonTypeText:Alleen tekst
# content tab
en.gtk.preferencesContentTabtitle:Content
fr.gtk.preferencesContentTabtitle:Contenu
+nl.gtk.preferencesContentTabtitle:Inhoud
en.gtk.preferencesControl:<b>Control</b>
fr.gtk.preferencesControl:<b>Contrôle</b>
+nl.gtk.preferencesControl:<b>Opties</b>
en.gtk.preferencesControlPrevent:Prevent pop-up windows
fr.gtk.preferencesControlPrevent:Empêcher fenêtres pop-up
+nl.gtk.preferencesControlPrevent:Pop-upvensters blokkeren
en.gtk.preferencesControlHide:Hide Adverts
fr.gtk.preferencesControlHide:Cacher les publicités
+nl.gtk.preferencesControlHide:Advertenties verbergen
en.gtk.preferencesControlEnable:Enable JavaScript
fr.gtk.preferencesControlEnable:Activer JavaScript
+nl.gtk.preferencesControlEnable:JavaScript inschakelen
en.gtk.preferencesControlDisable:Disable plug-ins
fr.gtk.preferencesControlDisable:Désactiver modules externes
+nl.gtk.preferencesControlDisable:Plug-ins uitschakelen
en.gtk.preferencesControlHigh:High quality image scaling
fr.gtk.preferencesControlHigh:Haute qualité d'image redimensionnée
+nl.gtk.preferencesControlHigh:Schalen op hoge beeldkwaliteit
en.gtk.preferencesControlLoad:Load and display
fr.gtk.preferencesControlLoad:Charger et visualiser
+nl.gtk.preferencesControlLoad:Laad en toon
en.gtk.preferencesAnimation:<b>Animation</b>
fr.gtk.preferencesAnimation:<b>Animation</b>
+nl.gtk.preferencesAnimation:<b>Animaties</b>
en.gtk.preferencesAnimationEnable:Enable
fr.gtk.preferencesAnimationEnable:Activer
+nl.gtk.preferencesAnimationEnable:Ingeschakeld
en.gtk.preferencesAnimationMinimum:Minimum time between frames:
fr.gtk.preferencesAnimationMinimum:Temps minimal entre cadres/frames/images/photo :
+nl.gtk.preferencesAnimationMinimum:Minimum tijd tussen opeenvolgende animatiebeelden:
en.gtk.preferencesAnimationMinimumTooltip:Do not update animations any more often than this.
fr.gtk.preferencesAnimationMinimumTooltip:Ne pas mettre à jour les animations plus souvent que cela.
+nl.gtk.preferencesAnimationMinimumTooltip:Animaties niet vaker actualiseren dan dit.
en.gtk.preferencesFonts:<b>Fonts</b>
fr.gtk.preferencesFonts:<b>Fontes/Polices</b>
+nl.gtk.preferencesFonts:<b>Lettertypen</b>
en.gtk.preferencesFontsDefault:Default
fr.gtk.preferencesFontsDefault:Défaut
+nl.gtk.preferencesFontsDefault:Standaard
en.gtk.preferencesFontsSize:Size
fr.gtk.preferencesFontsSize:Taille
+nl.gtk.preferencesFontsSize:Grootte
en.gtk.preferencesFontsSizeTooltip:The base-line font size to use.
fr.gtk.preferencesFontsSizeTooltip:La taille de la fonte/police de base à utiliser.
+nl.gtk.preferencesFontsSizeTooltip:Het standaardlettertype te gebruiken voor webpagina's.
en.gtk.preferencesFontsPreview:_Preview
fr.gtk.preferencesFontsPreview:A_perçu
+nl.gtk.preferencesFontsPreview:_Voorbeeld
en.gtk.preferencesLanguage:<b>Language</b>
fr.gtk.preferencesLanguage:<b>Langue</b>
+nl.gtk.preferencesLanguage:<b>Talen</b>
en.gtk.preferencesLanguagePreferred:Preferred language:
fr.gtk.preferencesLanguagePreferred:Langue préférée :
+nl.gtk.preferencesLanguagePreferred:Voorkeurtaal:
en.gtk.preferencesLanguagePreferredTooltip:The preferred language for web pages
fr.gtk.preferencesLanguagePreferredTooltip:La langue préférée pour les pages Web
+nl.gtk.preferencesLanguagePreferredTooltip:De voorkeurtaal voor webpagina's
# Image loading list
en.gtk.preferencesImageLoadBoth:foreground and background images
fr.gtk.preferencesImageLoadBoth:Images d'avant-plan et d'arrière-plan
+nl.gtk.preferencesImageLoadBoth:voorgrond- en achtergrondafbeeldingen
en.gtk.preferencesImageLoadFore:foreground images
fr.gtk.preferencesImageLoadFore:Images d'avant-plan
+nl.gtk.preferencesImageLoadFore:voorgrondafbeeldingen
en.gtk.preferencesImageLoadBack:background images
fr.gtk.preferencesImageLoadBack:Images d'arrière-plan
+nl.gtk.preferencesImageLoadBack:achtergrondafbeeldingen
en.gtk.preferencesImageLoadNone:no images
fr.gtk.preferencesImageLoadNone:pas d'images
+nl.gtk.preferencesImageLoadNone:geen afbeeldingen
# font type list
en.gtk.preferencesFonttypeSans:Sans-serif
fr.gtk.preferencesFonttypeSans:Sans-serif
+nl.gtk.preferencesFonttypeSans:Schreefloos
en.gtk.preferencesFonttypeSerif:Serif
fr.gtk.preferencesFonttypeSerif:Serif
+nl.gtk.preferencesFonttypeSerif:Met schreef
en.gtk.preferencesFonttypeMonospace:Monospace
fr.gtk.preferencesFonttypeMonospace:Monospace
+nl.gtk.preferencesFonttypeMonospace:Monospace
en.gtk.preferencesFonttypeCursive:Cursive
fr.gtk.preferencesFonttypeCursive:Cursive
+nl.gtk.preferencesFonttypeCursive:Cursief
en.gtk.preferencesFonttypeFantasy:Fantasy
fr.gtk.preferencesFonttypeFantasy:Fantasy
-
+nl.gtk.preferencesFonttypeFantasy:Fantasie
en.gtk.preferencesPrivacyTabtitle:Privacy
fr.gtk.preferencesPrivacyTabtitle:Confidentialité
+nl.gtk.preferencesPrivacyTabtitle:Privacy
en.gtk.preferencesGeneral:<b>General</b>
fr.gtk.preferencesGeneral:<b>Général</b>
+nl.gtk.preferencesGeneral:<b>Algemeen</b>
en.gtk.preferencesGeneralReferral:Enable referral submission
fr.gtk.preferencesGeneralReferral:Permettre l'envoi du referer en entête
+nl.gtk.preferencesGeneralReferral:Referentie versturen inschakelen
en.gtk.preferencesGeneralDNT:Enable sending "Do Not Track" request
fr.gtk.preferencesGeneralDNT:Activer l'envoi d'une requête "Ne pas suivre à la trace"
+nl.gtk.preferencesGeneralDNT:Websites laten weten dat gebruiker niet gevolgd wil worden
en.gtk.preferencesHistory:<b>History</b>
fr.gtk.preferencesHistory:<b>Historque</b>
+nl.gtk.preferencesHistory:<b>Geschiedenis</b>
en.gtk.preferencesHistoryShow:Local history shows URL in tooltip
fr.gtk.preferencesHistoryShow:Historique local dans une infobulle
+nl.gtk.preferencesHistoryShow:Venstergeschiedenis toont webadres in een tipkader
en.gtk.preferencesHistoryRemember:Remember browsing history for up to
fr.gtk.preferencesHistoryRemember:Conserver l'historique de navigation pendant
+nl.gtk.preferencesHistoryRemember:Browsergeschiedenis onthouden voor
en.gtk.preferencesHistoryDays:days
fr.gtk.preferencesHistoryDays:jours
+nl.gtk.preferencesHistoryDays:dag(en)
en.gtk.preferencesCache:<b>Cache</b>
fr.gtk.preferencesCache:<b>Cache</b>
+nl.gtk.preferencesCache:<b>Buffer</b>
en.gtk.preferencesCacheMemory:Memory cache size
fr.gtk.preferencesCacheMemory:Taille du cache mémoire
+nl.gtk.preferencesCacheMemory:Grootte geheugenbuffer
en.gtk.preferencesCacheDisc:Disc cache size
fr.gtk.preferencesCacheDisc:Taille du cache disque
+nl.gtk.preferencesCacheDisc:Grootte schijfbuffer
en.gtk.preferencesCacheExpire:Expire cache entries after
fr.gtk.preferencesCacheExpire:Les entrées du cache expirent après un délai de
+nl.gtk.preferencesCacheExpire:Buffergegevens vervallen na
en.gtk.preferencesCacheMaintenance:Maintenance
fr.gtk.preferencesCacheMaintenance:Maintenance
+nl.gtk.preferencesCacheMaintenance:Onderhoud
en.gtk.preferencesCacheDays:days
fr.gtk.preferencesCacheDays:jours
-
+nl.gtk.preferencesCacheDays:dag(en)
en.gtk.preferencesNetworkTabtitle:Network
fr.gtk.preferencesNetworkTabtitle:Réseau
+nl.gtk.preferencesNetworkTabtitle:Netwerk
en.gtk.preferencesProxy:<b>HTTP Proxy</b>
fr.gtk.preferencesProxy:<b>Proxy HTTP</b>
+nl.gtk.preferencesProxy:<b>HTTP-proxy</b>
en.gtk.preferencesProxyType:Proxy type
fr.gtk.preferencesProxyType:Type de Proxy
+nl.gtk.preferencesProxyType:Proxy-type
en.gtk.preferencesProxyHost:Host
fr.gtk.preferencesProxyHost:Hôte
+nl.gtk.preferencesProxyHost:Proxy-server
en.gtk.preferencesProxyUsername:Username
fr.gtk.preferencesProxyUsername:Nom d'utilisateur
+nl.gtk.preferencesProxyUsername:Gebruikersnaam
en.gtk.preferencesProxyPassword:Password
fr.gtk.preferencesProxyPassword:Mot de passe
+nl.gtk.preferencesProxyPassword:Wachtwoord
en.gtk.preferencesProxyNoproxy:No Proxy For
fr.gtk.preferencesProxyNoproxy:Pas de proxy pour
+nl.gtk.preferencesProxyNoproxy:Geen proxy voor
en.gtk.preferencesProxyTypeTooltip:The type of HTTP proxy server.
fr.gtk.preferencesProxyTypeTooltip:Le type de serveur proxy HTTP.
+nl.gtk.preferencesProxyTypeTooltip:Het type van de HTTP-proxy-server.
en.gtk.preferencesProxyHostTooltip:Host name of your proxy server.
fr.gtk.preferencesProxyHostTooltip:Nom d'hôte du serveur proxy.
+nl.gtk.preferencesProxyHostTooltip:Adres van de proxy-server.
en.gtk.preferencesProxyPortTooltip:Port number to connect to on proxy server.
fr.gtk.preferencesProxyPortTooltip:Le numéro de port pour se connecter au serveur proxy.
+nl.gtk.preferencesProxyPortTooltip:Poortnummer om te verbinden met de proxy-server.
en.gtk.preferencesProxyUsernameTooltip:Username to access the proxy.
fr.gtk.preferencesProxyUsernameTooltip:Nom d'utilisateur pour accéder au proxy.
+nl.gtk.preferencesProxyUsernameTooltip:Gebruikersnaam voor toegang tot de proxy.
en.gtk.preferencesProxyNoproxyTooltip:Comma separated list of host names that should not be proxied.
fr.gtk.preferencesProxyNoproxyTooltip:Liste des noms d'hôtes séparés par des virgules qui ne devraient pas être traitées par le proxy.
+nl.gtk.preferencesProxyNoproxyTooltip:Lijst van ip-adressen of servernamen die niet via de proxy mogen lopen, gescheiden door komma's.
en.gtk.preferencesFetching:<b>Fetching</b>
fr.gtk.preferencesFetching:<b>Connexions</b>
+nl.gtk.preferencesFetching:<b>Verbindingen</b>
en.gtk.preferencesFetchingMax:Maximum fetchers
fr.gtk.preferencesFetchingMax:Nombre maximum de connexions
+nl.gtk.preferencesFetchingMax:Maximum aantal
en.gtk.preferencesFetchingPerhost:Fetches per host
fr.gtk.preferencesFetchingPerhost:Nombre de connexions par hôte
+nl.gtk.preferencesFetchingPerhost:Aantal verbindingen per server
en.gtk.preferencesFetchingCached:Cached connections
fr.gtk.preferencesFetchingCached:Connexions en cache
+nl.gtk.preferencesFetchingCached:Gebufferde verbindingen
en.gtk.preferencesFetchingMaxTooltip:Maximum number of concurrent items to fetch at once.
fr.gtk.preferencesFetchingMaxTooltip:Nombre maximum d'éléments simultanés à récupérer
+nl.gtk.preferencesFetchingMaxTooltip:Maximum aantal verbindingen die simultaan items ophalen.
en.gtk.preferencesFetchingPerhostTooltip:Maximum number of item fetches per web server.
fr.gtk.preferencesFetchingPerhostTooltip:Nombre maximum d'élément à extrair pour chaque serveur Web.
+nl.gtk.preferencesFetchingPerhostTooltip:Maximum aantal verbinden per webserver.
en.gtk.preferencesFetchingCachedTooltip:Number of connections to keep in case they are needed again.
fr.gtk.preferencesFetchingCachedTooltip:Nombre de connexions à maintenir dans le cas où elles seront nécessaires à nouveau.
-
+nl.gtk.preferencesFetchingCachedTooltip:Aantal verbindingen te bufferen voor het geval ze zijn weer nodig.
# Proxy type list
en.gtk.preferencesProxyTypeDirect:Direct connection
fr.gtk.preferencesProxyTypeDirect:Connexion directe
+nl.gtk.preferencesProxyTypeDirect:Directe verbinding
en.gtk.preferencesProxyTypeManual:Manual with no authentication
fr.gtk.preferencesProxyTypeManual:Manuel sans authentification
+nl.gtk.preferencesProxyTypeManual:Handmatig zonder authenticatie
en.gtk.preferencesProxyTypeBasic:Manual with basic authentication
fr.gtk.preferencesProxyTypeBasic:Manuel avec authentification basique
-en.gtk.preferencesProxyTypeNLTM:Manual with NTLM authentication
+nl.gtk.preferencesProxyTypeBasic:Handmatig met basisauthenticatie
+en.gtk.preferencesProxyTypeNLTM:Manual with - authentication
fr.gtk.preferencesProxyTypeNLTM:Manuel avec l'authentification NTLM
+nl.gtk.preferencesProxyTypeNLTM:Handmatig via NTLM-authenticatie
en.gtk.preferencesProxyTypeSystem:System settings
fr.gtk.preferencesProxyTypeSystem:Paramètres du système
-
+nl.gtk.preferencesProxyTypeSystem:Systeeminstellingen
en.gtk.preferencesPDFTabtitle:PDF
fr.gtk.preferencesPDFTabtitle:PDF
+nl.gtk.preferencesPDFTabtitle:PDF-uitvoer
en.gtk.preferencesAppearance:<b>Appearance</b>
fr.gtk.preferencesAppearance:<b>Apparence</b>
-
+nl.gtk.preferencesAppearance:<b>Opmaak</b>
en.gtk.preferencesAppearanceImages:No images in output
fr.gtk.preferencesAppearanceImages:Aucune image de rendu/restituée
+nl.gtk.preferencesAppearanceImages:Geen afbeeldingen in uitvoer
en.gtk.preferencesAppearanceBackground:No background images in output
fr.gtk.preferencesAppearanceBackground:Aucune image d'arrière-plan de rendu/restituée
+nl.gtk.preferencesAppearanceBackground:Geen achtergrondafbeeldingen in uitvoer
en.gtk.preferencesAppearanceScalefit:Scale output to fit page
fr.gtk.preferencesAppearanceScalefit:Adapter à la page
+nl.gtk.preferencesAppearanceScalefit:Uitvoer passend maken aan pagina
en.gtk.preferencesAppearanceScale:Scale output
fr.gtk.preferencesAppearanceScale:Adapter
+nl.gtk.preferencesAppearanceScale:Schaal
en.gtk.preferencesMargins:<b>Margins</b>
fr.gtk.preferencesMargins:<b>Marges</b>
+nl.gtk.preferencesMargins:<b>Marges</b>
en.gtk.preferencesMarginsMeasurements:measurements in mm
fr.gtk.preferencesMarginsMeasurements:Mesures en mm
+nl.gtk.preferencesMarginsMeasurements:eenheden in millimeters
en.gtk.preferencesGeneration:<b>Generation</b>
fr.gtk.preferencesGeneration:<b>Generation</b>
+nl.gtk.preferencesGeneration:<b>Genereren</b>
en.gtk.preferencesGenerationCompressed:Output is compressed
fr.gtk.preferencesGenerationCompressed:La restitution est compressée
+nl.gtk.preferencesGenerationCompressed:Uitvoer wordt gecomprimeerd
en.gtk.preferencesGenerationPassword:Output has a password
fr.gtk.preferencesGenerationPassword:La restitution possède un mot de passe
-
+nl.gtk.preferencesGenerationPassword:Uitvoer wordt met wachtwoord beveiligd
# Printing user interface tokens
@@ -2799,7 +2873,7 @@ en.all.Form_Reset:Reset
de.all.Form_Reset:Zurücksetzen
fr.all.Form_Reset:Effacer
it.all.Form_Reset:Resetta
-nl.all.Form_Reset:Legen
+nl.all.Form_Reset:Opnieuw
en.all.Form_None:
de.all.Form_None:
fr.all.Form_None:
@@ -2812,14 +2886,18 @@ it.all.Form_Many:(Molti)
nl.all.Form_Many:(Veel)
en.gtk.Form_Drop:Click to select file
fr.gtk.Form_Drop:Cliquer pour sélectionner fichier
+nl.gtk.Form_Drop:Klik om bestand te selecteren
en.ro.Form_Drop:Drop file here
fr.ro.Form_Drop:Déposer fichier ici
en.ami.Form_Drop:Click or drop file here
-fr.ami.Form_Drop:Cliquer ou déposer fichier ici
+fr.ami.Form_Drop:Cliquer ou déposer fichier ici]
+nl.ami.Form_Drop:Sleep bestand hierheen
en.beos.Form_Drop:Drop file here
fr.beos.Form_Drop:Drop file here
+nl.beos.Form_Drop:Sleep bestand hierheen
en.fb.Form_Drop:Click to select file
fr.fb.Form_Drop:Cliquer pour sélectionner fichier
+nl.fb.Form_Drop:Klik om bestand te selecteren
en.osx.Form_Drop:Click to select file
fr.osx.Form_Drop:Cliquer pour sélectionner fichier
de.all.Form_Drop:Datei hier hinziehen
@@ -2943,7 +3021,7 @@ en.ami.DataTypesTitle:%s (%s image %lux%lu pixels)
de.ami.DataTypesTitle:%s (%s Bild %lux%lu pixels)
fr.ami.DataTypesTitle:%s (Image %s %lux%lu pixels)
it.ami.DataTypesTitle:%s (Immagine %s %lux%lu pixel)
-nl.ami.DataTypesTitle:%s (%s image %lux%lu pixels)
+nl.ami.DataTypesTitle:%s (%s afbeelding %lux%lu punten)
# HTML page character set
#
@@ -3223,28 +3301,29 @@ it.all.DirectoryError:La directory '%s' è già esistente
nl.all.DirectoryError:map '%s' bestaat reeds
en.ro.SprIsNull:Unable to convert image to sprite
+nl.ro.SprIsNull:Afbeelding kan niet worden omgezet in een sprite.
# Error messages for Amiga version only
en.ami.CompError:Unable to open
de.ami.CompError:Nicht zu öffnen
fr.ami.CompError:Unable to open
it.ami.CompError:Impossibile aprire
-nl.ami.CompError:Unable to open
+nl.ami.CompError:Niet te openen
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
it.ami.MultiTabClose:Sono rimaste aperte più schede, sei sicuro di voler uscire da NetSurf?
-nl.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+nl.ami.MultiTabClose:Er zijn meerdere tabbladen geopend. Tabbladen allemaal sluiten?
en.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
de.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
fr.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
it.ami.TCPIPShutdown:Lo stack TCP/IP ha dato segnale di essere in procinto di arresto, NetSurf verrà chiuso. NetSurf si chiuderà entro 5 secondi a meno che lo shutdown non venga interrotto.
-nl.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
+nl.ami.TCPIPShutdown:De TCP/IP-stack meldt dat deze wordt afgesloten waardoor NetSurf gestopt moet worden. NetSurf zal stoppen in 5 seconden, tenzij het afsluiten wordt afgebroken.
en.ami.AbortShutdown:Abort shutdown
de.ami.AbortShutdown:Abort shutdown
fr.ami.AbortShutdown:Abort shutdown
it.ami.AbortShutdown:Interrompi lo shutdown
-nl.ami.AbortShutdown:Abort shutdown
+nl.ami.AbortShutdown:Afsluiten afbreken
# Queries
@@ -3857,7 +3936,7 @@ en.ami.More:More
de.ami.More:More
fr.ami.More:More
it.ami.More:More
-nl.ami.More:More
+nl.ami.More:Meer
# Interactive help
@@ -5616,42 +5695,42 @@ en.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of re
de.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
fr.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
it.ami.HelpToolbarBack:Indietro
-nl.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
+nl.ami.HelpToolbarBack:Vorige\nLMB: Springt naar de vorige pagina in de venstergeschiedenis\nRMB: Toon menu met de venstergeschiedenis
en.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
de.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
fr.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
it.ami.HelpToolbarForward:Avanti
-nl.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
+nl.ami.HelpToolbarForward:Volgende\nLMB: Springt naar de volgende pagina in de venstergeschiedenis
en.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
de.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
fr.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
it.ami.HelpToolbarStop:Stoppa
-nl.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
+nl.ami.HelpToolbarStop:Stop\nLMB: Stopt het laden van de pagina
en.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
de.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
fr.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
it.ami.HelpToolbarReload:Ricarica
-nl.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
+nl.ami.HelpToolbarReload:Herlaad\nLMB: Herlaad de pagina\nShift+LMB: Herlaad de pagina inclusief alle objecten
en.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
de.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
fr.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
it.ami.HelpToolbarHome:Pagina iniziale
-nl.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
+nl.ami.HelpToolbarHome:Startpagina\nLMB: Opent de ingestelde startpagina
en.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
de.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
fr.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
it.ami.HelpToolbarURL:Barra indirizzi
-nl.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
+nl.ami.HelpToolbarURL:Webadresbalk\nVoor een webadres in en druk op Enter\nSuggesties kunnen worden geselecteerd via cursor-omhoog/omlaag
en.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
de.ami.HelpToolbarWebSearch:Websuchleiste\nText eingeben und Enter drücken um mit der Standardsuchmaschine zu suchen
fr.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
it.ami.HelpToolbarWebSearch:Digita una voce in base al provider scelto e premi invio
-nl.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
+nl.ami.HelpToolbarWebSearch:Web-zoekbalk\nVoer de tekst in en druk op Enter om te zoeken met behulp van de standaard ingestelde zoekmachine
en.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
de.ami.HelpToolbarAddTab:Tab hinzufügen.
fr.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
it.ami.HelpToolbarAddTab:Apri una nuova scheda
-nl.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
+nl.ami.HelpToolbarAddTab:Tabblad toevoegen\nLMB: Een nieuwe leeg tabblad wordt geopend
# Configuration tokens
@@ -5784,7 +5863,7 @@ en.ami.LocaleLang:Get from Locale prefs
de.ami.LocaleLang:Rechnervorgabe nutzen
fr.ami.LocaleLang:Get from Locale prefs
it.ami.LocaleLang:Ottieni da preferenze localizzazione
-nl.ami.LocaleLang:Get from Locale prefs
+nl.ami.LocaleLang:Gebruik computerspecificatie
en.all.HistoryAge:Keep history for
de.all.HistoryAge:History behalten für
fr.all.HistoryAge:Conserver l'historique de navigation pendant
@@ -5824,7 +5903,7 @@ en.ami.DoNotTrack:Send header to tell websites not to track
de.ami.DoNotTrack:Send header to tell websites not to track
fr.ami.DoNotTrack:Activer l'envoi d'une requête "Ne pas suivre à la trace"
it.ami.DoNotTrack:Invia header al sito per la richiesta di non tracciamento
-nl.ami.DoNotTrack:Send header to tell websites not to track
+nl.ami.DoNotTrack:Websites laten weten dat gebruiker niet gevolgd wil worden
en.all.FastScrolling:Fast scrolling
de.all.FastScrolling:Schnelles Scrollen
fr.all.FastScrolling:Défilement rapide
@@ -5848,17 +5927,17 @@ en.ami.ScreenWB:Workbench
de.ami.ScreenWB:Workbench
fr.ami.ScreenWB:Plan de travail
it.ami.ScreenWB:Schermo Workbench
-nl.ami.ScreenWB:Workbench
+nl.ami.ScreenWB:Workbench-scherm
en.ami.ScreenPublic:Public screen
de.ami.ScreenPublic:Public Screen
fr.ami.ScreenPublic:Écran public
it.ami.ScreenPublic:Schermo pubblico
-nl.ami.ScreenPublic:Public screen
+nl.ami.ScreenPublic:Openbaar scherm
en.ami.SimpleRefresh:Simple refresh
de.ami.SimpleRefresh:Simple refresh
fr.ami.SimpleRefresh:Rafraîchissement simple
it.ami.SimpleRefresh:Refresh semplice
-nl.ami.SimpleRefresh:Simple refresh
+nl.ami.SimpleRefresh:Eenvoudig verversen
en.all.Theme:Theme
de.all.Theme:Thema
fr.all.Theme:Thème
@@ -5897,7 +5976,7 @@ en.ami.ProxyBypass:Bypass proxy for
de.ami.ProxyBypass:Bypass proxy for
fr.ami.ProxyBypass:Contournement du proxy pour
it.ami.ProxyBypass:Bypassa proxy per
-nl.ami.ProxyBypass:Bypass proxy for
+nl.ami.ProxyBypass:Proxy omleiden voor
en.all.Fetching:Fetching
de.all.Fetching:Fetching
fr.all.Fetching:Connexion
@@ -5936,22 +6015,22 @@ en.ami.DitherQuality:Dither quality
de.ami.DitherQuality:Dither quality
fr.ami.DitherQuality:Qualité de tramage
it.ami.DitherQuality:Qualità dither
-nl.ami.DitherQuality:Dither quality
+nl.ami.DitherQuality:Kwaliteit kleurbenadering
en.ami.Low:Low
de.ami.Low:Low
fr.ami.Low:Faible
it.ami.Low:Bassa
-nl.ami.Low:Low
+nl.ami.Low:Laag
en.ami.Medium:Medium
de.ami.Medium:Medium
fr.ami.Medium:Moyenne
it.ami.Medium:Media
-nl.ami.Medium:Medium
+nl.ami.Medium:Gemiddeld
en.ami.High:High
de.ami.High:High
fr.ami.High:Élevée
it.ami.High:Alta
-nl.ami.High:High
+nl.ami.High:Hoog
en.all.Animations:Animations
de.all.Animations:Animationen
fr.all.Animations:Animations et effets
@@ -6042,7 +6121,7 @@ en.ami.FontFallback:Preferred fallback
de.ami.FontFallback:Preferred fallback
fr.ami.FontFallback:Police de caractères de secour préférée
it.ami.FontFallback:Fallback preferito
-nl.ami.FontFallback:Preferred fallback
+nl.ami.FontFallback:Favoriete reserve lettertype
en.all.Default:Default
de.all.Default:Standard
fr.all.Default:Défaut
@@ -6067,19 +6146,19 @@ en.ami.FontAntialiasing:Use anti-aliasing (when possible)
de.ami.FontAntialiasing:Use anti-aliasing (when possible)
fr.ami.FontAntialiasing:Utiliser l'anticrénelage (si possible)
it.ami.FontAntialiasing:Usa anti-aliasing (quando possibile)
-nl.ami.FontAntialiasing:Use anti-aliasing (when possible)
+nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
# Font scanning
en.ami.FontScanning:Scanning fonts...
de.ami.FontScanning:Scanning fonts...
fr.ami.FontScanning:Balayage de polices de caractères...
it.ami.FontScanning:Scansione dei font in corso...
-nl.ami.FontScanning:Scanning fonts...
+nl.ami.FontScanning:Scannen lettertypen...
en.ami.FontGlyphs:%ld unique glyphs found
de.ami.FontGlyphs:%ld unique glyphs found
fr.ami.FontGlyphs:%ld glyphe(s) unique(s) trouvé
it.ami.FontGlyphs:%ld glifi unici trovati
-nl.ami.FontGlyphs:%ld unique glyphs found
+nl.ami.FontGlyphs:%ld unieke tekens gevonden
# Cache tab
#
@@ -6113,7 +6192,7 @@ en.ami.Tabs:Tabs
de.ami.Tabs:Tabs
fr.ami.Tabs:Onglets
it.ami.Tabs:Schede
-nl.ami.Tabs:Tabs
+nl.ami.Tabs:Tabbladen
en.all.TabbedBrowsing:Tabbed browsing
de.all.TabbedBrowsing:Registernavigation (Tabs)
fr.all.TabbedBrowsing:Navigation par onglets
@@ -6138,12 +6217,12 @@ en.ami.TabClose:Warn when closing multiple tabs
de.ami.TabClose:Warn when closing multiple tabs
fr.ami.TabClose:Avertir lors de la fermeture de plusieurs onglets
it.ami.TabClose:Avvisa quando si chiudono più schede
-nl.ami.TabClose:Warn when closing multiple tabs
+nl.ami.TabClose:Waarschuwen wanneer meerdere tabbladen tegelijkertijd worden gesloten
en.ami.TabAlways:Always show tabs
de.ami.TabAlways:Always show tabs
fr.ami.TabAlways:Toujours afficher les onglets
it.ami.TabAlways:Mostra sempre la barra delle schede
-nl.ami.TabAlways:Always show tabs
+nl.ami.TabAlways:Tabbladen altijd tonen
# Advanced
#
@@ -6186,12 +6265,12 @@ en.ami.OptionDocky:Show in AmiDock
de.ami.OptionDocky:In AmiDock zeigen
fr.ami.OptionDocky:Afficher dans AmiDock
it.ami.OptionDocky:Mostra icona di NetSurf su AmiDock
-nl.ami.OptionDocky:Show in AmiDock
+nl.ami.OptionDocky:Toon in AmiDock
en.ami.PopupMenu:Use popupmenu for forms
de.ami.PopupMenu:Use popupmenu for forms
fr.ami.PopupMenu:Use popupmenu for forms
it.ami.PopupMenu:Use popupmenu for forms
-nl.ami.PopupMenu:Use popupmenu for forms
+nl.ami.PopupMenu:Gebruik popup-menu for formulieren
en.all.Clipboard:Clipboard
de.all.Clipboard:Clipboard
fr.all.Clipboard:Presse-papiers
diff --git a/riscos/templates/nl b/riscos/templates/nl
index a1474f8..704206f 100644
--- a/riscos/templates/nl
+++ b/riscos/templates/nl
@@ -3536,7 +3536,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Proxytype"
+ text_only:"Proxy-type"
}
wimp_icon {
extent:272,-108,652,-56
-----------------------------------------------------------------------
Summary of changes:
resources/FatMessages | 201 ++++++++++++++++++++++++++++++++++---------------
riscos/templates/nl | 2 +-
2 files changed, 141 insertions(+), 62 deletions(-)
diff --git a/resources/FatMessages b/resources/FatMessages
index bed740e..ffa0315 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -284,12 +284,12 @@ en.ro.Reload:Reload this page ^F5
de.ro.Reload:Seite erneut laden ^F5
fr.ro.Reload:Recharger cette page ^F5
it.ro.Reload:Ricarica ^F5
-nl.ro.Reload:Laad pag. opnieuw ^F5
+nl.ro.Reload:Herlaad pagina ^F5
en.beos.Reload:Reload this page
de.beos.Reload:Seite erneut laden
fr.beos.Reload:Recharger cette page
it.beos.Reload:Ricarica
-nl.beos.Reload:Laad pag. opnieuw
+nl.beos.Reload:Herlaad pagina
en.all.Stop:Stop loading this page
de.all.Stop:Ladevorgang abbrechen
fr.all.Stop:Arrêter le chargement de la page
@@ -662,7 +662,7 @@ en.all.ProxyBasic:Basic authentication
de.all.ProxyBasic:mit Authentifizierung
fr.all.ProxyBasic:Authentification de base
it.all.ProxyBasic:Autentificato di base
-nl.all.ProxyBasic:Basis-authenticatie
+nl.all.ProxyBasic:Basisauthenticatie
en.all.ProxyNTLM:NTLM authentication
de.all.ProxyNTLM:NTLM Authentifizierung
fr.all.ProxyNTLM:Authentification NTLM
@@ -816,12 +816,12 @@ en.ami.Undo:Undo
de.ami.Undo:Undo
fr.ami.Undo:Annuler
it.ami.Undo:Annulla
-nl.ami.Undo:Undo
+nl.ami.Undo:Maak ongedaan
en.ami.Redo:Redo
de.ami.Redo:Redo
fr.ami.Redo:Rétablir
it.ami.Redo:Ripristina
-nl.ami.Redo:Redo
+nl.ami.Redo:Opnieuw
# Browser menu
#
@@ -918,7 +918,7 @@ en.ami.ARexxExecute:Execute script...
de.ami.ARexxExecute:Script ausführen...
fr.ami.ARexxExecute:Executer script...
it.ami.ARexxExecute:Esegui script...
-nl.ami.ARexxExecute:Execute script...
+nl.ami.ARexxExecute:Voer script uit...
# Context menu
#
@@ -956,7 +956,7 @@ en.ami.SaveIFF:Save as IFF...
de.ami.SaveIFF:Speichern als IFF...
fr.ami.SaveIFF:Enregistrer sous IFF...
it.ami.SaveIFF:Salva come IFF...
-nl.ami.SaveIFF:Save as IFF...
+nl.ami.SaveIFF:Bewaar als IFF...
en.all.SaveComplete:Save complete...
de.all.SaveComplete:Speichern abgeschlossen...
fr.all.SaveComplete:Enregistrement terminé...
@@ -1152,7 +1152,7 @@ en.ami.TreeEdit:Edit title
de.ami.TreeEdit:Edit title
fr.ami.TreeEdit:Modifier le titre
it.ami.TreeEdit:Modifica titolo
-nl.ami.TreeEdit:Edit title
+nl.ami.TreeEdit:Wijzig titel
# Treeview field labels
#
@@ -1329,10 +1329,12 @@ nl.all.TreeHotlist:NetSurf-favorieten
en.ami.NetSurfDesc:Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.
fr.ami.NetSurfDesc:Petit comme une souris, rapide comme un guépard. NetSurf est un navigateur Web multi-plate-forme libre.
it.ami.NetSurfDesc:Piccolo come un mouse, veloce come un ghepardo. NetSurf è un browser web opensource e multi-piattaforma.
+nl.ami.NetSurfDesc:Klein als een muis, snel als een cheetah en gratis beschikbaar. NetSurf is een multi-platform webbrowser.
en.gtk.AboutDesc:NetSurf is a small and fast web browser.
fr.gtk.AboutDesc:NetSurf est un navigateur Web multi-plate-forme libre.
it.gtk.AboutDesc:NetSurf è un browser web opensource e multi-piattaforma.
+nl.gtk.AboutDesc:NetSurf is een kleine, snelle webbrowser met open broncode.
# Hotlist user interface tokens
# =============================
@@ -1398,12 +1400,12 @@ en.ami.HotlistMenu:Hotlist menu
de.ami.HotlistMenu:Hotlist menu
fr.ami.HotlistMenu:Hotlist menu
it.ami.HotlistMenu:Menu segnalibri
-nl.ami.HotlistMenu:Hotlist menu
+nl.ami.HotlistMenu:Favorietenmenu
en.ami.HotlistToolbar:Hotlist toolbar
de.ami.HotlistToolbar:Hotlist toolbar
fr.ami.HotlistToolbar:Hotlist toolbar
it.ami.HotlistToolbar:Barra segnalibri
-nl.ami.HotlistToolbar:Hotlist toolbar
+nl.ami.HotlistToolbar:Favorietenwerkbalk
# Global history user interface tokens
@@ -1551,17 +1553,17 @@ en.ami.amiDownload:%ld of %ld bytes downloaded
de.ami.amiDownload:%ld von %ld Bytes heruntergeladen
fr.ami.amiDownload:%ld of %ld bytes downloaded
it.ami.amiDownload:%ld di %ld byte scaricati
-nl.ami.amiDownload:%ld of %ld bytes downloaded
+nl.ami.amiDownload:%ld van %ld bytes opgehaald
en.ami.amiDownloadU:%ld bytes downloaded
de.ami.amiDownloadU:%ld Bytes heruntergeladen
fr.ami.amiDownloadU:%ld bytes downloaded
it.ami.amiDownloadU:%ld byte scaricati
-nl.ami.amiDownloadU:%ld bytes downloaded
+nl.ami.amiDownloadU:%ld bytes opgehaald
en.ami.amiDownloadComplete:NetSurf: Download completed
de.ami.amiDownloadComplete:NetSurf: Download vollständig
fr.ami.amiDownloadComplete:NetSurf: Download completed
it.ami.amiDownloadComplete:NetSurf: Download completato
-nl.ami.amiDownloadComplete:NetSurf: Download completed
+nl.ami.amiDownloadComplete:NetSurf: Download voltooid
# Requesters
#
@@ -1569,12 +1571,12 @@ en.ami.amiSizeExisting:Existing file size:
de.ami.amiSizeExisting:Größe der vorhandenen Datei:
fr.ami.amiSizeExisting:Existing file size:
it.ami.amiSizeExisting:Dimensione del file esistente:
-nl.ami.amiSizeExisting:Existing file size:
+nl.ami.amiSizeExisting:Bestaande bestandsgrootte:
en.ami.amiSizeNew:New file size:
de.ami.amiSizeNew:Größe der neuen Datei:
fr.ami.amiSizeNew:New file size:
it.ami.amiSizeNew:Nuova dimensione del file:
-nl.ami.amiSizeNew:New file size:
+nl.ami.amiSizeNew:Nieuwe bestandsgrootte:
# GTK download window tokens
#
@@ -2157,10 +2159,10 @@ fr.gtk.gtkAddBookMarks:_Ajouter un marque-page..
it.gtk.gtkAddBookMarks:_Aggiungi ai segnalibri...
nl.gtk.gtkAddBookMarks:_Aan bladwijzers toevoegen...
en.gtk.gtkAddBookMarksAccel:<ctrl>d
-de.gtk.gtkGlobalHistoryAccel:<ctrl>d
-fr.gtk.gtkGlobalHistoryAccel:<ctrl>d
-it.gtk.gtkGlobalHistoryAccel:<ctrl>d
-nl.gtk.gtkGlobalHistoryAccel:<ctrl>d
+de.gtk.gtkAddBookMarksAccel:<ctrl>d
+fr.gtk.gtkAddBookMarksAccel:<ctrl>d
+it.gtk.gtkAddBookMarksAccel:<ctrl>d
+nl.gtk.gtkAddBookMarksAccel:<ctrl>d
en.gtk.gtkShowBookMarks:_Show Bookmarks…
de.gtk.gtkShowBookMarks:Le_sezeichen anzeigen..
fr.gtk.gtkShowBookMarks:_Montrer les marques-pages...
@@ -2448,170 +2450,242 @@ nl.gtk.preferencesButtonTypeText:Alleen tekst
# content tab
en.gtk.preferencesContentTabtitle:Content
fr.gtk.preferencesContentTabtitle:Contenu
+nl.gtk.preferencesContentTabtitle:Inhoud
en.gtk.preferencesControl:<b>Control</b>
fr.gtk.preferencesControl:<b>Contrôle</b>
+nl.gtk.preferencesControl:<b>Opties</b>
en.gtk.preferencesControlPrevent:Prevent pop-up windows
fr.gtk.preferencesControlPrevent:Empêcher fenêtres pop-up
+nl.gtk.preferencesControlPrevent:Pop-upvensters blokkeren
en.gtk.preferencesControlHide:Hide Adverts
fr.gtk.preferencesControlHide:Cacher les publicités
+nl.gtk.preferencesControlHide:Advertenties verbergen
en.gtk.preferencesControlEnable:Enable JavaScript
fr.gtk.preferencesControlEnable:Activer JavaScript
+nl.gtk.preferencesControlEnable:JavaScript inschakelen
en.gtk.preferencesControlDisable:Disable plug-ins
fr.gtk.preferencesControlDisable:Désactiver modules externes
+nl.gtk.preferencesControlDisable:Plug-ins uitschakelen
en.gtk.preferencesControlHigh:High quality image scaling
fr.gtk.preferencesControlHigh:Haute qualité d'image redimensionnée
+nl.gtk.preferencesControlHigh:Schalen op hoge beeldkwaliteit
en.gtk.preferencesControlLoad:Load and display
fr.gtk.preferencesControlLoad:Charger et visualiser
+nl.gtk.preferencesControlLoad:Laad en toon
en.gtk.preferencesAnimation:<b>Animation</b>
fr.gtk.preferencesAnimation:<b>Animation</b>
+nl.gtk.preferencesAnimation:<b>Animaties</b>
en.gtk.preferencesAnimationEnable:Enable
fr.gtk.preferencesAnimationEnable:Activer
+nl.gtk.preferencesAnimationEnable:Ingeschakeld
en.gtk.preferencesAnimationMinimum:Minimum time between frames:
fr.gtk.preferencesAnimationMinimum:Temps minimal entre cadres/frames/images/photo :
+nl.gtk.preferencesAnimationMinimum:Minimum tijd tussen opeenvolgende animatiebeelden:
en.gtk.preferencesAnimationMinimumTooltip:Do not update animations any more often than this.
fr.gtk.preferencesAnimationMinimumTooltip:Ne pas mettre à jour les animations plus souvent que cela.
+nl.gtk.preferencesAnimationMinimumTooltip:Animaties niet vaker actualiseren dan dit.
en.gtk.preferencesFonts:<b>Fonts</b>
fr.gtk.preferencesFonts:<b>Fontes/Polices</b>
+nl.gtk.preferencesFonts:<b>Lettertypen</b>
en.gtk.preferencesFontsDefault:Default
fr.gtk.preferencesFontsDefault:Défaut
+nl.gtk.preferencesFontsDefault:Standaard
en.gtk.preferencesFontsSize:Size
fr.gtk.preferencesFontsSize:Taille
+nl.gtk.preferencesFontsSize:Grootte
en.gtk.preferencesFontsSizeTooltip:The base-line font size to use.
fr.gtk.preferencesFontsSizeTooltip:La taille de la fonte/police de base à utiliser.
+nl.gtk.preferencesFontsSizeTooltip:Het standaardlettertype te gebruiken voor webpagina's.
en.gtk.preferencesFontsPreview:_Preview
fr.gtk.preferencesFontsPreview:A_perçu
+nl.gtk.preferencesFontsPreview:_Voorbeeld
en.gtk.preferencesLanguage:<b>Language</b>
fr.gtk.preferencesLanguage:<b>Langue</b>
+nl.gtk.preferencesLanguage:<b>Talen</b>
en.gtk.preferencesLanguagePreferred:Preferred language:
fr.gtk.preferencesLanguagePreferred:Langue préférée :
+nl.gtk.preferencesLanguagePreferred:Voorkeurtaal:
en.gtk.preferencesLanguagePreferredTooltip:The preferred language for web pages
fr.gtk.preferencesLanguagePreferredTooltip:La langue préférée pour les pages Web
+nl.gtk.preferencesLanguagePreferredTooltip:De voorkeurtaal voor webpagina's
# Image loading list
en.gtk.preferencesImageLoadBoth:foreground and background images
fr.gtk.preferencesImageLoadBoth:Images d'avant-plan et d'arrière-plan
+nl.gtk.preferencesImageLoadBoth:voorgrond- en achtergrondafbeeldingen
en.gtk.preferencesImageLoadFore:foreground images
fr.gtk.preferencesImageLoadFore:Images d'avant-plan
+nl.gtk.preferencesImageLoadFore:voorgrondafbeeldingen
en.gtk.preferencesImageLoadBack:background images
fr.gtk.preferencesImageLoadBack:Images d'arrière-plan
+nl.gtk.preferencesImageLoadBack:achtergrondafbeeldingen
en.gtk.preferencesImageLoadNone:no images
fr.gtk.preferencesImageLoadNone:pas d'images
+nl.gtk.preferencesImageLoadNone:geen afbeeldingen
# font type list
en.gtk.preferencesFonttypeSans:Sans-serif
fr.gtk.preferencesFonttypeSans:Sans-serif
+nl.gtk.preferencesFonttypeSans:Schreefloos
en.gtk.preferencesFonttypeSerif:Serif
fr.gtk.preferencesFonttypeSerif:Serif
+nl.gtk.preferencesFonttypeSerif:Met schreef
en.gtk.preferencesFonttypeMonospace:Monospace
fr.gtk.preferencesFonttypeMonospace:Monospace
+nl.gtk.preferencesFonttypeMonospace:Monospace
en.gtk.preferencesFonttypeCursive:Cursive
fr.gtk.preferencesFonttypeCursive:Cursive
+nl.gtk.preferencesFonttypeCursive:Cursief
en.gtk.preferencesFonttypeFantasy:Fantasy
fr.gtk.preferencesFonttypeFantasy:Fantasy
-
+nl.gtk.preferencesFonttypeFantasy:Fantasie
en.gtk.preferencesPrivacyTabtitle:Privacy
fr.gtk.preferencesPrivacyTabtitle:Confidentialité
+nl.gtk.preferencesPrivacyTabtitle:Privacy
en.gtk.preferencesGeneral:<b>General</b>
fr.gtk.preferencesGeneral:<b>Général</b>
+nl.gtk.preferencesGeneral:<b>Algemeen</b>
en.gtk.preferencesGeneralReferral:Enable referral submission
fr.gtk.preferencesGeneralReferral:Permettre l'envoi du referer en entête
+nl.gtk.preferencesGeneralReferral:Referentie versturen inschakelen
en.gtk.preferencesGeneralDNT:Enable sending "Do Not Track" request
fr.gtk.preferencesGeneralDNT:Activer l'envoi d'une requête "Ne pas suivre à la trace"
+nl.gtk.preferencesGeneralDNT:Websites laten weten dat gebruiker niet gevolgd wil worden
en.gtk.preferencesHistory:<b>History</b>
fr.gtk.preferencesHistory:<b>Historque</b>
+nl.gtk.preferencesHistory:<b>Geschiedenis</b>
en.gtk.preferencesHistoryShow:Local history shows URL in tooltip
fr.gtk.preferencesHistoryShow:Historique local dans une infobulle
+nl.gtk.preferencesHistoryShow:Venstergeschiedenis toont webadres in een tipkader
en.gtk.preferencesHistoryRemember:Remember browsing history for up to
fr.gtk.preferencesHistoryRemember:Conserver l'historique de navigation pendant
+nl.gtk.preferencesHistoryRemember:Browsergeschiedenis onthouden voor
en.gtk.preferencesHistoryDays:days
fr.gtk.preferencesHistoryDays:jours
+nl.gtk.preferencesHistoryDays:dag(en)
en.gtk.preferencesCache:<b>Cache</b>
fr.gtk.preferencesCache:<b>Cache</b>
+nl.gtk.preferencesCache:<b>Buffer</b>
en.gtk.preferencesCacheMemory:Memory cache size
fr.gtk.preferencesCacheMemory:Taille du cache mémoire
+nl.gtk.preferencesCacheMemory:Grootte geheugenbuffer
en.gtk.preferencesCacheDisc:Disc cache size
fr.gtk.preferencesCacheDisc:Taille du cache disque
+nl.gtk.preferencesCacheDisc:Grootte schijfbuffer
en.gtk.preferencesCacheExpire:Expire cache entries after
fr.gtk.preferencesCacheExpire:Les entrées du cache expirent après un délai de
+nl.gtk.preferencesCacheExpire:Buffergegevens vervallen na
en.gtk.preferencesCacheMaintenance:Maintenance
fr.gtk.preferencesCacheMaintenance:Maintenance
+nl.gtk.preferencesCacheMaintenance:Onderhoud
en.gtk.preferencesCacheDays:days
fr.gtk.preferencesCacheDays:jours
-
+nl.gtk.preferencesCacheDays:dag(en)
en.gtk.preferencesNetworkTabtitle:Network
fr.gtk.preferencesNetworkTabtitle:Réseau
+nl.gtk.preferencesNetworkTabtitle:Netwerk
en.gtk.preferencesProxy:<b>HTTP Proxy</b>
fr.gtk.preferencesProxy:<b>Proxy HTTP</b>
+nl.gtk.preferencesProxy:<b>HTTP-proxy</b>
en.gtk.preferencesProxyType:Proxy type
fr.gtk.preferencesProxyType:Type de Proxy
+nl.gtk.preferencesProxyType:Proxy-type
en.gtk.preferencesProxyHost:Host
fr.gtk.preferencesProxyHost:Hôte
+nl.gtk.preferencesProxyHost:Proxy-server
en.gtk.preferencesProxyUsername:Username
fr.gtk.preferencesProxyUsername:Nom d'utilisateur
+nl.gtk.preferencesProxyUsername:Gebruikersnaam
en.gtk.preferencesProxyPassword:Password
fr.gtk.preferencesProxyPassword:Mot de passe
+nl.gtk.preferencesProxyPassword:Wachtwoord
en.gtk.preferencesProxyNoproxy:No Proxy For
fr.gtk.preferencesProxyNoproxy:Pas de proxy pour
+nl.gtk.preferencesProxyNoproxy:Geen proxy voor
en.gtk.preferencesProxyTypeTooltip:The type of HTTP proxy server.
fr.gtk.preferencesProxyTypeTooltip:Le type de serveur proxy HTTP.
+nl.gtk.preferencesProxyTypeTooltip:Het type van de HTTP-proxy-server.
en.gtk.preferencesProxyHostTooltip:Host name of your proxy server.
fr.gtk.preferencesProxyHostTooltip:Nom d'hôte du serveur proxy.
+nl.gtk.preferencesProxyHostTooltip:Adres van de proxy-server.
en.gtk.preferencesProxyPortTooltip:Port number to connect to on proxy server.
fr.gtk.preferencesProxyPortTooltip:Le numéro de port pour se connecter au serveur proxy.
+nl.gtk.preferencesProxyPortTooltip:Poortnummer om te verbinden met de proxy-server.
en.gtk.preferencesProxyUsernameTooltip:Username to access the proxy.
fr.gtk.preferencesProxyUsernameTooltip:Nom d'utilisateur pour accéder au proxy.
+nl.gtk.preferencesProxyUsernameTooltip:Gebruikersnaam voor toegang tot de proxy.
en.gtk.preferencesProxyNoproxyTooltip:Comma separated list of host names that should not be proxied.
fr.gtk.preferencesProxyNoproxyTooltip:Liste des noms d'hôtes séparés par des virgules qui ne devraient pas être traitées par le proxy.
+nl.gtk.preferencesProxyNoproxyTooltip:Lijst van ip-adressen of servernamen die niet via de proxy mogen lopen, gescheiden door komma's.
en.gtk.preferencesFetching:<b>Fetching</b>
fr.gtk.preferencesFetching:<b>Connexions</b>
+nl.gtk.preferencesFetching:<b>Verbindingen</b>
en.gtk.preferencesFetchingMax:Maximum fetchers
fr.gtk.preferencesFetchingMax:Nombre maximum de connexions
+nl.gtk.preferencesFetchingMax:Maximum aantal
en.gtk.preferencesFetchingPerhost:Fetches per host
fr.gtk.preferencesFetchingPerhost:Nombre de connexions par hôte
+nl.gtk.preferencesFetchingPerhost:Aantal verbindingen per server
en.gtk.preferencesFetchingCached:Cached connections
fr.gtk.preferencesFetchingCached:Connexions en cache
+nl.gtk.preferencesFetchingCached:Gebufferde verbindingen
en.gtk.preferencesFetchingMaxTooltip:Maximum number of concurrent items to fetch at once.
fr.gtk.preferencesFetchingMaxTooltip:Nombre maximum d'éléments simultanés à récupérer
+nl.gtk.preferencesFetchingMaxTooltip:Maximum aantal verbindingen die simultaan items ophalen.
en.gtk.preferencesFetchingPerhostTooltip:Maximum number of item fetches per web server.
fr.gtk.preferencesFetchingPerhostTooltip:Nombre maximum d'élément à extrair pour chaque serveur Web.
+nl.gtk.preferencesFetchingPerhostTooltip:Maximum aantal verbinden per webserver.
en.gtk.preferencesFetchingCachedTooltip:Number of connections to keep in case they are needed again.
fr.gtk.preferencesFetchingCachedTooltip:Nombre de connexions à maintenir dans le cas où elles seront nécessaires à nouveau.
-
+nl.gtk.preferencesFetchingCachedTooltip:Aantal verbindingen te bufferen voor het geval ze zijn weer nodig.
# Proxy type list
en.gtk.preferencesProxyTypeDirect:Direct connection
fr.gtk.preferencesProxyTypeDirect:Connexion directe
+nl.gtk.preferencesProxyTypeDirect:Directe verbinding
en.gtk.preferencesProxyTypeManual:Manual with no authentication
fr.gtk.preferencesProxyTypeManual:Manuel sans authentification
+nl.gtk.preferencesProxyTypeManual:Handmatig zonder authenticatie
en.gtk.preferencesProxyTypeBasic:Manual with basic authentication
fr.gtk.preferencesProxyTypeBasic:Manuel avec authentification basique
-en.gtk.preferencesProxyTypeNLTM:Manual with NTLM authentication
+nl.gtk.preferencesProxyTypeBasic:Handmatig met basisauthenticatie
+en.gtk.preferencesProxyTypeNLTM:Manual with - authentication
fr.gtk.preferencesProxyTypeNLTM:Manuel avec l'authentification NTLM
+nl.gtk.preferencesProxyTypeNLTM:Handmatig via NTLM-authenticatie
en.gtk.preferencesProxyTypeSystem:System settings
fr.gtk.preferencesProxyTypeSystem:Paramètres du système
-
+nl.gtk.preferencesProxyTypeSystem:Systeeminstellingen
en.gtk.preferencesPDFTabtitle:PDF
fr.gtk.preferencesPDFTabtitle:PDF
+nl.gtk.preferencesPDFTabtitle:PDF-uitvoer
en.gtk.preferencesAppearance:<b>Appearance</b>
fr.gtk.preferencesAppearance:<b>Apparence</b>
-
+nl.gtk.preferencesAppearance:<b>Opmaak</b>
en.gtk.preferencesAppearanceImages:No images in output
fr.gtk.preferencesAppearanceImages:Aucune image de rendu/restituée
+nl.gtk.preferencesAppearanceImages:Geen afbeeldingen in uitvoer
en.gtk.preferencesAppearanceBackground:No background images in output
fr.gtk.preferencesAppearanceBackground:Aucune image d'arrière-plan de rendu/restituée
+nl.gtk.preferencesAppearanceBackground:Geen achtergrondafbeeldingen in uitvoer
en.gtk.preferencesAppearanceScalefit:Scale output to fit page
fr.gtk.preferencesAppearanceScalefit:Adapter à la page
+nl.gtk.preferencesAppearanceScalefit:Uitvoer passend maken aan pagina
en.gtk.preferencesAppearanceScale:Scale output
fr.gtk.preferencesAppearanceScale:Adapter
+nl.gtk.preferencesAppearanceScale:Schaal
en.gtk.preferencesMargins:<b>Margins</b>
fr.gtk.preferencesMargins:<b>Marges</b>
+nl.gtk.preferencesMargins:<b>Marges</b>
en.gtk.preferencesMarginsMeasurements:measurements in mm
fr.gtk.preferencesMarginsMeasurements:Mesures en mm
+nl.gtk.preferencesMarginsMeasurements:eenheden in millimeters
en.gtk.preferencesGeneration:<b>Generation</b>
fr.gtk.preferencesGeneration:<b>Generation</b>
+nl.gtk.preferencesGeneration:<b>Genereren</b>
en.gtk.preferencesGenerationCompressed:Output is compressed
fr.gtk.preferencesGenerationCompressed:La restitution est compressée
+nl.gtk.preferencesGenerationCompressed:Uitvoer wordt gecomprimeerd
en.gtk.preferencesGenerationPassword:Output has a password
fr.gtk.preferencesGenerationPassword:La restitution possède un mot de passe
-
+nl.gtk.preferencesGenerationPassword:Uitvoer wordt met wachtwoord beveiligd
# Printing user interface tokens
@@ -2799,7 +2873,7 @@ en.all.Form_Reset:Reset
de.all.Form_Reset:Zurücksetzen
fr.all.Form_Reset:Effacer
it.all.Form_Reset:Resetta
-nl.all.Form_Reset:Legen
+nl.all.Form_Reset:Opnieuw
en.all.Form_None:
de.all.Form_None:
fr.all.Form_None:
@@ -2812,14 +2886,18 @@ it.all.Form_Many:(Molti)
nl.all.Form_Many:(Veel)
en.gtk.Form_Drop:Click to select file
fr.gtk.Form_Drop:Cliquer pour sélectionner fichier
+nl.gtk.Form_Drop:Klik om bestand te selecteren
en.ro.Form_Drop:Drop file here
fr.ro.Form_Drop:Déposer fichier ici
en.ami.Form_Drop:Click or drop file here
-fr.ami.Form_Drop:Cliquer ou déposer fichier ici
+fr.ami.Form_Drop:Cliquer ou déposer fichier ici]
+nl.ami.Form_Drop:Sleep bestand hierheen
en.beos.Form_Drop:Drop file here
fr.beos.Form_Drop:Drop file here
+nl.beos.Form_Drop:Sleep bestand hierheen
en.fb.Form_Drop:Click to select file
fr.fb.Form_Drop:Cliquer pour sélectionner fichier
+nl.fb.Form_Drop:Klik om bestand te selecteren
en.osx.Form_Drop:Click to select file
fr.osx.Form_Drop:Cliquer pour sélectionner fichier
de.all.Form_Drop:Datei hier hinziehen
@@ -2943,7 +3021,7 @@ en.ami.DataTypesTitle:%s (%s image %lux%lu pixels)
de.ami.DataTypesTitle:%s (%s Bild %lux%lu pixels)
fr.ami.DataTypesTitle:%s (Image %s %lux%lu pixels)
it.ami.DataTypesTitle:%s (Immagine %s %lux%lu pixel)
-nl.ami.DataTypesTitle:%s (%s image %lux%lu pixels)
+nl.ami.DataTypesTitle:%s (%s afbeelding %lux%lu punten)
# HTML page character set
#
@@ -3223,28 +3301,29 @@ it.all.DirectoryError:La directory '%s' è già esistente
nl.all.DirectoryError:map '%s' bestaat reeds
en.ro.SprIsNull:Unable to convert image to sprite
+nl.ro.SprIsNull:Afbeelding kan niet worden omgezet in een sprite.
# Error messages for Amiga version only
en.ami.CompError:Unable to open
de.ami.CompError:Nicht zu öffnen
fr.ami.CompError:Unable to open
it.ami.CompError:Impossibile aprire
-nl.ami.CompError:Unable to open
+nl.ami.CompError:Niet te openen
en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
it.ami.MultiTabClose:Sono rimaste aperte più schede, sei sicuro di voler uscire da NetSurf?
-nl.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+nl.ami.MultiTabClose:Er zijn meerdere tabbladen geopend. Tabbladen allemaal sluiten?
en.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
de.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
fr.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
it.ami.TCPIPShutdown:Lo stack TCP/IP ha dato segnale di essere in procinto di arresto, NetSurf verrà chiuso. NetSurf si chiuderà entro 5 secondi a meno che lo shutdown non venga interrotto.
-nl.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf will quit in 5 seconds unless this shutdown is aborted.
+nl.ami.TCPIPShutdown:De TCP/IP-stack meldt dat deze wordt afgesloten waardoor NetSurf gestopt moet worden. NetSurf zal stoppen in 5 seconden, tenzij het afsluiten wordt afgebroken.
en.ami.AbortShutdown:Abort shutdown
de.ami.AbortShutdown:Abort shutdown
fr.ami.AbortShutdown:Abort shutdown
it.ami.AbortShutdown:Interrompi lo shutdown
-nl.ami.AbortShutdown:Abort shutdown
+nl.ami.AbortShutdown:Afsluiten afbreken
# Queries
@@ -3857,7 +3936,7 @@ en.ami.More:More
de.ami.More:More
fr.ami.More:More
it.ami.More:More
-nl.ami.More:More
+nl.ami.More:Meer
# Interactive help
@@ -5616,42 +5695,42 @@ en.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of re
de.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
fr.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
it.ami.HelpToolbarBack:Indietro
-nl.ami.HelpToolbarBack:Back\nLMB: Steps back one page\nRMB: Display a menu of recent pages
+nl.ami.HelpToolbarBack:Vorige\nLMB: Springt naar de vorige pagina in de venstergeschiedenis\nRMB: Toon menu met de venstergeschiedenis
en.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
de.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
fr.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
it.ami.HelpToolbarForward:Avanti
-nl.ami.HelpToolbarForward:Forward\nLMB: Steps forward one page
+nl.ami.HelpToolbarForward:Volgende\nLMB: Springt naar de volgende pagina in de venstergeschiedenis
en.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
de.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
fr.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
it.ami.HelpToolbarStop:Stoppa
-nl.ami.HelpToolbarStop:Stop\nLMB: Stops loading the page
+nl.ami.HelpToolbarStop:Stop\nLMB: Stopt het laden van de pagina
en.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
de.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
fr.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
it.ami.HelpToolbarReload:Ricarica
-nl.ami.HelpToolbarReload:Reload\nLMB: Reloads the page\nShift+LMB: Reloads the page and all objects
+nl.ami.HelpToolbarReload:Herlaad\nLMB: Herlaad de pagina\nShift+LMB: Herlaad de pagina inclusief alle objecten
en.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
de.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
fr.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
it.ami.HelpToolbarHome:Pagina iniziale
-nl.ami.HelpToolbarHome:Home\nLMB: Goes to the homepage
+nl.ami.HelpToolbarHome:Startpagina\nLMB: Opent de ingestelde startpagina
en.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
de.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
fr.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
it.ami.HelpToolbarURL:Barra indirizzi
-nl.ami.HelpToolbarURL:URL bar\nType a URL and press Return\nSuggestions can be selected with up/down
+nl.ami.HelpToolbarURL:Webadresbalk\nVoor een webadres in en druk op Enter\nSuggesties kunnen worden geselecteerd via cursor-omhoog/omlaag
en.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
de.ami.HelpToolbarWebSearch:Websuchleiste\nText eingeben und Enter drücken um mit der Standardsuchmaschine zu suchen
fr.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
it.ami.HelpToolbarWebSearch:Digita una voce in base al provider scelto e premi invio
-nl.ami.HelpToolbarWebSearch:Web search bar\nType text and press Return to search using your default search provider
+nl.ami.HelpToolbarWebSearch:Web-zoekbalk\nVoer de tekst in en druk op Enter om te zoeken met behulp van de standaard ingestelde zoekmachine
en.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
de.ami.HelpToolbarAddTab:Tab hinzufügen.
fr.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
it.ami.HelpToolbarAddTab:Apri una nuova scheda
-nl.ami.HelpToolbarAddTab:Add tab\nLMB: Adds a new blank tab
+nl.ami.HelpToolbarAddTab:Tabblad toevoegen\nLMB: Een nieuwe leeg tabblad wordt geopend
# Configuration tokens
@@ -5784,7 +5863,7 @@ en.ami.LocaleLang:Get from Locale prefs
de.ami.LocaleLang:Rechnervorgabe nutzen
fr.ami.LocaleLang:Get from Locale prefs
it.ami.LocaleLang:Ottieni da preferenze localizzazione
-nl.ami.LocaleLang:Get from Locale prefs
+nl.ami.LocaleLang:Gebruik computerspecificatie
en.all.HistoryAge:Keep history for
de.all.HistoryAge:History behalten für
fr.all.HistoryAge:Conserver l'historique de navigation pendant
@@ -5824,7 +5903,7 @@ en.ami.DoNotTrack:Send header to tell websites not to track
de.ami.DoNotTrack:Send header to tell websites not to track
fr.ami.DoNotTrack:Activer l'envoi d'une requête "Ne pas suivre à la trace"
it.ami.DoNotTrack:Invia header al sito per la richiesta di non tracciamento
-nl.ami.DoNotTrack:Send header to tell websites not to track
+nl.ami.DoNotTrack:Websites laten weten dat gebruiker niet gevolgd wil worden
en.all.FastScrolling:Fast scrolling
de.all.FastScrolling:Schnelles Scrollen
fr.all.FastScrolling:Défilement rapide
@@ -5848,17 +5927,17 @@ en.ami.ScreenWB:Workbench
de.ami.ScreenWB:Workbench
fr.ami.ScreenWB:Plan de travail
it.ami.ScreenWB:Schermo Workbench
-nl.ami.ScreenWB:Workbench
+nl.ami.ScreenWB:Workbench-scherm
en.ami.ScreenPublic:Public screen
de.ami.ScreenPublic:Public Screen
fr.ami.ScreenPublic:Écran public
it.ami.ScreenPublic:Schermo pubblico
-nl.ami.ScreenPublic:Public screen
+nl.ami.ScreenPublic:Openbaar scherm
en.ami.SimpleRefresh:Simple refresh
de.ami.SimpleRefresh:Simple refresh
fr.ami.SimpleRefresh:Rafraîchissement simple
it.ami.SimpleRefresh:Refresh semplice
-nl.ami.SimpleRefresh:Simple refresh
+nl.ami.SimpleRefresh:Eenvoudig verversen
en.all.Theme:Theme
de.all.Theme:Thema
fr.all.Theme:Thème
@@ -5897,7 +5976,7 @@ en.ami.ProxyBypass:Bypass proxy for
de.ami.ProxyBypass:Bypass proxy for
fr.ami.ProxyBypass:Contournement du proxy pour
it.ami.ProxyBypass:Bypassa proxy per
-nl.ami.ProxyBypass:Bypass proxy for
+nl.ami.ProxyBypass:Proxy omleiden voor
en.all.Fetching:Fetching
de.all.Fetching:Fetching
fr.all.Fetching:Connexion
@@ -5936,22 +6015,22 @@ en.ami.DitherQuality:Dither quality
de.ami.DitherQuality:Dither quality
fr.ami.DitherQuality:Qualité de tramage
it.ami.DitherQuality:Qualità dither
-nl.ami.DitherQuality:Dither quality
+nl.ami.DitherQuality:Kwaliteit kleurbenadering
en.ami.Low:Low
de.ami.Low:Low
fr.ami.Low:Faible
it.ami.Low:Bassa
-nl.ami.Low:Low
+nl.ami.Low:Laag
en.ami.Medium:Medium
de.ami.Medium:Medium
fr.ami.Medium:Moyenne
it.ami.Medium:Media
-nl.ami.Medium:Medium
+nl.ami.Medium:Gemiddeld
en.ami.High:High
de.ami.High:High
fr.ami.High:Élevée
it.ami.High:Alta
-nl.ami.High:High
+nl.ami.High:Hoog
en.all.Animations:Animations
de.all.Animations:Animationen
fr.all.Animations:Animations et effets
@@ -6042,7 +6121,7 @@ en.ami.FontFallback:Preferred fallback
de.ami.FontFallback:Preferred fallback
fr.ami.FontFallback:Police de caractères de secour préférée
it.ami.FontFallback:Fallback preferito
-nl.ami.FontFallback:Preferred fallback
+nl.ami.FontFallback:Favoriete reserve lettertype
en.all.Default:Default
de.all.Default:Standard
fr.all.Default:Défaut
@@ -6067,19 +6146,19 @@ en.ami.FontAntialiasing:Use anti-aliasing (when possible)
de.ami.FontAntialiasing:Use anti-aliasing (when possible)
fr.ami.FontAntialiasing:Utiliser l'anticrénelage (si possible)
it.ami.FontAntialiasing:Usa anti-aliasing (quando possibile)
-nl.ami.FontAntialiasing:Use anti-aliasing (when possible)
+nl.ami.FontAntialiasing:Anti-aliasing (indien mogelijk) gebruiken
# Font scanning
en.ami.FontScanning:Scanning fonts...
de.ami.FontScanning:Scanning fonts...
fr.ami.FontScanning:Balayage de polices de caractères...
it.ami.FontScanning:Scansione dei font in corso...
-nl.ami.FontScanning:Scanning fonts...
+nl.ami.FontScanning:Scannen lettertypen...
en.ami.FontGlyphs:%ld unique glyphs found
de.ami.FontGlyphs:%ld unique glyphs found
fr.ami.FontGlyphs:%ld glyphe(s) unique(s) trouvé
it.ami.FontGlyphs:%ld glifi unici trovati
-nl.ami.FontGlyphs:%ld unique glyphs found
+nl.ami.FontGlyphs:%ld unieke tekens gevonden
# Cache tab
#
@@ -6113,7 +6192,7 @@ en.ami.Tabs:Tabs
de.ami.Tabs:Tabs
fr.ami.Tabs:Onglets
it.ami.Tabs:Schede
-nl.ami.Tabs:Tabs
+nl.ami.Tabs:Tabbladen
en.all.TabbedBrowsing:Tabbed browsing
de.all.TabbedBrowsing:Registernavigation (Tabs)
fr.all.TabbedBrowsing:Navigation par onglets
@@ -6138,12 +6217,12 @@ en.ami.TabClose:Warn when closing multiple tabs
de.ami.TabClose:Warn when closing multiple tabs
fr.ami.TabClose:Avertir lors de la fermeture de plusieurs onglets
it.ami.TabClose:Avvisa quando si chiudono più schede
-nl.ami.TabClose:Warn when closing multiple tabs
+nl.ami.TabClose:Waarschuwen wanneer meerdere tabbladen tegelijkertijd worden gesloten
en.ami.TabAlways:Always show tabs
de.ami.TabAlways:Always show tabs
fr.ami.TabAlways:Toujours afficher les onglets
it.ami.TabAlways:Mostra sempre la barra delle schede
-nl.ami.TabAlways:Always show tabs
+nl.ami.TabAlways:Tabbladen altijd tonen
# Advanced
#
@@ -6186,12 +6265,12 @@ en.ami.OptionDocky:Show in AmiDock
de.ami.OptionDocky:In AmiDock zeigen
fr.ami.OptionDocky:Afficher dans AmiDock
it.ami.OptionDocky:Mostra icona di NetSurf su AmiDock
-nl.ami.OptionDocky:Show in AmiDock
+nl.ami.OptionDocky:Toon in AmiDock
en.ami.PopupMenu:Use popupmenu for forms
de.ami.PopupMenu:Use popupmenu for forms
fr.ami.PopupMenu:Use popupmenu for forms
it.ami.PopupMenu:Use popupmenu for forms
-nl.ami.PopupMenu:Use popupmenu for forms
+nl.ami.PopupMenu:Gebruik popup-menu for formulieren
en.all.Clipboard:Clipboard
de.all.Clipboard:Clipboard
fr.all.Clipboard:Presse-papiers
diff --git a/riscos/templates/nl b/riscos/templates/nl
index a1474f8..704206f 100644
--- a/riscos/templates/nl
+++ b/riscos/templates/nl
@@ -3536,7 +3536,7 @@ wimp_window {
icon_esg:0
icon_fg:wimp_COLOUR_BLACK
icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Proxytype"
+ text_only:"Proxy-type"
}
wimp_icon {
extent:272,-108,652,-56
--
NetSurf Browser
7 years, 6 months
libcss: branch tlsa/shared-styles updated. release/0.5.0-22-gf5addec
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/f5addec7218ac981c950f8...
...commit http://git.netsurf-browser.org/libcss.git/commit/f5addec7218ac981c950f85a...
...tree http://git.netsurf-browser.org/libcss.git/tree/f5addec7218ac981c950f85a64...
The branch, tlsa/shared-styles has been updated
via f5addec7218ac981c950f85a64ced43a615c7940 (commit)
from 5d06a38dc1b535711df7fc94bbcc7901d754a5bf (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/libcss.git/commit/?id=f5addec7218ac981c950...
commit f5addec7218ac981c950f85a64ced43a615c7940
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Split bloom filter get/set out into helpers.
diff --git a/src/select/select.c b/src/select/select.c
index 61ce865..a99c3b8 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -484,6 +484,153 @@ css_error css_select_default_style(css_select_ctx *ctx,
return CSS_OK;
}
+/**
+ * Get a bloom filter for the parent node
+ *
+ * \param parent Parent node to get bloom filter for
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \param parent_bloom Updated to parent bloom to use.
+ * Note: if there's no parent, the caller must free
+ * the returned parent bloom, since it has no node to
+ * own it.
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+static css_error css__get_parent_bloom(void *parent,
+ css_select_handler *handler, void *pw,
+ css_bloom **parent_bloom)
+{
+ css_error error;
+ css_bloom *bloom = NULL;
+
+ /* Get parent node's bloom filter */
+ if (parent != NULL) {
+ /* Get parent bloom filter */
+ /* Hideous casting to avoid warnings on all platforms
+ * we build for. */
+ error = handler->get_libcss_node_data(pw, parent,
+ (void **) (void *) &bloom);
+ if (error != CSS_OK)
+ return error;
+ }
+
+ if (bloom == NULL) {
+ uint32_t i;
+ /* Need to create parent bloom */
+
+ /* TODO:
+ * Build & set the parent node's bloom properly. This will
+ * speed up the case where DOM change has caused bloom to get
+ * deleted. For now we fall back to a fully satruated bloom
+ * filter, which is slower but perfectly valid.
+ */
+ bloom = malloc(sizeof(css_bloom) * CSS_BLOOM_SIZE);
+ if (bloom == NULL) {
+ return CSS_NOMEM;
+ }
+ if (parent != NULL) {
+ /* Have to make up fully saturated bloom filter */
+ for (i = 0; i < CSS_BLOOM_SIZE; i++) {
+ bloom[i] = ~0;
+ }
+
+ /* Set parent node bloom filter */
+ error = handler->set_libcss_node_data(pw,
+ parent, bloom);
+ if (error != CSS_OK) {
+ free(bloom);
+ return error;
+ }
+ } else {
+ /* No ancestors; empty bloom filter */
+ for (i = 0; i < CSS_BLOOM_SIZE; i++) {
+ bloom[i] = 0;
+ }
+ }
+ }
+
+ *parent_bloom = bloom;
+ return CSS_OK;
+}
+
+/**
+ * Set a node's bloom filter
+ *
+ * \param parent Node to set bloom filter for
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+static css_error css__set_node_bloom(void *node, css_select_state *state,
+ css_select_handler *handler, void *pw)
+{
+ css_error error;
+ css_bloom *bloom;
+
+ /* Create the node's bloom */
+ bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
+ if (bloom == NULL) {
+ return CSS_NOMEM;
+ }
+
+ /* Add node name to bloom */
+ if (state->element.name->insensitive == NULL) {
+ if (lwc__intern_caseless_string(
+ state->element.name) != lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ state->element.name->insensitive));
+
+ /* Add id name to bloom */
+ if (state->id != NULL) {
+ lwc_string *id = state->id;
+ if (id->insensitive == NULL) {
+ if (lwc__intern_caseless_string(id) != lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ id->insensitive));
+ }
+
+ /* Add class names to bloom */
+ if (state->classes != NULL) {
+ lwc_string *s;
+ uint32_t i;
+ for (i = 0; i < state->n_classes; i++) {
+ s = state->classes[i];
+ if (s->insensitive == NULL) {
+ if (lwc__intern_caseless_string(s) !=
+ lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ s->insensitive));
+ }
+ }
+
+ /* Merge parent bloom into node bloom */
+ css_bloom_merge(state->bloom, bloom);
+
+ /* Set node bloom filter */
+ error = handler->set_libcss_node_data(pw, node, bloom);
+ if (error != CSS_OK)
+ goto cleanup;
+
+ return CSS_OK;
+
+cleanup:
+ free(bloom);
+
+ return error;
+}
+
/**
* Select a style for the given node
@@ -515,9 +662,8 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
uint32_t i, j;
css_error error;
css_select_state state;
- void *parent = NULL;
- css_bloom *bloom = NULL;
css_bloom *parent_bloom = NULL;
+ void *parent = NULL;
if (ctx == NULL || node == NULL || result == NULL || handler == NULL ||
handler->handler_version != CSS_SELECT_HANDLER_VERSION_1)
@@ -548,56 +694,15 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
return error;
}
- /* Create the node's bloom */
- bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
- if (bloom == NULL) {
- error = CSS_NOMEM;
- goto cleanup;
- }
-
error = handler->parent_node(pw, node, &parent);
if (error != CSS_OK)
goto cleanup;
- /* Get parent node's bloom filter */
- if (parent != NULL) {
- /* Get parent bloom filter */
- /* Hideous casting to avoid warnings on all platforms
- * we build for. */
- error = handler->get_libcss_node_data(pw, parent,
- (void **) (void *) &state.bloom);
- if (error != CSS_OK)
- goto cleanup;
- /* TODO:
- * If state.bloom == NULL, build & set parent node's bloom,
- * and use it as state.bloom. This will speed up the case
- * where DOM change has caused bloom to get deleted.
- * For now we fall back to a fully satruated bloom filter,
- * which is slower but perfectly valid.
- */
- }
-
- if (state.bloom == NULL) {
- /* Need to create parent bloom */
- parent_bloom = malloc(sizeof(css_bloom) * CSS_BLOOM_SIZE);
- if (parent_bloom == NULL) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- if (parent != NULL) {
- /* Have to make up fully saturated bloom filter */
- for (i = 0; i < CSS_BLOOM_SIZE; i++) {
- parent_bloom[i] = ~0;
- }
- } else {
- /* Empty bloom filter */
- for (i = 0; i < CSS_BLOOM_SIZE; i++) {
- parent_bloom[i] = 0;
- }
- }
-
- state.bloom = parent_bloom;
+ error = css__get_parent_bloom(parent, handler, pw, &parent_bloom);
+ if (error != CSS_OK) {
+ goto cleanup;
}
+ state.bloom = parent_bloom;
/* Get node's name */
error = handler->node_name(pw, node, &state.element);
@@ -737,56 +842,10 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
}
}
- /* Add node name to bloom */
- if (state.element.name->insensitive == NULL) {
- if (lwc__intern_caseless_string(
- state.element.name) != lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- state.element.name->insensitive));
-
- /* Add id name to bloom */
- if (state.id != NULL) {
- if (state.id->insensitive == NULL) {
- if (lwc__intern_caseless_string(state.id) !=
- lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- state.id->insensitive));
- }
-
- /* Add class names to bloom */
- if (state.classes != NULL) {
- lwc_string *s;
- for (i = 0; i < state.n_classes; i++) {
- s = state.classes[i];
- if (s->insensitive == NULL) {
- if (lwc__intern_caseless_string(s) !=
- lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- s->insensitive));
- }
- }
-
- /* Merge parent bloom into node bloom */
- css_bloom_merge(state.bloom, bloom);
-
- /* Set node bloom filter */
- error = handler->set_libcss_node_data(pw, node, bloom);
- if (error != CSS_OK)
+ error = css__set_node_bloom(node, &state, handler, pw);
+ if (error != CSS_OK) {
goto cleanup;
-
- bloom = NULL;
+ }
*result = state.results;
error = CSS_OK;
@@ -799,14 +858,12 @@ cleanup:
css_select_results_destroy(state.results);
}
- if (parent_bloom != NULL) {
+ /* If there's no parent, the parent_bloom is not owned by any node,
+ * so we need to free it. */
+ if (parent == NULL) {
free(parent_bloom);
}
- if (bloom != NULL) {
- free(bloom);
- }
-
if (state.classes != NULL) {
for (i = 0; i < state.n_classes; i++)
lwc_string_unref(state.classes[i]);
-----------------------------------------------------------------------
Summary of changes:
src/select/select.c | 259 +++++++++++++++++++++++++++++++--------------------
1 file changed, 158 insertions(+), 101 deletions(-)
diff --git a/src/select/select.c b/src/select/select.c
index 61ce865..a99c3b8 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -484,6 +484,153 @@ css_error css_select_default_style(css_select_ctx *ctx,
return CSS_OK;
}
+/**
+ * Get a bloom filter for the parent node
+ *
+ * \param parent Parent node to get bloom filter for
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \param parent_bloom Updated to parent bloom to use.
+ * Note: if there's no parent, the caller must free
+ * the returned parent bloom, since it has no node to
+ * own it.
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+static css_error css__get_parent_bloom(void *parent,
+ css_select_handler *handler, void *pw,
+ css_bloom **parent_bloom)
+{
+ css_error error;
+ css_bloom *bloom = NULL;
+
+ /* Get parent node's bloom filter */
+ if (parent != NULL) {
+ /* Get parent bloom filter */
+ /* Hideous casting to avoid warnings on all platforms
+ * we build for. */
+ error = handler->get_libcss_node_data(pw, parent,
+ (void **) (void *) &bloom);
+ if (error != CSS_OK)
+ return error;
+ }
+
+ if (bloom == NULL) {
+ uint32_t i;
+ /* Need to create parent bloom */
+
+ /* TODO:
+ * Build & set the parent node's bloom properly. This will
+ * speed up the case where DOM change has caused bloom to get
+ * deleted. For now we fall back to a fully satruated bloom
+ * filter, which is slower but perfectly valid.
+ */
+ bloom = malloc(sizeof(css_bloom) * CSS_BLOOM_SIZE);
+ if (bloom == NULL) {
+ return CSS_NOMEM;
+ }
+ if (parent != NULL) {
+ /* Have to make up fully saturated bloom filter */
+ for (i = 0; i < CSS_BLOOM_SIZE; i++) {
+ bloom[i] = ~0;
+ }
+
+ /* Set parent node bloom filter */
+ error = handler->set_libcss_node_data(pw,
+ parent, bloom);
+ if (error != CSS_OK) {
+ free(bloom);
+ return error;
+ }
+ } else {
+ /* No ancestors; empty bloom filter */
+ for (i = 0; i < CSS_BLOOM_SIZE; i++) {
+ bloom[i] = 0;
+ }
+ }
+ }
+
+ *parent_bloom = bloom;
+ return CSS_OK;
+}
+
+/**
+ * Set a node's bloom filter
+ *
+ * \param parent Node to set bloom filter for
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+static css_error css__set_node_bloom(void *node, css_select_state *state,
+ css_select_handler *handler, void *pw)
+{
+ css_error error;
+ css_bloom *bloom;
+
+ /* Create the node's bloom */
+ bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
+ if (bloom == NULL) {
+ return CSS_NOMEM;
+ }
+
+ /* Add node name to bloom */
+ if (state->element.name->insensitive == NULL) {
+ if (lwc__intern_caseless_string(
+ state->element.name) != lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ state->element.name->insensitive));
+
+ /* Add id name to bloom */
+ if (state->id != NULL) {
+ lwc_string *id = state->id;
+ if (id->insensitive == NULL) {
+ if (lwc__intern_caseless_string(id) != lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ id->insensitive));
+ }
+
+ /* Add class names to bloom */
+ if (state->classes != NULL) {
+ lwc_string *s;
+ uint32_t i;
+ for (i = 0; i < state->n_classes; i++) {
+ s = state->classes[i];
+ if (s->insensitive == NULL) {
+ if (lwc__intern_caseless_string(s) !=
+ lwc_error_ok) {
+ error = CSS_NOMEM;
+ goto cleanup;
+ }
+ }
+ css_bloom_add_hash(bloom, lwc_string_hash_value(
+ s->insensitive));
+ }
+ }
+
+ /* Merge parent bloom into node bloom */
+ css_bloom_merge(state->bloom, bloom);
+
+ /* Set node bloom filter */
+ error = handler->set_libcss_node_data(pw, node, bloom);
+ if (error != CSS_OK)
+ goto cleanup;
+
+ return CSS_OK;
+
+cleanup:
+ free(bloom);
+
+ return error;
+}
+
/**
* Select a style for the given node
@@ -515,9 +662,8 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
uint32_t i, j;
css_error error;
css_select_state state;
- void *parent = NULL;
- css_bloom *bloom = NULL;
css_bloom *parent_bloom = NULL;
+ void *parent = NULL;
if (ctx == NULL || node == NULL || result == NULL || handler == NULL ||
handler->handler_version != CSS_SELECT_HANDLER_VERSION_1)
@@ -548,56 +694,15 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
return error;
}
- /* Create the node's bloom */
- bloom = calloc(sizeof(css_bloom), CSS_BLOOM_SIZE);
- if (bloom == NULL) {
- error = CSS_NOMEM;
- goto cleanup;
- }
-
error = handler->parent_node(pw, node, &parent);
if (error != CSS_OK)
goto cleanup;
- /* Get parent node's bloom filter */
- if (parent != NULL) {
- /* Get parent bloom filter */
- /* Hideous casting to avoid warnings on all platforms
- * we build for. */
- error = handler->get_libcss_node_data(pw, parent,
- (void **) (void *) &state.bloom);
- if (error != CSS_OK)
- goto cleanup;
- /* TODO:
- * If state.bloom == NULL, build & set parent node's bloom,
- * and use it as state.bloom. This will speed up the case
- * where DOM change has caused bloom to get deleted.
- * For now we fall back to a fully satruated bloom filter,
- * which is slower but perfectly valid.
- */
- }
-
- if (state.bloom == NULL) {
- /* Need to create parent bloom */
- parent_bloom = malloc(sizeof(css_bloom) * CSS_BLOOM_SIZE);
- if (parent_bloom == NULL) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- if (parent != NULL) {
- /* Have to make up fully saturated bloom filter */
- for (i = 0; i < CSS_BLOOM_SIZE; i++) {
- parent_bloom[i] = ~0;
- }
- } else {
- /* Empty bloom filter */
- for (i = 0; i < CSS_BLOOM_SIZE; i++) {
- parent_bloom[i] = 0;
- }
- }
-
- state.bloom = parent_bloom;
+ error = css__get_parent_bloom(parent, handler, pw, &parent_bloom);
+ if (error != CSS_OK) {
+ goto cleanup;
}
+ state.bloom = parent_bloom;
/* Get node's name */
error = handler->node_name(pw, node, &state.element);
@@ -737,56 +842,10 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
}
}
- /* Add node name to bloom */
- if (state.element.name->insensitive == NULL) {
- if (lwc__intern_caseless_string(
- state.element.name) != lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- state.element.name->insensitive));
-
- /* Add id name to bloom */
- if (state.id != NULL) {
- if (state.id->insensitive == NULL) {
- if (lwc__intern_caseless_string(state.id) !=
- lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- state.id->insensitive));
- }
-
- /* Add class names to bloom */
- if (state.classes != NULL) {
- lwc_string *s;
- for (i = 0; i < state.n_classes; i++) {
- s = state.classes[i];
- if (s->insensitive == NULL) {
- if (lwc__intern_caseless_string(s) !=
- lwc_error_ok) {
- error = CSS_NOMEM;
- goto cleanup;
- }
- }
- css_bloom_add_hash(bloom, lwc_string_hash_value(
- s->insensitive));
- }
- }
-
- /* Merge parent bloom into node bloom */
- css_bloom_merge(state.bloom, bloom);
-
- /* Set node bloom filter */
- error = handler->set_libcss_node_data(pw, node, bloom);
- if (error != CSS_OK)
+ error = css__set_node_bloom(node, &state, handler, pw);
+ if (error != CSS_OK) {
goto cleanup;
-
- bloom = NULL;
+ }
*result = state.results;
error = CSS_OK;
@@ -799,14 +858,12 @@ cleanup:
css_select_results_destroy(state.results);
}
- if (parent_bloom != NULL) {
+ /* If there's no parent, the parent_bloom is not owned by any node,
+ * so we need to free it. */
+ if (parent == NULL) {
free(parent_bloom);
}
- if (bloom != NULL) {
- free(bloom);
- }
-
if (state.classes != NULL) {
for (i = 0; i < state.n_classes; i++)
lwc_string_unref(state.classes[i]);
--
Cascading Style Sheets library
7 years, 6 months
libcss: branch tlsa/shared-styles updated. release/0.5.0-21-g5d06a38
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/5d06a38dc1b535711df7fc...
...commit http://git.netsurf-browser.org/libcss.git/commit/5d06a38dc1b535711df7fc94...
...tree http://git.netsurf-browser.org/libcss.git/tree/5d06a38dc1b535711df7fc94bb...
The branch, tlsa/shared-styles has been updated
via 5d06a38dc1b535711df7fc94bbcc7901d754a5bf (commit)
from bf9bc96b4075710164c323240bfa32bb276e9ff2 (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/libcss.git/commit/?id=5d06a38dc1b535711df7...
commit 5d06a38dc1b535711df7fc94bbcc7901d754a5bf
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Remove redundant API surface.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index db3e3e4..c7e77e0 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -76,12 +76,8 @@ typedef struct css_computed_content_item {
} data;
} css_computed_content_item;
-css_error css_computed_style_create(css_computed_style **result);
css_error css_computed_style_destroy(css_computed_style *style);
-css_error css_computed_style_initialise(css_computed_style *style,
- struct css_select_handler *handler, void *pw);
-
css_error css_computed_style_compose(
const css_computed_style *restrict parent,
const css_computed_style *restrict child,
diff --git a/src/select/computed.c b/src/select/computed.c
index 1fe6a81..2efc8a7 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -65,7 +65,7 @@ static css_error compute_absolute_length_pair(css_computed_style *style,
* CSS_NOMEM on memory exhaustion,
* CSS_BADPARM on bad parameters.
*/
-css_error css_computed_style_create(css_computed_style **result)
+css_error css__computed_style_create(css_computed_style **result)
{
css_computed_style *s;
@@ -239,7 +239,7 @@ css_error css_computed_style_destroy(css_computed_style *style)
* \param pw Client-specific private data for handler functions
* \return CSS_OK on success.
*/
-css_error css_computed_style_initialise(css_computed_style *style,
+css_error css__computed_style_initialise(css_computed_style *style,
css_select_handler *handler, void *pw)
{
css_select_state state;
@@ -300,7 +300,7 @@ css_error css_computed_style_compose(
* to avoid the churn of unnecesaraly allocating and freeing
* the memory to compose styles into.
*/
- error = css_computed_style_create(&composed);
+ error = css__computed_style_create(&composed);
if (error != CSS_OK) {
return error;
}
diff --git a/src/select/computed.h b/src/select/computed.h
index 230711d..57981b2 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -342,6 +342,12 @@ static inline css_computed_style * css__computed_style_ref(
return style;
}
+css_error css__computed_style_create(css_computed_style **result);
+
+css_error css__computed_style_initialise(css_computed_style *style,
+ struct css_select_handler *handler, void *pw);
+
+
css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
css_error css__compute_absolute_values(const css_computed_style *parent,
diff --git a/src/select/select.c b/src/select/select.c
index 734f58c..61ce865 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -429,11 +429,11 @@ static css_error css__select_ctx_create_default_style(css_select_ctx *ctx,
css_error error;
/* Need to construct the default style */
- error = css_computed_style_create(&style);
+ error = css__computed_style_create(&style);
if (error != CSS_OK)
return error;
- error = css_computed_style_initialise(style, handler, pw);
+ error = css__computed_style_initialise(style, handler, pw);
if (error != CSS_OK) {
css_computed_style_destroy(style);
return error;
@@ -541,7 +541,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
state.results->styles[i] = NULL;
/* Base element style is guaranteed to exist */
- error = css_computed_style_create(
+ error = css__computed_style_create(
&state.results->styles[CSS_PSEUDO_ELEMENT_NONE]);
if (error != CSS_OK) {
free(state.results);
@@ -1804,7 +1804,7 @@ css_error match_selector_chain(css_select_ctx *ctx,
/* Ensure that the appropriate computed style exists */
if (state->results->styles[pseudo] == NULL) {
- error = css_computed_style_create(
+ error = css__computed_style_create(
&state->results->styles[pseudo]);
if (error != CSS_OK)
return error;
-----------------------------------------------------------------------
Summary of changes:
include/libcss/computed.h | 4 ----
src/select/computed.c | 6 +++---
src/select/computed.h | 6 ++++++
src/select/select.c | 8 ++++----
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index db3e3e4..c7e77e0 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -76,12 +76,8 @@ typedef struct css_computed_content_item {
} data;
} css_computed_content_item;
-css_error css_computed_style_create(css_computed_style **result);
css_error css_computed_style_destroy(css_computed_style *style);
-css_error css_computed_style_initialise(css_computed_style *style,
- struct css_select_handler *handler, void *pw);
-
css_error css_computed_style_compose(
const css_computed_style *restrict parent,
const css_computed_style *restrict child,
diff --git a/src/select/computed.c b/src/select/computed.c
index 1fe6a81..2efc8a7 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -65,7 +65,7 @@ static css_error compute_absolute_length_pair(css_computed_style *style,
* CSS_NOMEM on memory exhaustion,
* CSS_BADPARM on bad parameters.
*/
-css_error css_computed_style_create(css_computed_style **result)
+css_error css__computed_style_create(css_computed_style **result)
{
css_computed_style *s;
@@ -239,7 +239,7 @@ css_error css_computed_style_destroy(css_computed_style *style)
* \param pw Client-specific private data for handler functions
* \return CSS_OK on success.
*/
-css_error css_computed_style_initialise(css_computed_style *style,
+css_error css__computed_style_initialise(css_computed_style *style,
css_select_handler *handler, void *pw)
{
css_select_state state;
@@ -300,7 +300,7 @@ css_error css_computed_style_compose(
* to avoid the churn of unnecesaraly allocating and freeing
* the memory to compose styles into.
*/
- error = css_computed_style_create(&composed);
+ error = css__computed_style_create(&composed);
if (error != CSS_OK) {
return error;
}
diff --git a/src/select/computed.h b/src/select/computed.h
index 230711d..57981b2 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -342,6 +342,12 @@ static inline css_computed_style * css__computed_style_ref(
return style;
}
+css_error css__computed_style_create(css_computed_style **result);
+
+css_error css__computed_style_initialise(css_computed_style *style,
+ struct css_select_handler *handler, void *pw);
+
+
css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
css_error css__compute_absolute_values(const css_computed_style *parent,
diff --git a/src/select/select.c b/src/select/select.c
index 734f58c..61ce865 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -429,11 +429,11 @@ static css_error css__select_ctx_create_default_style(css_select_ctx *ctx,
css_error error;
/* Need to construct the default style */
- error = css_computed_style_create(&style);
+ error = css__computed_style_create(&style);
if (error != CSS_OK)
return error;
- error = css_computed_style_initialise(style, handler, pw);
+ error = css__computed_style_initialise(style, handler, pw);
if (error != CSS_OK) {
css_computed_style_destroy(style);
return error;
@@ -541,7 +541,7 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
state.results->styles[i] = NULL;
/* Base element style is guaranteed to exist */
- error = css_computed_style_create(
+ error = css__computed_style_create(
&state.results->styles[CSS_PSEUDO_ELEMENT_NONE]);
if (error != CSS_OK) {
free(state.results);
@@ -1804,7 +1804,7 @@ css_error match_selector_chain(css_select_ctx *ctx,
/* Ensure that the appropriate computed style exists */
if (state->results->styles[pseudo] == NULL) {
- error = css_computed_style_create(
+ error = css__computed_style_create(
&state->results->styles[pseudo]);
if (error != CSS_OK)
return error;
--
Cascading Style Sheets library
7 years, 6 months
netsurf: branch tlsa/shared-styles updated. release/3.3-288-g5a9ff3d
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/5a9ff3d64529a496a2330...
...commit http://git.netsurf-browser.org/netsurf.git/commit/5a9ff3d64529a496a23304a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/5a9ff3d64529a496a23304aa6...
The branch, tlsa/shared-styles has been updated
via 5a9ff3d64529a496a23304aa6b12fbfada1bd481 (commit)
from dab351ee9f37fca6caa6fb983190e333516c6576 (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=5a9ff3d64529a496a23...
commit 5a9ff3d64529a496a23304aa6b12fbfada1bd481
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Update to use libcss API which allows interned partial styles.
diff --git a/css/select.c b/css/select.c
index c9e5f7e..a4225cb 100644
--- a/css/select.c
+++ b/css/select.c
@@ -252,6 +252,7 @@ static void nscss_dom_user_data_handler(dom_node_operation operation,
css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
uint64_t media, const css_stylesheet *inline_style)
{
+ css_computed_style *composed;
css_select_results *styles;
int pseudo_element;
css_error error;
@@ -273,11 +274,16 @@ css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
error = css_computed_style_compose(ctx->parent_style,
styles->styles[CSS_PSEUDO_ELEMENT_NONE],
nscss_compute_font_size, NULL,
- &(styles->styles[CSS_PSEUDO_ELEMENT_NONE]));
+ &composed);
if (error != CSS_OK) {
css_select_results_destroy(styles);
return NULL;
}
+
+ /* Replace select_results style with composed style */
+ css_computed_style_destroy(
+ styles->styles[CSS_PSEUDO_ELEMENT_NONE]);
+ styles->styles[CSS_PSEUDO_ELEMENT_NONE] = composed;
}
for (pseudo_element = CSS_PSEUDO_ELEMENT_NONE + 1;
@@ -300,40 +306,20 @@ css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
styles->styles[CSS_PSEUDO_ELEMENT_NONE],
styles->styles[pseudo_element],
nscss_compute_font_size, NULL,
- &(styles->styles[pseudo_element]));
+ &composed);
if (error != CSS_OK) {
/* TODO: perhaps this shouldn't be quite so
* catastrophic? */
css_select_results_destroy(styles);
return NULL;
}
- }
-
- return styles;
-}
-
-/**
- * Get an initial style
- *
- * \param ctx CSS selection context
- * \return Pointer to partial computed style, or NULL on failure
- */
-static css_computed_style *nscss_get_initial_style(nscss_select_ctx *ctx)
-{
- css_computed_style *style;
- css_error error;
- error = css_computed_style_create(&style);
- if (error != CSS_OK)
- return NULL;
-
- error = css_computed_style_initialise(style, &selection_handler, ctx);
- if (error != CSS_OK) {
- css_computed_style_destroy(style);
- return NULL;
+ /* Replace select_results style with composed style */
+ css_computed_style_destroy(styles->styles[pseudo_element]);
+ styles->styles[pseudo_element] = composed;
}
- return style;
+ return styles;
}
/**
@@ -346,21 +332,26 @@ static css_computed_style *nscss_get_initial_style(nscss_select_ctx *ctx)
css_computed_style *nscss_get_blank_style(nscss_select_ctx *ctx,
const css_computed_style *parent)
{
- css_computed_style *partial;
+ css_computed_style *partial, *composed;
css_error error;
- partial = nscss_get_initial_style(ctx);
- if (partial == NULL)
+ error = css_select_default_style(ctx->ctx,
+ &selection_handler, ctx, &partial);
+ if (error != CSS_OK) {
return NULL;
+ }
+ /* TODO: Do we really need to compose? Initial style shouldn't
+ * have any inherited properties. */
error = css_computed_style_compose(parent, partial,
- nscss_compute_font_size, NULL, &partial);
+ nscss_compute_font_size, NULL, &composed);
+ css_computed_style_destroy(partial);
if (error != CSS_OK) {
- css_computed_style_destroy(partial);
+ css_computed_style_destroy(composed);
return NULL;
}
- return partial;
+ return composed;
}
/**
-----------------------------------------------------------------------
Summary of changes:
css/select.c | 55 +++++++++++++++++++++++--------------------------------
1 file changed, 23 insertions(+), 32 deletions(-)
diff --git a/css/select.c b/css/select.c
index c9e5f7e..a4225cb 100644
--- a/css/select.c
+++ b/css/select.c
@@ -252,6 +252,7 @@ static void nscss_dom_user_data_handler(dom_node_operation operation,
css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
uint64_t media, const css_stylesheet *inline_style)
{
+ css_computed_style *composed;
css_select_results *styles;
int pseudo_element;
css_error error;
@@ -273,11 +274,16 @@ css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
error = css_computed_style_compose(ctx->parent_style,
styles->styles[CSS_PSEUDO_ELEMENT_NONE],
nscss_compute_font_size, NULL,
- &(styles->styles[CSS_PSEUDO_ELEMENT_NONE]));
+ &composed);
if (error != CSS_OK) {
css_select_results_destroy(styles);
return NULL;
}
+
+ /* Replace select_results style with composed style */
+ css_computed_style_destroy(
+ styles->styles[CSS_PSEUDO_ELEMENT_NONE]);
+ styles->styles[CSS_PSEUDO_ELEMENT_NONE] = composed;
}
for (pseudo_element = CSS_PSEUDO_ELEMENT_NONE + 1;
@@ -300,40 +306,20 @@ css_select_results *nscss_get_style(nscss_select_ctx *ctx, dom_node *n,
styles->styles[CSS_PSEUDO_ELEMENT_NONE],
styles->styles[pseudo_element],
nscss_compute_font_size, NULL,
- &(styles->styles[pseudo_element]));
+ &composed);
if (error != CSS_OK) {
/* TODO: perhaps this shouldn't be quite so
* catastrophic? */
css_select_results_destroy(styles);
return NULL;
}
- }
-
- return styles;
-}
-
-/**
- * Get an initial style
- *
- * \param ctx CSS selection context
- * \return Pointer to partial computed style, or NULL on failure
- */
-static css_computed_style *nscss_get_initial_style(nscss_select_ctx *ctx)
-{
- css_computed_style *style;
- css_error error;
- error = css_computed_style_create(&style);
- if (error != CSS_OK)
- return NULL;
-
- error = css_computed_style_initialise(style, &selection_handler, ctx);
- if (error != CSS_OK) {
- css_computed_style_destroy(style);
- return NULL;
+ /* Replace select_results style with composed style */
+ css_computed_style_destroy(styles->styles[pseudo_element]);
+ styles->styles[pseudo_element] = composed;
}
- return style;
+ return styles;
}
/**
@@ -346,21 +332,26 @@ static css_computed_style *nscss_get_initial_style(nscss_select_ctx *ctx)
css_computed_style *nscss_get_blank_style(nscss_select_ctx *ctx,
const css_computed_style *parent)
{
- css_computed_style *partial;
+ css_computed_style *partial, *composed;
css_error error;
- partial = nscss_get_initial_style(ctx);
- if (partial == NULL)
+ error = css_select_default_style(ctx->ctx,
+ &selection_handler, ctx, &partial);
+ if (error != CSS_OK) {
return NULL;
+ }
+ /* TODO: Do we really need to compose? Initial style shouldn't
+ * have any inherited properties. */
error = css_computed_style_compose(parent, partial,
- nscss_compute_font_size, NULL, &partial);
+ nscss_compute_font_size, NULL, &composed);
+ css_computed_style_destroy(partial);
if (error != CSS_OK) {
- css_computed_style_destroy(partial);
+ css_computed_style_destroy(composed);
return NULL;
}
- return partial;
+ return composed;
}
/**
--
NetSurf Browser
7 years, 6 months
libcss: branch tlsa/shared-styles updated. release/0.5.0-20-gbf9bc96
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/bf9bc96b4075710164c323...
...commit http://git.netsurf-browser.org/libcss.git/commit/bf9bc96b4075710164c32324...
...tree http://git.netsurf-browser.org/libcss.git/tree/bf9bc96b4075710164c323240b...
The branch, tlsa/shared-styles has been updated
discards 5a41694af51d820a3f697f3bbcaefa0dc5091c26 (commit)
discards e6f16ffdd6fd204edb1735b1b9d0f7c305136428 (commit)
discards ae9ec4464807db7ba96ea49435d8bf45a5eaf51e (commit)
discards 91046993f7586edb101e537369ab64928fbdca7f (commit)
discards bfaf7d371e3f58487a0a6b1efbbac9935747df54 (commit)
discards c754efd5b1ce267cdd1da43c2e4fa924c0bb8334 (commit)
via bf9bc96b4075710164c323240bfa32bb276e9ff2 (commit)
via ade148d063380c4e28fcac7d6ef064555cff53cf (commit)
via e83a7ff272551e2e60418bc724add720c639afd6 (commit)
via f5d1d7e5087e3170e3f945281e30d413c0aef933 (commit)
via bf9c9ec944e26c4a9348b5274b5dbaa73a2143f5 (commit)
via 5519c5cdf3ea07a5650e3787e1405b5be0ae5703 (commit)
via e433be00243f6d041075cb992e81bc8a3a6976a1 (commit)
via 973372a5d8fcb07804b279c52504142fdbf0b009 (commit)
via be275fae169046432d5322527ee0fc92692aaff7 (commit)
via 61075c3e0c2c055ac3c263246fd79f5ac0a02723 (commit)
via a268eaf7c6b039dc41c853e0d8d68633e2cf713a (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (5a41694af51d820a3f697f3bbcaefa0dc5091c26)
\
N -- N -- N (bf9bc96b4075710164c323240bfa32bb276e9ff2)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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/libcss.git/commit/?id=bf9bc96b4075710164c3...
commit bf9bc96b4075710164c323240bfa32bb276e9ff2
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Remove trailing whitespace.
diff --git a/src/select/computed.c b/src/select/computed.c
index 2d3aea8..1fe6a81 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -123,7 +123,7 @@ css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon)
free(uncommon->counter_reset);
}
-
+
if (uncommon->cursor != NULL) {
lwc_string **s;
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=ade148d063380c4e28fc...
commit ade148d063380c4e28fcac7d6ef064555cff53cf
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add comment.
diff --git a/src/select/arena.c b/src/select/arena.c
index 1b0ea57..baadc9f 100644
--- a/src/select/arena.c
+++ b/src/select/arena.c
@@ -233,6 +233,7 @@ css_error css__arena_intern_style(struct css_computed_style **style)
struct css_computed_style *s = *style;
uint32_t hash, index;
+ /* Don't try to intern an already-interned computed style */
if (s->count != 0) {
return CSS_BADPARM;
}
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=e83a7ff272551e2e6041...
commit e83a7ff272551e2e60418bc724add720c639afd6
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Intern partial styles.
Note this changes the public API. We can't compose directly
over child style now, since it may be interned.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 0009267..db3e3e4 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -82,13 +82,14 @@ css_error css_computed_style_destroy(css_computed_style *style);
css_error css_computed_style_initialise(css_computed_style *style,
struct css_select_handler *handler, void *pw);
-css_error css_computed_style_compose(const css_computed_style *parent,
- css_computed_style *child,
+css_error css_computed_style_compose(
+ const css_computed_style *restrict parent,
+ const css_computed_style *restrict child,
css_error (*compute_font_size)(void *pw,
const struct css_hint *parent,
struct css_hint *size),
void *pw,
- css_computed_style **result);
+ css_computed_style **restrict result);
/******************************************************************************
* Property accessors below here *
diff --git a/include/libcss/select.h b/include/libcss/select.h
index a010e7c..83e6ded 100644
--- a/include/libcss/select.h
+++ b/include/libcss/select.h
@@ -217,6 +217,9 @@ css_error css_select_ctx_count_sheets(css_select_ctx *ctx, uint32_t *count);
css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
const css_stylesheet **sheet);
+css_error css_select_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw,
+ css_computed_style **style);
css_error css_select_style(css_select_ctx *ctx, void *node,
uint64_t media, const css_stylesheet *inline_style,
css_select_handler *handler, void *pw,
diff --git a/src/select/computed.c b/src/select/computed.c
index 107c884..2d3aea8 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -277,23 +277,34 @@ css_error css_computed_style_initialise(css_computed_style *style,
* \param child Child style
* \param compute_font_size Function to compute an absolute font size
* \param pw Client data for compute_font_size
- * \param result Pointer to style to compose into
+ * \param result Updated to point to new composed style
+ * Ownership passed to client.
* \return CSS_OK on success, appropriate error otherwise.
*
* \pre \a parent is a fully composed style (thus has no inherited properties)
- *
- * \note \a child and \a result may point at the same object
*/
-css_error css_computed_style_compose(const css_computed_style *parent,
- css_computed_style *child,
+css_error css_computed_style_compose(
+ const css_computed_style *restrict parent,
+ const css_computed_style *restrict child,
css_error (*compute_font_size)(void *pw,
const css_hint *parent, css_hint *size),
void *pw,
- css_computed_style **result)
+ css_computed_style **restrict result)
{
- css_error error = CSS_OK;
+ css_computed_style *composed;
+ css_error error;
size_t i;
+ /* TODO:
+ * Make this function take a composition context, to allow us
+ * to avoid the churn of unnecesaraly allocating and freeing
+ * the memory to compose styles into.
+ */
+ error = css_computed_style_create(&composed);
+ if (error != CSS_OK) {
+ return error;
+ }
+
/* Iterate through the properties */
for (i = 0; i < CSS_N_PROPERTIES; i++) {
/* Skip any in extension blocks if the block does not exist */
@@ -316,18 +327,19 @@ css_error css_computed_style_compose(const css_computed_style *parent,
}
/* Compose the property */
- error = prop_dispatch[i].compose(parent, child, *result);
+ error = prop_dispatch[i].compose(parent, child, composed);
if (error != CSS_OK)
break;
}
/* Finally, compute absolute values for everything */
- error = css__compute_absolute_values(parent, *result,
+ error = css__compute_absolute_values(parent, composed,
compute_font_size, pw);
if (error != CSS_OK) {
return error;
}
+ *result = composed;
return css__arena_intern_style(result);
}
diff --git a/src/select/computed.h b/src/select/computed.h
index f965993..230711d 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -325,6 +325,23 @@ struct css_computed_style {
uint32_t bin;
};
+
+/**
+ * Take a new reference to a computed style
+ *
+ * \param style The style to take a new reference to.
+ * \return The new computed style reference
+ */
+static inline css_computed_style * css__computed_style_ref(
+ css_computed_style *style)
+{
+ if (style == NULL)
+ return NULL;
+
+ style->count++;
+ return style;
+}
+
css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
css_error css__compute_absolute_values(const css_computed_style *parent,
diff --git a/src/select/select.c b/src/select/select.c
index e250657..734f58c 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -15,6 +15,7 @@
#include "bytecode/bytecode.h"
#include "bytecode/opcodes.h"
#include "stylesheet.h"
+#include "select/arena.h"
#include "select/computed.h"
#include "select/dispatch.h"
#include "select/hash.h"
@@ -74,6 +75,9 @@ struct css_select_ctx {
lwc_string *first_letter;
lwc_string *before;
lwc_string *after;
+
+ /* Interned default style */
+ css_computed_style *default_style;
};
/**
@@ -258,6 +262,9 @@ css_error css_select_ctx_destroy(css_select_ctx *ctx)
destroy_strings(ctx);
+ if (ctx->default_style != NULL)
+ css_computed_style_destroy(ctx->default_style);
+
if (ctx->sheets != NULL)
free(ctx->sheets);
@@ -406,6 +413,78 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
return CSS_OK;
}
+
+/**
+ * Create a default style on the selection context
+ *
+ * \param ctx Context to create default style in
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \return CSS_OK on success, appropriate error otherwise
+ */
+static css_error css__select_ctx_create_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw)
+{
+ css_computed_style *style;
+ css_error error;
+
+ /* Need to construct the default style */
+ error = css_computed_style_create(&style);
+ if (error != CSS_OK)
+ return error;
+
+ error = css_computed_style_initialise(style, handler, pw);
+ if (error != CSS_OK) {
+ css_computed_style_destroy(style);
+ return error;
+ }
+
+ /* Neither create nor initialise intern the style, so intern it now */
+ error = css__arena_intern_style(&style);
+ if (error != CSS_OK)
+ return error;
+
+ /* Store it on the ctx */
+ ctx->default_style = style;
+
+ return CSS_OK;
+}
+
+
+/**
+ * Get a default style, e.g. for an implied element's anonamous box
+ *
+ * \param ctx Selection context (used to avoid recreating default)
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \param style Pointer to location to receive default style
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+css_error css_select_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw,
+ css_computed_style **style)
+{
+ css_error error;
+
+ if (ctx == NULL || style == NULL || handler == NULL ||
+ handler->handler_version !=
+ CSS_SELECT_HANDLER_VERSION_1)
+ return CSS_BADPARM;
+
+ /* Ensure the ctx has a default style */
+ if (ctx->default_style == NULL) {
+ error = css__select_ctx_create_default_style(ctx, handler, pw);
+ if (error != CSS_OK) {
+ return error;
+ }
+ }
+
+ /* Pass a ref back to the client */
+ *style = css__computed_style_ref(ctx->default_style);
+ return CSS_OK;
+}
+
+
/**
* Select a style for the given node
*
@@ -646,6 +725,18 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
goto cleanup;
}
+ /* Intern the partial computed styles */
+ for (j = CSS_PSEUDO_ELEMENT_NONE; j < CSS_PSEUDO_ELEMENT_COUNT; j++) {
+ /* Skip non-existent pseudo elements */
+ if (state.results->styles[j] == NULL)
+ continue;
+
+ error = css__arena_intern_style(&state.results->styles[j]);
+ if (error != CSS_OK) {
+ goto cleanup;
+ }
+ }
+
/* Add node name to bloom */
if (state.element.name->insensitive == NULL) {
if (lwc__intern_caseless_string(
diff --git a/test/select-common.c b/test/select-common.c
index 42cdb76..61568e5 100644
--- a/test/select-common.c
+++ b/test/select-common.c
@@ -769,11 +769,14 @@ static void run_test_select_tree(css_select_ctx *select,
&select_handler, ctx, &sr) == CSS_OK);
if (node->parent != NULL) {
+ css_computed_style *composed;
assert(css_computed_style_compose(
node->parent->sr->styles[ctx->pseudo_element],
sr->styles[ctx->pseudo_element],
compute_font_size, NULL,
- &(sr->styles[ctx->pseudo_element])) == CSS_OK);
+ &composed) == CSS_OK);
+ css_computed_style_destroy(sr->styles[ctx->pseudo_element]);
+ sr->styles[ctx->pseudo_element] = composed;
}
node->sr = sr;
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=f5d1d7e5087e3170e3f9...
commit f5d1d7e5087e3170e3f945281e30d413c0aef933
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Remove trailing tab.
diff --git a/include/libcss/select.h b/include/libcss/select.h
index d504e81..a010e7c 100644
--- a/include/libcss/select.h
+++ b/include/libcss/select.h
@@ -227,7 +227,7 @@ css_error css_select_font_faces(css_select_ctx *ctx,
uint64_t media, lwc_string *font_family,
css_select_font_faces_results **result);
css_error css_select_font_faces_results_destroy(
- css_select_font_faces_results *results);
+ css_select_font_faces_results *results);
#ifdef __cplusplus
}
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=bf9c9ec944e26c4a9348...
commit bf9c9ec944e26c4a9348b5274b5dbaa73a2143f5
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Composition: Avoid extension block checks irrelevent to property group.
diff --git a/src/select/computed.c b/src/select/computed.c
index 182a7e7..107c884 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -296,20 +296,24 @@ css_error css_computed_style_compose(const css_computed_style *parent,
/* Iterate through the properties */
for (i = 0; i < CSS_N_PROPERTIES; i++) {
- /* Skip any in extension blocks if the block does not exist */
- if (prop_dispatch[i].group == GROUP_UNCOMMON &&
- parent->i.uncommon == NULL &&
- child->i.uncommon == NULL)
- continue;
-
- if (prop_dispatch[i].group == GROUP_PAGE &&
- parent->page == NULL && child->page == NULL)
- continue;
-
- if (prop_dispatch[i].group == GROUP_AURAL &&
- parent->i.aural == NULL &&
- child->i.aural == NULL)
- continue;
+ /* Skip any in extension blocks if the block does not exist */
+ switch(prop_dispatch[i].group) {
+ case GROUP_NORMAL:
+ break;
+ case GROUP_UNCOMMON:
+ if (parent->i.uncommon == NULL &&
+ child->i.uncommon == NULL)
+ continue;
+ break;
+ case GROUP_PAGE:
+ if (parent->page == NULL && child->page == NULL)
+ continue;
+ break;
+ case GROUP_AURAL:
+ if (parent->i.aural == NULL && child->i.aural == NULL)
+ continue;
+ break;
+ }
/* Compose the property */
error = prop_dispatch[i].compose(parent, child, *result);
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=5519c5cdf3ea07a5650e...
commit 5519c5cdf3ea07a5650e3787e1405b5be0ae5703
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Change arena hash from FNV-1 to 32-bit MurmurHash2.
diff --git a/src/select/arena.c b/src/select/arena.c
index 8f5a319..1b0ea57 100644
--- a/src/select/arena.c
+++ b/src/select/arena.c
@@ -9,6 +9,7 @@
#include <string.h>
#include "select/arena.h"
+#include "select/arena_hash.h"
#include "select/computed.h"
#define TU_SIZE 3037
@@ -18,23 +19,6 @@ struct css_computed_uncommon *table_u[TU_SIZE];
struct css_computed_style *table_s[TS_SIZE];
-/**
- * FNV-1 hash
- */
-static inline uint32_t css__arena_hash(const uint8_t *data, size_t len)
-{
- lwc_hash h = 0x811c9dc5;
-
- while (len > 0) {
- h *= 0x01000193;
- h ^= *data++;
- len--;
- }
-
- return h;
-}
-
-
static inline uint32_t css__arena_hash_uncommon(struct css_computed_uncommon *u)
{
return css__arena_hash((const uint8_t *) &u->i, sizeof(u->i));
diff --git a/src/select/arena_hash.h b/src/select/arena_hash.h
new file mode 100644
index 0000000..58abcd4
--- /dev/null
+++ b/src/select/arena_hash.h
@@ -0,0 +1,67 @@
+/*
+ * This file is part of LibCSS
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Copyright 2015 Michael Drake <tlsa(a)netsurf-browser.org>
+ */
+
+#ifndef css_select_arena_hash_h_
+#define css_select_arena_hash_h_
+
+#include <stdint.h>
+
+/**
+ * Currently 32-bit MurmurHash2.
+ *
+ * Created by Austin Appleby, and placed in the public domain.
+ * https://sites.google.com/site/murmurhash/
+ *
+ * Refactored and adapted a little for libcss.
+ */
+static inline uint32_t css__arena_hash(const uint8_t *data, size_t len)
+{
+ /* Hashing constants */
+ const uint32_t m = 0x5bd1e995;
+ const int r = 24;
+
+ /* Start with length */
+ uint32_t h = len;
+
+ /* Hash four bytes at a time */
+ while (len >= 4) {
+ /* If we could ensure 4-byte alignment of the input, this
+ * could be faster. */
+ uint32_t k =
+ (((uint32_t) data[0]) ) |
+ (((uint32_t) data[1]) << 8) |
+ (((uint32_t) data[2]) << 16) |
+ (((uint32_t) data[3]) << 24);
+
+ k *= m;
+ k ^= k >> r;
+ k *= m;
+ h *= m;
+ h ^= k;
+ data += 4;
+ len -= 4;
+ }
+
+ /* Hash any left over bytes */
+ switch (len) {
+ case 3: h ^= data[2] << 16;
+ case 2: h ^= data[1] << 8;
+ case 1: h ^= data[0];
+ h *= m;
+ }
+
+ /* Finalise */
+ h ^= h >> 13;
+ h *= m;
+ h ^= h >> 15;
+
+ return h;
+}
+
+#endif
+
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=e433be00243f6d041075...
commit e433be00243f6d041075cb992e81bc8a3a6976a1
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
After composing styles, intern the result in the style sharing arena.
Note this changes the API.
Selection tests updated.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 3470da8..0009267 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -83,12 +83,12 @@ css_error css_computed_style_initialise(css_computed_style *style,
struct css_select_handler *handler, void *pw);
css_error css_computed_style_compose(const css_computed_style *parent,
- const css_computed_style *child,
+ css_computed_style *child,
css_error (*compute_font_size)(void *pw,
const struct css_hint *parent,
struct css_hint *size),
void *pw,
- css_computed_style *result);
+ css_computed_style **result);
/******************************************************************************
* Property accessors below here *
diff --git a/src/select/computed.c b/src/select/computed.c
index 817da31..182a7e7 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -7,6 +7,7 @@
#include <string.h>
+#include "select/arena.h"
#include "select/computed.h"
#include "select/dispatch.h"
#include "select/propget.h"
@@ -92,6 +93,13 @@ css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon)
if (uncommon == NULL)
return CSS_BADPARM;
+ if (uncommon->count > 1) {
+ uncommon->count--;
+ return CSS_OK;
+
+ } else if (uncommon->count == 1) {
+ css__arena_remove_uncommon_style(uncommon);
+ }
if (uncommon != NULL) {
if (uncommon->counter_increment != NULL) {
@@ -176,6 +184,13 @@ css_error css_computed_style_destroy(css_computed_style *style)
css__computed_uncommon_destroy(style->i.uncommon);
+ if (style->count > 1) {
+ style->count--;
+ return CSS_OK;
+
+ } else if (style->count == 1) {
+ css__arena_remove_style(style);
+ }
if (style->page != NULL) {
free(style->page);
@@ -270,11 +285,11 @@ css_error css_computed_style_initialise(css_computed_style *style,
* \note \a child and \a result may point at the same object
*/
css_error css_computed_style_compose(const css_computed_style *parent,
- const css_computed_style *child,
+ css_computed_style *child,
css_error (*compute_font_size)(void *pw,
const css_hint *parent, css_hint *size),
void *pw,
- css_computed_style *result)
+ css_computed_style **result)
{
css_error error = CSS_OK;
size_t i;
@@ -297,13 +312,19 @@ css_error css_computed_style_compose(const css_computed_style *parent,
continue;
/* Compose the property */
- error = prop_dispatch[i].compose(parent, child, result);
+ error = prop_dispatch[i].compose(parent, child, *result);
if (error != CSS_OK)
break;
}
/* Finally, compute absolute values for everything */
- return css__compute_absolute_values(parent, result, compute_font_size, pw);
+ error = css__compute_absolute_values(parent, *result,
+ compute_font_size, pw);
+ if (error != CSS_OK) {
+ return error;
+ }
+
+ return css__arena_intern_style(result);
}
/******************************************************************************
diff --git a/test/select-common.c b/test/select-common.c
index f1762a6..42cdb76 100644
--- a/test/select-common.c
+++ b/test/select-common.c
@@ -773,7 +773,7 @@ static void run_test_select_tree(css_select_ctx *select,
node->parent->sr->styles[ctx->pseudo_element],
sr->styles[ctx->pseudo_element],
compute_font_size, NULL,
- sr->styles[ctx->pseudo_element]) == CSS_OK);
+ &(sr->styles[ctx->pseudo_element])) == CSS_OK);
}
node->sr = sr;
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=973372a5d8fcb07804b2...
commit 973372a5d8fcb07804b279c52504142fdbf0b009
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Add arena module for interning computed styles.
Builds, but currently unused.
diff --git a/src/select/Makefile b/src/select/Makefile
index eb89c1f..e937191 100644
--- a/src/select/Makefile
+++ b/src/select/Makefile
@@ -1,4 +1,4 @@
# Sources
-DIR_SOURCES := computed.c dispatch.c hash.c select.c font_face.c
+DIR_SOURCES := arena.c computed.c dispatch.c hash.c select.c font_face.c
include $(NSBUILD)/Makefile.subdir
diff --git a/src/select/arena.c b/src/select/arena.c
new file mode 100644
index 0000000..8f5a319
--- /dev/null
+++ b/src/select/arena.c
@@ -0,0 +1,377 @@
+/*
+ * This file is part of LibCSS
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Copyright 2015 Michael Drake <tlsa(a)netsurf-browser.org>
+ */
+
+#include <string.h>
+
+#include "select/arena.h"
+#include "select/computed.h"
+
+#define TU_SIZE 3037
+#define TS_SIZE 5101
+
+struct css_computed_uncommon *table_u[TU_SIZE];
+struct css_computed_style *table_s[TS_SIZE];
+
+
+/**
+ * FNV-1 hash
+ */
+static inline uint32_t css__arena_hash(const uint8_t *data, size_t len)
+{
+ lwc_hash h = 0x811c9dc5;
+
+ while (len > 0) {
+ h *= 0x01000193;
+ h ^= *data++;
+ len--;
+ }
+
+ return h;
+}
+
+
+static inline uint32_t css__arena_hash_uncommon(struct css_computed_uncommon *u)
+{
+ return css__arena_hash((const uint8_t *) &u->i, sizeof(u->i));
+}
+
+
+static inline uint32_t css__arena_hash_style(struct css_computed_style *s)
+{
+ return css__arena_hash((const uint8_t *) &s->i, sizeof(s->i));
+}
+
+
+static inline bool arena__compare_computed_page(
+ const struct css_computed_page *a,
+ const struct css_computed_page *b)
+{
+ if (a == NULL && b == NULL) {
+ return true;
+
+ } else if (a == NULL || b == NULL) {
+ return false;
+ }
+
+ return memcmp(a, b, sizeof(struct css_computed_page)) == 0;
+}
+
+
+static inline bool arena__compare_computed_content_item(
+ const struct css_computed_content_item *a,
+ const struct css_computed_content_item *b)
+{
+ if (a == NULL && b == NULL) {
+ return true;
+
+ } else if (a == NULL || b == NULL) {
+ return false;
+ }
+
+ if (a->type != b->type) {
+ return false;
+ }
+
+ return memcmp(a, b, sizeof(struct css_computed_content_item)) == 0;
+}
+
+
+static inline bool arena__compare_css_computed_counter(
+ const struct css_computed_counter *a,
+ const struct css_computed_counter *b)
+{
+ bool match;
+
+ if (a == NULL && b == NULL) {
+ return true;
+
+ } else if (a == NULL || b == NULL) {
+ return false;
+ }
+
+ if (a->value == b->value &&
+ lwc_string_isequal(a->name, b->name,
+ &match) == lwc_error_ok &&
+ match == true) {
+ return true;
+ }
+
+ return false;
+}
+
+static inline bool arena__compare_string_list(
+ lwc_string **a,
+ lwc_string **b)
+{
+ if (a == NULL && b == NULL) {
+ return true;
+
+ } else if (a == NULL || b == NULL) {
+ return false;
+ }
+
+ while (*a != NULL && *b != NULL) {
+ bool match;
+
+ if (lwc_string_isequal(*a, *b, &match) != lwc_error_ok ||
+ match == false) {
+ return false;
+ }
+
+ a++;
+ b++;
+ }
+
+ if (*a != *b) {
+ return false;
+ }
+
+ return true;
+}
+
+
+static inline bool css__arena_uncommon_is_equal(
+ struct css_computed_uncommon *a,
+ struct css_computed_uncommon *b)
+{
+ if (memcmp(&a->i, &b->i, sizeof(struct css_computed_uncommon_i)) != 0) {
+ return false;
+ }
+
+ if (!arena__compare_css_computed_counter(
+ a->counter_increment,
+ b->counter_increment)) {
+ return false;
+ }
+
+ if (!arena__compare_css_computed_counter(
+ a->counter_reset,
+ b->counter_reset)) {
+ return false;
+ }
+
+ if (!arena__compare_computed_content_item(
+ a->content,
+ b->content)) {
+ return false;
+ }
+
+ if (!arena__compare_string_list(
+ a->cursor,
+ b->cursor)) {
+ return false;
+ }
+
+ return true;
+}
+
+
+static inline bool css__arena_style_is_equal(
+ struct css_computed_style *a,
+ struct css_computed_style *b)
+{
+ if (memcmp(&a->i, &b->i, sizeof(struct css_computed_style_i)) != 0) {
+ return false;
+ }
+
+ if (!arena__compare_string_list(
+ a->font_family,
+ b->font_family)) {
+ return false;
+ }
+
+ if (!arena__compare_string_list(
+ a->quotes,
+ b->quotes)) {
+ return false;
+ }
+
+ if (!arena__compare_computed_page(
+ a->page,
+ b->page)) {
+ return false;
+ }
+
+ return true;
+}
+
+
+static void css__arena_intern_uncommon(
+ struct css_computed_uncommon **uncommon)
+{
+ struct css_computed_uncommon *u = *uncommon;
+ uint32_t hash, index;
+
+ /* Need to intern the uncommon block */
+ hash = css__arena_hash_uncommon(u);
+ index = hash % TU_SIZE;
+ u->bin = index;
+
+ if (table_u[index] == NULL) {
+ /* Can just insert */
+ table_u[index] = u;
+ u->count = 1;
+ } else {
+ /* Check for existing */
+ struct css_computed_uncommon *l = table_u[index];
+ struct css_computed_uncommon *existing = NULL;
+
+ do {
+ if (css__arena_uncommon_is_equal(l, u)) {
+ existing = l;
+ break;
+ }
+ l = l->next;
+ } while (l != NULL);
+
+ if (existing != NULL) {
+ css__computed_uncommon_destroy(u);
+ existing->count++;
+ *uncommon = existing;
+ } else {
+ /* Add to list */
+ u->next = table_u[index];
+ table_u[index] = u;
+ u->count = 1;
+ }
+ }
+}
+
+
+/* Internally exported function, documented in src/select/arena.h */
+css_error css__arena_intern_style(struct css_computed_style **style)
+{
+ struct css_computed_style *s = *style;
+ uint32_t hash, index;
+
+ if (s->count != 0) {
+ return CSS_BADPARM;
+ }
+
+ if (s->i.uncommon != NULL) {
+ if (s->i.uncommon->count != 0) {
+ return CSS_BADPARM;
+ }
+ css__arena_intern_uncommon(&s->i.uncommon);
+ }
+
+ /* Need to intern the style block */
+ hash = css__arena_hash_style(s);
+ index = hash % TS_SIZE;
+ s->bin = index;
+
+ if (table_s[index] == NULL) {
+ /* Can just insert */
+ table_s[index] = s;
+ s->count = 1;
+ } else {
+ /* Check for existing */
+ struct css_computed_style *l = table_s[index];
+ struct css_computed_style *existing = NULL;
+
+ do {
+ if (css__arena_style_is_equal(l, s)) {
+ existing = l;
+ break;
+ }
+ l = l->next;
+ } while (l != NULL);
+
+ if (existing != NULL) {
+ s->i.uncommon = NULL;
+ css_computed_style_destroy(s);
+ existing->count++;
+ *style = existing;
+ } else {
+ /* Add to list */
+ s->next = table_s[index];
+ table_s[index] = s;
+ s->count = 1;
+ }
+ }
+
+ return CSS_OK;
+}
+
+
+/* Internally exported function, documented in src/select/arena.h */
+enum css_error css__arena_remove_style(struct css_computed_style *style)
+{
+ uint32_t index = style->bin;
+
+ if (table_s[index] == NULL) {
+ return CSS_BADPARM;
+
+ } else {
+ /* Check for existing */
+ struct css_computed_style *l = table_s[index];
+ struct css_computed_style *existing = NULL;
+ struct css_computed_style *prev = NULL;
+
+ do {
+ if (css__arena_style_is_equal(l, style)) {
+ existing = l;
+ break;
+ }
+ prev = l;
+ l = l->next;
+ } while (l != NULL);
+
+ if (existing != NULL) {
+ if (prev != NULL) {
+ prev->next = existing->next;
+ } else {
+ table_s[index] = existing->next;
+ }
+ } else {
+ return CSS_BADPARM;
+ }
+ }
+
+ return CSS_OK;
+}
+
+
+/* Internally exported function, documented in src/select/arena.h */
+enum css_error css__arena_remove_uncommon_style(
+ struct css_computed_uncommon *uncommon)
+{
+ uint32_t index = uncommon->bin;
+
+ if (table_u[index] == NULL) {
+ return CSS_BADPARM;
+
+ } else {
+ /* Check for existing */
+ struct css_computed_uncommon *l = table_u[index];
+ struct css_computed_uncommon *existing = NULL;
+ struct css_computed_uncommon *prev = NULL;
+
+ do {
+ if (css__arena_uncommon_is_equal(l, uncommon)) {
+ existing = l;
+ break;
+ }
+ prev = l;
+ l = l->next;
+ } while (l != NULL);
+
+ if (existing != NULL) {
+ if (prev != NULL) {
+ prev->next = existing->next;
+ } else {
+ table_u[index] = existing->next;
+ }
+ } else {
+ return CSS_BADPARM;
+ }
+ }
+
+ return CSS_OK;
+}
+
diff --git a/src/select/arena.h b/src/select/arena.h
new file mode 100644
index 0000000..af06050
--- /dev/null
+++ b/src/select/arena.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of LibCSS
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * Copyright 2015 Michael Drake <tlsa(a)netsurf-browser.org>
+ */
+
+#ifndef css_select_arena_h_
+#define css_select_arena_h_
+
+struct css_computed_style;
+struct css_computed_uncommon;
+
+/*
+ * Add computed style to the style sharing arena, or exchange for existing
+ *
+ * This takes a computed style. Note that the original computed style
+ * may be freed by this call and all future usage should be via the
+ * updated computed style parameter.
+ *
+ * \params style The style to intern; possibly freed and updated
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_intern_style(struct css_computed_style **style);
+
+/*
+ * Remove a computed style from the style sharing arena
+ *
+ * \params style The style to remove from the style sharing arena
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_remove_style(struct css_computed_style *style);
+
+/*
+ * Remove a computed style's uncommon block from the style sharing arena
+ *
+ * \params uncommon The uncommon style to remove from the style sharing arena
+ * \return CSS_OK on success or appropriate error otherwise.
+ */
+enum css_error css__arena_remove_uncommon_style(
+ struct css_computed_uncommon *uncommon);
+
+#endif
+
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=be275fae169046432d53...
commit be275fae169046432d5322527ee0fc92692aaff7
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Ensure computed content items are initialised to zero.
This allows comparing them with memcmp.
diff --git a/src/select/properties/content.c b/src/select/properties/content.c
index a9dd211..472a66a 100644
--- a/src/select/properties/content.c
+++ b/src/select/properties/content.c
@@ -49,6 +49,7 @@ css_error css__cascade_content(uint32_t opv, css_style *style,
}
content = temp;
+ memset(content + n_contents, 0, sizeof(css_computed_content_item));
switch (v & 0xff) {
case CONTENT_COUNTER:
commitdiff http://git.netsurf-browser.org/libcss.git/commit/?id=61075c3e0c2c055ac3c2...
commit 61075c3e0c2c055ac3c263246fd79f5ac0a02723
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Move trivially compared parts of computed styles to sub-structures.
diff --git a/src/select/computed.c b/src/select/computed.c
index dc632f9..817da31 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -75,59 +75,61 @@ css_error css_computed_style_create(css_computed_style **result)
if (s == NULL)
return CSS_NOMEM;
+ s->bin = UINT32_MAX;
*result = s;
return CSS_OK;
}
/**
- * Destroy a computed style
+ * Destroy an uncommon computed style section
*
* \param style Style to destroy
* \return CSS_OK on success, appropriate error otherwise
*/
-css_error css_computed_style_destroy(css_computed_style *style)
+css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon)
{
- if (style == NULL)
+ if (uncommon == NULL)
return CSS_BADPARM;
- if (style->uncommon != NULL) {
- if (style->uncommon->counter_increment != NULL) {
+
+ if (uncommon != NULL) {
+ if (uncommon->counter_increment != NULL) {
css_computed_counter *c;
- for (c = style->uncommon->counter_increment;
+ for (c = uncommon->counter_increment;
c->name != NULL; c++) {
lwc_string_unref(c->name);
}
- free(style->uncommon->counter_increment);
+ free(uncommon->counter_increment);
}
- if (style->uncommon->counter_reset != NULL) {
+ if (uncommon->counter_reset != NULL) {
css_computed_counter *c;
- for (c = style->uncommon->counter_reset;
+ for (c = uncommon->counter_reset;
c->name != NULL; c++) {
lwc_string_unref(c->name);
}
- free(style->uncommon->counter_reset);
+ free(uncommon->counter_reset);
}
- if (style->uncommon->cursor != NULL) {
+ if (uncommon->cursor != NULL) {
lwc_string **s;
- for (s = style->uncommon->cursor; *s != NULL; s++) {
+ for (s = uncommon->cursor; *s != NULL; s++) {
lwc_string_unref(*s);
}
- free(style->uncommon->cursor);
+ free(uncommon->cursor);
}
- if (style->uncommon->content != NULL) {
+ if (uncommon->content != NULL) {
css_computed_content_item *c;
- for (c = style->uncommon->content;
+ for (c = uncommon->content;
c->type != CSS_COMPUTED_CONTENT_NONE;
c++) {
switch (c->type) {
@@ -152,18 +154,35 @@ css_error css_computed_style_destroy(css_computed_style *style)
}
}
- free(style->uncommon->content);
+ free(uncommon->content);
}
- free(style->uncommon);
+ free(uncommon);
}
+ return CSS_OK;
+}
+
+/**
+ * Destroy a computed style
+ *
+ * \param style Style to destroy
+ * \return CSS_OK on success, appropriate error otherwise
+ */
+css_error css_computed_style_destroy(css_computed_style *style)
+{
+ if (style == NULL)
+ return CSS_BADPARM;
+
+ css__computed_uncommon_destroy(style->i.uncommon);
+
+
if (style->page != NULL) {
free(style->page);
}
- if (style->aural != NULL) {
- free(style->aural);
+ if (style->i.aural != NULL) {
+ free(style->i.aural);
}
if (style->font_family != NULL) {
@@ -186,11 +205,11 @@ css_error css_computed_style_destroy(css_computed_style *style)
free(style->quotes);
}
- if (style->list_style_image != NULL)
- lwc_string_unref(style->list_style_image);
+ if (style->i.list_style_image != NULL)
+ lwc_string_unref(style->i.list_style_image);
- if (style->background_image != NULL)
- lwc_string_unref(style->background_image);
+ if (style->i.background_image != NULL)
+ lwc_string_unref(style->i.background_image);
free(style);
@@ -264,8 +283,8 @@ css_error css_computed_style_compose(const css_computed_style *parent,
for (i = 0; i < CSS_N_PROPERTIES; i++) {
/* Skip any in extension blocks if the block does not exist */
if (prop_dispatch[i].group == GROUP_UNCOMMON &&
- parent->uncommon == NULL &&
- child->uncommon == NULL)
+ parent->i.uncommon == NULL &&
+ child->i.uncommon == NULL)
continue;
if (prop_dispatch[i].group == GROUP_PAGE &&
@@ -273,7 +292,8 @@ css_error css_computed_style_compose(const css_computed_style *parent,
continue;
if (prop_dispatch[i].group == GROUP_AURAL &&
- parent->aural == NULL && child->aural == NULL)
+ parent->i.aural == NULL &&
+ child->i.aural == NULL)
continue;
/* Compose the property */
@@ -444,7 +464,7 @@ uint8_t css_computed_top(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (top == CSS_TOP_AUTO) {
/* Top is auto => -bottom */
- *length = -style->bottom;
+ *length = -style->i.bottom;
*unit = (css_unit) (bottom >> 2);
}
@@ -474,7 +494,7 @@ uint8_t css_computed_right(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (right == CSS_RIGHT_AUTO) {
/* Right is auto => -left */
- *length = -style->left;
+ *length = -style->i.left;
*unit = (css_unit) (left >> 2);
} else {
/** \todo Consider containing block's direction
@@ -508,7 +528,7 @@ uint8_t css_computed_bottom(const css_computed_style *style,
} else if (bottom == CSS_BOTTOM_AUTO ||
(top & 0x3) != CSS_TOP_AUTO) {
/* Bottom is auto or top is not auto => -top */
- *length = -style->top;
+ *length = -style->i.top;
*unit = (css_unit) (top >> 2);
}
@@ -538,7 +558,7 @@ uint8_t css_computed_left(const css_computed_style *style,
*unit = CSS_UNIT_PX;
} else if (left == CSS_LEFT_AUTO) {
/* Left is auto => -right */
- *length = -style->right;
+ *length = -style->i.right;
*unit = (css_unit) (right >> 2);
} else {
/** \todo Consider containing block's direction
@@ -1144,7 +1164,7 @@ css_error css__compute_absolute_values(const css_computed_style *parent,
return error;
/* Uncommon properties */
- if (style->uncommon != NULL) {
+ if (style->i.uncommon != NULL) {
/* Fix up border-spacing */
error = compute_absolute_length_pair(style,
&ex_size.data.length,
diff --git a/src/select/computed.h b/src/select/computed.h
index 0ca01d9..f965993 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -13,7 +13,7 @@
-typedef struct css_computed_uncommon {
+struct css_computed_uncommon_i {
/*
* border_spacing 1 + 2(4) 2(4)
* break_before 4 0
@@ -99,13 +99,20 @@ typedef struct css_computed_uncommon {
css_color column_rule_color;
css_fixed column_rule_width;
css_fixed column_width;
+};
+
+typedef struct css_computed_uncommon {
+ struct css_computed_uncommon_i i;
css_computed_counter *counter_increment;
css_computed_counter *counter_reset;
- lwc_string **cursor;
-
css_computed_content_item *content;
+
+ lwc_string **cursor;
+ struct css_computed_uncommon *next;
+ uint32_t count;
+ uint32_t bin;
} css_computed_uncommon;
typedef struct css_computed_page {
@@ -122,7 +129,7 @@ typedef struct css_computed_page {
int32_t orphans;
} css_computed_page;
-struct css_computed_style {
+struct css_computed_style_i {
/*
* background_attachment 2
* background_repeat 3
@@ -302,15 +309,24 @@ struct css_computed_style {
int32_t z_index;
+ css_computed_uncommon *uncommon;/**< Uncommon properties */
+ void *aural; /**< Aural properties */
+};
+
+struct css_computed_style {
+ struct css_computed_style_i i;
+
lwc_string **font_family;
lwc_string **quotes;
-
- css_computed_uncommon *uncommon;/**< Uncommon properties */
- void *aural; /**< Aural properties */
css_computed_page *page; /**< Page properties */
+ struct css_computed_style *next;
+ uint32_t count;
+ uint32_t bin;
};
+css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
+
css_error css__compute_absolute_values(const css_computed_style *parent,
css_computed_style *style,
css_error (*compute_font_size)(void *pw,
diff --git a/src/select/properties/border_spacing.c b/src/select/properties/border_spacing.c
index 1b32747..db7b1f2 100644
--- a/src/select/properties/border_spacing.c
+++ b/src/select/properties/border_spacing.c
@@ -71,10 +71,10 @@ css_error css__compose_border_spacing(const css_computed_style *parent,
uint8_t type = get_border_spacing(child, &hlength, &hunit,
&vlength, &vunit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_BORDER_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_BORDER_SPACING_INHERIT) {
type = get_border_spacing(parent,
&hlength, &hunit, &vlength, &vunit);
diff --git a/src/select/properties/clip.c b/src/select/properties/clip.c
index d98c7eb..cc39d99 100644
--- a/src/select/properties/clip.c
+++ b/src/select/properties/clip.c
@@ -102,10 +102,10 @@ css_error css__compose_clip(const css_computed_style *parent,
false, false, false, false };
uint8_t type = get_clip(child, &rect);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CLIP_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CLIP_INHERIT) {
type = get_clip(parent, &rect);
}
diff --git a/src/select/properties/column_count.c b/src/select/properties/column_count.c
index 92fdec2..4ded377 100644
--- a/src/select/properties/column_count.c
+++ b/src/select/properties/column_count.c
@@ -59,10 +59,10 @@ css_error css__compose_column_count(const css_computed_style *parent,
int32_t count = 0;
uint8_t type = get_column_count(child, &count);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_COUNT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_COUNT_INHERIT) {
type = get_column_count(parent, &count);
}
diff --git a/src/select/properties/column_gap.c b/src/select/properties/column_gap.c
index 641f529..f544f44 100644
--- a/src/select/properties/column_gap.c
+++ b/src/select/properties/column_gap.c
@@ -41,10 +41,10 @@ css_error css__compose_column_gap(const css_computed_style *parent,
css_unit unit = CSS_UNIT_EM;
uint8_t type = get_column_gap(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_GAP_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_GAP_INHERIT) {
type = get_column_gap(parent, &length, &unit);
}
diff --git a/src/select/properties/column_width.c b/src/select/properties/column_width.c
index 45eb7fc..b6550ab 100644
--- a/src/select/properties/column_width.c
+++ b/src/select/properties/column_width.c
@@ -41,10 +41,10 @@ css_error css__compose_column_width(const css_computed_style *parent,
css_unit unit = CSS_UNIT_EM;
uint8_t type = get_column_width(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_WIDTH_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COLUMN_WIDTH_INHERIT) {
type = get_column_width(parent, &length, &unit);
}
diff --git a/src/select/properties/content.c b/src/select/properties/content.c
index c79dd0d..a9dd211 100644
--- a/src/select/properties/content.c
+++ b/src/select/properties/content.c
@@ -206,13 +206,13 @@ css_error css__compose_content(const css_computed_style *parent,
const css_computed_content_item *items = NULL;
uint8_t type = get_content(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CONTENT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_content_item *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CONTENT_INHERIT) {
type = get_content(parent, &items);
}
diff --git a/src/select/properties/counter_increment.c b/src/select/properties/counter_increment.c
index 429e558..644607b 100644
--- a/src/select/properties/counter_increment.c
+++ b/src/select/properties/counter_increment.c
@@ -56,13 +56,13 @@ css_error css__compose_counter_increment(const css_computed_style *parent,
const css_computed_counter *items = NULL;
uint8_t type = get_counter_increment(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_INCREMENT_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_counter *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_INCREMENT_INHERIT) {
type = get_counter_increment(parent, &items);
}
diff --git a/src/select/properties/counter_reset.c b/src/select/properties/counter_reset.c
index ddf54aa..05559f5 100644
--- a/src/select/properties/counter_reset.c
+++ b/src/select/properties/counter_reset.c
@@ -55,13 +55,13 @@ css_error css__compose_counter_reset(const css_computed_style *parent,
const css_computed_counter *items = NULL;
uint8_t type = get_counter_reset(child, &items);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_RESET_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_items = 0;
css_computed_counter *copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_COUNTER_RESET_INHERIT) {
type = get_counter_reset(parent, &items);
}
diff --git a/src/select/properties/cursor.c b/src/select/properties/cursor.c
index a77d21b..1ca497f 100644
--- a/src/select/properties/cursor.c
+++ b/src/select/properties/cursor.c
@@ -172,13 +172,13 @@ css_error css__compose_cursor(const css_computed_style *parent,
lwc_string **urls = NULL;
uint8_t type = get_cursor(child, &urls);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CURSOR_INHERIT ||
- (child->uncommon != NULL && result != child)) {
+ (child->i.uncommon != NULL && result != child)) {
size_t n_urls = 0;
lwc_string **copy = NULL;
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_CURSOR_INHERIT) {
type = get_cursor(parent, &urls);
}
diff --git a/src/select/properties/letter_spacing.c b/src/select/properties/letter_spacing.c
index 322efef..cc00100 100644
--- a/src/select/properties/letter_spacing.c
+++ b/src/select/properties/letter_spacing.c
@@ -41,10 +41,10 @@ css_error css__compose_letter_spacing(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_letter_spacing(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_LETTER_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_LETTER_SPACING_INHERIT) {
type = get_letter_spacing(parent, &length, &unit);
}
diff --git a/src/select/properties/outline_color.c b/src/select/properties/outline_color.c
index 36aafd7..2613839 100644
--- a/src/select/properties/outline_color.c
+++ b/src/select/properties/outline_color.c
@@ -65,10 +65,10 @@ css_error css__compose_outline_color(const css_computed_style *parent,
css_color color = 0;
uint8_t type = get_outline_color(child, &color);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_COLOR_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_COLOR_INHERIT) {
type = get_outline_color(parent, &color);
}
diff --git a/src/select/properties/outline_width.c b/src/select/properties/outline_width.c
index 5380179..547c42a 100644
--- a/src/select/properties/outline_width.c
+++ b/src/select/properties/outline_width.c
@@ -41,10 +41,10 @@ css_error css__compose_outline_width(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_outline_width(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_WIDTH_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_OUTLINE_WIDTH_INHERIT) {
type = get_outline_width(parent, &length, &unit);
}
diff --git a/src/select/properties/word_spacing.c b/src/select/properties/word_spacing.c
index dd4e1d7..24eda89 100644
--- a/src/select/properties/word_spacing.c
+++ b/src/select/properties/word_spacing.c
@@ -41,10 +41,10 @@ css_error css__compose_word_spacing(const css_computed_style *parent,
css_unit unit = CSS_UNIT_PX;
uint8_t type = get_word_spacing(child, &length, &unit);
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_WORD_SPACING_INHERIT ||
- (child->uncommon != NULL && result != child)) {
- if ((child->uncommon == NULL && parent->uncommon != NULL) ||
+ (child->i.uncommon != NULL && result != child)) {
+ if ((child->i.uncommon == NULL && parent->i.uncommon != NULL) ||
type == CSS_WORD_SPACING_INHERIT) {
type = get_word_spacing(parent, &length, &unit);
}
diff --git a/src/select/propget.h b/src/select/propget.h
index 2a263aa..5552e39 100644
--- a/src/select/propget.h
+++ b/src/select/propget.h
@@ -21,15 +21,15 @@ static inline uint8_t get_letter_spacing(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[LETTER_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[LETTER_SPACING_INDEX];
bits &= LETTER_SPACING_MASK;
bits >>= LETTER_SPACING_SHIFT;
/* 6bits: uuuutt : unit | type */
if ((bits & 3) == CSS_LETTER_SPACING_SET) {
- *length = style->uncommon->letter_spacing;
+ *length = style->i.uncommon->i.letter_spacing;
*unit = bits >> 2;
}
@@ -49,15 +49,15 @@ static inline uint8_t get_letter_spacing(
static inline uint8_t get_outline_color(
const css_computed_style *style, css_color *color)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[OUTLINE_COLOR_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[OUTLINE_COLOR_INDEX];
bits &= OUTLINE_COLOR_MASK;
bits >>= OUTLINE_COLOR_SHIFT;
/* 2bits: tt : type */
if ((bits & 3) == CSS_OUTLINE_COLOR_COLOR) {
- *color = style->uncommon->outline_color;
+ *color = style->i.uncommon->i.outline_color;
}
return (bits & 3);
@@ -77,15 +77,15 @@ static inline uint8_t get_outline_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[OUTLINE_WIDTH_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[OUTLINE_WIDTH_INDEX];
bits &= OUTLINE_WIDTH_MASK;
bits >>= OUTLINE_WIDTH_SHIFT;
/* 7bits: uuuuttt : unit | type */
if ((bits & 7) == CSS_OUTLINE_WIDTH_WIDTH) {
- *length = style->uncommon->outline_width;
+ *length = style->i.uncommon->i.outline_width;
*unit = bits >> 3;
}
@@ -110,24 +110,24 @@ static inline uint8_t get_border_spacing(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BORDER_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BORDER_SPACING_INDEX];
bits &= BORDER_SPACING_MASK;
bits >>= BORDER_SPACING_SHIFT;
/* 1 bit: type */
if (bits == CSS_BORDER_SPACING_SET) {
uint8_t bits1 =
- style->uncommon->bits[BORDER_SPACING_INDEX1];
+ style->i.uncommon->i.bits[BORDER_SPACING_INDEX1];
bits1 &= BORDER_SPACING_MASK1;
bits1 >>= BORDER_SPACING_SHIFT1;
/* 8bits: hhhhvvvv : hunit | vunit */
- *hlength = style->uncommon->border_spacing[0];
+ *hlength = style->i.uncommon->i.border_spacing[0];
*hunit = bits1 >> 4;
- *vlength = style->uncommon->border_spacing[1];
+ *vlength = style->i.uncommon->i.border_spacing[1];
*vunit = bits1 & 0xf;
}
@@ -152,8 +152,8 @@ static inline uint8_t get_border_spacing(
static inline uint8_t get_break_after(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_AFTER_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_AFTER_INDEX];
bits &= BREAK_AFTER_MASK;
bits >>= BREAK_AFTER_SHIFT;
@@ -174,8 +174,8 @@ static inline uint8_t get_break_after(
static inline uint8_t get_break_before(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_BEFORE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_BEFORE_INDEX];
bits &= BREAK_BEFORE_MASK;
bits >>= BREAK_BEFORE_SHIFT;
@@ -196,8 +196,8 @@ static inline uint8_t get_break_before(
static inline uint8_t get_break_inside(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[BREAK_INSIDE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[BREAK_INSIDE_INDEX];
bits &= BREAK_INSIDE_MASK;
bits >>= BREAK_INSIDE_SHIFT;
@@ -219,15 +219,15 @@ static inline uint8_t get_word_spacing(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[WORD_SPACING_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[WORD_SPACING_INDEX];
bits &= WORD_SPACING_MASK;
bits >>= WORD_SPACING_SHIFT;
/* 6bits: uuuutt : unit | type */
if ((bits & 3) == CSS_WORD_SPACING_SET) {
- *length = style->uncommon->word_spacing;
+ *length = style->i.uncommon->i.word_spacing;
*unit = bits >> 2;
}
@@ -247,8 +247,8 @@ static inline uint8_t get_word_spacing(
static inline uint8_t get_writing_mode(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[WRITING_MODE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[WRITING_MODE_INDEX];
bits &= WRITING_MODE_MASK;
bits >>= WRITING_MODE_SHIFT;
@@ -270,13 +270,13 @@ static inline uint8_t get_counter_increment(
const css_computed_style *style,
const css_computed_counter **counters)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COUNTER_INCREMENT_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COUNTER_INCREMENT_INDEX];
bits &= COUNTER_INCREMENT_MASK;
bits >>= COUNTER_INCREMENT_SHIFT;
/* 1bit: type */
- *counters = style->uncommon->counter_increment;
+ *counters = style->i.uncommon->counter_increment;
return bits;
}
@@ -295,13 +295,13 @@ static inline uint8_t get_counter_reset(
const css_computed_style *style,
const css_computed_counter **counters)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COUNTER_RESET_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COUNTER_RESET_INDEX];
bits &= COUNTER_RESET_MASK;
bits >>= COUNTER_RESET_SHIFT;
/* 1bit: type */
- *counters = style->uncommon->counter_reset;
+ *counters = style->i.uncommon->counter_reset;
return bits;
}
@@ -320,13 +320,13 @@ static inline uint8_t get_cursor(
const css_computed_style *style,
lwc_string ***urls)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CURSOR_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CURSOR_INDEX];
bits &= CURSOR_MASK;
bits >>= CURSOR_SHIFT;
/* 5bits: type */
- *urls = style->uncommon->cursor;
+ *urls = style->i.uncommon->cursor;
return bits;
}
@@ -351,8 +351,8 @@ static inline uint8_t get_clip(
const css_computed_style *style,
css_computed_clip_rect *rect)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CLIP_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CLIP_INDEX];
bits &= CLIP_MASK;
bits >>= CLIP_SHIFT;
@@ -368,33 +368,33 @@ static inline uint8_t get_clip(
if (rect->top_auto == false ||
rect->right_auto == false) {
/* 8bits: ttttrrrr : top | right */
- bits1 = style->uncommon->bits[CLIP_INDEX1];
+ bits1 = style->i.uncommon->i.bits[CLIP_INDEX1];
bits1 &= CLIP_MASK1;
bits1 >>= CLIP_SHIFT1;
} else {
bits1 = 0;
}
- rect->top = style->uncommon->clip[0];
+ rect->top = style->i.uncommon->i.clip[0];
rect->tunit = bits1 >> 4;
- rect->right = style->uncommon->clip[1];
+ rect->right = style->i.uncommon->i.clip[1];
rect->runit = bits1 & 0xf;
if (rect->bottom_auto == false ||
rect->left_auto == false) {
/* 8bits: bbbbllll : bottom | left */
- bits1 = style->uncommon->bits[CLIP_INDEX2];
+ bits1 = style->i.uncommon->i.bits[CLIP_INDEX2];
bits1 &= CLIP_MASK2;
bits1 >>= CLIP_SHIFT2;
} else {
bits1 = 0;
}
- rect->bottom = style->uncommon->clip[2];
+ rect->bottom = style->i.uncommon->i.clip[2];
rect->bunit = bits1 >> 4;
- rect->left = style->uncommon->clip[3];
+ rect->left = style->i.uncommon->i.clip[3];
rect->lunit = bits1 & 0xf;
}
@@ -420,13 +420,13 @@ static inline uint8_t get_clip(
static inline uint8_t get_column_count(
const css_computed_style *style, int32_t *count)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_COUNT_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_COUNT_INDEX];
bits &= COLUMN_COUNT_MASK;
bits >>= COLUMN_COUNT_SHIFT;
/* 2bits: tt : type */
- *count = style->uncommon->column_count;
+ *count = style->i.uncommon->i.column_count;
return bits;
}
@@ -444,8 +444,8 @@ static inline uint8_t get_column_count(
static inline uint8_t get_column_fill(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_FILL_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_FILL_INDEX];
bits &= COLUMN_FILL_MASK;
bits >>= COLUMN_FILL_SHIFT;
@@ -467,14 +467,14 @@ static inline uint8_t get_column_gap(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_GAP_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_GAP_INDEX];
bits &= COLUMN_GAP_MASK;
bits >>= COLUMN_GAP_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_COLUMN_GAP_SET) {
- *length = style->uncommon->column_gap;
+ *length = style->i.uncommon->i.column_gap;
*unit = bits >> 2;
}
@@ -495,13 +495,13 @@ static inline uint8_t get_column_rule_color(
const css_computed_style *style,
css_color *color)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_RULE_COLOR_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_RULE_COLOR_INDEX];
bits &= COLUMN_RULE_COLOR_MASK;
bits >>= COLUMN_RULE_COLOR_SHIFT;
/* 2bits: type */
- *color = style->uncommon->column_rule_color;
+ *color = style->i.uncommon->i.column_rule_color;
return bits;
}
@@ -520,8 +520,8 @@ static inline uint8_t get_column_rule_color(
static inline uint8_t get_column_rule_style(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_RULE_STYLE_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_RULE_STYLE_INDEX];
bits &= COLUMN_RULE_STYLE_MASK;
bits >>= COLUMN_RULE_STYLE_SHIFT;
@@ -543,14 +543,14 @@ static inline uint8_t get_column_rule_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_RULE_WIDTH_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_RULE_WIDTH_INDEX];
bits &= COLUMN_RULE_WIDTH_MASK;
bits >>= COLUMN_RULE_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_COLUMN_RULE_WIDTH_WIDTH) {
- *length = style->uncommon->column_rule_width;
+ *length = style->i.uncommon->i.column_rule_width;
*unit = bits >> 3;
}
@@ -570,8 +570,8 @@ static inline uint8_t get_column_rule_width(
static inline uint8_t get_column_span(
const css_computed_style *style)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_SPAN_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_SPAN_INDEX];
bits &= COLUMN_SPAN_MASK;
bits >>= COLUMN_SPAN_SHIFT;
@@ -593,14 +593,14 @@ static inline uint8_t get_column_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[COLUMN_WIDTH_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[COLUMN_WIDTH_INDEX];
bits &= COLUMN_WIDTH_MASK;
bits >>= COLUMN_WIDTH_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_COLUMN_WIDTH_SET) {
- *length = style->uncommon->column_width;
+ *length = style->i.uncommon->i.column_width;
*unit = bits >> 2;
}
@@ -621,13 +621,13 @@ static inline uint8_t get_content(
const css_computed_style *style,
const css_computed_content_item **content)
{
- if (style->uncommon != NULL) {
- uint8_t bits = style->uncommon->bits[CONTENT_INDEX];
+ if (style->i.uncommon != NULL) {
+ uint8_t bits = style->i.uncommon->i.bits[CONTENT_INDEX];
bits &= CONTENT_MASK;
bits >>= CONTENT_SHIFT;
/* 2bits: type */
- *content = style->uncommon->content;
+ *content = style->i.uncommon->content;
return bits;
}
@@ -646,13 +646,13 @@ static inline uint8_t get_vertical_align(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[VERTICAL_ALIGN_INDEX];
+ uint8_t bits = style->i.bits[VERTICAL_ALIGN_INDEX];
bits &= VERTICAL_ALIGN_MASK;
bits >>= VERTICAL_ALIGN_SHIFT;
/* 8bits: uuuutttt : units | type */
if ((bits & 0xf) == CSS_VERTICAL_ALIGN_SET) {
- *length = style->vertical_align;
+ *length = style->i.vertical_align;
*unit = bits >> 4;
}
@@ -669,13 +669,13 @@ static inline uint8_t get_font_size(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[FONT_SIZE_INDEX];
+ uint8_t bits = style->i.bits[FONT_SIZE_INDEX];
bits &= FONT_SIZE_MASK;
bits >>= FONT_SIZE_SHIFT;
/* 8bits: uuuutttt : units | type */
if ((bits & 0xf) == CSS_FONT_SIZE_DIMENSION) {
- *length = style->font_size;
+ *length = style->i.font_size;
*unit = bits >> 4;
}
@@ -692,13 +692,13 @@ static inline uint8_t get_border_top_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_TOP_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_WIDTH_INDEX];
bits &= BORDER_TOP_WIDTH_MASK;
bits >>= BORDER_TOP_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[0];
+ *length = style->i.border_width[0];
*unit = bits >> 3;
}
@@ -715,13 +715,13 @@ static inline uint8_t get_border_right_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_RIGHT_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
bits &= BORDER_RIGHT_WIDTH_MASK;
bits >>= BORDER_RIGHT_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[1];
+ *length = style->i.border_width[1];
*unit = bits >> 3;
}
@@ -738,13 +738,13 @@ static inline uint8_t get_border_bottom_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
bits &= BORDER_BOTTOM_WIDTH_MASK;
bits >>= BORDER_BOTTOM_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[2];
+ *length = style->i.border_width[2];
*unit = bits >> 3;
}
@@ -761,13 +761,13 @@ static inline uint8_t get_border_left_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BORDER_LEFT_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_WIDTH_INDEX];
bits &= BORDER_LEFT_WIDTH_MASK;
bits >>= BORDER_LEFT_WIDTH_SHIFT;
/* 7bits: uuuuttt : units | type */
if ((bits & 0x7) == CSS_BORDER_WIDTH_WIDTH) {
- *length = style->border_width[3];
+ *length = style->i.border_width[3];
*unit = bits >> 3;
}
@@ -784,12 +784,12 @@ static inline uint8_t get_background_image(
const css_computed_style *style,
lwc_string **url)
{
- uint8_t bits = style->bits[BACKGROUND_IMAGE_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_IMAGE_INDEX];
bits &= BACKGROUND_IMAGE_MASK;
bits >>= BACKGROUND_IMAGE_SHIFT;
/* 1bit: type */
- *url = style->background_image;
+ *url = style->i.background_image;
return bits;
}
@@ -804,12 +804,12 @@ static inline uint8_t get_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[COLOR_INDEX];
+ uint8_t bits = style->i.bits[COLOR_INDEX];
bits &= COLOR_MASK;
bits >>= COLOR_SHIFT;
/* 1bit: type */
- *color = style->color;
+ *color = style->i.color;
return bits;
}
@@ -824,12 +824,12 @@ static inline uint8_t get_list_style_image(
const css_computed_style *style,
lwc_string **url)
{
- uint8_t bits = style->bits[LIST_STYLE_IMAGE_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_IMAGE_INDEX];
bits &= LIST_STYLE_IMAGE_MASK;
bits >>= LIST_STYLE_IMAGE_SHIFT;
/* 1bit: type */
- *url = style->list_style_image;
+ *url = style->i.list_style_image;
return bits;
}
@@ -844,7 +844,7 @@ static inline uint8_t get_quotes(
const css_computed_style *style,
lwc_string ***quotes)
{
- uint8_t bits = style->bits[QUOTES_INDEX];
+ uint8_t bits = style->i.bits[QUOTES_INDEX];
bits &= QUOTES_MASK;
bits >>= QUOTES_SHIFT;
@@ -864,13 +864,13 @@ static inline uint8_t get_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[TOP_INDEX];
+ uint8_t bits = style->i.bits[TOP_INDEX];
bits &= TOP_MASK;
bits >>= TOP_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_TOP_SET) {
- *length = style->top;
+ *length = style->i.top;
*unit = bits >> 2;
}
@@ -879,7 +879,7 @@ static inline uint8_t get_top(
static inline uint8_t get_top_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TOP_INDEX];
+ uint8_t bits = style->i.bits[TOP_INDEX];
bits &= TOP_MASK;
bits >>= TOP_SHIFT;
@@ -897,13 +897,13 @@ static inline uint8_t get_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[RIGHT_INDEX];
+ uint8_t bits = style->i.bits[RIGHT_INDEX];
bits &= RIGHT_MASK;
bits >>= RIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_RIGHT_SET) {
- *length = style->right;
+ *length = style->i.right;
*unit = bits >> 2;
}
@@ -912,7 +912,7 @@ static inline uint8_t get_right(
static inline uint8_t get_right_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[RIGHT_INDEX];
+ uint8_t bits = style->i.bits[RIGHT_INDEX];
bits &= RIGHT_MASK;
bits >>= RIGHT_SHIFT;
@@ -930,13 +930,13 @@ static inline uint8_t get_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[BOTTOM_INDEX];
bits &= BOTTOM_MASK;
bits >>= BOTTOM_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_BOTTOM_SET) {
- *length = style->bottom;
+ *length = style->i.bottom;
*unit = bits >> 2;
}
@@ -945,7 +945,7 @@ static inline uint8_t get_bottom(
static inline uint8_t get_bottom_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[BOTTOM_INDEX];
bits &= BOTTOM_MASK;
bits >>= BOTTOM_SHIFT;
@@ -963,13 +963,13 @@ static inline uint8_t get_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[LEFT_INDEX];
+ uint8_t bits = style->i.bits[LEFT_INDEX];
bits &= LEFT_MASK;
bits >>= LEFT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_LEFT_SET) {
- *length = style->left;
+ *length = style->i.left;
*unit = bits >> 2;
}
@@ -978,7 +978,7 @@ static inline uint8_t get_left(
static inline uint8_t get_left_bits(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LEFT_INDEX];
+ uint8_t bits = style->i.bits[LEFT_INDEX];
bits &= LEFT_MASK;
bits >>= LEFT_SHIFT;
@@ -996,12 +996,12 @@ static inline uint8_t get_border_top_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_TOP_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_COLOR_INDEX];
bits &= BORDER_TOP_COLOR_MASK;
bits >>= BORDER_TOP_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[0];
+ *color = style->i.border_color[0];
return bits;
}
@@ -1016,12 +1016,12 @@ static inline uint8_t get_border_right_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_RIGHT_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_COLOR_INDEX];
bits &= BORDER_RIGHT_COLOR_MASK;
bits >>= BORDER_RIGHT_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[1];
+ *color = style->i.border_color[1];
return bits;
}
@@ -1036,12 +1036,12 @@ static inline uint8_t get_border_bottom_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
bits &= BORDER_BOTTOM_COLOR_MASK;
bits >>= BORDER_BOTTOM_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[2];
+ *color = style->i.border_color[2];
return bits;
}
@@ -1056,12 +1056,12 @@ static inline uint8_t get_border_left_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BORDER_LEFT_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_COLOR_INDEX];
bits &= BORDER_LEFT_COLOR_MASK;
bits >>= BORDER_LEFT_COLOR_SHIFT;
/* 2bits: type */
- *color = style->border_color[3];
+ *color = style->i.border_color[3];
return bits;
}
@@ -1076,13 +1076,13 @@ static inline uint8_t get_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[HEIGHT_INDEX];
bits &= HEIGHT_MASK;
bits >>= HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_HEIGHT_SET) {
- *length = style->height;
+ *length = style->i.height;
*unit = bits >> 2;
}
@@ -1099,14 +1099,14 @@ static inline uint8_t get_line_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[LINE_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[LINE_HEIGHT_INDEX];
bits &= LINE_HEIGHT_MASK;
bits >>= LINE_HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_LINE_HEIGHT_NUMBER ||
(bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
- *length = style->line_height;
+ *length = style->i.line_height;
}
if ((bits & 0x3) == CSS_LINE_HEIGHT_DIMENSION) {
@@ -1126,12 +1126,12 @@ static inline uint8_t get_background_color(
const css_computed_style *style,
css_color *color)
{
- uint8_t bits = style->bits[BACKGROUND_COLOR_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_COLOR_INDEX];
bits &= BACKGROUND_COLOR_MASK;
bits >>= BACKGROUND_COLOR_SHIFT;
/* 2bits: type */
- *color = style->background_color;
+ *color = style->i.background_color;
return bits;
}
@@ -1146,12 +1146,12 @@ static inline uint8_t get_z_index(
const css_computed_style *style,
int32_t *z_index)
{
- uint8_t bits = style->bits[Z_INDEX_INDEX];
+ uint8_t bits = style->i.bits[Z_INDEX_INDEX];
bits &= Z_INDEX_MASK;
bits >>= Z_INDEX_SHIFT;
/* 2bits: type */
- *z_index = style->z_index;
+ *z_index = style->i.z_index;
return bits;
}
@@ -1166,13 +1166,13 @@ static inline uint8_t get_margin_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_TOP_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_TOP_INDEX];
bits &= MARGIN_TOP_MASK;
bits >>= MARGIN_TOP_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[0];
+ *length = style->i.margin[0];
*unit = bits >> 2;
}
@@ -1189,13 +1189,13 @@ static inline uint8_t get_margin_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_RIGHT_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_RIGHT_INDEX];
bits &= MARGIN_RIGHT_MASK;
bits >>= MARGIN_RIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[1];
+ *length = style->i.margin[1];
*unit = bits >> 2;
}
@@ -1212,13 +1212,13 @@ static inline uint8_t get_margin_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_BOTTOM_INDEX];
bits &= MARGIN_BOTTOM_MASK;
bits >>= MARGIN_BOTTOM_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[2];
+ *length = style->i.margin[2];
*unit = bits >> 2;
}
@@ -1235,13 +1235,13 @@ static inline uint8_t get_margin_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MARGIN_LEFT_INDEX];
+ uint8_t bits = style->i.bits[MARGIN_LEFT_INDEX];
bits &= MARGIN_LEFT_MASK;
bits >>= MARGIN_LEFT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MARGIN_SET) {
- *length = style->margin[3];
+ *length = style->i.margin[3];
*unit = bits >> 2;
}
@@ -1257,7 +1257,7 @@ static inline uint8_t get_margin_left(
static inline uint8_t get_background_attachment(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BACKGROUND_ATTACHMENT_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
bits &= BACKGROUND_ATTACHMENT_MASK;
bits >>= BACKGROUND_ATTACHMENT_SHIFT;
@@ -1274,7 +1274,7 @@ static inline uint8_t get_background_attachment(
static inline uint8_t get_border_collapse(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_COLLAPSE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_COLLAPSE_INDEX];
bits &= BORDER_COLLAPSE_MASK;
bits >>= BORDER_COLLAPSE_SHIFT;
@@ -1291,7 +1291,7 @@ static inline uint8_t get_border_collapse(
static inline uint8_t get_caption_side(
const css_computed_style *style)
{
- uint8_t bits = style->bits[CAPTION_SIDE_INDEX];
+ uint8_t bits = style->i.bits[CAPTION_SIDE_INDEX];
bits &= CAPTION_SIDE_MASK;
bits >>= CAPTION_SIDE_SHIFT;
@@ -1308,7 +1308,7 @@ static inline uint8_t get_caption_side(
static inline uint8_t get_direction(
const css_computed_style *style)
{
- uint8_t bits = style->bits[DIRECTION_INDEX];
+ uint8_t bits = style->i.bits[DIRECTION_INDEX];
bits &= DIRECTION_MASK;
bits >>= DIRECTION_SHIFT;
@@ -1326,13 +1326,13 @@ static inline uint8_t get_max_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MAX_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[MAX_HEIGHT_INDEX];
bits &= MAX_HEIGHT_MASK;
bits >>= MAX_HEIGHT_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MAX_HEIGHT_SET) {
- *length = style->max_height;
+ *length = style->i.max_height;
*unit = bits >> 2;
}
@@ -1349,13 +1349,13 @@ static inline uint8_t get_max_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MAX_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[MAX_WIDTH_INDEX];
bits &= MAX_WIDTH_MASK;
bits >>= MAX_WIDTH_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_MAX_WIDTH_SET) {
- *length = style->max_width;
+ *length = style->i.max_width;
*unit = bits >> 2;
}
@@ -1372,13 +1372,13 @@ static inline uint8_t get_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[WIDTH_INDEX];
+ uint8_t bits = style->i.bits[WIDTH_INDEX];
bits &= WIDTH_MASK;
bits >>= WIDTH_SHIFT;
/* 6bits: uuuutt : units | type */
if ((bits & 0x3) == CSS_WIDTH_SET) {
- *length = style->width;
+ *length = style->i.width;
*unit = bits >> 2;
}
@@ -1394,7 +1394,7 @@ static inline uint8_t get_width(
static inline uint8_t get_empty_cells(
const css_computed_style *style)
{
- uint8_t bits = style->bits[EMPTY_CELLS_INDEX];
+ uint8_t bits = style->i.bits[EMPTY_CELLS_INDEX];
bits &= EMPTY_CELLS_MASK;
bits >>= EMPTY_CELLS_SHIFT;
@@ -1411,7 +1411,7 @@ static inline uint8_t get_empty_cells(
static inline uint8_t get_float(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FLOAT_INDEX];
+ uint8_t bits = style->i.bits[FLOAT_INDEX];
bits &= FLOAT_MASK;
bits >>= FLOAT_SHIFT;
@@ -1428,7 +1428,7 @@ static inline uint8_t get_float(
static inline uint8_t get_font_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[FONT_STYLE_INDEX];
bits &= FONT_STYLE_MASK;
bits >>= FONT_STYLE_SHIFT;
@@ -1446,13 +1446,13 @@ static inline uint8_t get_min_height(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MIN_HEIGHT_INDEX];
+ uint8_t bits = style->i.bits[MIN_HEIGHT_INDEX];
bits &= MIN_HEIGHT_MASK;
bits >>= MIN_HEIGHT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_MIN_HEIGHT_SET) {
- *length = style->min_height;
+ *length = style->i.min_height;
*unit = bits >> 1;
}
@@ -1469,13 +1469,13 @@ static inline uint8_t get_min_width(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[MIN_WIDTH_INDEX];
+ uint8_t bits = style->i.bits[MIN_WIDTH_INDEX];
bits &= MIN_WIDTH_MASK;
bits >>= MIN_WIDTH_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_MIN_WIDTH_SET) {
- *length = style->min_width;
+ *length = style->i.min_width;
*unit = bits >> 1;
}
@@ -1491,7 +1491,7 @@ static inline uint8_t get_min_width(
static inline uint8_t get_background_repeat(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BACKGROUND_REPEAT_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_REPEAT_INDEX];
bits &= BACKGROUND_REPEAT_MASK;
bits >>= BACKGROUND_REPEAT_SHIFT;
@@ -1508,7 +1508,7 @@ static inline uint8_t get_background_repeat(
static inline uint8_t get_clear(
const css_computed_style *style)
{
- uint8_t bits = style->bits[CLEAR_INDEX];
+ uint8_t bits = style->i.bits[CLEAR_INDEX];
bits &= CLEAR_MASK;
bits >>= CLEAR_SHIFT;
@@ -1526,13 +1526,13 @@ static inline uint8_t get_padding_top(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_TOP_INDEX];
+ uint8_t bits = style->i.bits[PADDING_TOP_INDEX];
bits &= PADDING_TOP_MASK;
bits >>= PADDING_TOP_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[0];
+ *length = style->i.padding[0];
*unit = bits >> 1;
}
@@ -1549,13 +1549,13 @@ static inline uint8_t get_padding_right(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_RIGHT_INDEX];
+ uint8_t bits = style->i.bits[PADDING_RIGHT_INDEX];
bits &= PADDING_RIGHT_MASK;
bits >>= PADDING_RIGHT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[1];
+ *length = style->i.padding[1];
*unit = bits >> 1;
}
@@ -1572,13 +1572,13 @@ static inline uint8_t get_padding_bottom(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_BOTTOM_INDEX];
+ uint8_t bits = style->i.bits[PADDING_BOTTOM_INDEX];
bits &= PADDING_BOTTOM_MASK;
bits >>= PADDING_BOTTOM_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[2];
+ *length = style->i.padding[2];
*unit = bits >> 1;
}
@@ -1595,13 +1595,13 @@ static inline uint8_t get_padding_left(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[PADDING_LEFT_INDEX];
+ uint8_t bits = style->i.bits[PADDING_LEFT_INDEX];
bits &= PADDING_LEFT_MASK;
bits >>= PADDING_LEFT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_PADDING_SET) {
- *length = style->padding[3];
+ *length = style->i.padding[3];
*unit = bits >> 1;
}
@@ -1617,7 +1617,7 @@ static inline uint8_t get_padding_left(
static inline uint8_t get_overflow_x(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OVERFLOW_X_INDEX];
+ uint8_t bits = style->i.bits[OVERFLOW_X_INDEX];
bits &= OVERFLOW_X_MASK;
bits >>= OVERFLOW_X_SHIFT;
@@ -1634,7 +1634,7 @@ static inline uint8_t get_overflow_x(
static inline uint8_t get_overflow_y(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OVERFLOW_Y_INDEX];
+ uint8_t bits = style->i.bits[OVERFLOW_Y_INDEX];
bits &= OVERFLOW_Y_MASK;
bits >>= OVERFLOW_Y_SHIFT;
@@ -1651,7 +1651,7 @@ static inline uint8_t get_overflow_y(
static inline uint8_t get_position(
const css_computed_style *style)
{
- uint8_t bits = style->bits[POSITION_INDEX];
+ uint8_t bits = style->i.bits[POSITION_INDEX];
bits &= POSITION_MASK;
bits >>= POSITION_SHIFT;
@@ -1669,13 +1669,13 @@ static inline uint8_t get_opacity(
const css_computed_style *style,
css_fixed *opacity)
{
- uint8_t bits = style->bits[OPACITY_INDEX];
+ uint8_t bits = style->i.bits[OPACITY_INDEX];
bits &= OPACITY_MASK;
bits >>= OPACITY_SHIFT;
/* 1bit: t : type */
if ((bits & 0x1) == CSS_OPACITY_SET) {
- *opacity = style->opacity;
+ *opacity = style->i.opacity;
}
return (bits & 0x1);
@@ -1690,7 +1690,7 @@ static inline uint8_t get_opacity(
static inline uint8_t get_text_transform(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_TRANSFORM_INDEX];
+ uint8_t bits = style->i.bits[TEXT_TRANSFORM_INDEX];
bits &= TEXT_TRANSFORM_MASK;
bits >>= TEXT_TRANSFORM_SHIFT;
@@ -1708,13 +1708,13 @@ static inline uint8_t get_text_indent(
const css_computed_style *style,
css_fixed *length, css_unit *unit)
{
- uint8_t bits = style->bits[TEXT_INDENT_INDEX];
+ uint8_t bits = style->i.bits[TEXT_INDENT_INDEX];
bits &= TEXT_INDENT_MASK;
bits >>= TEXT_INDENT_SHIFT;
/* 5bits: uuuut : units | type */
if ((bits & 0x1) == CSS_TEXT_INDENT_SET) {
- *length = style->text_indent;
+ *length = style->i.text_indent;
*unit = bits >> 1;
}
@@ -1730,7 +1730,7 @@ static inline uint8_t get_text_indent(
static inline uint8_t get_white_space(
const css_computed_style *style)
{
- uint8_t bits = style->bits[WHITE_SPACE_INDEX];
+ uint8_t bits = style->i.bits[WHITE_SPACE_INDEX];
bits &= WHITE_SPACE_MASK;
bits >>= WHITE_SPACE_SHIFT;
@@ -1752,21 +1752,21 @@ static inline uint8_t get_background_position(
css_fixed *hlength, css_unit *hunit,
css_fixed *vlength, css_unit *vunit)
{
- uint8_t bits = style->bits[BACKGROUND_POSITION_INDEX];
+ uint8_t bits = style->i.bits[BACKGROUND_POSITION_INDEX];
bits &= BACKGROUND_POSITION_MASK;
bits >>= BACKGROUND_POSITION_SHIFT;
/* 1bit: type */
if (bits == CSS_BACKGROUND_POSITION_SET) {
- uint8_t bits1 = style->bits[BACKGROUND_POSITION_INDEX1];
+ uint8_t bits1 = style->i.bits[BACKGROUND_POSITION_INDEX1];
bits1 &= BACKGROUND_POSITION_MASK1;
bits1 >>= BACKGROUND_POSITION_SHIFT1;
/* 8bits: hhhhvvvv : hunit | vunit */
- *hlength = style->background_position[0];
+ *hlength = style->i.background_position[0];
*hunit = bits1 >> 4;
- *vlength = style->background_position[1];
+ *vlength = style->i.background_position[1];
*vunit = bits1 & 0xf;
}
@@ -1785,7 +1785,7 @@ static inline uint8_t get_background_position(
static inline uint8_t get_display(
const css_computed_style *style)
{
- uint8_t bits = style->bits[DISPLAY_INDEX];
+ uint8_t bits = style->i.bits[DISPLAY_INDEX];
bits &= DISPLAY_MASK;
bits >>= DISPLAY_SHIFT;
@@ -1802,7 +1802,7 @@ static inline uint8_t get_display(
static inline uint8_t get_font_variant(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_VARIANT_INDEX];
+ uint8_t bits = style->i.bits[FONT_VARIANT_INDEX];
bits &= FONT_VARIANT_MASK;
bits >>= FONT_VARIANT_SHIFT;
@@ -1819,7 +1819,7 @@ static inline uint8_t get_font_variant(
static inline uint8_t get_text_decoration(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_DECORATION_INDEX];
+ uint8_t bits = style->i.bits[TEXT_DECORATION_INDEX];
bits &= TEXT_DECORATION_MASK;
bits >>= TEXT_DECORATION_SHIFT;
@@ -1837,7 +1837,7 @@ static inline uint8_t get_font_family(
const css_computed_style *style,
lwc_string ***names)
{
- uint8_t bits = style->bits[FONT_FAMILY_INDEX];
+ uint8_t bits = style->i.bits[FONT_FAMILY_INDEX];
bits &= FONT_FAMILY_MASK;
bits >>= FONT_FAMILY_SHIFT;
@@ -1856,7 +1856,7 @@ static inline uint8_t get_font_family(
static inline uint8_t get_border_top_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_TOP_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_TOP_STYLE_INDEX];
bits &= BORDER_TOP_STYLE_MASK;
bits >>= BORDER_TOP_STYLE_SHIFT;
@@ -1873,7 +1873,7 @@ static inline uint8_t get_border_top_style(
static inline uint8_t get_border_right_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_RIGHT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_RIGHT_STYLE_INDEX];
bits &= BORDER_RIGHT_STYLE_MASK;
bits >>= BORDER_RIGHT_STYLE_SHIFT;
@@ -1890,7 +1890,7 @@ static inline uint8_t get_border_right_style(
static inline uint8_t get_border_bottom_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_BOTTOM_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
bits &= BORDER_BOTTOM_STYLE_MASK;
bits >>= BORDER_BOTTOM_STYLE_SHIFT;
@@ -1907,7 +1907,7 @@ static inline uint8_t get_border_bottom_style(
static inline uint8_t get_border_left_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[BORDER_LEFT_STYLE_INDEX];
+ uint8_t bits = style->i.bits[BORDER_LEFT_STYLE_INDEX];
bits &= BORDER_LEFT_STYLE_MASK;
bits >>= BORDER_LEFT_STYLE_SHIFT;
@@ -1924,7 +1924,7 @@ static inline uint8_t get_border_left_style(
static inline uint8_t get_font_weight(
const css_computed_style *style)
{
- uint8_t bits = style->bits[FONT_WEIGHT_INDEX];
+ uint8_t bits = style->i.bits[FONT_WEIGHT_INDEX];
bits &= FONT_WEIGHT_MASK;
bits >>= FONT_WEIGHT_SHIFT;
@@ -1941,7 +1941,7 @@ static inline uint8_t get_font_weight(
static inline uint8_t get_list_style_type(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LIST_STYLE_TYPE_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_TYPE_INDEX];
bits &= LIST_STYLE_TYPE_MASK;
bits >>= LIST_STYLE_TYPE_SHIFT;
@@ -1958,7 +1958,7 @@ static inline uint8_t get_list_style_type(
static inline uint8_t get_outline_style(
const css_computed_style *style)
{
- uint8_t bits = style->bits[OUTLINE_STYLE_INDEX];
+ uint8_t bits = style->i.bits[OUTLINE_STYLE_INDEX];
bits &= OUTLINE_STYLE_MASK;
bits >>= OUTLINE_STYLE_SHIFT;
@@ -1975,7 +1975,7 @@ static inline uint8_t get_outline_style(
static inline uint8_t get_table_layout(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TABLE_LAYOUT_INDEX];
+ uint8_t bits = style->i.bits[TABLE_LAYOUT_INDEX];
bits &= TABLE_LAYOUT_MASK;
bits >>= TABLE_LAYOUT_SHIFT;
@@ -1992,7 +1992,7 @@ static inline uint8_t get_table_layout(
static inline uint8_t get_unicode_bidi(
const css_computed_style *style)
{
- uint8_t bits = style->bits[UNICODE_BIDI_INDEX];
+ uint8_t bits = style->i.bits[UNICODE_BIDI_INDEX];
bits &= UNICODE_BIDI_MASK;
bits >>= UNICODE_BIDI_SHIFT;
@@ -2009,7 +2009,7 @@ static inline uint8_t get_unicode_bidi(
static inline uint8_t get_visibility(
const css_computed_style *style)
{
- uint8_t bits = style->bits[VISIBILITY_INDEX];
+ uint8_t bits = style->i.bits[VISIBILITY_INDEX];
bits &= VISIBILITY_MASK;
bits >>= VISIBILITY_SHIFT;
@@ -2026,7 +2026,7 @@ static inline uint8_t get_visibility(
static inline uint8_t get_list_style_position(
const css_computed_style *style)
{
- uint8_t bits = style->bits[LIST_STYLE_POSITION_INDEX];
+ uint8_t bits = style->i.bits[LIST_STYLE_POSITION_INDEX];
bits &= LIST_STYLE_POSITION_MASK;
bits >>= LIST_STYLE_POSITION_SHIFT;
@@ -2043,7 +2043,7 @@ static inline uint8_t get_list_style_position(
static inline uint8_t get_text_align(
const css_computed_style *style)
{
- uint8_t bits = style->bits[TEXT_ALIGN_INDEX];
+ uint8_t bits = style->i.bits[TEXT_ALIGN_INDEX];
bits &= TEXT_ALIGN_MASK;
bits >>= TEXT_ALIGN_SHIFT;
diff --git a/src/select/propset.h b/src/select/propset.h
index 928b9e3..76e4fe6 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -19,54 +19,60 @@
/** Default values are 'initial value', unless the property is inherited,
* in which case it is 'inherit'. */
static const css_computed_uncommon default_uncommon = {
- .bits = {
- (CSS_LETTER_SPACING_INHERIT << 2) |
- CSS_OUTLINE_COLOR_INVERT,
- (CSS_OUTLINE_WIDTH_MEDIUM << 1) |
- CSS_BORDER_SPACING_INHERIT,
- 0,
- (CSS_WORD_SPACING_INHERIT << 2) |
- (CSS_COUNTER_INCREMENT_NONE << 1) |
- CSS_COUNTER_RESET_NONE,
- (CSS_CURSOR_INHERIT << 3) |
- (CSS_WRITING_MODE_INHERIT << 1),
- 0,
- 0,
- (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL,
- (CSS_COLUMN_COUNT_AUTO << 6) |
- (CSS_COLUMN_FILL_BALANCE << 4) |
- (CSS_COLUMN_RULE_STYLE_NONE << 0),
- (CSS_COLUMN_GAP_NORMAL << 2) |
- (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
- (CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
- (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
- (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
- (CSS_BREAK_INSIDE_AUTO)
+ .i = {
+ .bits = {
+ (CSS_LETTER_SPACING_INHERIT << 2) |
+ CSS_OUTLINE_COLOR_INVERT,
+ (CSS_OUTLINE_WIDTH_MEDIUM << 1) |
+ CSS_BORDER_SPACING_INHERIT,
+ 0,
+ (CSS_WORD_SPACING_INHERIT << 2) |
+ (CSS_COUNTER_INCREMENT_NONE << 1) |
+ CSS_COUNTER_RESET_NONE,
+ (CSS_CURSOR_INHERIT << 3) |
+ (CSS_WRITING_MODE_INHERIT << 1),
+ 0,
+ 0,
+ (CSS_CLIP_AUTO << 2) | CSS_CONTENT_NORMAL,
+ (CSS_COLUMN_COUNT_AUTO << 6) |
+ (CSS_COLUMN_FILL_BALANCE << 4) |
+ (CSS_COLUMN_RULE_STYLE_NONE << 0),
+ (CSS_COLUMN_GAP_NORMAL << 2) |
+ (CSS_COLUMN_RULE_COLOR_CURRENT_COLOR),
+ (CSS_COLUMN_RULE_WIDTH_MEDIUM << 1),
+ (CSS_COLUMN_SPAN_NONE << 6) | CSS_COLUMN_WIDTH_AUTO,
+ (CSS_BREAK_BEFORE_AUTO << 4) | CSS_BREAK_AFTER_AUTO,
+ (CSS_BREAK_INSIDE_AUTO)
+ },
+ .border_spacing = { 0, 0 },
+ .clip = { 0, 0, 0, 0 },
+ .letter_spacing = 0,
+ .outline_color = 0x0,
+ .outline_width = 0,
+ .word_spacing = 0,
+ .column_count = 0,
+ .column_gap = 0,
+ .column_rule_color = 0,
+ .column_rule_width = 0,
+ .column_width = 0
},
- .border_spacing = { 0, 0 },
- .clip = { 0, 0, 0, 0 },
- .letter_spacing = 0,
- .outline_color = 0x0,
- .outline_width = 0,
- .word_spacing = 0,
- .column_count = 0,
- .column_gap = 0,
- .column_rule_color = 0,
- .column_rule_width = 0,
- .column_width = 0,
.counter_increment = NULL,
.counter_reset = NULL,
.content = NULL,
- .cursor = NULL
+ .cursor = NULL,
+ .next = NULL,
+ .count = 0,
+ .bin = UINT32_MAX
};
#define ENSURE_UNCOMMON do { \
- if (style->uncommon == NULL) { \
- style->uncommon = malloc(sizeof(css_computed_uncommon));\
- if (style->uncommon == NULL) \
+ if (style->i.uncommon == NULL) { \
+ style->i.uncommon = malloc( \
+ sizeof(css_computed_uncommon)); \
+ if (style->i.uncommon == NULL) \
return CSS_NOMEM; \
\
- memcpy(style->uncommon, &default_uncommon, \
+ memcpy(style->i.uncommon, &default_uncommon, \
sizeof(css_computed_uncommon)); \
} \
} while(0)
@@ -105,13 +111,13 @@ static inline css_error set_letter_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[LETTER_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[LETTER_SPACING_INDEX];
/* 6bits: uuuutt : unit | type */
*bits = (*bits & ~LETTER_SPACING_MASK) |
(((type & 0x3) | unit << 2) << LETTER_SPACING_SHIFT);
- style->uncommon->letter_spacing = length;
+ style->i.uncommon->i.letter_spacing = length;
return CSS_OK;
}
@@ -129,13 +135,13 @@ static inline css_error set_outline_color(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[OUTLINE_COLOR_INDEX];
+ bits = &style->i.uncommon->i.bits[OUTLINE_COLOR_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~OUTLINE_COLOR_MASK) |
((type & 0x3) << OUTLINE_COLOR_SHIFT);
- style->uncommon->outline_color = color;
+ style->i.uncommon->i.outline_color = color;
return CSS_OK;
}
@@ -154,13 +160,13 @@ static inline css_error set_outline_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[OUTLINE_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[OUTLINE_WIDTH_INDEX];
/* 7bits: uuuuttt : unit | type */
*bits = (*bits & ~OUTLINE_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << OUTLINE_WIDTH_SHIFT);
- style->uncommon->outline_width = length;
+ style->i.uncommon->i.outline_width = length;
return CSS_OK;
}
@@ -182,20 +188,20 @@ static inline css_error set_border_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BORDER_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[BORDER_SPACING_INDEX];
/* 1 bit: type */
*bits = (*bits & ~BORDER_SPACING_MASK) |
((type & 0x1) << BORDER_SPACING_SHIFT);
- bits = &style->uncommon->bits[BORDER_SPACING_INDEX1];
+ bits = &style->i.uncommon->i.bits[BORDER_SPACING_INDEX1];
/* 8bits: hhhhvvvv : hunit | vunit */
*bits = (((hunit << 4) | vunit) << BORDER_SPACING_SHIFT1);
- style->uncommon->border_spacing[0] = hlength;
- style->uncommon->border_spacing[1] = vlength;
+ style->i.uncommon->i.border_spacing[0] = hlength;
+ style->i.uncommon->i.border_spacing[1] = vlength;
return CSS_OK;
}
@@ -215,7 +221,7 @@ static inline css_error set_break_after(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_AFTER_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_AFTER_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_AFTER_MASK) |
@@ -237,7 +243,7 @@ static inline css_error set_break_before(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_BEFORE_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_BEFORE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_BEFORE_MASK) |
@@ -259,7 +265,7 @@ static inline css_error set_break_inside(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[BREAK_INSIDE_INDEX];
+ bits = &style->i.uncommon->i.bits[BREAK_INSIDE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BREAK_INSIDE_MASK) |
@@ -282,13 +288,13 @@ static inline css_error set_word_spacing(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[WORD_SPACING_INDEX];
+ bits = &style->i.uncommon->i.bits[WORD_SPACING_INDEX];
/* 6bits: uuuutt : unit | type */
*bits = (*bits & ~WORD_SPACING_MASK) |
(((type & 0x3) | (unit << 2)) << WORD_SPACING_SHIFT);
- style->uncommon->word_spacing = length;
+ style->i.uncommon->i.word_spacing = length;
return CSS_OK;
}
@@ -306,7 +312,7 @@ static inline css_error set_writing_mode(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[WRITING_MODE_INDEX];
+ bits = &style->i.uncommon->i.bits[WRITING_MODE_INDEX];
/* 2bits: type */
*bits = (*bits & ~WRITING_MODE_MASK) |
@@ -331,8 +337,8 @@ static inline css_error set_counter_increment(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COUNTER_INCREMENT_INDEX];
- oldcounters = style->uncommon->counter_increment;
+ bits = &style->i.uncommon->i.bits[COUNTER_INCREMENT_INDEX];
+ oldcounters = style->i.uncommon->counter_increment;
/* 1bit: type */
*bits = (*bits & ~COUNTER_INCREMENT_MASK) |
@@ -341,7 +347,7 @@ static inline css_error set_counter_increment(
for (c = counters; c != NULL && c->name != NULL; c++)
c->name = lwc_string_ref(c->name);
- style->uncommon->counter_increment = counters;
+ style->i.uncommon->counter_increment = counters;
/* Free existing array */
if (oldcounters != NULL) {
@@ -371,8 +377,8 @@ static inline css_error set_counter_reset(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COUNTER_RESET_INDEX];
- oldcounters = style->uncommon->counter_reset;
+ bits = &style->i.uncommon->i.bits[COUNTER_RESET_INDEX];
+ oldcounters = style->i.uncommon->counter_reset;
/* 1bit: type */
*bits = (*bits & ~COUNTER_RESET_MASK) |
@@ -381,7 +387,7 @@ static inline css_error set_counter_reset(
for (c = counters; c != NULL && c->name != NULL; c++)
c->name = lwc_string_ref(c->name);
- style->uncommon->counter_reset = counters;
+ style->i.uncommon->counter_reset = counters;
/* Free existing array */
if (oldcounters != NULL) {
@@ -411,8 +417,8 @@ static inline css_error set_cursor(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[CURSOR_INDEX];
- oldurls = style->uncommon->cursor;
+ bits = &style->i.uncommon->i.bits[CURSOR_INDEX];
+ oldurls = style->i.uncommon->cursor;
/* 5bits: type */
*bits = (*bits & ~CURSOR_MASK) |
@@ -421,7 +427,7 @@ static inline css_error set_cursor(
for (s = urls; s != NULL && *s != NULL; s++)
*s = lwc_string_ref(*s);
- style->uncommon->cursor = urls;
+ style->i.uncommon->cursor = urls;
/* Free existing array */
if (oldurls != NULL) {
@@ -453,7 +459,7 @@ static inline css_error set_clip(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[CLIP_INDEX];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX];
/* 6bits: trblyy : top | right | bottom | left | type */
*bits = (*bits & ~CLIP_MASK) |
@@ -465,20 +471,20 @@ static inline css_error set_clip(
(rect->bottom_auto ? 0x8 : 0) |
(rect->left_auto ? 0x4 : 0)) << CLIP_SHIFT);
- bits = &style->uncommon->bits[CLIP_INDEX1];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX1];
/* 8bits: ttttrrrr : top | right */
*bits = (((rect->tunit << 4) | rect->runit) << CLIP_SHIFT1);
- bits = &style->uncommon->bits[CLIP_INDEX2];
+ bits = &style->i.uncommon->i.bits[CLIP_INDEX2];
/* 8bits: bbbbllll : bottom | left */
*bits = (((rect->bunit << 4) | rect->lunit) << CLIP_SHIFT2);
- style->uncommon->clip[0] = rect->top;
- style->uncommon->clip[1] = rect->right;
- style->uncommon->clip[2] = rect->bottom;
- style->uncommon->clip[3] = rect->left;
+ style->i.uncommon->i.clip[0] = rect->top;
+ style->i.uncommon->i.clip[1] = rect->right;
+ style->i.uncommon->i.clip[2] = rect->bottom;
+ style->i.uncommon->i.clip[3] = rect->left;
}
return CSS_OK;
@@ -501,13 +507,13 @@ static inline css_error set_column_count(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_COUNT_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_COUNT_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_COUNT_MASK) |
((type & 0x3) << COLUMN_COUNT_SHIFT);
- style->uncommon->column_count = count;
+ style->i.uncommon->i.column_count = count;
return CSS_OK;
}
@@ -525,7 +531,7 @@ static inline css_error set_column_fill(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_FILL_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_FILL_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_FILL_MASK) |
@@ -548,13 +554,13 @@ static inline css_error set_column_gap(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_GAP_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_GAP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~COLUMN_GAP_MASK) |
(((type & 0x3) | (unit << 2)) << COLUMN_GAP_SHIFT);
- style->uncommon->column_gap = length;
+ style->i.uncommon->i.column_gap = length;
return CSS_OK;
}
@@ -573,13 +579,13 @@ static inline css_error set_column_rule_color(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_COLOR_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~COLUMN_RULE_COLOR_MASK) |
((type & 0x3) << COLUMN_RULE_COLOR_SHIFT);
- style->uncommon->column_rule_color = color;
+ style->i.uncommon->i.column_rule_color = color;
return CSS_OK;
}
@@ -597,7 +603,7 @@ static inline css_error set_column_rule_style(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_STYLE_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~COLUMN_RULE_STYLE_MASK) |
@@ -620,13 +626,13 @@ static inline css_error set_column_rule_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_RULE_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_RULE_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~COLUMN_RULE_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << COLUMN_RULE_WIDTH_SHIFT);
- style->uncommon->column_rule_width = length;
+ style->i.uncommon->i.column_rule_width = length;
return CSS_OK;
}
@@ -644,7 +650,7 @@ static inline css_error set_column_span(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_SPAN_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_SPAN_INDEX];
/* 2bits: tt : type */
*bits = (*bits & ~COLUMN_SPAN_MASK) |
@@ -667,13 +673,13 @@ static inline css_error set_column_width(
ENSURE_UNCOMMON;
- bits = &style->uncommon->bits[COLUMN_WIDTH_INDEX];
+ bits = &style->i.uncommon->i.bits[COLUMN_WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~COLUMN_WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << COLUMN_WIDTH_SHIFT);
- style->uncommon->column_width = length;
+ style->i.uncommon->i.column_width = length;
return CSS_OK;
}
@@ -695,8 +701,8 @@ static inline css_error set_content(
ENSURE_UNCOMMON;
/* 2bits: type */
- bits = &style->uncommon->bits[CONTENT_INDEX];
- oldcontent = style->uncommon->content;
+ bits = &style->i.uncommon->i.bits[CONTENT_INDEX];
+ oldcontent = style->i.uncommon->content;
*bits = (*bits & ~CONTENT_MASK) |
((type & 0x3) << CONTENT_SHIFT);
@@ -728,7 +734,7 @@ static inline css_error set_content(
}
}
- style->uncommon->content = content;
+ style->i.uncommon->content = content;
/* Free existing array */
if (oldcontent != NULL) {
@@ -773,12 +779,12 @@ static inline css_error set_vertical_align(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[VERTICAL_ALIGN_INDEX];
+ uint8_t *bits = &style->i.bits[VERTICAL_ALIGN_INDEX];
/* 8bits: uuuutttt : units | type */
*bits = (((type & 0xf) | (unit << 4)) << VERTICAL_ALIGN_SHIFT);
- style->vertical_align = length;
+ style->i.vertical_align = length;
return CSS_OK;
}
@@ -791,12 +797,12 @@ static inline css_error set_font_size(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[FONT_SIZE_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_SIZE_INDEX];
/* 8bits: uuuutttt : units | type */
*bits = (((type & 0xf) | (unit << 4)) << FONT_SIZE_SHIFT);
- style->font_size = length;
+ style->i.font_size = length;
return CSS_OK;
}
@@ -810,13 +816,13 @@ static inline css_error set_border_top_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_TOP_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_TOP_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_TOP_WIDTH_SHIFT);
- style->border_width[0] = length;
+ style->i.border_width[0] = length;
return CSS_OK;
}
@@ -831,13 +837,13 @@ static inline css_error set_border_right_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_RIGHT_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_RIGHT_WIDTH_SHIFT);
- style->border_width[1] = length;
+ style->i.border_width[1] = length;
return CSS_OK;
}
@@ -852,13 +858,13 @@ static inline css_error set_border_bottom_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_BOTTOM_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_BOTTOM_WIDTH_SHIFT);
- style->border_width[2] = length;
+ style->i.border_width[2] = length;
return CSS_OK;
}
@@ -873,13 +879,13 @@ static inline css_error set_border_left_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_WIDTH_INDEX];
/* 7bits: uuuuttt : units | type */
*bits = (*bits & ~BORDER_LEFT_WIDTH_MASK) |
(((type & 0x7) | (unit << 3)) << BORDER_LEFT_WIDTH_SHIFT);
- style->border_width[3] = length;
+ style->i.border_width[3] = length;
return CSS_OK;
}
@@ -894,17 +900,17 @@ static inline css_error set_background_image(
css_computed_style *style, uint8_t type,
lwc_string *url)
{
- uint8_t *bits = &style->bits[BACKGROUND_IMAGE_INDEX];
- lwc_string *oldurl = style->background_image;
+ uint8_t *bits = &style->i.bits[BACKGROUND_IMAGE_INDEX];
+ lwc_string *oldurl = style->i.background_image;
/* 1bit: type */
*bits = (*bits & ~BACKGROUND_IMAGE_MASK) |
((type & 0x1) << BACKGROUND_IMAGE_SHIFT);
if (url != NULL) {
- style->background_image = lwc_string_ref(url);
+ style->i.background_image = lwc_string_ref(url);
} else {
- style->background_image = NULL;
+ style->i.background_image = NULL;
}
if (oldurl != NULL)
@@ -923,13 +929,13 @@ static inline css_error set_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[COLOR_INDEX];
/* 1bit: type */
*bits = (*bits & ~COLOR_MASK) |
((type & 0x1) << COLOR_SHIFT);
- style->color = color;
+ style->i.color = color;
return CSS_OK;
}
@@ -944,17 +950,17 @@ static inline css_error set_list_style_image(
css_computed_style *style, uint8_t type,
lwc_string *url)
{
- uint8_t *bits = &style->bits[LIST_STYLE_IMAGE_INDEX];
- lwc_string *oldurl = style->list_style_image;
+ uint8_t *bits = &style->i.bits[LIST_STYLE_IMAGE_INDEX];
+ lwc_string *oldurl = style->i.list_style_image;
/* 1bit: type */
*bits = (*bits & ~LIST_STYLE_IMAGE_MASK) |
((type & 0x1) << LIST_STYLE_IMAGE_SHIFT);
if (url != NULL) {
- style->list_style_image = lwc_string_ref(url);
+ style->i.list_style_image = lwc_string_ref(url);
} else {
- style->list_style_image = NULL;
+ style->i.list_style_image = NULL;
}
if (oldurl != NULL)
@@ -973,7 +979,7 @@ static inline css_error set_quotes(
css_computed_style *style, uint8_t type,
lwc_string **quotes)
{
- uint8_t *bits = &style->bits[QUOTES_INDEX];
+ uint8_t *bits = &style->i.bits[QUOTES_INDEX];
lwc_string **oldquotes = style->quotes;
lwc_string **s;
@@ -1008,13 +1014,13 @@ static inline css_error set_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[TOP_INDEX];
+ uint8_t *bits = &style->i.bits[TOP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~TOP_MASK) |
(((type & 0x3) | (unit << 2)) << TOP_SHIFT);
- style->top = length;
+ style->i.top = length;
return CSS_OK;
}
@@ -1029,13 +1035,13 @@ static inline css_error set_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[RIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~RIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << RIGHT_SHIFT);
- style->right = length;
+ style->i.right = length;
return CSS_OK;
}
@@ -1050,13 +1056,13 @@ static inline css_error set_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[BOTTOM_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~BOTTOM_MASK) |
(((type & 0x3) | (unit << 2)) << BOTTOM_SHIFT);
- style->bottom = length;
+ style->i.bottom = length;
return CSS_OK;
}
@@ -1071,13 +1077,13 @@ static inline css_error set_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[LEFT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~LEFT_MASK) |
(((type & 0x3) | (unit << 2)) << LEFT_SHIFT);
- style->left = length;
+ style->i.left = length;
return CSS_OK;
}
@@ -1092,13 +1098,13 @@ static inline css_error set_border_top_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_TOP_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_TOP_COLOR_MASK) |
((type & 0x3) << BORDER_TOP_COLOR_SHIFT);
- style->border_color[0] = color;
+ style->i.border_color[0] = color;
return CSS_OK;
}
@@ -1113,13 +1119,13 @@ static inline css_error set_border_right_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_RIGHT_COLOR_MASK) |
((type & 0x3) << BORDER_RIGHT_COLOR_SHIFT);
- style->border_color[1] = color;
+ style->i.border_color[1] = color;
return CSS_OK;
}
@@ -1134,13 +1140,13 @@ static inline css_error set_border_bottom_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_BOTTOM_COLOR_MASK) |
((type & 0x3) << BORDER_BOTTOM_COLOR_SHIFT);
- style->border_color[2] = color;
+ style->i.border_color[2] = color;
return CSS_OK;
}
@@ -1155,13 +1161,13 @@ static inline css_error set_border_left_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_LEFT_COLOR_MASK) |
((type & 0x3) << BORDER_LEFT_COLOR_SHIFT);
- style->border_color[3] = color;
+ style->i.border_color[3] = color;
return CSS_OK;
}
@@ -1176,13 +1182,13 @@ static inline css_error set_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << HEIGHT_SHIFT);
- style->height = length;
+ style->i.height = length;
return CSS_OK;
}
@@ -1197,13 +1203,13 @@ static inline css_error set_line_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[LINE_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[LINE_HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~LINE_HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << LINE_HEIGHT_SHIFT);
- style->line_height = length;
+ style->i.line_height = length;
return CSS_OK;
}
@@ -1218,13 +1224,13 @@ static inline css_error set_background_color(
css_computed_style *style, uint8_t type,
css_color color)
{
- uint8_t *bits = &style->bits[BACKGROUND_COLOR_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_COLOR_INDEX];
/* 2bits: type */
*bits = (*bits & ~BACKGROUND_COLOR_MASK) |
((type & 0x3) << BACKGROUND_COLOR_SHIFT);
- style->background_color = color;
+ style->i.background_color = color;
return CSS_OK;
}
@@ -1239,13 +1245,13 @@ static inline css_error set_z_index(
css_computed_style *style, uint8_t type,
int32_t z_index)
{
- uint8_t *bits = &style->bits[Z_INDEX_INDEX];
+ uint8_t *bits = &style->i.bits[Z_INDEX_INDEX];
/* 2bits: type */
*bits = (*bits & ~Z_INDEX_MASK) |
((type & 0x3) << Z_INDEX_SHIFT);
- style->z_index = z_index;
+ style->i.z_index = z_index;
return CSS_OK;
}
@@ -1260,13 +1266,13 @@ static inline css_error set_margin_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_TOP_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_TOP_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_TOP_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_TOP_SHIFT);
- style->margin[0] = length;
+ style->i.margin[0] = length;
return CSS_OK;
}
@@ -1281,13 +1287,13 @@ static inline css_error set_margin_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_RIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_RIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_RIGHT_SHIFT);
- style->margin[1] = length;
+ style->i.margin[1] = length;
return CSS_OK;
}
@@ -1302,13 +1308,13 @@ static inline css_error set_margin_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_BOTTOM_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_BOTTOM_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_BOTTOM_SHIFT);
- style->margin[2] = length;
+ style->i.margin[2] = length;
return CSS_OK;
}
@@ -1323,13 +1329,13 @@ static inline css_error set_margin_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MARGIN_LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[MARGIN_LEFT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MARGIN_LEFT_MASK) |
(((type & 0x3) | (unit << 2)) << MARGIN_LEFT_SHIFT);
- style->margin[3] = length;
+ style->i.margin[3] = length;
return CSS_OK;
}
@@ -1343,7 +1349,7 @@ static inline css_error set_margin_left(
static inline css_error set_background_attachment(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BACKGROUND_ATTACHMENT_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_ATTACHMENT_INDEX];
/* 2bits: type */
*bits = (*bits & ~BACKGROUND_ATTACHMENT_MASK) |
@@ -1361,7 +1367,7 @@ static inline css_error set_background_attachment(
static inline css_error set_border_collapse(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_COLLAPSE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_COLLAPSE_INDEX];
/* 2bits: type */
*bits = (*bits & ~BORDER_COLLAPSE_MASK) |
@@ -1379,7 +1385,7 @@ static inline css_error set_border_collapse(
static inline css_error set_caption_side(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[CAPTION_SIDE_INDEX];
+ uint8_t *bits = &style->i.bits[CAPTION_SIDE_INDEX];
/* 2bits: type */
*bits = (*bits & ~CAPTION_SIDE_MASK) |
@@ -1397,7 +1403,7 @@ static inline css_error set_caption_side(
static inline css_error set_direction(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[DIRECTION_INDEX];
+ uint8_t *bits = &style->i.bits[DIRECTION_INDEX];
/* 2bits: type */
*bits = (*bits & ~DIRECTION_MASK) |
@@ -1416,13 +1422,13 @@ static inline css_error set_max_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MAX_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MAX_HEIGHT_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MAX_HEIGHT_MASK) |
(((type & 0x3) | (unit << 2)) << MAX_HEIGHT_SHIFT);
- style->max_height = length;
+ style->i.max_height = length;
return CSS_OK;
}
@@ -1437,13 +1443,13 @@ static inline css_error set_max_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MAX_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[MAX_WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~MAX_WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << MAX_WIDTH_SHIFT);
- style->max_width = length;
+ style->i.max_width = length;
return CSS_OK;
}
@@ -1458,13 +1464,13 @@ static inline css_error set_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[WIDTH_INDEX];
/* 6bits: uuuutt : units | type */
*bits = (*bits & ~WIDTH_MASK) |
(((type & 0x3) | (unit << 2)) << WIDTH_SHIFT);
- style->width = length;
+ style->i.width = length;
return CSS_OK;
}
@@ -1478,7 +1484,7 @@ static inline css_error set_width(
static inline css_error set_empty_cells(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[EMPTY_CELLS_INDEX];
+ uint8_t *bits = &style->i.bits[EMPTY_CELLS_INDEX];
/* 2bits: type */
*bits = (*bits & ~EMPTY_CELLS_MASK) |
@@ -1496,7 +1502,7 @@ static inline css_error set_empty_cells(
static inline css_error set_float(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FLOAT_INDEX];
+ uint8_t *bits = &style->i.bits[FLOAT_INDEX];
/* 2bits: type */
*bits = (*bits & ~FLOAT_MASK) |
@@ -1514,7 +1520,7 @@ static inline css_error set_float(
static inline css_error set_font_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_STYLE_INDEX];
/* 2bits: type */
*bits = (*bits & ~FONT_STYLE_MASK) |
@@ -1533,13 +1539,13 @@ static inline css_error set_min_height(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MIN_HEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[MIN_HEIGHT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~MIN_HEIGHT_MASK) |
(((type & 0x1) | (unit << 1)) << MIN_HEIGHT_SHIFT);
- style->min_height = length;
+ style->i.min_height = length;
return CSS_OK;
}
@@ -1554,13 +1560,13 @@ static inline css_error set_min_width(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[MIN_WIDTH_INDEX];
+ uint8_t *bits = &style->i.bits[MIN_WIDTH_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~MIN_WIDTH_MASK) |
(((type & 0x1) | (unit << 1)) << MIN_WIDTH_SHIFT);
- style->min_width = length;
+ style->i.min_width = length;
return CSS_OK;
}
@@ -1574,7 +1580,7 @@ static inline css_error set_min_width(
static inline css_error set_background_repeat(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BACKGROUND_REPEAT_INDEX];
+ uint8_t *bits = &style->i.bits[BACKGROUND_REPEAT_INDEX];
/* 3bits: type */
*bits = (*bits & ~BACKGROUND_REPEAT_MASK) |
@@ -1592,7 +1598,7 @@ static inline css_error set_background_repeat(
static inline css_error set_clear(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[CLEAR_INDEX];
+ uint8_t *bits = &style->i.bits[CLEAR_INDEX];
/* 3bits: type */
*bits = (*bits & ~CLEAR_MASK) |
@@ -1611,13 +1617,13 @@ static inline css_error set_padding_top(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_TOP_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_TOP_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_TOP_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_TOP_SHIFT);
- style->padding[0] = length;
+ style->i.padding[0] = length;
return CSS_OK;
}
@@ -1632,13 +1638,13 @@ static inline css_error set_padding_right(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_RIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_RIGHT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_RIGHT_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_RIGHT_SHIFT);
- style->padding[1] = length;
+ style->i.padding[1] = length;
return CSS_OK;
}
@@ -1653,13 +1659,13 @@ static inline css_error set_padding_bottom(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_BOTTOM_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_BOTTOM_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_BOTTOM_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_BOTTOM_SHIFT);
- style->padding[2] = length;
+ style->i.padding[2] = length;
return CSS_OK;
}
@@ -1674,13 +1680,13 @@ static inline css_error set_padding_left(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[PADDING_LEFT_INDEX];
+ uint8_t *bits = &style->i.bits[PADDING_LEFT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~PADDING_LEFT_MASK) |
(((type & 0x1) | (unit << 1)) << PADDING_LEFT_SHIFT);
- style->padding[3] = length;
+ style->i.padding[3] = length;
return CSS_OK;
}
@@ -1694,7 +1700,7 @@ static inline css_error set_padding_left(
static inline css_error set_overflow_x(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OVERFLOW_X_INDEX];
+ uint8_t *bits = &style->i.bits[OVERFLOW_X_INDEX];
/* 3bits: type */
*bits = (*bits & ~OVERFLOW_X_MASK) |
@@ -1712,7 +1718,7 @@ static inline css_error set_overflow_x(
static inline css_error set_overflow_y(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OVERFLOW_Y_INDEX];
+ uint8_t *bits = &style->i.bits[OVERFLOW_Y_INDEX];
/* 3bits: type */
*bits = (*bits & ~OVERFLOW_Y_MASK) |
@@ -1730,7 +1736,7 @@ static inline css_error set_overflow_y(
static inline css_error set_position(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[POSITION_INDEX];
+ uint8_t *bits = &style->i.bits[POSITION_INDEX];
/* 3bits: type */
*bits = (*bits & ~POSITION_MASK) |
@@ -1749,13 +1755,13 @@ static inline css_error set_opacity(
css_computed_style *style,
uint8_t type, css_fixed opacity)
{
- uint8_t *bits = &style->bits[OPACITY_INDEX];
+ uint8_t *bits = &style->i.bits[OPACITY_INDEX];
/* 1bit: t : type */
*bits = (*bits & ~OPACITY_MASK) |
((type & 0x1) << OPACITY_SHIFT);
- style->opacity = opacity;
+ style->i.opacity = opacity;
return CSS_OK;
}
@@ -1769,7 +1775,7 @@ static inline css_error set_opacity(
static inline css_error set_text_transform(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_TRANSFORM_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_TRANSFORM_INDEX];
/* 3bits: type */
*bits = (*bits & ~TEXT_TRANSFORM_MASK) |
@@ -1788,13 +1794,13 @@ static inline css_error set_text_indent(
css_computed_style *style, uint8_t type,
css_fixed length, css_unit unit)
{
- uint8_t *bits = &style->bits[TEXT_INDENT_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_INDENT_INDEX];
/* 5bits: uuuut : units | type */
*bits = (*bits & ~TEXT_INDENT_MASK) |
(((type & 0x1) | (unit << 1)) << TEXT_INDENT_SHIFT);
- style->text_indent = length;
+ style->i.text_indent = length;
return CSS_OK;
}
@@ -1808,7 +1814,7 @@ static inline css_error set_text_indent(
static inline css_error set_white_space(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[WHITE_SPACE_INDEX];
+ uint8_t *bits = &style->i.bits[WHITE_SPACE_INDEX];
/* 3bits: type */
*bits = (*bits & ~WHITE_SPACE_MASK) |
@@ -1832,19 +1838,19 @@ static inline css_error set_background_position(
{
uint8_t *bits;
- bits = &style->bits[BACKGROUND_POSITION_INDEX];
+ bits = &style->i.bits[BACKGROUND_POSITION_INDEX];
/* 1 bit: type */
*bits = (*bits & ~BACKGROUND_POSITION_MASK) |
((type & 0x1) << BACKGROUND_POSITION_SHIFT);
- bits = &style->bits[BACKGROUND_POSITION_INDEX1];
+ bits = &style->i.bits[BACKGROUND_POSITION_INDEX1];
/* 8bits: hhhhvvvv : hunit | vunit */
*bits = (((hunit << 4) | vunit) << BACKGROUND_POSITION_SHIFT1);
- style->background_position[0] = hlength;
- style->background_position[1] = vlength;
+ style->i.background_position[0] = hlength;
+ style->i.background_position[1] = vlength;
return CSS_OK;
}
@@ -1860,7 +1866,7 @@ static inline css_error set_background_position(
static inline css_error set_display(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[DISPLAY_INDEX];
+ uint8_t *bits = &style->i.bits[DISPLAY_INDEX];
/* 5bits: type */
*bits = (*bits & ~DISPLAY_MASK) |
@@ -1878,7 +1884,7 @@ static inline css_error set_display(
static inline css_error set_font_variant(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_VARIANT_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_VARIANT_INDEX];
/* 2bits: type */
*bits = (*bits & ~FONT_VARIANT_MASK) |
@@ -1896,7 +1902,7 @@ static inline css_error set_font_variant(
static inline css_error set_text_decoration(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_DECORATION_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_DECORATION_INDEX];
/* 5bits: type */
*bits = (*bits & ~TEXT_DECORATION_MASK) |
@@ -1915,7 +1921,7 @@ static inline css_error set_font_family(
css_computed_style *style, uint8_t type,
lwc_string **names)
{
- uint8_t *bits = &style->bits[FONT_FAMILY_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_FAMILY_INDEX];
lwc_string **oldnames = style->font_family;
lwc_string **s;
@@ -1949,7 +1955,7 @@ static inline css_error set_font_family(
static inline css_error set_border_top_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_TOP_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_TOP_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_TOP_STYLE_MASK) |
@@ -1967,7 +1973,7 @@ static inline css_error set_border_top_style(
static inline css_error set_border_right_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_RIGHT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_RIGHT_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_RIGHT_STYLE_MASK) |
@@ -1985,7 +1991,7 @@ static inline css_error set_border_right_style(
static inline css_error set_border_bottom_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_BOTTOM_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_BOTTOM_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_BOTTOM_STYLE_MASK) |
@@ -2003,7 +2009,7 @@ static inline css_error set_border_bottom_style(
static inline css_error set_border_left_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[BORDER_LEFT_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[BORDER_LEFT_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~BORDER_LEFT_STYLE_MASK) |
@@ -2021,7 +2027,7 @@ static inline css_error set_border_left_style(
static inline css_error set_font_weight(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[FONT_WEIGHT_INDEX];
+ uint8_t *bits = &style->i.bits[FONT_WEIGHT_INDEX];
/* 4bits: type */
*bits = (*bits & ~FONT_WEIGHT_MASK) |
@@ -2039,7 +2045,7 @@ static inline css_error set_font_weight(
static inline css_error set_list_style_type(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[LIST_STYLE_TYPE_INDEX];
+ uint8_t *bits = &style->i.bits[LIST_STYLE_TYPE_INDEX];
/* 4bits: type */
*bits = (*bits & ~LIST_STYLE_TYPE_MASK) |
@@ -2057,7 +2063,7 @@ static inline css_error set_list_style_type(
static inline css_error set_outline_style(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[OUTLINE_STYLE_INDEX];
+ uint8_t *bits = &style->i.bits[OUTLINE_STYLE_INDEX];
/* 4bits: type */
*bits = (*bits & ~OUTLINE_STYLE_MASK) |
@@ -2075,7 +2081,7 @@ static inline css_error set_outline_style(
static inline css_error set_table_layout(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TABLE_LAYOUT_INDEX];
+ uint8_t *bits = &style->i.bits[TABLE_LAYOUT_INDEX];
/* 2bits: type */
*bits = (*bits & ~TABLE_LAYOUT_MASK) |
@@ -2093,7 +2099,7 @@ static inline css_error set_table_layout(
static inline css_error set_unicode_bidi(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[UNICODE_BIDI_INDEX];
+ uint8_t *bits = &style->i.bits[UNICODE_BIDI_INDEX];
/* 2bits: type */
*bits = (*bits & ~UNICODE_BIDI_MASK) |
@@ -2111,7 +2117,7 @@ static inline css_error set_unicode_bidi(
static inline css_error set_visibility(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[VISIBILITY_INDEX];
+ uint8_t *bits = &style->i.bits[VISIBILITY_INDEX];
/* 2bits: type */
*bits = (*bits & ~VISIBILITY_MASK) |
@@ -2129,7 +2135,7 @@ static inline css_error set_visibility(
static inline css_error set_list_style_position(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[LIST_STYLE_POSITION_INDEX];
+ uint8_t *bits = &style->i.bits[LIST_STYLE_POSITION_INDEX];
/* 2bits: type */
*bits = (*bits & ~LIST_STYLE_POSITION_MASK) |
@@ -2147,7 +2153,7 @@ static inline css_error set_list_style_position(
static inline uint8_t set_text_align(
css_computed_style *style, uint8_t type)
{
- uint8_t *bits = &style->bits[TEXT_ALIGN_INDEX];
+ uint8_t *bits = &style->i.bits[TEXT_ALIGN_INDEX];
/* 4bits: type */
*bits = (*bits & ~TEXT_ALIGN_MASK) |
diff --git a/src/select/select.c b/src/select/select.c
index 17dff31..e250657 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -1177,7 +1177,7 @@ css_error set_initial(css_select_state *state,
case GROUP_NORMAL:
break;
case GROUP_UNCOMMON:
- if (state->computed->uncommon == NULL)
+ if (state->computed->i.uncommon == NULL)
return CSS_OK;
break;
case GROUP_PAGE:
@@ -1185,7 +1185,7 @@ css_error set_initial(css_select_state *state,
return CSS_OK;
break;
case GROUP_AURAL:
- if (state->computed->aural == NULL)
+ if (state->computed->i.aural == NULL)
return CSS_OK;
break;
}
-----------------------------------------------------------------------
Summary of changes:
include/libcss/computed.h | 9 +++--
include/libcss/select.h | 5 ++-
src/select/arena.c | 1 +
src/select/computed.c | 32 +++++++++++-----
src/select/computed.h | 17 +++++++++
src/select/select.c | 91 +++++++++++++++++++++++++++++++++++++++++++++
test/select-common.c | 5 ++-
7 files changed, 144 insertions(+), 16 deletions(-)
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index f8f3391..db3e3e4 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -73,7 +73,7 @@ typedef struct css_computed_content_item {
lwc_string *sep;
uint8_t style;
} counters;
- } data;
+ } data;
} css_computed_content_item;
css_error css_computed_style_create(css_computed_style **result);
@@ -82,13 +82,14 @@ css_error css_computed_style_destroy(css_computed_style *style);
css_error css_computed_style_initialise(css_computed_style *style,
struct css_select_handler *handler, void *pw);
-css_error css_computed_style_compose(const css_computed_style *parent,
- css_computed_style *child,
+css_error css_computed_style_compose(
+ const css_computed_style *restrict parent,
+ const css_computed_style *restrict child,
css_error (*compute_font_size)(void *pw,
const struct css_hint *parent,
struct css_hint *size),
void *pw,
- css_computed_style **result);
+ css_computed_style **restrict result);
/******************************************************************************
* Property accessors below here *
diff --git a/include/libcss/select.h b/include/libcss/select.h
index d504e81..83e6ded 100644
--- a/include/libcss/select.h
+++ b/include/libcss/select.h
@@ -217,6 +217,9 @@ css_error css_select_ctx_count_sheets(css_select_ctx *ctx, uint32_t *count);
css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
const css_stylesheet **sheet);
+css_error css_select_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw,
+ css_computed_style **style);
css_error css_select_style(css_select_ctx *ctx, void *node,
uint64_t media, const css_stylesheet *inline_style,
css_select_handler *handler, void *pw,
@@ -227,7 +230,7 @@ css_error css_select_font_faces(css_select_ctx *ctx,
uint64_t media, lwc_string *font_family,
css_select_font_faces_results **result);
css_error css_select_font_faces_results_destroy(
- css_select_font_faces_results *results);
+ css_select_font_faces_results *results);
#ifdef __cplusplus
}
diff --git a/src/select/arena.c b/src/select/arena.c
index 1b0ea57..baadc9f 100644
--- a/src/select/arena.c
+++ b/src/select/arena.c
@@ -233,6 +233,7 @@ css_error css__arena_intern_style(struct css_computed_style **style)
struct css_computed_style *s = *style;
uint32_t hash, index;
+ /* Don't try to intern an already-interned computed style */
if (s->count != 0) {
return CSS_BADPARM;
}
diff --git a/src/select/computed.c b/src/select/computed.c
index 107c884..1fe6a81 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -123,7 +123,7 @@ css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon)
free(uncommon->counter_reset);
}
-
+
if (uncommon->cursor != NULL) {
lwc_string **s;
@@ -277,23 +277,34 @@ css_error css_computed_style_initialise(css_computed_style *style,
* \param child Child style
* \param compute_font_size Function to compute an absolute font size
* \param pw Client data for compute_font_size
- * \param result Pointer to style to compose into
+ * \param result Updated to point to new composed style
+ * Ownership passed to client.
* \return CSS_OK on success, appropriate error otherwise.
*
* \pre \a parent is a fully composed style (thus has no inherited properties)
- *
- * \note \a child and \a result may point at the same object
*/
-css_error css_computed_style_compose(const css_computed_style *parent,
- css_computed_style *child,
+css_error css_computed_style_compose(
+ const css_computed_style *restrict parent,
+ const css_computed_style *restrict child,
css_error (*compute_font_size)(void *pw,
const css_hint *parent, css_hint *size),
void *pw,
- css_computed_style **result)
+ css_computed_style **restrict result)
{
- css_error error = CSS_OK;
+ css_computed_style *composed;
+ css_error error;
size_t i;
+ /* TODO:
+ * Make this function take a composition context, to allow us
+ * to avoid the churn of unnecesaraly allocating and freeing
+ * the memory to compose styles into.
+ */
+ error = css_computed_style_create(&composed);
+ if (error != CSS_OK) {
+ return error;
+ }
+
/* Iterate through the properties */
for (i = 0; i < CSS_N_PROPERTIES; i++) {
/* Skip any in extension blocks if the block does not exist */
@@ -316,18 +327,19 @@ css_error css_computed_style_compose(const css_computed_style *parent,
}
/* Compose the property */
- error = prop_dispatch[i].compose(parent, child, *result);
+ error = prop_dispatch[i].compose(parent, child, composed);
if (error != CSS_OK)
break;
}
/* Finally, compute absolute values for everything */
- error = css__compute_absolute_values(parent, *result,
+ error = css__compute_absolute_values(parent, composed,
compute_font_size, pw);
if (error != CSS_OK) {
return error;
}
+ *result = composed;
return css__arena_intern_style(result);
}
diff --git a/src/select/computed.h b/src/select/computed.h
index f965993..230711d 100644
--- a/src/select/computed.h
+++ b/src/select/computed.h
@@ -325,6 +325,23 @@ struct css_computed_style {
uint32_t bin;
};
+
+/**
+ * Take a new reference to a computed style
+ *
+ * \param style The style to take a new reference to.
+ * \return The new computed style reference
+ */
+static inline css_computed_style * css__computed_style_ref(
+ css_computed_style *style)
+{
+ if (style == NULL)
+ return NULL;
+
+ style->count++;
+ return style;
+}
+
css_error css__computed_uncommon_destroy(css_computed_uncommon *uncommon);
css_error css__compute_absolute_values(const css_computed_style *parent,
diff --git a/src/select/select.c b/src/select/select.c
index e250657..734f58c 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -15,6 +15,7 @@
#include "bytecode/bytecode.h"
#include "bytecode/opcodes.h"
#include "stylesheet.h"
+#include "select/arena.h"
#include "select/computed.h"
#include "select/dispatch.h"
#include "select/hash.h"
@@ -74,6 +75,9 @@ struct css_select_ctx {
lwc_string *first_letter;
lwc_string *before;
lwc_string *after;
+
+ /* Interned default style */
+ css_computed_style *default_style;
};
/**
@@ -258,6 +262,9 @@ css_error css_select_ctx_destroy(css_select_ctx *ctx)
destroy_strings(ctx);
+ if (ctx->default_style != NULL)
+ css_computed_style_destroy(ctx->default_style);
+
if (ctx->sheets != NULL)
free(ctx->sheets);
@@ -406,6 +413,78 @@ css_error css_select_ctx_get_sheet(css_select_ctx *ctx, uint32_t index,
return CSS_OK;
}
+
+/**
+ * Create a default style on the selection context
+ *
+ * \param ctx Context to create default style in
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \return CSS_OK on success, appropriate error otherwise
+ */
+static css_error css__select_ctx_create_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw)
+{
+ css_computed_style *style;
+ css_error error;
+
+ /* Need to construct the default style */
+ error = css_computed_style_create(&style);
+ if (error != CSS_OK)
+ return error;
+
+ error = css_computed_style_initialise(style, handler, pw);
+ if (error != CSS_OK) {
+ css_computed_style_destroy(style);
+ return error;
+ }
+
+ /* Neither create nor initialise intern the style, so intern it now */
+ error = css__arena_intern_style(&style);
+ if (error != CSS_OK)
+ return error;
+
+ /* Store it on the ctx */
+ ctx->default_style = style;
+
+ return CSS_OK;
+}
+
+
+/**
+ * Get a default style, e.g. for an implied element's anonamous box
+ *
+ * \param ctx Selection context (used to avoid recreating default)
+ * \param handler Dispatch table of handler functions
+ * \param pw Client-specific private data for handler functions
+ * \param style Pointer to location to receive default style
+ * \return CSS_OK on success, appropriate error otherwise.
+ */
+css_error css_select_default_style(css_select_ctx *ctx,
+ css_select_handler *handler, void *pw,
+ css_computed_style **style)
+{
+ css_error error;
+
+ if (ctx == NULL || style == NULL || handler == NULL ||
+ handler->handler_version !=
+ CSS_SELECT_HANDLER_VERSION_1)
+ return CSS_BADPARM;
+
+ /* Ensure the ctx has a default style */
+ if (ctx->default_style == NULL) {
+ error = css__select_ctx_create_default_style(ctx, handler, pw);
+ if (error != CSS_OK) {
+ return error;
+ }
+ }
+
+ /* Pass a ref back to the client */
+ *style = css__computed_style_ref(ctx->default_style);
+ return CSS_OK;
+}
+
+
/**
* Select a style for the given node
*
@@ -646,6 +725,18 @@ css_error css_select_style(css_select_ctx *ctx, void *node,
goto cleanup;
}
+ /* Intern the partial computed styles */
+ for (j = CSS_PSEUDO_ELEMENT_NONE; j < CSS_PSEUDO_ELEMENT_COUNT; j++) {
+ /* Skip non-existent pseudo elements */
+ if (state.results->styles[j] == NULL)
+ continue;
+
+ error = css__arena_intern_style(&state.results->styles[j]);
+ if (error != CSS_OK) {
+ goto cleanup;
+ }
+ }
+
/* Add node name to bloom */
if (state.element.name->insensitive == NULL) {
if (lwc__intern_caseless_string(
diff --git a/test/select-common.c b/test/select-common.c
index 42cdb76..61568e5 100644
--- a/test/select-common.c
+++ b/test/select-common.c
@@ -769,11 +769,14 @@ static void run_test_select_tree(css_select_ctx *select,
&select_handler, ctx, &sr) == CSS_OK);
if (node->parent != NULL) {
+ css_computed_style *composed;
assert(css_computed_style_compose(
node->parent->sr->styles[ctx->pseudo_element],
sr->styles[ctx->pseudo_element],
compute_font_size, NULL,
- &(sr->styles[ctx->pseudo_element])) == CSS_OK);
+ &composed) == CSS_OK);
+ css_computed_style_destroy(sr->styles[ctx->pseudo_element]);
+ sr->styles[ctx->pseudo_element] = composed;
}
node->sr = sr;
--
Cascading Style Sheets library
7 years, 6 months
libcss: branch master updated. release/0.5.0-10-ga268eaf
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/libcss.git/shortlog/a268eaf7c6b039dc41c853...
...commit http://git.netsurf-browser.org/libcss.git/commit/a268eaf7c6b039dc41c853e0...
...tree http://git.netsurf-browser.org/libcss.git/tree/a268eaf7c6b039dc41c853e0d8...
The branch, master has been updated
via a268eaf7c6b039dc41c853e0d8d68633e2cf713a (commit)
from b1684e3588d95b93f3268895c5a0a7c156cd018e (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/libcss.git/commit/?id=a268eaf7c6b039dc41c8...
commit a268eaf7c6b039dc41c853e0d8d68633e2cf713a
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Remove trailing whitespace.
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 233265c..3470da8 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -73,7 +73,7 @@ typedef struct css_computed_content_item {
lwc_string *sep;
uint8_t style;
} counters;
- } data;
+ } data;
} css_computed_content_item;
css_error css_computed_style_create(css_computed_style **result);
-----------------------------------------------------------------------
Summary of changes:
include/libcss/computed.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/libcss/computed.h b/include/libcss/computed.h
index 233265c..3470da8 100644
--- a/include/libcss/computed.h
+++ b/include/libcss/computed.h
@@ -73,7 +73,7 @@ typedef struct css_computed_content_item {
lwc_string *sep;
uint8_t style;
} counters;
- } data;
+ } data;
} css_computed_content_item;
css_error css_computed_style_create(css_computed_style **result);
--
Cascading Style Sheets library
7 years, 7 months