rpms/links/F-12 links-2.2-google.patch,NONE,1.1 links.spec,1.4,1.5

Ondrej Vasik ovasik at fedoraproject.org
Fri Nov 27 11:45:11 UTC 2009


Author: ovasik

Update of /cvs/extras/rpms/links/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16934

Modified Files:
	links.spec 
Added Files:
	links-2.2-google.patch 
Log Message:
add Requires(post) and Requires(postun) for coreutils (readlink) (#540434), Do not display textareas hidden by CSS

links-2.2-google.patch:
 html.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

--- NEW FILE links-2.2-google.patch ---
>From f6e442534448ece862a288216efd259cc53b9596 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak at v3.sk>
Date: Sat, 17 Oct 2009 14:06:51 +0200
Subject: [PATCH] Display Google correctly

Do not display a TEXTAREA which has STYLE attribute that matches
"display:.*none" even when we don't do CSS, so that Google looks nice.
---
 html.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/html.c b/html.c
index b0f5918..26f6e99 100644
--- a/html.c
+++ b/html.c
@@ -2143,7 +2143,7 @@ void html_textarea(unsigned char *a)
 void do_html_textarea(unsigned char *attr, unsigned char *html, unsigned char *eof, unsigned char **end, void *f)
 {
 	struct form_control *fc;
-	unsigned char *p, *t_name, *w;
+	unsigned char *p, *t_name, *w, *style;
 	int t_namelen;
 	int cols, rows;
 	int i;
@@ -2172,6 +2172,16 @@ void do_html_textarea(unsigned char *attr, unsigned char *html, unsigned char *e
 	fc->type = FC_TEXTAREA;;
 	fc->ro = has_attr(attr, "disabled") ? 2 : has_attr(attr, "readonly") ? 1 : 0;
 	fc->default_value = memacpy(html, p - html);
+
+	/* Half-assed way to hide textareas that have display CSS property set to none,
+         * even as we don't do CSS, so that we display Google nicely */
+	style = get_attr_val(attr, "style");
+	if (style) style = (unsigned char *)strcasestr(style, "display");
+	if (style) style += strlen("display");
+	while (style && *style && isblank(*style)) style++;
+	if (style && *style == ':') do { ++style; } while (style && *style && isblank(*style));
+	if (style && style == (unsigned char *)strcasestr(style, "none")) goto hid;
+	
 	if ((cols = get_num(attr, "cols")) <= 5) cols = HTML_DEFAULT_TEXTAREA_WIDTH;
 	cols++;
 	if ((rows = get_num(attr, "rows")) <= 0) rows = HTML_DEFAULT_TEXTAREA_HEIGHT;
@@ -2212,6 +2222,8 @@ void do_html_textarea(unsigned char *attr, unsigned char *html, unsigned char *e
 	kill_html_stack_item(&html_top);
 	if (rows > 1) ln_break(1, line_break_f, f);
 	else put_chrs(" ", 1, put_chars_f, f);
+
+	hid:
 	special_f(f, SP_CONTROL, fc);
 }
 
-- 
1.6.5.rc2



Index: links.spec
===================================================================
RCS file: /cvs/extras/rpms/links/F-12/links.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- links.spec	25 Jul 2009 11:06:11 -0000	1.4
+++ links.spec	27 Nov 2009 11:45:11 -0000	1.5
@@ -1,6 +1,6 @@
 Name:           links
 Version:        2.2
-Release:        10%{?dist}
+Release:        11%{?dist}
 Epoch:          1
 Summary:        Web browser running in both graphics and text mode
 
@@ -107,6 +107,11 @@ exit 0
 
 
 %changelog
+* Fri Nov 27 2009 Ondrej Vasik <ovasik at redhat.com> - 1:2.2-11
+- add Requires(post) and Requires(postun) for coreutils (readlink)
+  (#540434)
+- Do not display textareas hidden by CSS
+
 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:2.2-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list