mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1216747 - Record dependency on writing mode in nsRuleNode::ComputeStylePosition. r=heycam
Without the patch, both reftests fail; with it, both pass.
This commit is contained in:
parent
c34a81df88
commit
07f0bbe1de
3
layout/reftests/writing-mode/1216747-1-notref.html
Normal file
3
layout/reftests/writing-mode/1216747-1-notref.html
Normal file
@ -0,0 +1,3 @@
|
||||
<!DOCTYPE HTML>
|
||||
|
||||
<div>This should have min-content width (i.e., many line breaks).</div>
|
10
layout/reftests/writing-mode/1216747-1-ref.html
Normal file
10
layout/reftests/writing-mode/1216747-1-ref.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE HTML>
|
||||
<style>
|
||||
|
||||
div {
|
||||
width: -moz-min-content;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div>This should have min-content width (i.e., many line breaks).</div>
|
14
layout/reftests/writing-mode/1216747-1.html
Normal file
14
layout/reftests/writing-mode/1216747-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE HTML>
|
||||
<style>
|
||||
|
||||
div {
|
||||
width: -moz-min-content;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- If you delete this div, the bug goes away, because we don't cache
|
||||
vertical-specific data in the rule tree. -->
|
||||
<div style="writing-mode: vertical-rl"></div>
|
||||
|
||||
<div>This should have min-content width (i.e., many line breaks).</div>
|
@ -163,6 +163,9 @@ fuzzy-if(gtkWidget||B2G,255,6) fuzzy-if(cocoaWidget,65,69) == 1193519-sideways-l
|
||||
== 1196887-1-computed-display-inline-block.html 1196887-1-computed-display-inline-block-ref.html
|
||||
== 1205787-legacy-svg-values-1.html 1205787-legacy-svg-values-1-ref.html
|
||||
|
||||
== 1216747-1.html 1216747-1-ref.html
|
||||
!= 1216747-1.html 1216747-1-notref.html
|
||||
|
||||
# Suite of tests from Gérard Talbot in bug 1079151
|
||||
include abspos/reftest.list
|
||||
|
||||
|
@ -7706,7 +7706,8 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
// that case.
|
||||
|
||||
bool vertical;
|
||||
switch (aContext->StyleVisibility()->mWritingMode) {
|
||||
uint8_t writingMode = aContext->StyleVisibility()->mWritingMode;
|
||||
switch (writingMode) {
|
||||
default:
|
||||
MOZ_ASSERT(false, "unexpected writing-mode value");
|
||||
// fall through
|
||||
@ -7722,6 +7723,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
}
|
||||
|
||||
const nsCSSValue* width = aRuleData->ValueForWidth();
|
||||
if (width->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(width->GetUnit() == eCSSUnit_Enumerated && vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *width,
|
||||
pos->mWidth, parentPos->mWidth,
|
||||
@ -7730,6 +7734,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
const nsCSSValue* minWidth = aRuleData->ValueForMinWidth();
|
||||
if (minWidth->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(minWidth->GetUnit() == eCSSUnit_Enumerated && vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *minWidth,
|
||||
pos->mMinWidth, parentPos->mMinWidth,
|
||||
@ -7738,6 +7745,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
const nsCSSValue* maxWidth = aRuleData->ValueForMaxWidth();
|
||||
if (maxWidth->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(maxWidth->GetUnit() == eCSSUnit_Enumerated && vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *maxWidth,
|
||||
pos->mMaxWidth, parentPos->mMaxWidth,
|
||||
@ -7746,6 +7756,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
const nsCSSValue* height = aRuleData->ValueForHeight();
|
||||
if (height->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(height->GetUnit() == eCSSUnit_Enumerated && !vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *height,
|
||||
pos->mHeight, parentPos->mHeight,
|
||||
@ -7754,6 +7767,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
const nsCSSValue* minHeight = aRuleData->ValueForMinHeight();
|
||||
if (minHeight->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(minHeight->GetUnit() == eCSSUnit_Enumerated && !vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *minHeight,
|
||||
pos->mMinHeight, parentPos->mMinHeight,
|
||||
@ -7762,6 +7778,9 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
aContext, mPresContext, conditions);
|
||||
|
||||
const nsCSSValue* maxHeight = aRuleData->ValueForMaxHeight();
|
||||
if (maxHeight->GetUnit() == eCSSUnit_Enumerated) {
|
||||
conditions.SetWritingModeDependency(writingMode);
|
||||
}
|
||||
SetCoord(maxHeight->GetUnit() == eCSSUnit_Enumerated && !vertical ?
|
||||
nsCSSValue(eCSSUnit_Unset) : *maxHeight,
|
||||
pos->mMaxHeight, parentPos->mMaxHeight,
|
||||
|
Loading…
Reference in New Issue
Block a user