Skip to content
Snippets Groups Projects
Commit 719ed5d2 authored by Morgan Rae Reschenberg's avatar Morgan Rae Reschenberg
Browse files

Bug 1825611: Cache overflow r=Jamie

parent df57e6b1
No related branches found
No related tags found
No related merge requests found
......@@ -3619,6 +3619,17 @@ already_AddRefed<AccAttributes> LocalAccessible::BundleFieldsForCache(
} else if (aUpdateType != CacheUpdateType::Initial) {
fields->SetAttribute(nsGkAtoms::position, DeleteEntry());
}
if (frame) {
nsAutoCString overflow;
frame->Style()->GetComputedPropertyValue(eCSSProperty_overflow, overflow);
RefPtr<nsAtom> overflowAtom = NS_Atomize(overflow);
if (overflowAtom == nsGkAtoms::hidden) {
fields->SetAttribute(nsGkAtoms::overflow, nsGkAtoms::hidden);
} else if (aUpdateType != CacheUpdateType::Initial) {
fields->SetAttribute(nsGkAtoms::overflow, DeleteEntry());
}
}
}
if (aCacheDomain & CacheDomain::Table) {
......@@ -3823,6 +3834,19 @@ void LocalAccessible::MaybeQueueCacheUpdateForStyleChanges() {
if (nsIFrame* frame = GetFrame()) {
const ComputedStyle* newStyle = frame->Style();
nsAutoCString oldOverflow, newOverflow;
mOldComputedStyle->GetComputedPropertyValue(eCSSProperty_overflow,
oldOverflow);
newStyle->GetComputedPropertyValue(eCSSProperty_overflow, newOverflow);
if (oldOverflow != newOverflow) {
RefPtr<nsAtom> oldAtom = NS_Atomize(oldOverflow);
RefPtr<nsAtom> newAtom = NS_Atomize(newOverflow);
if (oldAtom == nsGkAtoms::hidden || newAtom == nsGkAtoms::hidden) {
mDoc->QueueCacheUpdate(this, CacheDomain::Style);
}
}
nsAutoCString oldDisplay, newDisplay;
mOldComputedStyle->GetComputedPropertyValue(eCSSProperty_display,
oldDisplay);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment