зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1478550 - Adjust IsInnerTableStyle to fail for table captions. r=dholbert
MozReview-Commit-ID: 6CK1XEYWsTl --HG-- extra : rebase_source : d5f753d0127c482021577fe0f48c67a1361e0b53
This commit is contained in:
Родитель
51268dcbdf
Коммит
20f759a6e0
|
@ -9442,9 +9442,7 @@ nsLayoutUtils::GetTouchActionFromFrame(nsIFrame* aFrame)
|
|||
}
|
||||
|
||||
const nsStyleDisplay* disp = aFrame->StyleDisplay();
|
||||
bool isTableElement = disp->IsInnerTableStyle() &&
|
||||
disp->mDisplay != StyleDisplay::TableCell &&
|
||||
disp->mDisplay != StyleDisplay::TableCaption;
|
||||
bool isTableElement = disp->IsInternalTableStyleExceptCell();
|
||||
if (isTableElement) {
|
||||
return NS_STYLE_TOUCH_ACTION_AUTO;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reftest Reference</title>
|
||||
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
|
||||
<style>
|
||||
caption {
|
||||
border: 1em solid green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption></caption>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Test: 'contain: size' on table captions should cause them to be sized as if they had no contents.</title>
|
||||
<link rel="author" title="Morgan Rae Reschenberg" href="mailto:mreschenberg@berkeley.edu">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-contain/#containment-size">
|
||||
<link rel="match" href="contain-size-table-caption-001-ref.html">
|
||||
<style>
|
||||
.contain {
|
||||
contain:size;
|
||||
}
|
||||
.innerContents {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
color: transparent;
|
||||
}
|
||||
caption {
|
||||
border: 1em solid green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<caption class="contain">
|
||||
<div class="innerContents">
|
||||
inner
|
||||
</div>
|
||||
</caption>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -27,3 +27,4 @@ fuzzy-if(webrender&&winWidget,3,2) == contain-size-inline-flex-001.html contain-
|
|||
== contain-size-fieldset-002.html contain-size-fieldset-002-ref.html
|
||||
== contain-size-multicol-002.html contain-size-multicol-002-ref.html
|
||||
== contain-size-multicol-003.html contain-size-multicol-003-ref.html
|
||||
== contain-size-table-caption-001.html contain-size-table-caption-001-ref.html
|
||||
|
|
|
@ -2276,8 +2276,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleDisplay
|
|||
}
|
||||
|
||||
bool IsInnerTableStyle() const {
|
||||
return mozilla::StyleDisplay::TableCaption == mDisplay ||
|
||||
mozilla::StyleDisplay::TableCell == mDisplay ||
|
||||
return mozilla::StyleDisplay::TableCell == mDisplay ||
|
||||
IsInternalTableStyleExceptCell();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче