Skip to content

Commit

Permalink
blink: Fix computed style overrides for overflow.
Browse files Browse the repository at this point in the history
StyleAdjuster enforces that an element with table layout can only use
overflow with values 'visible' or 'hidden'. There is no reason to
disallow 'clip' in this case.

See update to the spec here: https://github.com/w3c/csswg-drafts/pull/7492/files

Bug: 1321217
Change-Id: I6eea2c5fd105f6b46adef590f35eafa0b3598031
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3758250
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1023858}
  • Loading branch information
khushalsagar authored and chromium-wpt-export-bot committed Jul 13, 2022
1 parent f5a2d3e commit 3afcc8c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions css/css-overflow/overflow-img-display-table-ref.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title>Verifies img elements are clipped with display:table</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#propdef-overflow">
<link rel="author" title="Khushal Sagar" href="mailto:khushalsagar@chromium.org">
<style>
.default {
width: 25px;
height: 50px;
border-radius: 2px;
overflow: clip;
border-radius: 2px;
}
</style>
<body>
<div class="default">
<img src="../css-images/support/exif-orientation-6-ru.jpg"></img>
</div>
</body>
19 changes: 19 additions & 0 deletions css/css-overflow/overflow-img-display-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<meta charset="utf-8">
<title>Verifies img elements are clipped with display:table</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#propdef-overflow">
<link rel="author" title="Khushal Sagar" href="mailto:khushalsagar@chromium.org">
<link rel="match" href="overflow-img-display-table-ref.html">
<style>
.default {
width: 25px;
height: 50px;
object-fit: none;
object-position: 0% 0%;
border-radius: 2px;
display: table;
}
</style>
<body>
<img class=default src="../css-images/support/exif-orientation-6-ru.jpg"></img>
</body>

0 comments on commit 3afcc8c

Please sign in to comment.