Back out 5 changesets (bug 881832) for failures in browser_html_tooltip-02.js

Backed out changeset 117e8e24d714 (bug 881832)
Backed out changeset 8a0d5df41cfb (bug 881832)
Backed out changeset 6b3c5e185b04 (bug 881832)
Backed out changeset 11106afdcbe7 (bug 881832)
Backed out changeset d711b7c19a43 (bug 881832)
This commit is contained in:
Phil Ringnalda 2016-05-11 21:08:08 -07:00
parent 99248811be
commit c6417cc01e
22 changed files with 115 additions and 148 deletions

View File

@ -5592,7 +5592,7 @@ nsDocShell::InitWindow(nativeWindow aParentNativeWindow,
int32_t aWidth, int32_t aHeight)
{
SetParentWidget(aParentWidget);
SetPositionAndSize(aX, aY, aWidth, aHeight, 0);
SetPositionAndSize(aX, aY, aWidth, aHeight, false);
return NS_OK;
}
@ -5838,8 +5838,7 @@ nsDocShell::SetSize(int32_t aWidth, int32_t aHeight, bool aRepaint)
{
int32_t x = 0, y = 0;
GetPosition(&x, &y);
return SetPositionAndSize(x, y, aWidth, aHeight,
aRepaint ? nsIBaseWindow::eRepaint : 0);
return SetPositionAndSize(x, y, aWidth, aHeight, aRepaint);
}
NS_IMETHODIMP
@ -5850,7 +5849,7 @@ nsDocShell::GetSize(int32_t* aWidth, int32_t* aHeight)
NS_IMETHODIMP
nsDocShell::SetPositionAndSize(int32_t aX, int32_t aY, int32_t aWidth,
int32_t aHeight, uint32_t aFlags)
int32_t aHeight, bool aFRepaint)
{
mBounds.x = aX;
mBounds.y = aY;
@ -5860,11 +5859,8 @@ nsDocShell::SetPositionAndSize(int32_t aX, int32_t aY, int32_t aWidth,
// Hold strong ref, since SetBounds can make us null out mContentViewer
nsCOMPtr<nsIContentViewer> viewer = mContentViewer;
if (viewer) {
uint32_t cvflags = (aFlags & nsIBaseWindow::eDelayResize) ?
nsIContentViewer::eDelayResize : 0;
// XXX Border figured in here or is that handled elsewhere?
nsresult rv = viewer->SetBoundsWithFlags(mBounds, cvflags);
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(viewer->SetBounds(mBounds), NS_ERROR_FAILURE);
}
return NS_OK;
@ -5878,7 +5874,7 @@ nsDocShell::GetPositionAndSize(int32_t* aX, int32_t* aY, int32_t* aWidth,
// ensure size is up-to-date if window has changed resolution
LayoutDeviceIntRect r;
mParentWidget->GetClientBounds(r);
SetPositionAndSize(mBounds.x, mBounds.y, r.width, r.height, 0);
SetPositionAndSize(mBounds.x, mBounds.y, r.width, r.height, false);
}
// We should really consider just getting this information from

View File

@ -104,12 +104,6 @@ interface nsIContentViewer : nsISupports
[noscript] void getBounds(in nsIntRectRef aBounds);
[noscript] void setBounds([const] in nsIntRectRef aBounds);
/**
* The 'aFlags' argument to setBoundsWithFlags is a set of these bits.
*/
const unsigned long eDelayResize = 1;
[noscript] void setBoundsWithFlags([const] in nsIntRectRef aBounds,
in unsigned long aFlags);
/**
* The previous content viewer, which has been |close|d but not

View File

@ -2311,8 +2311,7 @@ nsFrameLoader::UpdateBaseWindowPositionAndSize(nsSubDocumentFrame *aIFrame)
ScreenIntSize size = aIFrame->GetSubdocumentSize();
baseWindow->SetPositionAndSize(x, y, size.width, size.height,
nsIBaseWindow::eDelayResize);
baseWindow->SetPositionAndSize(x, y, size.width, size.height, false);
}
}

View File

@ -37,10 +37,8 @@ function doTest() {
win.addEventListener("resize", function() {
win.removeEventListener("resize", arguments.callee, false);
setTimeout(function(){
sbo.scrollBy(200, 0);
resize();
},0);
sbo.scrollBy(200, 0);
setTimeout(function() { resize(); }, 0);
}, false);
oldWidth = win.outerWidth;

View File

@ -1694,7 +1694,7 @@ TabChild::RecvUpdateDimensions(const CSSRect& rect, const CSSSize& size,
// size from the content viewer when it computes a new CSS viewport.
nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(WebNavigation());
baseWin->SetPositionAndSize(0, 0, screenSize.width, screenSize.height,
nsIBaseWindow::eRepaint);
true);
mPuppetWidget->Resize(screenRect.x + clientOffset.x + chromeDisp.x,
screenRect.y + clientOffset.y + chromeDisp.y,
@ -3059,7 +3059,7 @@ TabChild::RecvUIResolutionChanged(const float& aDpi, const double& aScale)
nsCOMPtr<nsIBaseWindow> baseWin = do_QueryInterface(WebNavigation());
baseWin->SetPositionAndSize(0, 0, screenSize.width, screenSize.height,
nsIBaseWindow::eRepaint);
true);
}
return true;

View File

@ -870,8 +870,7 @@ TabParent::RecvSetDimensions(const uint32_t& aFlags,
if (aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION &&
aFlags & nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER) {
treeOwnerAsWin->SetPositionAndSize(x, y, cx, cy,
nsIBaseWindow::eRepaint);
treeOwnerAsWin->SetPositionAndSize(x, y, cx, cy, true);
return true;
}

View File

@ -647,7 +647,7 @@ nsDocShellTreeOwner::GetSize(int32_t* aCX, int32_t* aCY)
NS_IMETHODIMP
nsDocShellTreeOwner::SetPositionAndSize(int32_t aX, int32_t aY, int32_t aCX,
int32_t aCY, uint32_t aFlags)
int32_t aCY, bool aRepaint)
{
nsCOMPtr<nsIEmbeddingSiteWindow> ownerWin = GetOwnerWin();
if (ownerWin) {

View File

@ -1150,7 +1150,7 @@ nsWebBrowser::InitWindow(nativeWindow aParentNativeWindow,
NS_ENSURE_SUCCESS(SetParentNativeWindow(aParentNativeWindow),
NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(SetPositionAndSize(aX, aY, aCX, aCY, 0),
NS_ENSURE_SUCCESS(SetPositionAndSize(aX, aY, aCX, aCY, false),
NS_ERROR_FAILURE);
return NS_OK;
@ -1325,7 +1325,7 @@ nsWebBrowser::SetPosition(int32_t aX, int32_t aY)
GetSize(&cx, &cy);
return SetPositionAndSize(aX, aY, cx, cy, 0);
return SetPositionAndSize(aX, aY, cx, cy, false);
}
NS_IMETHODIMP
@ -1342,8 +1342,7 @@ nsWebBrowser::SetSize(int32_t aCX, int32_t aCY, bool aRepaint)
GetPosition(&x, &y);
return SetPositionAndSize(x, y, aCX, aCY,
aRepaint ? nsIBaseWindow::eRepaint : 0);
return SetPositionAndSize(x, y, aCX, aCY, aRepaint);
}
NS_IMETHODIMP
@ -1354,7 +1353,7 @@ nsWebBrowser::GetSize(int32_t* aCX, int32_t* aCY)
NS_IMETHODIMP
nsWebBrowser::SetPositionAndSize(int32_t aX, int32_t aY,
int32_t aCX, int32_t aCY, uint32_t aFlags)
int32_t aCX, int32_t aCY, bool aRepaint)
{
if (!mDocShell) {
mInitInfo->x = aX;
@ -1370,13 +1369,12 @@ nsWebBrowser::SetPositionAndSize(int32_t aX, int32_t aY,
// We also need to resize our widget then.
if (mInternalWidget) {
doc_x = doc_y = 0;
NS_ENSURE_SUCCESS(mInternalWidget->Resize(aX, aY, aCX, aCY,
!!(aFlags & nsIBaseWindow::eRepaint)),
NS_ENSURE_SUCCESS(mInternalWidget->Resize(aX, aY, aCX, aCY, aRepaint),
NS_ERROR_FAILURE);
}
// Now reposition/ resize the doc
NS_ENSURE_SUCCESS(
mDocShellAsWin->SetPositionAndSize(doc_x, doc_y, aCX, aCY, aFlags),
mDocShellAsWin->SetPositionAndSize(doc_x, doc_y, aCX, aCY, aRepaint),
NS_ERROR_FAILURE);
}

View File

@ -352,9 +352,6 @@ MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution)
UpdateDisplayPortMargins();
}
const bool isHeightChanging =
(mMobileViewportSize.height != viewport.height);
// Update internal state.
mIsFirstPaint = false;
mMobileViewportSize = viewport;
@ -362,6 +359,5 @@ MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution)
// Kick off a reflow.
mPresShell->ResizeReflowIgnoreOverride(
nsPresContext::CSSPixelsToAppUnits(viewport.width),
nsPresContext::CSSPixelsToAppUnits(viewport.height),
isHeightChanging);
nsPresContext::CSSPixelsToAppUnits(viewport.height));
}

View File

@ -1909,7 +1909,7 @@ nsDocumentViewer::SetPreviousViewer(nsIContentViewer* aViewer)
}
NS_IMETHODIMP
nsDocumentViewer::SetBoundsWithFlags(const nsIntRect& aBounds, uint32_t aFlags)
nsDocumentViewer::SetBounds(const nsIntRect& aBounds)
{
NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_AVAILABLE);
@ -1924,8 +1924,7 @@ nsDocumentViewer::SetBoundsWithFlags(const nsIntRect& aBounds, uint32_t aFlags)
} else if (mPresContext && mViewManager) {
int32_t p2a = mPresContext->AppUnitsPerDevPixel();
mViewManager->SetWindowDimensions(NSIntPixelsToAppUnits(mBounds.width, p2a),
NSIntPixelsToAppUnits(mBounds.height, p2a),
!!(aFlags & nsIContentViewer::eDelayResize));
NSIntPixelsToAppUnits(mBounds.height, p2a));
}
// If there's a previous viewer, it's the one that's actually showing,
@ -1943,12 +1942,6 @@ nsDocumentViewer::SetBoundsWithFlags(const nsIntRect& aBounds, uint32_t aFlags)
return NS_OK;
}
NS_IMETHODIMP
nsDocumentViewer::SetBounds(const nsIntRect& aBounds)
{
return SetBoundsWithFlags(aBounds, 0);
}
NS_IMETHODIMP
nsDocumentViewer::Move(int32_t aX, int32_t aY)
{

View File

@ -429,12 +429,12 @@ public:
* Reflow the frame model into a new width and height. The
* coordinates for aWidth and aHeight must be in standard nscoord's.
*/
virtual nsresult ResizeReflow(nscoord aWidth, nscoord aHeight, bool aHeightChanging = true) = 0;
virtual nsresult ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;
/**
* Do the same thing as ResizeReflow but even if ResizeReflowOverride was
* called previously.
*/
virtual nsresult ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight, bool aHeightChanging) = 0;
virtual nsresult ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight) = 0;
/**
* Returns true if ResizeReflowOverride has been called.

View File

@ -1803,7 +1803,7 @@ PresShell::AsyncResizeEventCallback(nsITimer* aTimer, void* aPresShell)
}
nsresult
PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight, bool aHeightChanging)
PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight)
{
if (mZoomConstraintsClient) {
// If we have a ZoomConstraintsClient and the available screen area
@ -1819,11 +1819,11 @@ PresShell::ResizeReflow(nscoord aWidth, nscoord aHeight, bool aHeightChanging)
return NS_OK;
}
return ResizeReflowIgnoreOverride(aWidth, aHeight, aHeightChanging);
return ResizeReflowIgnoreOverride(aWidth, aHeight);
}
nsresult
PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight, bool aHeightChanging)
PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight)
{
NS_PRECONDITION(!mIsReflowing, "Shouldn't be in reflow here!");
NS_PRECONDITION(aWidth != NS_UNCONSTRAINEDSIZE,
@ -1839,6 +1839,9 @@ PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight, bool aHei
return NS_ERROR_NOT_AVAILABLE;
}
const bool isHeightChanging =
(mPresContext->GetVisibleArea().height != aHeight);
mPresContext->SetVisibleArea(nsRect(0, 0, aWidth, aHeight));
// There isn't anything useful we can do if the initial reflow hasn't happened.
@ -1866,7 +1869,7 @@ PresShell::ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight, bool aHei
// XXX Do a full invalidate at the beginning so that invalidates along
// the way don't have region accumulation issues?
if (aHeightChanging) {
if (isHeightChanging) {
// For BSize changes driven by style, RestyleManager handles this.
// For height:auto BSizes (i.e. layout-controlled), descendant
// intrinsic sizes can't depend on them. So the only other case is
@ -3633,16 +3636,6 @@ PresShell::ScheduleViewManagerFlush(PaintType aType)
}
}
bool
FlushLayoutRecursive(nsIDocument* aDocument,
void* aData = nullptr)
{
MOZ_ASSERT(!aData);
aDocument->EnumerateSubDocuments(FlushLayoutRecursive, nullptr);
aDocument->FlushPendingNotifications(Flush_Layout);
return true;
}
void
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
bool aFlushOnHoverChange)
@ -3667,10 +3660,7 @@ PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
hoverGenerationBefore != restyleManager->AsGecko()->GetHoverGeneration()) {
// Flush so that the resulting reflow happens now so that our caller
// can suppress any synthesized mouse moves caused by that reflow.
// This code only ever runs for the root document, but :hover changes
// can happen in descendant documents too, so make sure we flush
// all of them.
FlushLayoutRecursive(mDocument);
FlushPendingNotifications(Flush_Layout);
}
}

View File

@ -118,8 +118,8 @@ public:
virtual void BeginObservingDocument() override;
virtual void EndObservingDocument() override;
virtual nsresult Initialize(nscoord aWidth, nscoord aHeight) override;
virtual nsresult ResizeReflow(nscoord aWidth, nscoord aHeight, bool aHeightChanging = true) override;
virtual nsresult ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight, bool aHeightChanging) override;
virtual nsresult ResizeReflow(nscoord aWidth, nscoord aHeight) override;
virtual nsresult ResizeReflowIgnoreOverride(nscoord aWidth, nscoord aHeight) override;
virtual nsIPageSequenceFrame* GetPageSequenceFrame() const override;
virtual nsCanvasFrame* GetCanvasFrame() const override;

View File

@ -146,111 +146,126 @@ function step6() {
step6called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setResize("step7()");
synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
setTimeout(step7, 500); // time to detect oscillations if they exist
}
var step7called = false;
function step7() {
is(step7called, false, "step7 called only once (more than two cycles of oscillation)");
if (step7called)
return;
is(step7called, false, "step7 called only once");
step7called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setTimeout(step8, 500); // time to detect oscillations if they exist
if (getComputedStyle(iframe, "").width == "50px") {
// The two resize events may be coalesced into a single one.
step8();
return;
}
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
setResize("step8()");
/* expect to get a second resize from the oscillation */
}
/* test the same case with scrolltop */
var step8called = false;
function step8() {
is(step8called, false, "step8 called only once");
is(step8called, false, "step8 called only once (more than two cycles of oscillation)");
if (step8called)
return;
step8called = true;
iframe.contentDocument.body.removeAttribute("onresize");
/* move the mouse out of the way */
synthesizeMouse(divtwoparent, 200, 5, moveEvent, window);
divtwoparent.scrollLeft = 5;
setResize("step9()");
synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
/* mouse now over 7, 5 */
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setTimeout(step9, 500); // time to detect oscillations if they exist
}
/* test the same case with scrolltop */
var step9called = false;
function step9() {
is(step9called, false, "step9 called only once");
step9called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
iframe.contentDocument.body.removeAttribute("onresize");
/* move the mouse out of the way */
synthesizeMouse(divtwoparent, 200, 5, moveEvent, window);
divtwoparent.scrollLeft = 5;
setResize("step10()");
divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
synthesizeMouse(divtwoparent, 2, 5, moveEvent, window);
/* mouse now over 7, 5 */
}
var step10called = false;
function step10() {
is(step10called, false, "step10 called only once");
step10called = true;
if (getComputedStyle(iframe, "").width == "100px") {
// The two resize events may be coalesced into a single one.
step11();
return;
}
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
setResize("step11()");
/* expect to get a second resize from the oscillation */
divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
}
var step11called = false;
function step11() {
is(step11called, false, "step11 called only once (more than two cycles of oscillation)");
if (step11called)
return;
is(step11called, false, "step11 called only once");
step11called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
setTimeout(step12, 500); // time to detect oscillations if they exist
if (getComputedStyle(iframe, "").width == "100px") {
// The two resize events may be coalesced into a single one.
step12();
return;
}
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setResize("step12()");
/* expect to get a second resize from the oscillation */
}
var step12called = false;
function step12() {
is(step12called, false, "step12 called only once");
is(step12called, false, "step12 called only once (more than two cycles of oscillation)");
if (step12called)
return;
step12called = true;
setResize("step13()");
divtwoparent.scrollLeft = 25; /* mouse now over 27,5 */
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
setTimeout(step13, 500); // time to detect oscillations if they exist
}
var step13called = false;
function step13() {
is(step13called, false, "step13 called only once");
step13called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setResize("step14()");
divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
divtwoparent.scrollLeft = 25; /* mouse now over 27,5 */
}
var step14called = false;
function step14() {
is(step14called, false, "step14 called only once");
step14called = true;
if (getComputedStyle(iframe, "").width == "50px") {
// The two resize events may be coalesced into a single one.
step15();
return;
}
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setResize("step15()");
/* expect to get a second resize from the oscillation */
divtwoparent.scrollLeft = 0; /* mouse now over 2,5 */
}
var step15called = false;
function step15() {
is(step15called, false, "step15 called only once (more than two cycles of oscillation)");
if (step15called)
return;
is(step15called, false, "step15 called only once");
step15called = true;
if (getComputedStyle(iframe, "").width == "50px") {
// The two resize events may be coalesced into a single one.
step16();
return;
}
is(getComputedStyle(divtwo, "").backgroundColor, "rgb(0, 255, 0)",
":hover applies");
setResize("step16()");
/* expect to get a second resize from the oscillation */
}
var step16called = false;
function step16() {
is(step16called, false, "step16 called only once (more than two cycles of oscillation)");
if (step16called)
return;
step16called = true;
is(getComputedStyle(divtwo, "").backgroundColor, "transparent",
":hover does not apply");
setTimeout(finish, 500); // time to detect oscillations if they exist

View File

@ -285,8 +285,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
}
}
else {
window->SetPositionAndSize(rect.x, rect.y, rect.width, rect.height,
nsIBaseWindow::eRepaint); // do the repaint.
window->SetPositionAndSize(rect.x, rect.y, rect.width, rect.height, true); // do the repaint.
}
doDefault = false;

