rpms/links/devel import.log, NONE, 1.1 links-2.2-google.patch, NONE, 1.1 links.spec, 1.4, 1.5
Lubomir Rintel
lkundrak at fedoraproject.org
Sat Oct 17 12:14:04 UTC 2009
Author: lkundrak
Update of /cvs/pkgs/rpms/links/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7421/devel
Modified Files:
links.spec
Added Files:
import.log links-2.2-google.patch
Log Message:
* Sat Oct 17 2009 Lubomir Rintel <lkundrak at v3.sk> - 2.2-11
- Do not display textareas hidden by CSS
--- NEW FILE import.log ---
links-2_2-11_fc12:HEAD:links-2.2-11.fc12.src.rpm:1255781606
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/pkgs/rpms/links/devel/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 17 Oct 2009 12:14:03 -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
@@ -11,6 +11,8 @@ Source0: http://links.twibright.c
Source1: links.desktop
Patch0: links-2.2-nss.patch
Patch1: links-2.2-ssl-verify.patch
+# Not sent upstream, since they would probably break my nose for this
+Patch2: links-2.2-google.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libpng-devel
@@ -45,6 +47,7 @@ scrolling.
%setup -q
%patch0 -p1 -b .nss
%patch1 -p1 -b .verify-ssl
+%patch2 -p1 -b .google
%build
@@ -107,6 +110,9 @@ exit 0
%changelog
+* Sat Oct 17 2009 Lubomir Rintel <lkundrak at v3.sk> - 2.2-11
+- 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