Bug 1961010 - Use ink overflow sizes more often in view transitions. r=view-transitions-reviewers,boris
This fixes the rendering of new-content-ancestor-clipped.html (with D245770). Differential Revision: https://phabricator.services.mozilla.com/D245802
This commit is contained in:
@@ -66,6 +66,11 @@ static CSSToCSSMatrix4x4Flagged EffectiveTransform(nsIFrame* aFrame) {
|
||||
float sy = boundingRect.height / untransformedSize.height;
|
||||
matrix = CSSToCSSMatrix4x4Flagged::Scaling(sx, sy, 0.0f);
|
||||
}
|
||||
auto inkOverflowOffset = aFrame->InkOverflowRectRelativeToSelf().TopLeft();
|
||||
if (inkOverflowOffset != nsPoint()) {
|
||||
auto cssOffset = CSSPoint::FromAppUnits(inkOverflowOffset);
|
||||
matrix.PostTranslate(cssOffset.x, cssOffset.y, 0.0f);
|
||||
}
|
||||
if (boundingRect.TopLeft() != CSSPoint()) {
|
||||
matrix.PostTranslate(boundingRect.x, boundingRect.y, 0.0f);
|
||||
}
|
||||
@@ -190,7 +195,7 @@ struct CapturedElementOldState {
|
||||
mTriedImage(true),
|
||||
mSize(aFrame->Style()->IsRootElementStyle()
|
||||
? aSnapshotContainingBlockSize
|
||||
: aFrame->GetRect().Size()),
|
||||
: aFrame->InkOverflowRect().Size()),
|
||||
mTransform(EffectiveTransform(aFrame)),
|
||||
mWritingMode(aFrame->StyleVisibility()->mWritingMode),
|
||||
mDirection(aFrame->StyleVisibility()->mDirection),
|
||||
@@ -825,9 +830,12 @@ bool ViewTransition::UpdatePseudoElementStyles(bool aNeedsInvalidation) {
|
||||
auto* rule = EnsureRule(capturedElement.mGroupRule);
|
||||
// Let newRect be snapshot containing block if capturedElement is the
|
||||
// document element, otherwise, capturedElement’s border box.
|
||||
// NOTE: Needs ink overflow rect instead to get the correct rendering, see
|
||||
// https://github.com/w3c/csswg-drafts/issues/12092.
|
||||
// TODO(emilio, bug 1961139): Maybe revisit this.
|
||||
auto newRect = frame->Style()->IsRootElementStyle()
|
||||
? SnapshotContainingBlockRect()
|
||||
: frame->GetRect();
|
||||
: frame->InkOverflowRectRelativeToSelf();
|
||||
auto size = CSSPixel::FromAppUnits(newRect);
|
||||
// NOTE(emilio): Intentionally not short-circuiting. Int cast is needed to
|
||||
// silence warning.
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[block-with-overflowing-text.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[capture-with-opacity-zero-child.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[capture-with-visibility-hidden-child.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[capture-with-visibility-mixed-descendants.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[clip-path-larger-than-border-box-on-child-of-named-element.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[content-with-child-with-transparent-background.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[content-with-inline-child.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[element-with-overflow.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[fractional-box-with-overflow-children-new.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[fractional-box-with-overflow-children-old.html]
|
||||
expected: FAIL
|
||||
@@ -1,4 +0,0 @@
|
||||
[inline-child-with-filter.html]
|
||||
expected:
|
||||
if (os == "android") and debug and not swgl: [FAIL, TIMEOUT]
|
||||
FAIL
|
||||
@@ -0,0 +1,2 @@
|
||||
[new-content-preserve-3d-ancestor.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[new-content-with-overflow.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[no-root-capture.html]
|
||||
expected: FAIL
|
||||
@@ -1,4 +0,0 @@
|
||||
[old-content-captures-different-size.html]
|
||||
expected:
|
||||
if debug: [FAIL, ERROR]
|
||||
FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[old-content-with-overflow.html]
|
||||
expected: FAIL
|
||||
@@ -1,2 +0,0 @@
|
||||
[span-with-overflowing-text.html]
|
||||
expected: FAIL
|
||||
Reference in New Issue
Block a user