mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 703241. Part 3: nsLayoutUtils::GetTransformToAncestor should handle the case where aAncestor == aFrame. r=matspal
This commit is contained in:
parent
7ce96b9824
commit
c899cd7b0c
@ -1302,7 +1302,11 @@ gfx3DMatrix
|
||||
nsLayoutUtils::GetTransformToAncestor(nsIFrame *aFrame, const nsIFrame *aAncestor)
|
||||
{
|
||||
nsIFrame* parent;
|
||||
gfx3DMatrix ctm = aFrame->GetTransformMatrix(aAncestor, &parent);
|
||||
gfx3DMatrix ctm;
|
||||
if (aFrame == aAncestor) {
|
||||
return ctm;
|
||||
}
|
||||
ctm = aFrame->GetTransformMatrix(aAncestor, &parent);
|
||||
while (parent && parent != aAncestor) {
|
||||
if (!parent->Preserves3DChildren()) {
|
||||
ctm.ProjectTo2D();
|
||||
|
@ -35,7 +35,9 @@ t.scrollTop = 0;
|
||||
var targetY = target.getBoundingClientRect().top;
|
||||
|
||||
SimpleTest.waitForFocus(function() {
|
||||
is(target.getBoundingClientRect().top, targetY, "Target should not have scrolled due to waitForFocus");
|
||||
t.focus();
|
||||
is(target.getBoundingClientRect().top, targetY, "Target should not have scrolled due to focus change");
|
||||
|
||||
// Move the caret to scroll it into view
|
||||
sel.collapse(target.firstChild, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user