зеркало из https://github.com/mozilla/pjs.git
Bug 610935 - Don't clamp percentages in HTML dimension attributes; r+a=sicking
This commit is contained in:
Родитель
e2f19b88b9
Коммит
62140158bd
|
@ -1073,11 +1073,7 @@ nsAttrValue::ParseSpecialIntValue(const nsAString& aString,
|
|||
PRInt32 val = NS_MAX(originalVal, 0);
|
||||
|
||||
// % (percent)
|
||||
// XXX RFindChar means that 5%x will be parsed!
|
||||
if (aCanBePercent && (isPercent || tmp.RFindChar('%') >= 0)) {
|
||||
if (val > 100) {
|
||||
val = 100;
|
||||
}
|
||||
isPercent = PR_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -231,6 +231,8 @@ public:
|
|||
* @param aString the string to parse
|
||||
* @param aCanBePercent PR_TRUE if it can be a percent value (%)
|
||||
* @return whether the value could be parsed
|
||||
*
|
||||
* @see http://www.whatwg.org/html/#rules-for-parsing-dimension-values
|
||||
*/
|
||||
PRBool ParseSpecialIntValue(const nsAString& aString,
|
||||
PRBool aCanBePercent);
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<title>Test for bug 610935</title>
|
||||
<style>
|
||||
div { width:300px; background:yellow; height:50px; }
|
||||
table { width:150%; }
|
||||
td { background:blue; }
|
||||
</style>
|
||||
<div>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td>parent div float=left</td></tr>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
<!doctype html>
|
||||
<title>Test for bug 610935</title>
|
||||
<style>
|
||||
div { width:300px; background:yellow; height:50px; }
|
||||
td { background:blue; }
|
||||
</style>
|
||||
<div>
|
||||
<table width="150%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><td>parent div float=left</td></tr>
|
||||
</table>
|
||||
</div>
|
|
@ -17,6 +17,7 @@
|
|||
== 596455-1b.html 596455-ref-1.html
|
||||
== 596455-2a.html 596455-ref-2.html
|
||||
== 596455-2b.html 596455-ref-2.html
|
||||
== 610935.html 610935-ref.html
|
||||
== hidden-1a.html hidden-1-ref.html
|
||||
== hidden-1b.html hidden-1-ref.html
|
||||
== hidden-1c.html hidden-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче