зеркало из https://github.com/mozilla/gecko-dev.git
Bug 744699 - Call setDisplayPort on the correct presShell. r=roc
This commit is contained in:
Родитель
0c48158611
Коммит
6e2d7ef374
|
@ -311,6 +311,10 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
|
|||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (content->GetCurrentDoc() != presShell->GetDocument()) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsRect lastDisplayPort;
|
||||
if (nsLayoutUtils::GetDisplayPort(content, &lastDisplayPort) &&
|
||||
displayport.IsEqualInterior(lastDisplayPort)) {
|
||||
|
|
|
@ -1710,6 +1710,7 @@ Tab.prototype = {
|
|||
|
||||
// finally, we set the display port, taking care to convert everything into the CSS-pixel
|
||||
// coordinate space, because that is what the function accepts.
|
||||
cwu = this.browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
cwu.setDisplayPortForElement((aDisplayPort.left / resolution) - (aViewportX / zoom),
|
||||
(aDisplayPort.top / resolution) - (aViewportY / zoom),
|
||||
(aDisplayPort.right - aDisplayPort.left) / resolution,
|
||||
|
|
Загрузка…
Ссылка в новой задаче