Gitweb links:

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

The branch, tlsa/layout-nodes has been updated
  discards  7852370aca24e96b7a398164094ba8dcb637b748 (commit)
       via  fd5ccee08973a2a5ada67e87c8d76b8086cd6ec5 (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 (7852370aca24e96b7a398164094ba8dcb637b748)
            \
             N -- N -- N (fd5ccee08973a2a5ada67e87c8d76b8086cd6ec5)

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/libnslayout.git/commit/?id=fd5ccee08973a2a5ada67e87c8d76b8086cd6ec5
commit fd5ccee08973a2a5ada67e87c8d76b8086cd6ec5
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    WIP: Layout node stuff.  Not a lot here.

diff --git a/src/Makefile b/src/Makefile
index 7a6251d..b02f0b9 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,6 +6,6 @@
 # Released under the ISC License (see COPYING file)
 
 # Sources
-DIR_SOURCES := layout.c
+DIR_SOURCES := layout.c node.c
 
 include $(NSBUILD)/Makefile.subdir
diff --git a/src/node.c b/src/node.c
new file mode 100644
index 0000000..233e6c4
--- /dev/null
+++ b/src/node.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of LibNSLayout
+ * Licensed under the ISC License, http://opensource.org/licenses/ISC
+ * Copyright 2015 Michael Drake <[email protected]>
+ */
+
+/** \file src/node.c
+ * Layout node handling
+ */
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include "libnslayout/nslayout.h"
+
+#include "layout.h"
+#include "util/util.h"
+#include "util/dom-str.h"
+
+
+/**
+ * The layout node object.
+ */
+struct nsl_node {
+};
diff --git a/src/node.h b/src/node.h
new file mode 100644
index 0000000..b21352a
--- /dev/null
+++ b/src/node.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of LibNSLayout
+ * Licensed under the ISC License, http://opensource.org/licenses/ISC
+ * Copyright 2015 Michael Drake <[email protected]>
+ */
+
+/** \file src/node.h
+ * Layout node handling
+ */
+
+#ifndef nsl_node_h_
+#define nsl_node_h_
+
+typedef struct nsl_node nsl_node;
+
+/** Layout node types */
+enum nsl_node {
+       NSL_NODE_INLINE          = 1,
+       NSL_NODE_BLOCK           = ( 1 << 1),
+       NSL_NODE_FLEX            = ( 2 << 1),
+       NSL_NODE_GRID            = ( 3 << 1),
+       NSL_NODE_TABLE           = ( 4 << 1),
+       NSL_NODE_TABLE_CAP       = ( 5 << 1),
+       NSL_NODE_TABLE_COL_GROUP = ( 6 << 1),
+       NSL_NODE_TABLE_ROW_GROUP = ( 7 << 1),
+       NSL_NODE_TABLE_CELL      = ( 8 << 1),
+       NSL_NODE_TABLE_COL       = ( 9 << 1),
+       NSL_NODE_TABLE_ROW       = (10 << 1),
+       NSL_NODE_INLINE_BLOCK    = NSL_NODE_INLINE | NSL_NODE_BLOCK,
+       NSL_NODE_INLINE_FLEX     = NSL_NODE_INLINE | NSL_NODE_FLEX,
+       NSL_NODE_INLINE_GRID     = NSL_NODE_INLINE | NSL_NODE_GRID,
+       NSL_NODE_INLINE_TABLE    = NSL_NODE_INLINE | NSL_NODE_TABLE,
+};
+
+/**
+ * Test whether a layout node participates in inline flow.
+ *
+ * \param[in] node  Node to test.
+ * \return true if node participates in inline flow, false otherwise.
+ */
+static inline bool nsl_node_is_inline(struct nsl_node *node)
+{
+       return node->type & NSL_NODE_INLINE;
+}
+
+/**
+ * Test whether a layout node participates in block flow.
+ *
+ * \param[in] node  Node to test.
+ * \return true if node participates in block flow, false otherwise.
+ */
+static inline bool nsl_node_is_block(struct nsl_node *node)
+{
+       return !nsl_node_is_inline(node);
+}
+
+nsl_error nsl__node_create(nsl_node **node_out);
+
+void nsl__node_destroy(nsl_node *node_out);
+
+#endif


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

Summary of changes:
 src/node.h |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/src/node.h b/src/node.h
index 9e85db1..b21352a 100644
--- a/src/node.h
+++ b/src/node.h
@@ -13,6 +13,47 @@
 
 typedef struct nsl_node nsl_node;
 
+/** Layout node types */
+enum nsl_node {
+       NSL_NODE_INLINE          = 1,
+       NSL_NODE_BLOCK           = ( 1 << 1),
+       NSL_NODE_FLEX            = ( 2 << 1),
+       NSL_NODE_GRID            = ( 3 << 1),
+       NSL_NODE_TABLE           = ( 4 << 1),
+       NSL_NODE_TABLE_CAP       = ( 5 << 1),
+       NSL_NODE_TABLE_COL_GROUP = ( 6 << 1),
+       NSL_NODE_TABLE_ROW_GROUP = ( 7 << 1),
+       NSL_NODE_TABLE_CELL      = ( 8 << 1),
+       NSL_NODE_TABLE_COL       = ( 9 << 1),
+       NSL_NODE_TABLE_ROW       = (10 << 1),
+       NSL_NODE_INLINE_BLOCK    = NSL_NODE_INLINE | NSL_NODE_BLOCK,
+       NSL_NODE_INLINE_FLEX     = NSL_NODE_INLINE | NSL_NODE_FLEX,
+       NSL_NODE_INLINE_GRID     = NSL_NODE_INLINE | NSL_NODE_GRID,
+       NSL_NODE_INLINE_TABLE    = NSL_NODE_INLINE | NSL_NODE_TABLE,
+};
+
+/**
+ * Test whether a layout node participates in inline flow.
+ *
+ * \param[in] node  Node to test.
+ * \return true if node participates in inline flow, false otherwise.
+ */
+static inline bool nsl_node_is_inline(struct nsl_node *node)
+{
+       return node->type & NSL_NODE_INLINE;
+}
+
+/**
+ * Test whether a layout node participates in block flow.
+ *
+ * \param[in] node  Node to test.
+ * \return true if node participates in block flow, false otherwise.
+ */
+static inline bool nsl_node_is_block(struct nsl_node *node)
+{
+       return !nsl_node_is_inline(node);
+}
+
 nsl_error nsl__node_create(nsl_node **node_out);
 
 void nsl__node_destroy(nsl_node *node_out);


-- 
NetSurf Layout Engine

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to