Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Merge last PGO-green changeset of mozilla-inbound to mozilla-central
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Morley committed Aug 13, 2012
2 parents f6fd20d + e87774e commit 45b1a92
Show file tree
Hide file tree
Showing 133 changed files with 1,950 additions and 1,324 deletions.
10 changes: 1 addition & 9 deletions config/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,12 @@ endif
CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config
AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf

ifeq ($(OS_ARCH),QNX)
ifeq ($(OS_TARGET),NTO)
LD := qcc -Vgcc_ntox86 -nostdlib
else
LD := $(CC)
endif
endif

#
# Strip off the excessively long version numbers on these platforms,
# but save the version to allow multiple versions of the same base
# platform to be built in the same tree.
#
ifneq (,$(filter FreeBSD HP-UX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
ifneq (,$(filter FreeBSD HP-UX Linux NetBSD OpenBSD SunOS,$(OS_ARCH)))
OS_RELEASE := $(basename $(OS_RELEASE))

# Allow the user to ignore the OS_VERSION, which is usually irrelevant.
Expand Down
11 changes: 0 additions & 11 deletions config/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,6 @@ endif # HAS_EXTRAEXPORTS
endif # IS_COMPONENT
endif # AIX

#
# OSF1: add -B symbolic flag for components
#
ifeq ($(OS_ARCH),OSF1)
ifdef IS_COMPONENT
ifeq ($(GNU_CC)$(GNU_CXX),)
EXTRA_DSO_LDOPTS += -B symbolic
endif
endif
endif

#
# Linux: add -Bsymbolic flag for components
#
Expand Down
18 changes: 4 additions & 14 deletions content/base/src/nsGenericElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,7 @@ PRInt32
nsGenericElement::GetScrollTop()
{
nsIScrollableFrame* sf = GetScrollFrame();

return sf ?
nsPresContext::AppUnitsToIntCSSPixels(sf->GetScrollPosition().y) :
0;
return sf ? sf->GetScrollPositionCSSPixels().y : 0;
}

NS_IMETHODIMP
Expand All @@ -626,9 +623,7 @@ nsGenericElement::SetScrollTop(PRInt32 aScrollTop)
{
nsIScrollableFrame* sf = GetScrollFrame();
if (sf) {
nsPoint pt = sf->GetScrollPosition();
sf->ScrollToCSSPixels(nsIntPoint(nsPresContext::AppUnitsToIntCSSPixels(pt.x),
aScrollTop));
sf->ScrollToCSSPixels(nsIntPoint(sf->GetScrollPositionCSSPixels().x, aScrollTop));
}
return NS_OK;
}
Expand All @@ -637,10 +632,7 @@ PRInt32
nsGenericElement::GetScrollLeft()
{
nsIScrollableFrame* sf = GetScrollFrame();

return sf ?
nsPresContext::AppUnitsToIntCSSPixels(sf->GetScrollPosition().x) :
0;
return sf ? sf->GetScrollPositionCSSPixels().x : 0;
}

NS_IMETHODIMP
Expand All @@ -656,9 +648,7 @@ nsGenericElement::SetScrollLeft(PRInt32 aScrollLeft)
{
nsIScrollableFrame* sf = GetScrollFrame();
if (sf) {
nsPoint pt = sf->GetScrollPosition();
sf->ScrollToCSSPixels(nsIntPoint(aScrollLeft,
nsPresContext::AppUnitsToIntCSSPixels(pt.y)));
sf->ScrollToCSSPixels(nsIntPoint(aScrollLeft, sf->GetScrollPositionCSSPixels().y));
}
return NS_OK;
}
Expand Down
31 changes: 14 additions & 17 deletions content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4645,23 +4645,20 @@ nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
return nullptr;
}
CanvasRenderingContext2DUserDataAzure *userData = nullptr;
if (aBuilder->IsPaintingToWindow()) {
// Make the layer tell us whenever a transaction finishes (including
// the current transaction), so we can clear our invalidation state and
// start invalidating again. We need to do this for the layer that is
// being painted to a window (there shouldn't be more than one at a time,
// and if there is, flushing the invalidation state more often than
// necessary is harmless).

// The layer will be destroyed when we tear down the presentation
// (at the latest), at which time this userData will be destroyed,
// releasing the reference to the element.
// The userData will receive DidTransactionCallbacks, which flush the
// the invalidation state to indicate that the canvas is up to date.
userData = new CanvasRenderingContext2DUserDataAzure(this);
canvasLayer->SetDidTransactionCallback(
CanvasRenderingContext2DUserDataAzure::DidTransactionCallback, userData);
}
// Make the layer tell us whenever a transaction finishes (including
// the current transaction), so we can clear our invalidation state and
// start invalidating again. We need to do this for all layers since
// callers of DrawWindow may be expecting to receive normal invalidation
// notifications after this paint.

// The layer will be destroyed when we tear down the presentation
// (at the latest), at which time this userData will be destroyed,
// releasing the reference to the element.
// The userData will receive DidTransactionCallbacks, which flush the
// the invalidation state to indicate that the canvas is up to date.
userData = new CanvasRenderingContext2DUserDataAzure(this);
canvasLayer->SetDidTransactionCallback(
CanvasRenderingContext2DUserDataAzure::DidTransactionCallback, userData);
canvasLayer->SetUserData(&g2DContextLayerUserData, userData);

CanvasLayer::Data data;
Expand Down
7 changes: 0 additions & 7 deletions content/events/src/nsEventStateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ class nsMouseWheelTransaction {

static DeltaValues AccelerateWheelDelta(widget::WheelEvent* aEvent,
bool aAllowScrollSpeedOverride);
static bool IsAccelerationEnabled();

enum {
kScrollSeriesTimeout = 80
Expand Down Expand Up @@ -588,12 +587,6 @@ nsMouseWheelTransaction::GetIgnoreMoveDelayTime()
return Preferences::GetUint("mousewheel.transaction.ignoremovedelay", 100);
}

bool
nsMouseWheelTransaction::IsAccelerationEnabled()
{
return GetAccelerationStart() >= 0 && GetAccelerationFactor() > 0;
}

DeltaValues
nsMouseWheelTransaction::AccelerateWheelDelta(widget::WheelEvent* aEvent,
bool aAllowScrollSpeedOverride)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
*/

if (observers.hasMoreElements()) {

document.getElementById('av').addEventListener("invalid", function(aEvent) {
aEvent.target.removeAttribute("invalid", arguments.callee, false);
ok(true, "formnovalidate should not apply on if not set on the submit " +
Expand Down Expand Up @@ -133,6 +132,8 @@
SimpleTest.waitForFocus(function() {
document.getElementById('a').click();
});
} else {
todo(false, "No 'invalidformsubmit' observers. Skip test.");
}

</script>
Expand Down
2 changes: 2 additions & 0 deletions content/html/content/test/test_bug605124-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@
checkPseudoClass(textarea, false);
checkPseudoClass(input, false);
checkPseudoClass(select, false);
} else {
todo(false, "No 'invalidformsubmit' observers. Skip test.");
}

</script>
Expand Down
2 changes: 2 additions & 0 deletions content/html/content/test/test_bug605125-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@
checkPseudoClass(textarea, false);
checkPseudoClass(input, false);
checkPseudoClass(select, false);
} else {
todo(false, "No 'invalidformsubmit' observers. Skip test.");
}

</script>
Expand Down
10 changes: 6 additions & 4 deletions dom/base/Navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

#include "nsIDOMGlobalPropertyInitializer.h"

using namespace mozilla::dom::power;

// This should not be in the namespace.
DOMCI_DATA(Navigator, mozilla::dom::Navigator)

Expand Down Expand Up @@ -1029,11 +1031,11 @@ Navigator::GetMozPower(nsIDOMMozPowerManager** aPower)
*aPower = nullptr;

if (!mPowerManager) {
nsCOMPtr<nsPIDOMWindow> win = do_QueryReferent(mWindow);
NS_ENSURE_TRUE(win, NS_OK);
nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
NS_ENSURE_TRUE(window, NS_OK);

mPowerManager = new power::PowerManager();
mPowerManager->Init(win);
mPowerManager = PowerManager::CheckPermissionAndCreateInstance(window);
NS_ENSURE_TRUE(mPowerManager, NS_OK);
}

nsCOMPtr<nsIDOMMozPowerManager> power(mPowerManager);
Expand Down
7 changes: 5 additions & 2 deletions dom/base/nsDOMClassInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ using mozilla::dom::indexedDB::IDBWrapperCache;
#include "LockedFile.h"
#include "GeneratedEvents.h"
#include "mozilla/Likely.h"
#include "nsDebug.h"

#undef None // something included above defines this preprocessor symbol, maybe Xlib headers
#include "WebGLContext.h"
Expand Down Expand Up @@ -2073,8 +2074,10 @@ SetParentToWindow(nsGlobalWindow *win, JSObject **parent)

if (MOZ_UNLIKELY(!*parent)) {
// The only known case where this can happen is when the inner window has
// been torn down. See bug 691178 comment 11.
MOZ_ASSERT(win->IsClosedOrClosing());
// been torn down. See bug 691178 comment 11. Should be a fatal MOZ_ASSERT,
// but we've found a way to hit it too often in mochitests. See bugs 777875
// 778424, 781078.
NS_ASSERTION(win->IsClosedOrClosing(), "win should be closed or closing");
return NS_ERROR_FAILURE;
}
return NS_OK;
Expand Down
12 changes: 7 additions & 5 deletions dom/base/nsGlobalWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4322,11 +4322,13 @@ nsGlobalWindow::GetScrollXY(PRInt32* aScrollX, PRInt32* aScrollY,
return GetScrollXY(aScrollX, aScrollY, true);
}

if (aScrollX)
*aScrollX = nsPresContext::AppUnitsToIntCSSPixels(scrollPos.x);
if (aScrollY)
*aScrollY = nsPresContext::AppUnitsToIntCSSPixels(scrollPos.y);

nsIntPoint scrollPosCSSPixels = sf->GetScrollPositionCSSPixels();
if (aScrollX) {
*aScrollX = scrollPosCSSPixels.x;
}
if (aScrollY) {
*aScrollY = scrollPosCSSPixels.y;
}
return NS_OK;
}

Expand Down
6 changes: 6 additions & 0 deletions dom/plugins/ipc/PluginInstanceParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,12 @@ PluginInstanceParent::RecvShow(const NPRect& updatedRect,
}

mFrontSurface = surface;
if (!surface) {
ImageContainer* container = GetImageContainer();
if (container) {
container->SetCurrentImage(nullptr);
}
}
RecvNPN_InvalidateRect(updatedRect);

PLUGIN_LOG_DEBUG((" (RecvShow invalidated for surface %p)",
Expand Down
Loading

0 comments on commit 45b1a92

Please sign in to comment.