Bug 403524: Make textarea not inherit text decorations and correct the failing reftest (r=dbaron)

Originally, this reftest only failed on Windows (see bug 585684).
However, upon making standards mode compliant with CSS2.1, the bug
described in 585684 spread to all platforms, indicating it was actually
a layout bug and not d2d per se.  This patch makes the anonymous div
inside textareas and text inputs inline-blocks so that they ignore
decorations defined on ancestors.
This commit is contained in:
Vitor Menezes 2011-08-03 11:30:58 -07:00
parent cf98ee0a14
commit 4dbadf264d
3 changed files with 3 additions and 4 deletions

View File

@ -81,7 +81,7 @@ fails == underline-block-propagation-2-quirks.html underline-block-propagation-2
== underline-table-cell-standards.html underline-table-cell-standards-ref.html == underline-table-cell-standards.html underline-table-cell-standards-ref.html
!= underline-table-cell-standards.html underline-table-cell-standards-notref.html != underline-table-cell-standards.html underline-table-cell-standards-notref.html
== underline-block-propagation-standards.html underline-block-propagation-standards-ref.html == underline-block-propagation-standards.html underline-block-propagation-standards-ref.html
fails-if(Android) fails-if(d2d) == underline-block-propagation-2-standards.html underline-block-propagation-2-standards-ref.html # bug 585684 fails-if(Android) == underline-block-propagation-2-standards.html underline-block-propagation-2-standards-ref.html
== text-decoration-zorder-1-standards.html text-decoration-zorder-1-ref.html == text-decoration-zorder-1-standards.html text-decoration-zorder-1-ref.html
== text-decoration-zorder-1-quirks.html text-decoration-zorder-1-ref.html == text-decoration-zorder-1-quirks.html text-decoration-zorder-1-ref.html
== table-quirk-1.html table-quirk-1-ref.html == table-quirk-1.html table-quirk-1-ref.html

View File

@ -3,6 +3,7 @@
<title>More tests of propagation of text-decoration</title> <title>More tests of propagation of text-decoration</title>
<style> <style>
textarea { -moz-appearance: none } textarea { -moz-appearance: none }
textarea + textarea { margin-left: 10px }
</style> </style>
</head> </head>
<body> <body>
@ -10,7 +11,6 @@ textarea { -moz-appearance: none }
<form> <form>
<span style="text-decoration:underline">This text should be underlined.</span><br> <span style="text-decoration:underline">This text should be underlined.</span><br>
<textarea rows="2" cols="40">This text should not be underlined.</textarea <textarea rows="2" cols="40">This text should not be underlined.</textarea
><span style="display:inline-block;width:10px;text-decoration:underline">&nbsp;&nbsp;&nbsp;</span
><textarea rows="2" cols="40" style="text-decoration:line-through" ><textarea rows="2" cols="40" style="text-decoration:line-through"
>This text should be struck out.</textarea> >This text should be struck out.</textarea>
<p style="text-decoration:underline">This text should also be underlined.</p> <p style="text-decoration:underline">This text should also be underlined.</p>

View File

@ -156,11 +156,10 @@ input > .anonymous-div {
/* The 1px horizontal padding is for parity with Win/IE */ /* The 1px horizontal padding is for parity with Win/IE */
padding: 0px 1px; padding: 0px 1px;
margin: 0px; margin: 0px;
/* XXXldb I'm not sure if we really want the 'text-decoration: inherit',
but it's needed to make 'text-decoration' "work" on text inputs. */
text-decoration: inherit; text-decoration: inherit;
-moz-text-decoration-color: inherit; -moz-text-decoration-color: inherit;
-moz-text-decoration-style: inherit; -moz-text-decoration-style: inherit;
display: inline-block;
ime-mode: inherit; ime-mode: inherit;
resize: inherit; resize: inherit;
} }