8318112: CSS percentage values are capped at 100%
Reviewed-by: tr, prr
This commit is contained in:
parent
2063bb8ffa
commit
f70667ea68
@ -2627,7 +2627,7 @@ public class CSS implements Serializable {
|
||||
case 1:
|
||||
// %
|
||||
lv = new LengthValue();
|
||||
lv.span = Math.max(0, Math.min(1, lu.value));
|
||||
lv.span = Math.max(0, lu.value);
|
||||
lv.percentage = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,7 @@ import javax.swing.text.html.StyleSheet;
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 7083187 8318113
|
||||
* @bug 7083187 8318113 8318112
|
||||
* @summary Verifies if CSS.CSSValue attribute is same
|
||||
* @run main CSSAttributeEqualityBug
|
||||
*/
|
||||
@ -91,6 +91,7 @@ public class CSSAttributeEqualityBug {
|
||||
{"margin-top: 100%", "margin-top: 50%"},
|
||||
|
||||
{"background-image: none", "background-image: url(image.png)"},
|
||||
{"width: 100%", "width: 200 %"},
|
||||
};
|
||||
|
||||
private static final String[][] EQUALS_WITH_SPACE = {
|
||||
|
Loading…
Reference in New Issue
Block a user