* bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag.
@ 2013-11-11 15:53 nakayamakenjiro
2013-11-24 15:34 ` bug#15860: (no subject) Kenjiro NAKAYAMA
2013-12-01 13:23 ` bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag Lars Magne Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: nakayamakenjiro @ 2013-11-11 15:53 UTC (permalink / raw)
To: 15860
If HTML has optgroup tag, the select box with options disapears. eww should support optgroup tag.
Signed-off-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
---
lisp/net/eww.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 573715e..4fe88b6 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -725,7 +725,15 @@ appears in a <link> or <a> tag."
(options nil)
(start (point))
(max 0))
- (dolist (elem cont)
+ (let ((opelem))
+ (cond ((eq (car (car cont)) 'optgroup)
+ (dolist (groupelem cont)
+ (unless (cdr (assq :disabled (cdr groupelem)))
+ (setq opelem (nconc opelem (cdr (cdr groupelem)))))
+ ))
+ (t
+ (setq opelem cont)))
+ (dolist (elem opelem)
(when (eq (car elem) 'option)
(when (cdr (assq :selected (cdr elem)))
(nconc menu (list :value
@@ -735,7 +743,7 @@ appears in a <link> or <a> tag."
(push (list 'item
:value (cdr (assq :value (cdr elem)))
:display display)
- options))))
+ options)))))
(when options
(setq options (nreverse options))
;; If we have no selected values, default to the first value.
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#15860: (no subject)
2013-11-11 15:53 bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag nakayamakenjiro
@ 2013-11-24 15:34 ` Kenjiro NAKAYAMA
2013-12-01 13:23 ` bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag Lars Magne Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Kenjiro NAKAYAMA @ 2013-11-24 15:34 UTC (permalink / raw)
To: 15860
The following HTML(test.html) reproduces the bug.
* Reproduce the bug.
1. M-x ewww-open-file RET
2. ~/$PATH_TO_THE_FILE/test.html
3. select box with options(Value A to D) dispears.
-- test.html --
<html>
<head><title>SELECT TEST</title></head>
<body>
<form method="POST" action="./dummy.php">
<input type="text" name="text1">
<input type="submit" name="btn1" value="val1">
<select>
<optgroup label="group 1">
<option value="a">Value A</option>
<option value="b">Value B</option>
</optgroup>
<optgroup label="group 2">
<option value="c">Value C</option>
<option value="d">Value D</option>
</optgroup>
</select>
</form>
</body>
</html>
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag.
2013-11-11 15:53 bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag nakayamakenjiro
2013-11-24 15:34 ` bug#15860: (no subject) Kenjiro NAKAYAMA
@ 2013-12-01 13:23 ` Lars Magne Ingebrigtsen
2013-12-02 11:44 ` Kenjiro NAKAYAMA
1 sibling, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2013-12-01 13:23 UTC (permalink / raw)
To: nakayamakenjiro; +Cc: 15860
<nakayamakenjiro@gmail.com> writes:
> If HTML has optgroup tag, the select box with options disapears. eww
> should support optgroup tag.
I've now applied the patch (with some changes).
But after checking it in, I noticed that you have two other small
patches to eww already in the code. I don't think the number of lines
exceeds the limit, but would you be willing to sign a copyright
assignment form for code to Emacs?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag.
2013-12-01 13:23 ` bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag Lars Magne Ingebrigtsen
@ 2013-12-02 11:44 ` Kenjiro NAKAYAMA
0 siblings, 0 replies; 4+ messages in thread
From: Kenjiro NAKAYAMA @ 2013-12-02 11:44 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: nakayamakenjiro, 15860
> exceeds the limit, but would you be willing to sign a copyright
> assignment form for code to Emacs?
Yes, I will sign a copyright assignment form soon.
Kenjiro NAKAYAMA
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-02 11:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 15:53 bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag nakayamakenjiro
2013-11-24 15:34 ` bug#15860: (no subject) Kenjiro NAKAYAMA
2013-12-01 13:23 ` bug#15860: 24.3.50; [PATCH] eww: Handle optgroup tag Lars Magne Ingebrigtsen
2013-12-02 11:44 ` Kenjiro NAKAYAMA
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).