[Commits] [SCM] claws branch, master, updated. 4.1.1-97-g5253556f4

jonathan at claws-mail.org jonathan at claws-mail.org
Sun Oct 22 11:51:42 UTC 2023


The branch, master has been updated
       via  5253556f4dabdd78708162d28a267376f07fdaff (commit)
      from  532414c6704c91083f56ca6630bbdc12cc86507b (commit)

Summary of changes:
 src/plugins/litehtml_viewer/Makefile.am   |   1 -
 src/plugins/litehtml_viewer/css.inc       | 332 ------------------------------
 src/plugins/litehtml_viewer/lh_widget.cpp |  10 +-
 src/plugins/litehtml_viewer/lh_widget.h   |   1 -
 4 files changed, 2 insertions(+), 342 deletions(-)
 delete mode 100644 src/plugins/litehtml_viewer/css.inc


- Log -----------------------------------------------------------------
commit 5253556f4dabdd78708162d28a267376f07fdaff
Author: Jonathan Boeing <jonathan at claws-mail.org>
Date:   Mon Oct 9 01:16:33 2023 -0700

    Sync with master_css changes

diff --git a/src/plugins/litehtml_viewer/Makefile.am b/src/plugins/litehtml_viewer/Makefile.am
index 771261d7f..ecc3fa812 100644
--- a/src/plugins/litehtml_viewer/Makefile.am
+++ b/src/plugins/litehtml_viewer/Makefile.am
@@ -6,7 +6,6 @@
 include $(srcdir)/../win_plugin.mk
 
 SUBDIRS = litehtml
-EXTRA_DIST = css.inc
 
 IFLAGS = \
 	-I$(top_builddir)/src \
diff --git a/src/plugins/litehtml_viewer/css.inc b/src/plugins/litehtml_viewer/css.inc
deleted file mode 100644
index 128898201..000000000
--- a/src/plugins/litehtml_viewer/css.inc
+++ /dev/null
@@ -1,332 +0,0 @@
-"html { \
-    display: block; \
-    height:100%; \
-    width:100%; \
-	position: relative; \
-} \
- \
-head { \
-    display: none \
-} \
- \
-meta { \
-    display: none \
-} \
- \
-title { \
-    display: none \
-} \
- \
-link { \
-    display: none \
-} \
- \
-style { \
-    display: none \
-} \
- \
-script { \
-    display: none \
-} \
- \
-body { \
-	display:block;  \
-	margin:8px;  \
-    height:100%; \
-    width:100%; \
-} \
- \
-p { \
-	display:block;  \
-	margin-top:1em;  \
-	margin-bottom:1em; \
-} \
- \
-b, strong { \
-	display:inline;  \
-	font-weight:bold; \
-} \
- \
-i, em { \
-	display:inline;  \
-	font-style:italic; \
-} \
- \
-center  \
-{ \
-	text-align:center; \
-	display:block; \
-} \
- \
-a:link \
-{ \
-	text-decoration: underline; \
-	color: #00f; \
-	cursor: pointer; \
-} \
- \
-h1, h2, h3, h4, h5, h6, div { \
-	display:block; \
-} \
- \
-h1 { \
-	font-weight:bold;  \
-	margin-top:0.67em;  \
-	margin-bottom:0.67em;  \
-	font-size: 2em; \
-} \
- \
-h2 { \
-	font-weight:bold;  \
-	margin-top:0.83em;  \
-	margin-bottom:0.83em;  \
-	font-size: 1.5em; \
-} \
- \
-h3 { \
-	font-weight:bold;  \
-	margin-top:1em;  \
-	margin-bottom:1em;  \
-	font-size:1.17em; \
-} \
- \
-h4 { \
-	font-weight:bold;  \
-	margin-top:1.33em;  \
-	margin-bottom:1.33em \
-} \
- \
-h5 { \
-	font-weight:bold;  \
-	margin-top:1.67em;  \
-	margin-bottom:1.67em; \
-	font-size:.83em; \
-} \
- \
-h6 { \
-	font-weight:bold;  \
-	margin-top:2.33em;  \
-	margin-bottom:2.33em; \
-	font-size:.67em; \
-}  \
- \
-br { \
-	display:inline-block; \
-} \
- \
-br[clear=\"all\"] \
-{ \
-	clear:both; \
-} \
- \
-br[clear=\"left\"] \
-{ \
-	clear:left; \
-} \
- \
-br[clear=\"right\"] \
-{ \
-	clear:right; \
-} \
- \
-span { \
-	display:inline \
-} \
- \
-img { \
-	display: inline-block; \
-} \
- \
-img[align=\"right\"] \
-{ \
-	float: right; \
-} \
- \
-img[align=\"left\"] \
-{ \
-	float: left; \
-} \
- \
-hr { \
-    display: block; \
-    margin-top: 0.5em; \
-    margin-bottom: 0.5em; \
-    margin-left: auto; \
-    margin-right: auto; \
-    border-style: inset; \
-    border-width: 1px \
-} \
- \
- \
-/***************** TABLES ********************/ \
- \
-table { \
-    display: table; \
-    border-collapse: separate; \
-    border-spacing: 2px; \
-    border-top-color:gray; \
-    border-left-color:gray; \
-    border-bottom-color:black; \
-    border-right-color:black; \
-} \
- \
-tbody, tfoot, thead { \
-	display:table-row-group; \
-	vertical-align:middle; \
-} \
- \
-tr { \
-    display: table-row; \
-    vertical-align: inherit; \
-    border-color: inherit; \
-} \
- \
-td, th { \
-    display: table-cell; \
-    vertical-align: inherit; \
-    border-width:1px; \
-    padding:1px; \
-} \
- \
-th { \
-	font-weight: bold; \
-} \
- \
-table[border] { \
-    border-style:solid; \
-} \
- \
-table[border|=0] { \
-    border-style:none; \
-} \
- \
-table[border] td, table[border] th { \
-    border-style:solid; \
-    border-top-color:black; \
-    border-left-color:black; \
-    border-bottom-color:gray; \
-    border-right-color:gray; \
-} \
- \
-table[border|=0] td, table[border|=0] th { \
-    border-style:none; \
-} \
- \
-caption { \
-	display: table-caption; \
-} \
- \
-td[nowrap], th[nowrap] { \
-	white-space:nowrap; \
-} \
- \
-tt, code, kbd, samp { \
-    font-family: monospace \
-} \
- \
-pre, xmp, plaintext, listing { \
-    display: block; \
-    font-family: monospace; \
-    white-space: pre; \
-    margin: 1em 0 \
-} \
- \
-/***************** LISTS ********************/ \
- \
-ul, menu, dir { \
-    display: block; \
-    list-style-type: disc; \
-    margin-top: 1em; \
-    margin-bottom: 1em; \
-    margin-left: 0; \
-    margin-right: 0; \
-    padding-left: 40px \
-} \
- \
-ol { \
-    display: block; \
-    list-style-type: decimal; \
-    margin-top: 1em; \
-    margin-bottom: 1em; \
-    margin-left: 0; \
-    margin-right: 0; \
-    padding-left: 40px \
-} \
- \
-li { \
-    display: list-item; \
-} \
- \
-ul ul, ol ul { \
-    list-style-type: circle; \
-} \
- \
-ol ol ul, ol ul ul, ul ol ul, ul ul ul { \
-    list-style-type: square; \
-} \
- \
-dd { \
-    display: block; \
-    margin-left: 40px; \
-} \
- \
-dl { \
-    display: block; \
-    margin-top: 1em; \
-    margin-bottom: 1em; \
-    margin-left: 0; \
-    margin-right: 0; \
-} \
- \
-dt { \
-    display: block; \
-} \
- \
-ol ul, ul ol, ul ul, ol ol { \
-    margin-top: 0; \
-    margin-bottom: 0 \
-} \
- \
-blockquote { \
-	display: block; \
-	margin-top: 1em; \
-	margin-bottom: 1em; \
-	margin-left: 40px; \
-	margin-left: 40px; \
-} \
- \
-/*********** FORM ELEMENTS ************/ \
- \
-form { \
-	display: block; \
-	margin-top: 0em; \
-} \
- \
-option { \
-	display: none; \
-} \
- \
-input, textarea, keygen, select, button, isindex { \
-	margin: 0em; \
-	color: initial; \
-	line-height: normal; \
-	text-transform: none; \
-	text-indent: 0; \
-	text-shadow: none; \
-	display: inline-block; \
-} \
-input[type=\"hidden\"] { \
-	display: none; \
-} \
- \
- \
-article, aside, footer, header, hgroup, nav, section  \
-{ \
-	display: block; \
-} \
-\
-small, sub, sup { font-size: 80%; } \
-sub, sup { position: relative; } \
-sub { top: +0.5em; } \
-sup { top: -0.5em; } \
-"
diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp
index 42aebe764..984422c7f 100644
--- a/src/plugins/litehtml_viewer/lh_widget.cpp
+++ b/src/plugins/litehtml_viewer/lh_widget.cpp
@@ -41,10 +41,6 @@ extern "C" {
 const gchar *prefs_common_get_uri_cmd(void);
 }
 