View File

@ -187,11 +187,9 @@ void nsViewManager::DoSetWindowDimensions(nscoord aWidth, nscoord aHeight)
// We care about resizes even when one dimension is already zero.
if (!oldDim.IsEqualEdges(newDim)) {
// Don't resize the widget. It is already being set elsewhere.
const bool isHeightChanging = (oldDim.height != aHeight);
mRootView->SetDimensions(newDim, true, false);
if (mPresShell)
mPresShell->ResizeReflow(aWidth, aHeight, isHeightChanging);
mPresShell->ResizeReflow(aWidth, aHeight);
}
}
@ -212,10 +210,10 @@ nsViewManager::ShouldDelayResize() const
}
void
nsViewManager::SetWindowDimensions(nscoord aWidth, nscoord aHeight, bool aDelayResize)
nsViewManager::SetWindowDimensions(nscoord aWidth, nscoord aHeight)
{
if (mRootView) {
if (!ShouldDelayResize() && !aDelayResize) {
if (!ShouldDelayResize()) {
if (mDelayedResize != nsSize(NSCOORD_NONE, NSCOORD_NONE) &&
mDelayedResize != nsSize(aWidth, aHeight)) {
// We have a delayed resize; that now obsolete size may already have

View File

@ -89,8 +89,7 @@ public:
* @param aWidth of window in twips
* @param aHeight of window in twips
*/
void SetWindowDimensions(nscoord aWidth, nscoord aHeight,
bool aDelayResize = false);
void SetWindowDimensions(nscoord aWidth, nscoord aHeight);
/**
* Do any resizes that are pending.

View File

@ -113,18 +113,12 @@ interface nsIBaseWindow : nsISupports
*/
void getSize(out long cx, out long cy);
/**
* The 'flags' argument to setPositionAndSize is a set of these bits.
*/
const unsigned long eRepaint = 1;
const unsigned long eDelayResize = 2;
/*
Convenience function combining the SetPosition and SetSize into one call.
Also is more efficient than calling both.
*/
void setPositionAndSize(in long x, in long y, in long cx, in long cy,
in unsigned long flags);
in boolean fRepaint);
/*
Convenience function combining the GetPosition and GetSize into one call.

View File

@ -357,7 +357,7 @@ NS_IMETHODIMP nsChromeTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
nsIWidget* parentWidget, int32_t x, int32_t y, int32_t cx, int32_t cy)
{
// Ignore widget parents for now. Don't think those are a vaild thing to call.
NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, 0), NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, false), NS_ERROR_FAILURE);
return NS_OK;
}
@ -417,10 +417,10 @@ NS_IMETHODIMP nsChromeTreeOwner::GetSize(int32_t* cx, int32_t* cy)
}
NS_IMETHODIMP nsChromeTreeOwner::SetPositionAndSize(int32_t x, int32_t y, int32_t cx,
int32_t cy, uint32_t aFlags)
int32_t cy, bool fRepaint)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->SetPositionAndSize(x, y, cx, cy, aFlags);
return mXULWindow->SetPositionAndSize(x, y, cx, cy, fRepaint);
}
NS_IMETHODIMP nsChromeTreeOwner::GetPositionAndSize(int32_t* x, int32_t* y, int32_t* cx,

View File

@ -599,7 +599,7 @@ NS_IMETHODIMP nsContentTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
nsIWidget* parentWidget, int32_t x, int32_t y, int32_t cx, int32_t cy)
{
// Ignore wigdet parents for now. Don't think those are a vaild thing to call.
NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, 0), NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, false), NS_ERROR_FAILURE);
return NS_OK;
}
@ -659,10 +659,10 @@ NS_IMETHODIMP nsContentTreeOwner::GetSize(int32_t* aCX, int32_t* aCY)
}
NS_IMETHODIMP nsContentTreeOwner::SetPositionAndSize(int32_t aX, int32_t aY,
int32_t aCX, int32_t aCY, uint32_t aFlags)
int32_t aCX, int32_t aCY, bool aRepaint)
{
NS_ENSURE_STATE(mXULWindow);
return mXULWindow->SetPositionAndSize(aX, aY, aCX, aCY, aFlags);
return mXULWindow->SetPositionAndSize(aX, aY, aCX, aCY, aRepaint);
}
NS_IMETHODIMP nsContentTreeOwner::GetPositionAndSize(int32_t* aX, int32_t* aY,
@ -1058,8 +1058,7 @@ nsSiteWindow::SetDimensions(uint32_t aFlags,
int32_t aX, int32_t aY, int32_t aCX, int32_t aCY)
{
// XXX we're ignoring aFlags
return mAggregator->SetPositionAndSize(aX, aY, aCX, aCY,
nsIBaseWindow::eRepaint);
return mAggregator->SetPositionAndSize(aX, aY, aCX, aCY, true);
}
NS_IMETHODIMP

View File

@ -281,7 +281,7 @@ nsWebShellWindow::WindowResized(nsIWidget* aWidget, int32_t aWidth, int32_t aHei
{
nsCOMPtr<nsIBaseWindow> shellAsWin(do_QueryInterface(mDocShell));
if (shellAsWin) {
shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, 0);
shellAsWin->SetPositionAndSize(0, 0, aWidth, aHeight, false);
}
// Persist size, but not immediately, in case this OS is firing
// repeated size events as the user drags the sizing handle

View File

@ -641,7 +641,7 @@ NS_IMETHODIMP nsXULWindow::GetSize(int32_t* aCX, int32_t* aCY)
}
NS_IMETHODIMP nsXULWindow::SetPositionAndSize(int32_t aX, int32_t aY,
int32_t aCX, int32_t aCY, uint32_t aFlags)
int32_t aCX, int32_t aCY, bool aRepaint)
{
/* any attempt to set the window's size or position overrides the window's
zoom state. this is important when these two states are competing while
@ -653,7 +653,7 @@ NS_IMETHODIMP nsXULWindow::SetPositionAndSize(int32_t aX, int32_t aY,
DesktopToLayoutDeviceScale scale = mWindow->GetDesktopToDeviceScale();
DesktopRect rect = LayoutDeviceIntRect(aX, aY, aCX, aCY) / scale;
nsresult rv = mWindow->Resize(rect.x, rect.y, rect.width, rect.height,
!!(aFlags & nsIBaseWindow::eRepaint));
aRepaint);
NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE);
if (!mChromeLoaded) {
// If we're called before the chrome is loaded someone obviously wants this