Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width.html

Issue 24360004: Use shrink-to-fit for width for Button, input, select, textarea, and legend treat width value of 'a… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width.html
diff --git a/LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width.html b/LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..dbad531bba88ba358d51c980c5c305bead9c7b0d
--- /dev/null
+++ b/LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+.container {
+ position: relative;
+ height: 50px;
+ background-color: gray;
+}
+
+.auto-width {
+ position: absolute;
+ left: 0;
+ right: 0;
+}
+
+.with-border-padding {
+ border: 2px;
+ padding: 5px;
+}
+
+.border-box {
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ width: 200px;
+ height: 20px;
+}
+</style>
+</head>
+<body>
+<div>Check if the elements shrink to fit as per their 'intrinsic' width for Button, input, select and textarea. If you see any the elements strech to available width, then the test has failed.</div>
+<div class="container">
+<button id="button" class="auto-width">Button</button>
+</div>
+<div class="container">
+<input id="inputText" type="text" class="auto-width">
+</div>
+<div class="container">
+<select id="select" class="auto-width"></select>
+</div>
+<div class="container">
+<textarea id="textarea" class="auto-width">Text area</textarea>
+</div>
+<div class="container">
+<button id="buttonBorderPadding" class="auto-width with-border-padding">Button</button>
+</div>
+<div class="container">
+<input id="inputTextBorderPadding" type="text" class="auto-width with-border-padding">
+</div>
+<div class="container">
+<select id="selectBorderPadding" class="auto-width with-border-padding"></select>
+</div>
+<div class="container">
+<textarea id="textareaBorderPadding" class="auto-width with-border-padding">Text area</textarea>
+</div>
+<div class="container">
+<button id="button-border-box" class="auto-width border-box with-border-padding">Button</button>
+</div>
+<div class="container">
+<input id="inputText-border-box" type="text" class="auto-width border-box with-border-padding">
+</div>
+<div class="container">
+<select id="select-border-box" class="auto-width border-box with-border-padding"></select>
+</div>
+<div class="container">
+<textarea id="textarea-border-box" class="auto-width border-box with-border-padding">Text area</textarea>
+</div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/replaced/absolute-position-auto-width-and-left-and-right-and-intrinsic-width-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698