-char master_css[] = {
-#include "css.inc"
-};
-
 static gboolean draw_cb(GtkWidget *widget, cairo_t *cr,
 		gpointer user_data);
 static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event,
@@ -102,7 +98,6 @@ lh_widget::lh_widget()
 
 	m_html = NULL;
 	m_rendered_width = 0;
-	m_context.load_master_stylesheet(master_css);
 
 	m_font_name = NULL;
 	m_font_size = 0;
@@ -162,8 +157,7 @@ void lh_widget::on_anchor_click(const char *url, const litehtml::element::ptr& e
 
 void lh_widget::import_css(litehtml::string& text, const litehtml::string& url, litehtml::string& baseurl)
 {
-	debug_print("lh_widget import_css\n");
-	baseurl = master_css;
+	debug_print("lh_widget import_css. url=\"%s\" baseurl=\"%s\"\n", url.c_str(), baseurl.c_str());
 }
 
 void lh_widget::get_client_rect(litehtml::position& client) const
@@ -190,7 +184,7 @@ void lh_widget::open_html(const gchar *contents)
 	update_font();
 
 	lh_widget_statusbar_push("Loading HTML part ...");
-	m_html = litehtml::document::createFromString(contents, this, &m_context);
+	m_html = litehtml::document::createFromString(contents, this);
 	m_rendered_width = 0;
 	if (m_html != NULL) {
 		debug_print("lh_widget::open_html created document\n");
diff --git a/src/plugins/litehtml_viewer/lh_widget.h b/src/plugins/litehtml_viewer/lh_widget.h
index e05d81f17..e4bd082b2 100644
--- a/src/plugins/litehtml_viewer/lh_widget.h
+++ b/src/plugins/litehtml_viewer/lh_widget.h
@@ -83,7 +83,6 @@ class lh_widget : public container_linux
 		GtkWidget *m_scrolled_window;
 		GtkWidget *m_viewport;
 		GtkWidget *m_context_menu;
-		litehtml::context m_context;
 		gint m_height;
 		litehtml::element::ptr m_over_element;
 		gboolean m_showing_url;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list