mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 840317 - Re-evaluate media queries in scoped style sheets. r=dbaron
This commit is contained in:
parent
56fa4092eb
commit
85dbbf856b
@ -15,4 +15,5 @@ skip-if(B2G) == mq_print_maxheight_updown.xhtml mq_print-ref.xhtml # bug 773482
|
||||
skip-if(B2G) == mq_print_minheight_updown.xhtml mq_print-ref.xhtml # bug 773482
|
||||
skip-if(B2G) == mq_print_minwidth_updown.xhtml mq_print-ref.xhtml # bug 773482
|
||||
|
||||
== scoped-mq-update.html scoped-mq-update-ref.html
|
||||
== system-metrics-1.html system-metrics-1-ref.html
|
||||
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<body>
|
||||
<style>
|
||||
body { width: 100%; height: 100%; background-color: red; }
|
||||
</style>
|
||||
<style scoped>
|
||||
@media (max-width: 200px) {
|
||||
body { background-color: green; }
|
||||
}
|
||||
</style>
|
@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html>
|
||||
<iframe src="scoped-mq-update-helper.html" width="100" height="100" style="border: none"></iframe>
|
11
layout/reftests/css-mediaqueries/scoped-mq-update.html
Normal file
11
layout/reftests/css-mediaqueries/scoped-mq-update.html
Normal file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<iframe src="scoped-mq-update-helper.html" width="300" height="100" style="border: none"></iframe>
|
||||
<script>
|
||||
function test() {
|
||||
document.querySelector("iframe").width = "100";
|
||||
document.documentElement.removeAttribute("class");
|
||||
}
|
||||
|
||||
window.addEventListener("MozReftestInvalidate", test, false);
|
||||
</script>
|
@ -125,8 +125,17 @@ nsStyleSet::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf) const
|
||||
if (mRuleProcessors[i]) {
|
||||
n += mRuleProcessors[i]->SizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
n += mSheets[i].SizeOfExcludingThis(nullptr, aMallocSizeOf);
|
||||
}
|
||||
|
||||
for (int i = 0; i < mScopedDocSheetRuleProcessors.Length(); i++) {
|
||||
n += mScopedDocSheetRuleProcessors[i]->SizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
n += mScopedDocSheetRuleProcessors.SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
||||
n += mRoots.SizeOfExcludingThis(aMallocSizeOf);
|
||||
n += mOldRuleTrees.SizeOfExcludingThis(aMallocSizeOf);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
@ -1824,6 +1833,11 @@ nsStyleSet::MediumFeaturesChanged(nsPresContext* aPresContext)
|
||||
bool thisChanged = processor->MediumFeaturesChanged(aPresContext);
|
||||
stylesChanged = stylesChanged || thisChanged;
|
||||
}
|
||||
for (uint32_t i = 0; i < mScopedDocSheetRuleProcessors.Length(); ++i) {
|
||||
nsIStyleRuleProcessor *processor = mScopedDocSheetRuleProcessors[i];
|
||||
bool thisChanged = processor->MediumFeaturesChanged(aPresContext);
|
||||
stylesChanged = stylesChanged || thisChanged;
|
||||
}
|
||||
|
||||
if (mBindingManager) {
|
||||
bool thisChanged = false;
|
||||
|
Loading…
Reference in New Issue
Block a user