mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 849407: Disable flex item style fixup for anonymous content in nsFrameManager::ReResolveStyleContext(). r=bz
This commit is contained in:
parent
3eec603af5
commit
b47d968bc8
@ -1270,6 +1270,10 @@ nsFrameManager::ReResolveStyleContext(nsPresContext *aPresContext,
|
||||
else {
|
||||
NS_ASSERTION(localContent,
|
||||
"non pseudo-element frame without content node");
|
||||
// Skip flex-item style fixup for anonymous subtrees:
|
||||
TreeMatchContext::AutoFlexItemStyleFixupSkipper
|
||||
flexFixupSkipper(aTreeMatchContext,
|
||||
element->IsRootOfNativeAnonymousSubtree());
|
||||
newContext = styleSet->ResolveStyleFor(element, parentContext,
|
||||
aTreeMatchContext);
|
||||
}
|
||||
|
27
layout/reftests/bugs/849407-1-ref.html
Normal file
27
layout/reftests/bugs/849407-1-ref.html
Normal file
@ -0,0 +1,27 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
legend {
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow: scroll;
|
||||
border: 2px dashed gray;
|
||||
}
|
||||
div.child {
|
||||
background: lightblue;
|
||||
height: 1000px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div class="child">
|
||||
There should be scrollbars making this area scrollable.
|
||||
</div>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
28
layout/reftests/bugs/849407-1.html
Normal file
28
layout/reftests/bugs/849407-1.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<style>
|
||||
legend {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
overflow: scroll;
|
||||
border: 2px dashed gray;
|
||||
}
|
||||
div.child {
|
||||
background: lightblue;
|
||||
height: 1000px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div class="child">
|
||||
There should be scrollbars making this area scrollable.
|
||||
</div>
|
||||
</legend>
|
||||
</fieldset>
|
||||
</body>
|
||||
</html>
|
@ -1748,3 +1748,4 @@ skip-if(B2G) == 818276-1.html 818276-1-ref.html
|
||||
== 848421-1.html 848421-1-ref.html
|
||||
== 847850-1.html 847850-1-ref.html
|
||||
== 846144-1.html 846144-1-ref.html
|
||||
test-pref(layout.css.flexbox.enabled,true) == 849407-1.html 849407-1-ref.html
|
||||
|
@ -243,15 +243,24 @@ struct NS_STACK_CLASS TreeMatchContext {
|
||||
};
|
||||
|
||||
/* Helper class for tracking whether we're skipping the ApplyStyleFixups
|
||||
* code for flex items. */
|
||||
* code for flex items.
|
||||
*
|
||||
* The optional second parameter aSkipFlexItemStyleFixup allows this
|
||||
* class to be instantiated but only conditionally activated (e.g.
|
||||
* in cases where we may or may not want to be skipping flex-item
|
||||
* style fixup for a particular chunk of code).
|
||||
*/
|
||||
class NS_STACK_CLASS AutoFlexItemStyleFixupSkipper {
|
||||
public:
|
||||
AutoFlexItemStyleFixupSkipper(TreeMatchContext& aTreeMatchContext
|
||||
AutoFlexItemStyleFixupSkipper(TreeMatchContext& aTreeMatchContext,
|
||||
bool aSkipFlexItemStyleFixup = true
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: mAutoRestorer(aTreeMatchContext.mSkippingFlexItemStyleFixup)
|
||||
{
|
||||
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
aTreeMatchContext.mSkippingFlexItemStyleFixup = true;
|
||||
if (aSkipFlexItemStyleFixup) {
|
||||
aTreeMatchContext.mSkippingFlexItemStyleFixup = true;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user