Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/e1a3e0427f7166bf0e1c85520080bb75c6ee24c1
...commit
http://git.netsurf-browser.org/netsurf.git/commit/e1a3e0427f7166bf0e1c85520080bb75c6ee24c1
...tree
http://git.netsurf-browser.org/netsurf.git/tree/e1a3e0427f7166bf0e1c85520080bb75c6ee24c1
The branch, master has been updated
via e1a3e0427f7166bf0e1c85520080bb75c6ee24c1 (commit)
via 07242c7415bcfb35d3f9f150317b30138664eb2f (commit)
via 776b0242a6221df61c8d1c7b320f223de5af8466 (commit)
from 54371c28f07e638694ad2148e8900e1bae71e3d4 (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=e1a3e0427f7166bf0e1c85520080bb75c6ee24c1
commit e1a3e0427f7166bf0e1c85520080bb75c6ee24c1
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
HTML handler: Reformat passing viewport height when triggered by object.
Previously we correctly used the viewport width, but we were using the
document height instead of viewport height when an HTML child content
triggered a reformat of the parent HTML document.
diff --git a/content/handlers/html/html_object.c
b/content/handlers/html/html_object.c
index 7eab466..b56f8e4 100644
--- a/content/handlers/html/html_object.c
+++ b/content/handlers/html/html_object.c
@@ -166,7 +166,7 @@ html_object_callback(hlcache_handle *object,
c->base.status == CONTENT_STATUS_DONE)
content__reformat(&c->base, false,
c->base.available_width,
- c->base.height);
+ c->base.available_height);
}
break;
@@ -459,7 +459,7 @@ html_object_callback(hlcache_handle *object,
event->type == CONTENT_MSG_ERRORCODE)) {
/* all objects have arrived */
content__reformat(&c->base, false, c->base.available_width,
- c->base.height);
+ c->base.available_height);
content_set_done(&c->base);
} else if (nsoption_bool(incremental_reflow) &&
event->type == CONTENT_MSG_DONE &&
@@ -484,7 +484,7 @@ html_object_callback(hlcache_handle *object,
content__reformat(&c->base,
false,
c->base.available_width,
- c->base.height);
+ c->base.available_height);
}
}
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=07242c7415bcfb35d3f9f150317b30138664eb2f
commit 07242c7415bcfb35d3f9f150317b30138664eb2f
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Content: Make the content structure aware of viewport height.
It was always aware of viewport width, but since adding support for
vh CSS units, the HTML content handler also needs viewport height.
Signed-off-by: Michael Drake <[email protected]>
diff --git a/content/content.c b/content/content.c
index a04051b..8697501 100644
--- a/content/content.c
+++ b/content/content.c
@@ -96,6 +96,7 @@ nserror content__init(struct content *c, const
content_handler *handler,
c->width = 0;
c->height = 0;
c->available_width = 0;
+ c->available_height = 0;
c->quirks = quirks;
c->refresh = 0;
nsu_getmonotonic_ms(&c->time);
@@ -355,6 +356,7 @@ void content__reformat(struct content *c, bool background,
assert(c->locked == false);
c->available_width = width;
+ c->available_height = height;
if (c->handler->reformat != NULL) {
c->locked = true;
diff --git a/content/content_protected.h b/content/content_protected.h
index 21b73a6..be277a0 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -113,7 +113,8 @@ struct content {
content_status status; /**< Current status. */
int width, height; /**< Dimensions, if applicable. */
- int available_width; /**< Available width (eg window width). */
+ int available_width; /**< Viewport width. */
+ int available_height; /**< Viewport height. */
bool quirks; /**< Content is in quirks mode */
char *fallback_charset; /**< Fallback charset, or NULL */
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=776b0242a6221df61c8d1c7b320f223de5af8466
commit 776b0242a6221df61c8d1c7b320f223de5af8466
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Layout: Add debug logging to show viewport dimensions passed into layout.
Signed-off-by: Michael Drake <[email protected]>
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index d52dbf8..f4a1a20 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -5390,6 +5390,10 @@ bool layout_document(html_content *content, int width,
int height)
struct box *doc = content->layout;
const struct gui_layout_table *font_func = content->font_func;
+ NSLOG(layout, DEBUG, "Doing layout to %ix%i of %s",
+ width, height, nsurl_access(content_get_url(
+ &content->base)));
+
layout_minmax_block(doc, font_func, content);
layout_block_find_dimensions(&content->len_ctx,
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 2 ++
content/content_protected.h | 3 ++-
content/handlers/html/html_object.c | 6 +++---
content/handlers/html/layout.c | 4 ++++
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/content/content.c b/content/content.c
index a04051b..8697501 100644
--- a/content/content.c
+++ b/content/content.c
@@ -96,6 +96,7 @@ nserror content__init(struct content *c, const
content_handler *handler,
c->width = 0;
c->height = 0;
c->available_width = 0;
+ c->available_height = 0;
c->quirks = quirks;
c->refresh = 0;
nsu_getmonotonic_ms(&c->time);
@@ -355,6 +356,7 @@ void content__reformat(struct content *c, bool background,
assert(c->locked == false);
c->available_width = width;
+ c->available_height = height;
if (c->handler->reformat != NULL) {
c->locked = true;
diff --git a/content/content_protected.h b/content/content_protected.h
index 21b73a6..be277a0 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -113,7 +113,8 @@ struct content {
content_status status; /**< Current status. */
int width, height; /**< Dimensions, if applicable. */
- int available_width; /**< Available width (eg window width). */
+ int available_width; /**< Viewport width. */
+ int available_height; /**< Viewport height. */
bool quirks; /**< Content is in quirks mode */
char *fallback_charset; /**< Fallback charset, or NULL */
diff --git a/content/handlers/html/html_object.c
b/content/handlers/html/html_object.c
index 7eab466..b56f8e4 100644
--- a/content/handlers/html/html_object.c
+++ b/content/handlers/html/html_object.c
@@ -166,7 +166,7 @@ html_object_callback(hlcache_handle *object,
c->base.status == CONTENT_STATUS_DONE)
content__reformat(&c->base, false,
c->base.available_width,
- c->base.height);
+ c->base.available_height);
}
break;
@@ -459,7 +459,7 @@ html_object_callback(hlcache_handle *object,
event->type == CONTENT_MSG_ERRORCODE)) {
/* all objects have arrived */
content__reformat(&c->base, false, c->base.available_width,
- c->base.height);
+ c->base.available_height);
content_set_done(&c->base);
} else if (nsoption_bool(incremental_reflow) &&
event->type == CONTENT_MSG_DONE &&
@@ -484,7 +484,7 @@ html_object_callback(hlcache_handle *object,
content__reformat(&c->base,
false,
c->base.available_width,
- c->base.height);
+ c->base.available_height);
}
}
diff --git a/content/handlers/html/layout.c b/content/handlers/html/layout.c
index d52dbf8..f4a1a20 100644
--- a/content/handlers/html/layout.c
+++ b/content/handlers/html/layout.c
@@ -5390,6 +5390,10 @@ bool layout_document(html_content *content, int width,
int height)
struct box *doc = content->layout;
const struct gui_layout_table *font_func = content->font_func;
+ NSLOG(layout, DEBUG, "Doing layout to %ix%i of %s",
+ width, height, nsurl_access(content_get_url(
+ &content->base)));
+
layout_minmax_block(doc, font_func, content);
layout_block_find_dimensions(&content->len_ctx,
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org