Gitweb links:
...log
http://git.netsurf-browser.org/libcss.git/shortlog/50de2581f6d150871fd27595e778adf06552df40
...commit
http://git.netsurf-browser.org/libcss.git/commit/50de2581f6d150871fd27595e778adf06552df40
...tree
http://git.netsurf-browser.org/libcss.git/tree/50de2581f6d150871fd27595e778adf06552df40
The branch, tlsa/explicit-defaulting has been updated
discards de058a73c08749025b1376ea2975cd54b9cbda29 (commit)
via 50de2581f6d150871fd27595e778adf06552df40 (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 (de058a73c08749025b1376ea2975cd54b9cbda29)
\
N -- N -- N (50de2581f6d150871fd27595e778adf06552df40)
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=50de2581f6d150871fd27595e778adf06552df40
commit 50de2581f6d150871fd27595e778adf06552df40
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
WIP: Select: Properties: Add copy handler
diff --git a/src/select/properties/align_content.c
b/src/select/properties/align_content.c
index 7d791b8..d432879 100644
--- a/src/select/properties/align_content.c
+++ b/src/select/properties/align_content.c
@@ -66,16 +66,25 @@ css_error css__initial_align_content(css_select_state
*state)
return set_align_content(state->computed, CSS_ALIGN_CONTENT_STRETCH);
}
+css_error css__copy_align_content(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ if (from == to) {
+ return CSS_OK;
+ }
+
+ return set_align_content(to, get_align_content(from));
+}
+
css_error css__compose_align_content(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
uint8_t type = get_align_content(child);
- if (type == CSS_ALIGN_CONTENT_INHERIT) {
- type = get_align_content(parent);
- }
-
- return set_align_content(result, type);
+ return css__copy_align_content(
+ type == CSS_ALIGN_CONTENT_INHERIT ? parent : child,
+ result);
}
diff --git a/src/select/properties/align_items.c
b/src/select/properties/align_items.c
index 007fd70..52ca094 100644
--- a/src/select/properties/align_items.c
+++ b/src/select/properties/align_items.c
@@ -60,16 +60,25 @@ css_error css__initial_align_items(css_select_state *state)
return set_align_items(state->computed, CSS_ALIGN_ITEMS_STRETCH);
}
+css_error css__copy_align_items(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ if (from == to) {
+ return CSS_OK;
+ }
+
+ return set_align_items(to, get_align_items(from));
+}
+
css_error css__compose_align_items(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
uint8_t type = get_align_items(child);
- if (type == CSS_ALIGN_ITEMS_INHERIT) {
- type = get_align_items(parent);
- }
-
- return set_align_items(result, type);
+ return css__copy_align_items(
+ type == CSS_ALIGN_ITEMS_INHERIT ? parent : child,
+ result);
}
diff --git a/src/select/properties/align_self.c
b/src/select/properties/align_self.c
index b8ce46d..abdb3fe 100644
--- a/src/select/properties/align_self.c
+++ b/src/select/properties/align_self.c
@@ -63,16 +63,25 @@ css_error css__initial_align_self(css_select_state *state)
return set_align_self(state->computed, CSS_ALIGN_SELF_AUTO);
}
+css_error css__copy_align_self(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ if (from == to) {
+ return CSS_OK;
+ }
+
+ return set_align_self(to, get_align_self(from));
+}
+
css_error css__compose_align_self(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
uint8_t type = get_align_self(child);
- if (type == CSS_ALIGN_SELF_INHERIT) {
- type = get_align_self(parent);
- }
-
- return set_align_self(result, type);
+ return css__copy_align_self(
+ type == CSS_ALIGN_SELF_INHERIT ? parent : child,
+ result);
}
diff --git a/src/select/properties/azimuth.c b/src/select/properties/azimuth.c
index 1d3e1c2..bbbb48d 100644
--- a/src/select/properties/azimuth.c
+++ b/src/select/properties/azimuth.c
@@ -70,6 +70,16 @@ css_error css__initial_azimuth(css_select_state *state)
return CSS_OK;
}
+css_error css__copy_azimuth(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ UNUSED(from);
+ UNUSED(to);
+
+ return CSS_OK;
+}
+
css_error css__compose_azimuth(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
diff --git a/src/select/properties/background_attachment.c
b/src/select/properties/background_attachment.c
index 7e59557..49194cc 100644
--- a/src/select/properties/background_attachment.c
+++ b/src/select/properties/background_attachment.c
@@ -52,16 +52,25 @@ css_error
css__initial_background_attachment(css_select_state *state)
CSS_BACKGROUND_ATTACHMENT_SCROLL);
}
+css_error css__copy_background_attachment(
+ const css_computed_style *from,
+ css_computed_style *to)
+{
+ if (from == to) {
+ return CSS_OK;
+ }
+
+ return set_background_attachment(to, get_background_attachment(from));
+}
+
css_error css__compose_background_attachment(const css_computed_style *parent,
const css_computed_style *child,
css_computed_style *result)
{
uint8_t type = get_background_attachment(child);
- if (type == CSS_BACKGROUND_ATTACHMENT_INHERIT) {
- type = get_background_attachment(parent);
- }
-
- return set_background_attachment(result, type);
+ return css__copy_background_attachment(
+ type == CSS_BACKGROUND_ATTACHMENT_INHERIT ? parent :
child,
+ result);
}
diff --git a/src/select/properties/properties.h
b/src/select/properties/properties.h
index 6eac397..be31d0b 100644
--- a/src/select/properties/properties.h
+++ b/src/select/properties/properties.h
@@ -18,6 +18,7 @@
css_error css__cascade_##pname (uint32_t opv, css_style *style,
css_select_state *state); \
css_error css__set_##pname##_from_hint(const css_hint *hint,
css_computed_style *style); \
css_error css__initial_##pname (css_select_state *state); \
+ css_error css__copy_##pname (const css_computed_style *from,
css_computed_style *to); \
css_error css__compose_##pname (const css_computed_style *parent, const
css_computed_style *child, css_computed_style *result); \
uint32_t destroy_##pname (void *bytecode)
-----------------------------------------------------------------------
Summary of changes:
src/select/properties/background_attachment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/select/properties/background_attachment.c
b/src/select/properties/background_attachment.c
index 4faf5dd..49194cc 100644
--- a/src/select/properties/background_attachment.c
+++ b/src/select/properties/background_attachment.c
@@ -70,7 +70,7 @@ css_error css__compose_background_attachment(const
css_computed_style *parent,
uint8_t type = get_background_attachment(child);
return css__copy_background_attachment(
- type == CSS_ALIGN_CONTENT_INHERIT ? parent : child,
+ type == CSS_BACKGROUND_ATTACHMENT_INHERIT ? parent :
child,
result);
}
--
Cascading Style Sheets library
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]