зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1307328 - nested iframes combined with scrolling=no require special attention for rect positioning inside the findbar dimmed background. r=jaws
MozReview-Commit-ID: JG99XMKsuIj --HG-- extra : rebase_source : adf22a6048ea53214bd3065143183bcd8f0670c2
This commit is contained in:
Родитель
5befc348f6
Коммит
a07dc8e986
|
@ -608,6 +608,14 @@ FinderHighlighter.prototype = {
|
|||
if (includeScroll) {
|
||||
dwu.getScrollXY(false, scrollX, scrollY);
|
||||
parentRect.translate(scrollX.value, scrollY.value);
|
||||
// If the current window is an iframe with scrolling="no" and its parent
|
||||
// is also an iframe the scroll offsets from the parents' documentElement
|
||||
// (inverse scroll position) needs to be subtracted from the parent
|
||||
// window rect.
|
||||
if (el.getAttribute("scrolling") == "no" && currWin != window.top) {
|
||||
let docEl = currWin.document.documentElement;
|
||||
parentRect.translate(-docEl.scrollLeft, -docEl.scrollTop);
|
||||
}
|
||||
}
|
||||
|
||||
cssPageRect.translate(parentRect.left, parentRect.top);
|
||||
|
|
Загрузка…
Ссылка в новой задаче