-
-
Notifications
You must be signed in to change notification settings - Fork 496
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Use correct default value for <input type=range>
Previously the input element was displayed with value 0, when no value was set in the HTML. Now it uses `value_sanitization_algorithm()`, which will calculate the default value. In `value_sanitization_algorithm()` there was a logical mistake/typo. The comment from the spec says "unless the maximum is less than the minimum". The added layout test would fail without the code changes. Fixes #520
- Loading branch information
1 parent
907dc84
commit 191531b
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline | ||
BlockContainer <html> at (0,0) content-size 800x38 [BFC] children: not-inline | ||
BlockContainer <body> at (8,8) content-size 784x22 children: inline | ||
frag 0 from BlockContainer start: 0, length: 0, rect: [8,9 200x16] baseline: 16 | ||
frag 1 from BlockContainer start: 0, length: 0, rect: [208,9 200x16] baseline: 16 | ||
BlockContainer <input> at (8,9) content-size 200x16 inline-block [BFC] children: not-inline | ||
BlockContainer <div> at (9,16) content-size 200x4 positioned children: not-inline | ||
BlockContainer <div> at (9,16) content-size 100x4 positioned [BFC] children: not-inline | ||
BlockContainer <div> at (109,10) content-size 16x16 children: not-inline | ||
BlockContainer <input> at (208,9) content-size 200x16 inline-block [BFC] children: not-inline | ||
BlockContainer <div> at (209,16) content-size 200x4 positioned children: not-inline | ||
BlockContainer <div> at (209,16) content-size 20x4 positioned [BFC] children: not-inline | ||
BlockContainer <div> at (229,10) content-size 16x16 children: not-inline | ||
TextNode <#text> | ||
|
||
ViewportPaintable (Viewport<#document>) [0,0 800x600] | ||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x38] | ||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x22] | ||
PaintableWithLines (BlockContainer<INPUT>) [8,9 200x16] overflow: [8,9 202x17] | ||
PaintableWithLines (BlockContainer<DIV>) [8,15 202x6] overflow: [9,10 200x16] | ||
PaintableWithLines (BlockContainer<DIV>) [9,16 100x4] | ||
PaintableWithLines (BlockContainer<DIV>) [109,10 16x16] | ||
PaintableWithLines (BlockContainer<INPUT>) [208,9 200x16] overflow: [208,9 202x17] | ||
PaintableWithLines (BlockContainer<DIV>) [208,15 202x6] overflow: [209,10 200x16] | ||
PaintableWithLines (BlockContainer<DIV>) [209,16 20x4] | ||
PaintableWithLines (BlockContainer<DIV>) [229,10 16x16] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html><html><head><style> | ||
* { | ||
font: 20px 'SerenitySans'; | ||
} | ||
input { | ||
width: 200px; | ||
} | ||
</style></head><body><input type="range" min="0" max="100" /><input type="range" min="0" max="100" value="10"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters