| Summary: | Render bug on http://fob.po8.org/node/101. Comment box x-size too small | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Christian D. <christiand59> |
| Component: | khtml parsing | Assignee: | Maksim Orlovich <maksim> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Christian D.
2006-02-19 15:56:06 UTC
cols has invalid quotion marks. (should be cols="70") <textarea wrap="virtual" cols="70" rows="10" name="edit[comment]" Wow, mozilla's parsing behavior on this stuff is really crack-tastic SVN commit 511343 by orlovich:
Match IE behavior on parsing of malformed textarea cols/rows
(Coincidentally, mozilla manages to have different behavior between the two)
BUG:122287
M +8 -2 html_formimpl.cpp
--- branches/KDE/3.5/kdelibs/khtml/html/html_formimpl.cpp #511342:511343
@@ -2638,12 +2638,18 @@
switch(attr->id())
{
case ATTR_ROWS:
- m_rows = attr->val() ? attr->val()->toInt() : 3;
+ m_rows = 0;
+ if (attr->val())
+ m_rows = DOMString(attr->val()).string().toInt();
+ if (!m_rows) m_rows = 2;
if (renderer())
renderer()->setNeedsLayoutAndMinMaxRecalc();
break;
case ATTR_COLS:
- m_cols = attr->val() ? attr->val()->toInt() : 60;
+ m_cols = 0;
+ if (attr->val())
+ m_cols = DOMString(attr->val()).string().toInt();
+ if (!m_cols) m_cols = 20;
if (renderer())
renderer()->setNeedsLayoutAndMinMaxRecalc();
break;
SVN commit 511349 by orlovich:
New testase for invalid cols/rows parsing. Also some baseline maintenance:
one of the tests was affected by the change. Other date back to
the getAttribute change long time ago, but I forgot to commit them
<blush>
CCBUG:122287
A baseline/forms/textarea-invalid-cols.html-dom
AM baseline/forms/textarea-invalid-cols.html-dump.png
A baseline/forms/textarea-invalid-cols.html-render
M +1 -1 baseline/mozilla/dom/dom-html/hopt009.html-dom
M baseline/mozilla/dom/dom-html/hopt009.html-dump.png
M +4 -4 baseline/mozilla/dom/dom-html/hopt009.html-render
M +2 -2 baseline/mozilla/dom/dom-html/htxa000.html-dom
M baseline/mozilla/dom/dom-html/htxa000.html-dump.png
M +6 -2 baseline/mozilla/dom/dom-html/htxa000.html-render
M +1 -1 baseline/mozilla/dom/dom-html/htxa003.html-dom
M baseline/mozilla/dom/dom-html/htxa003.html-dump.png
M +3 -1 baseline/mozilla/dom/dom-html/htxa003.html-render
M baseline/mozilla/dom/dom-html/htxa007.html-dump.png
M +1 -1 baseline/mozilla/dom/dom-html/htxa007.html-render
A tests/forms/textarea-invalid-cols.html
** trunk/tests/khtmltests/regression/baseline/forms/textarea-invalid-cols.html-dump.png #property svn:mime-type
+ application/octet-stream
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/hopt009.html-dom #511348:511349
@@ -120,7 +120,7 @@
BR
B
FONT color="#FF2400"
- #text "HTMLOption.getAttribute('text')="""
+ #text "HTMLOption.getAttribute('text')="null""
BR
B
FONT color="#FF2400"
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/hopt009.html-render #511348:511349
@@ -66,10 +66,10 @@
RenderText {text} at (0,0) size 149x16 text inline minMaxKnown
text run at (0,16) width 149: "*** DEBUG SECTION ***"
RenderBR {br} at (0,0) size 0x0 text inline
- RenderInline {b} at (0,0) size 208x16 [font='helvetica' 14px bold] inline minMaxKnown
- RenderInline {font} at (0,0) size 208x16 [color=#ff2400] inline minMaxKnown
- RenderText {text} at (0,0) size 208x16 text inline minMaxKnown
- text run at (0,32) width 208: "HTMLOption.getAttribute('text')=\"\""
+ RenderInline {b} at (0,0) size 228x16 [font='helvetica' 14px bold] inline minMaxKnown
+ RenderInline {font} at (0,0) size 228x16 [color=#ff2400] inline minMaxKnown
+ RenderText {text} at (0,0) size 228x16 text inline minMaxKnown
+ text run at (0,32) width 228: "HTMLOption.getAttribute('text')=\"null\""
RenderBR {br} at (0,0) size 0x0 text inline
RenderInline {b} at (0,0) size 216x16 [font='helvetica' 14px bold] inline minMaxKnown
RenderInline {font} at (0,0) size 216x16 [color=#ff2400] inline minMaxKnown
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/htxa000.html-dom #511348:511349
@@ -99,7 +99,7 @@
#text "Bug# 32799 - fixed - bug me, jc
"
TD bgcolor="red" style="color:white;"
- #text "
+ #text "null
"
TD
#text "default value 1
@@ -114,7 +114,7 @@
#text "Bug# 32799 - fixed - bug me, jc
"
TD bgcolor="red" style="color:white;"
- #text "
+ #text "null
"
TD
#text "default value 2
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/htxa000.html-render #511348:511349
@@ -46,7 +46,9 @@
RenderTableCell {td} at (355,24) size 183x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=1 col=2 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 179x16 text inline paintBackground minMaxKnown
text run at (2,2) width 179: "Bug# 32799 - fixed - bug me, jc"
- RenderTableCell {td} at (540,32) size 83x4 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=1 col=3 rSpan=1 cSpan=1
+ RenderTableCell {td} at (540,24) size 83x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=1 col=3 rSpan=1 cSpan=1
+ RenderText {text} at (0,0) size 20x16 text inline paintBackground minMaxKnown
+ text run at (2,2) width 20: "null"
RenderTableCell {td} at (625,24) size 101x20 paintBackground minMaxKnown row=1 col=4 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 83x16 text inline paintBackground minMaxKnown
text run at (2,2) width 83: "default value 1"
@@ -60,7 +62,9 @@
RenderTableCell {td} at (355,46) size 183x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=2 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 179x16 text inline paintBackground minMaxKnown
text run at (2,2) width 179: "Bug# 32799 - fixed - bug me, jc"
- RenderTableCell {td} at (540,54) size 83x4 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=3 rSpan=1 cSpan=1
+ RenderTableCell {td} at (540,46) size 83x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=3 rSpan=1 cSpan=1
+ RenderText {text} at (0,0) size 20x16 text inline paintBackground minMaxKnown
+ text run at (2,2) width 20: "null"
RenderTableCell {td} at (625,46) size 101x20 paintBackground minMaxKnown row=2 col=4 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 83x16 text inline paintBackground minMaxKnown
text run at (2,2) width 83: "default value 2"
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/htxa003.html-dom #511348:511349
@@ -121,7 +121,7 @@
#text "bug #29292, jc
"
TD bgcolor="red" style="color:white;"
- #text "
+ #text "null
"
TD
#text "1000
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/htxa003.html-render #511348:511349
@@ -66,7 +66,9 @@
RenderTableCell {td} at (308,46) size 89x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=2 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 85x16 text inline paintBackground minMaxKnown
text run at (2,2) width 85: "bug #29292, jc"
- RenderTableCell {td} at (399,54) size 83x4 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=3 rSpan=1 cSpan=1
+ RenderTableCell {td} at (399,46) size 83x20 [color=#ffffff] [bgcolor=#ff0000] paintBackground minMaxKnown row=2 col=3 rSpan=1 cSpan=1
+ RenderText {text} at (0,0) size 20x16 text inline paintBackground minMaxKnown
+ text run at (2,2) width 20: "null"
RenderTableCell {td} at (484,46) size 101x20 paintBackground minMaxKnown row=2 col=4 rSpan=1 cSpan=1
RenderText {text} at (0,0) size 28x16 text inline paintBackground minMaxKnown
text run at (2,2) width 28: "1000"
--- trunk/tests/khtmltests/regression/baseline/mozilla/dom/dom-html/htxa007.html-render #511348:511349
@@ -7,7 +7,7 @@
RenderTextArea {textarea} at (0,0) size 158x113 [font='courier' 14px] inline replaced minMaxKnown color=#000000 bg=#ffffff
RenderText {text} at (0,0) size 4x16 text inline minMaxKnown
text run at (158,97) width 4: " "
- RenderTextArea {textarea} at (162,90) size 158x23 [font='courier' 14px] inline replaced minMaxKnown color=#000000 bg=#ffffff
+ RenderTextArea {textarea} at (162,75) size 158x38 [font='courier' 14px] inline replaced minMaxKnown color=#000000 bg=#ffffff
RenderText {text} at (0,0) size 0x14 text inline minMaxKnown
RenderBlock {form} at (0,127) size 776x0 minMaxKnown childrenInline
RenderBlock {h3} at (0,128) size 776x16 [font='helvetica' 17px bold] minMaxKnown childrenInline
|