зеркало из https://github.com/mozilla/gecko-dev.git
Bug 703241. Part 2: Stop the 'scroll top of line into view' behavior when ancestors in the line are transformed or positioned. Allow that behavior for any kind of line-participant ancestor. r=mats
--HG-- extra : rebase_source : bcbe05a09fe9f5423bb09697f8be3c6ce0c44f46
This commit is contained in:
Родитель
aef1d59b6f
Коммит
a8f23be047
|
@ -3005,19 +3005,18 @@ AccumulateFrameBounds(nsIFrame* aContainerFrame,
|
||||||
// layout model) or aUseWholeLineHeightForInlines is set, we need to
|
// layout model) or aUseWholeLineHeightForInlines is set, we need to
|
||||||
// change the top of the bounds to include the whole line.
|
// change the top of the bounds to include the whole line.
|
||||||
if (frameBounds.height == 0 || aUseWholeLineHeightForInlines) {
|
if (frameBounds.height == 0 || aUseWholeLineHeightForInlines) {
|
||||||
nsIAtom* frameType = NULL;
|
|
||||||
nsIFrame *prevFrame = aFrame;
|
nsIFrame *prevFrame = aFrame;
|
||||||
nsIFrame *f = aFrame;
|
nsIFrame *f = aFrame;
|
||||||
|
|
||||||
while (f &&
|
while (f && f->IsFrameOfType(nsIFrame::eLineParticipant) &&
|
||||||
(frameType = f->GetType()) == nsGkAtoms::inlineFrame) {
|
!f->IsTransformed() && !f->IsPositioned()) {
|
||||||
prevFrame = f;
|
prevFrame = f;
|
||||||
f = prevFrame->GetParent();
|
f = prevFrame->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f != aFrame &&
|
if (f != aFrame &&
|
||||||
f &&
|
f &&
|
||||||
frameType == nsGkAtoms::blockFrame) {
|
f->GetType() == nsGkAtoms::blockFrame) {
|
||||||
// find the line containing aFrame and increase the top of |offset|.
|
// find the line containing aFrame and increase the top of |offset|.
|
||||||
if (f != aPrevBlock) {
|
if (f != aPrevBlock) {
|
||||||
aLines = f->GetLineIterator();
|
aLines = f->GetLineIterator();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче