зеркало из 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
|
||||
// change the top of the bounds to include the whole line.
|
||||
if (frameBounds.height == 0 || aUseWholeLineHeightForInlines) {
|
||||
nsIAtom* frameType = NULL;
|
||||
nsIFrame *prevFrame = aFrame;
|
||||
nsIFrame *f = aFrame;
|
||||
|
||||
while (f &&
|
||||
(frameType = f->GetType()) == nsGkAtoms::inlineFrame) {
|
||||
while (f && f->IsFrameOfType(nsIFrame::eLineParticipant) &&
|
||||
!f->IsTransformed() && !f->IsPositioned()) {
|
||||
prevFrame = f;
|
||||
f = prevFrame->GetParent();
|
||||
}
|
||||
|
||||
if (f != aFrame &&
|
||||
f &&
|
||||
frameType == nsGkAtoms::blockFrame) {
|
||||
f->GetType() == nsGkAtoms::blockFrame) {
|
||||
// find the line containing aFrame and increase the top of |offset|.
|
||||
if (f != aPrevBlock) {
|
||||
aLines = f->GetLineIterator();
|
||||
|
|
Загрузка…
Ссылка в новой задаче