@@ -54,13 +54,9 @@ function e(id) {
return document.getElementById(id);
}
-function start() {
- SimpleTest.waitForFocus(
- function() {
- addListener("change", change1);
- e("fse").mozRequestFullScreen();
- }
- );
+function begin() {
+ addListener("change", change1);
+ e("fse").mozRequestFullScreen();
}
function change1() {
diff --git a/content/html/content/test/test_fullscreen-api.html b/content/html/content/test/test_fullscreen-api.html
index fe84d0d4ca8e..5991baeb7dff 100644
--- a/content/html/content/test/test_fullscreen-api.html
+++ b/content/html/content/test/test_fullscreen-api.html
@@ -24,12 +24,10 @@
/** Tests for Bug 545812 **/
// Ensure the full-screen api is enabled, and will be disabled on test exit.
-var prevEnabled = SpecialPowers.getBoolPref("full-screen-api.enabled");
SpecialPowers.setBoolPref("full-screen-api.enabled", true);
// Disable the requirement for trusted contexts only, so the tests are easier
// to write.
-var prevTrusted = SpecialPowers.getBoolPref("full-screen-api.allow-trusted-requests-only");
SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false);
// Run the tests which go full-screen in new windows, as mochitests normally
@@ -50,6 +48,7 @@ var testWindow = null;
var gTestIndex = 0;
const isWinXP = navigator.userAgent.indexOf("Windows NT 5.1") != -1;
+const isOSXLion = navigator.userAgent.indexOf("Mac OS X 10.7") != -1;
function nextTest() {
if (isWinXP) {
@@ -59,13 +58,34 @@ function nextTest() {
}
if (testWindow) {
testWindow.close();
+ if (isOSXLion) {
+ // On OS X Lion, tests cause problems. Timeouts are a bad way to get around
+ // the problem and may lead to future [orange], but they are the only option
+ // at this point.
+ SimpleTest.waitForFocus(function() { setTimeout(runNextTest, 3000); });
+ return;
+ }
}
+ runNextTest();
+}
+
+function runNextTest() {
if (gTestIndex < gTestWindows.length) {
testWindow = window.open(gTestWindows[gTestIndex], "", "width=500,height=500");
+ // We'll wait for the window to load, then make sure our window is refocused
+ // before starting the test, which will get kicked off on "focus".
+ // This ensures that we're essentially back on the primary "desktop" on
+ // OS X Lion before we run the test.
+ testWindow.addEventListener("load", function onload() {
+ testWindow.removeEventListener("load", onload, false);
+ SimpleTest.waitForFocus(function() {
+ SimpleTest.waitForFocus(testWindow.begin, testWindow);
+ });
+ }, false);
gTestIndex++;
} else {
- SpecialPowers.setBoolPref("full-screen-api.enabled", prevEnabled);
- SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", prevTrusted);
+ SpecialPowers.clearUserPref("full-screen-api.enabled");
+ SpecialPowers.clearUserPref("full-screen-api.allow-trusted-requests-only");
SimpleTest.finish();
}
}
diff --git a/content/html/document/src/nsHTMLContentSink.cpp b/content/html/document/src/nsHTMLContentSink.cpp
index 4e3dabca9e59..9a6f5d18481d 100644
--- a/content/html/document/src/nsHTMLContentSink.cpp
+++ b/content/html/document/src/nsHTMLContentSink.cpp
@@ -407,7 +407,10 @@ HTMLContentSink::AddAttributes(const nsIParserNode& aNode,
nsAutoString key;
for (; i != limit; i += step) {
// Get lower-cased key
- nsContentUtils::ASCIIToLower(aNode.GetKeyAt(i), key);
+ nsresult rv = nsContentUtils::ASCIIToLower(aNode.GetKeyAt(i), key);
+ if (NS_FAILED(rv)) {
+ return rv;
+ }
nsCOMPtr
keyAtom = do_GetAtom(key);
diff --git a/content/smil/nsSMILAnimationController.cpp b/content/smil/nsSMILAnimationController.cpp
index 036ed92a08a9..667c2d5735ad 100644
--- a/content/smil/nsSMILAnimationController.cpp
+++ b/content/smil/nsSMILAnimationController.cpp
@@ -399,8 +399,14 @@ nsSMILAnimationController::DoSample(bool aSkipUnchangedContainers)
// Set running sample flag -- do this before flushing styles so that when we
// flush styles we don't end up requesting extra samples
mRunningSample = true;
+ nsCOMPtr kungFuDeathGrip(mDocument); // keeps 'this' alive too
mDocument->FlushPendingNotifications(Flush_Style);
+ // WARNING:
+ // WARNING: the above flush may have destroyed the pres shell and/or
+ // WARNING: frames and other layout related objects.
+ // WARNING:
+
// STEP 1: Bring model up to date
// (i) Rewind elements where necessary
// (ii) Run milestone samples
diff --git a/content/smil/nsSMILAnimationController.h b/content/smil/nsSMILAnimationController.h
index e2c9c4eba63f..2101feb775b8 100644
--- a/content/smil/nsSMILAnimationController.h
+++ b/content/smil/nsSMILAnimationController.h
@@ -95,6 +95,7 @@ public:
// Methods for resampling all animations
// (A resample performs the same operations as a sample but doesn't advance
// the current time and doesn't check if the container is paused)
+ // This will flush pending style changes for the document.
void Resample() { DoSample(false); }
void SetResampleNeeded()
@@ -106,6 +107,8 @@ public:
mResampleNeeded = true;
}
}
+
+ // This will flush pending style changes for the document.
void FlushResampleRequests()
{
if (!mResampleNeeded)
diff --git a/content/svg/content/src/nsSVGDataParser.cpp b/content/svg/content/src/nsSVGDataParser.cpp
index 5b5e51d840bc..097dad8005e3 100644
--- a/content/svg/content/src/nsSVGDataParser.cpp
+++ b/content/svg/content/src/nsSVGDataParser.cpp
@@ -52,6 +52,8 @@
#include "prdtoa.h"
#include "nsSVGUtils.h"
#include "nsMathUtils.h"
+#include "nsMemory.h"
+#include "nsReadableUtils.h"
#include
#include
diff --git a/content/svg/content/src/nsSVGFilters.cpp b/content/svg/content/src/nsSVGFilters.cpp
index f97e8e4035c2..e15706512946 100644
--- a/content/svg/content/src/nsSVGFilters.cpp
+++ b/content/svg/content/src/nsSVGFilters.cpp
@@ -3800,17 +3800,10 @@ nsSVGFEMorphologyElement::Filter(nsSVGFilterInstance *instance,
PRUint8* sourceData = aSources[0]->mImage->Data();
PRUint8* targetData = aTarget->mImage->Data();
PRUint32 stride = aTarget->mImage->Stride();
- PRUint32 xExt[4], yExt[4]; // X, Y indices of RGBA extrema
PRUint8 extrema[4]; // RGBA magnitude of extrema
PRUint16 op = mEnumAttributes[OPERATOR].GetAnimValue();
- /* Scan the kernel for each pixel to determine max/min RGBA values. Note that
- * as we advance in the x direction, each kernel overlaps the previous kernel.
- * Thus, we can avoid iterating over the entire kernel by comparing the
- * leading edge of the new kernel against the extrema found in the previous
- * kernel. We must still scan the entire kernel if the previous extrema do
- * not fall within the current kernel or if we are starting a new row.
- */
+ // Scan the kernel for each pixel to determine max/min RGBA values.
for (PRInt32 y = rect.y; y < rect.YMost(); y++) {
PRUint32 startY = NS_MAX(0, y - ry);
// We need to read pixels not just in 'rect', which is limited to
@@ -3822,39 +3815,18 @@ nsSVGFEMorphologyElement::Filter(nsSVGFilterInstance *instance,
PRUint32 endX = NS_MIN(x + rx, instance->GetSurfaceWidth() - 1);
PRUint32 targIndex = y * stride + 4 * x;
- // We need to scan the entire kernel
- if (x == rect.x || xExt[0] <= startX || xExt[1] <= startX ||
- xExt[2] <= startX || xExt[3] <= startX) {
- PRUint32 i;
- for (i = 0; i < 4; i++) {
- extrema[i] = sourceData[targIndex + i];
- }
- for (PRUint32 y1 = startY; y1 <= endY; y1++) {
- for (PRUint32 x1 = startX; x1 <= endX; x1++) {
- for (i = 0; i < 4; i++) {
- PRUint8 pixel = sourceData[y1 * stride + 4 * x1 + i];
- if ((extrema[i] >= pixel &&
- op == nsSVGFEMorphologyElement::SVG_OPERATOR_ERODE) ||
- (extrema[i] <= pixel &&
- op == nsSVGFEMorphologyElement::SVG_OPERATOR_DILATE)) {
- extrema[i] = pixel;
- xExt[i] = x1;
- yExt[i] = y1;
- }
- }
- }
- }
- } else { // We only need to look at the newest column
- for (PRUint32 y1 = startY; y1 <= endY; y1++) {
+ for (PRUint32 i = 0; i < 4; i++) {
+ extrema[i] = sourceData[targIndex + i];
+ }
+ for (PRUint32 y1 = startY; y1 <= endY; y1++) {
+ for (PRUint32 x1 = startX; x1 <= endX; x1++) {
for (PRUint32 i = 0; i < 4; i++) {
- PRUint8 pixel = sourceData[y1 * stride + 4 * endX + i];
- if ((extrema[i] >= pixel &&
+ PRUint8 pixel = sourceData[y1 * stride + 4 * x1 + i];
+ if ((extrema[i] > pixel &&
op == nsSVGFEMorphologyElement::SVG_OPERATOR_ERODE) ||
- (extrema[i] <= pixel &&
+ (extrema[i] < pixel &&
op == nsSVGFEMorphologyElement::SVG_OPERATOR_DILATE)) {
- extrema[i] = pixel;
- xExt[i] = endX;
- yExt[i] = y1;
+ extrema[i] = pixel;
}
}
}
@@ -5119,14 +5091,11 @@ nsSVGFELightingElement::Filter(nsSVGFilterInstance *instance,
S[2] = pointsAt[2] - lightPos[2];
NORMALIZE(S);
float dot = -DOT(L, S);
- if (dot < cosConeAngle) {
- color = NS_RGB(0, 0, 0);
- } else {
- float tmp = pow(dot, specularExponent);
- color = NS_RGB(PRUint8(NS_GET_R(lightColor) * tmp),
- PRUint8(NS_GET_G(lightColor) * tmp),
- PRUint8(NS_GET_B(lightColor) * tmp));
- }
+ if (dot < cosConeAngle) dot = 0;
+ float tmp = pow(dot, specularExponent);
+ color = NS_RGB(PRUint8(NS_GET_R(lightColor) * tmp),
+ PRUint8(NS_GET_G(lightColor) * tmp),
+ PRUint8(NS_GET_B(lightColor) * tmp));
} else {
color = lightColor;
}
@@ -5293,19 +5262,14 @@ nsSVGFEDiffuseLightingElement::LightPixel(const float *N, const float *L,
float diffuseNL =
mNumberAttributes[DIFFUSE_CONSTANT].GetAnimValue() * DOT(N, L);
- if (diffuseNL > 0) {
- targetData[GFX_ARGB32_OFFSET_B] =
- NS_MIN(PRUint32(diffuseNL * NS_GET_B(color)), 255U);
- targetData[GFX_ARGB32_OFFSET_G] =
- NS_MIN(PRUint32(diffuseNL * NS_GET_G(color)), 255U);
- targetData[GFX_ARGB32_OFFSET_R] =
- NS_MIN(PRUint32(diffuseNL * NS_GET_R(color)), 255U);
- } else {
- targetData[GFX_ARGB32_OFFSET_B] = 0;
- targetData[GFX_ARGB32_OFFSET_G] = 0;
- targetData[GFX_ARGB32_OFFSET_R] = 0;
- }
+ if (diffuseNL < 0) diffuseNL = 0;
+ targetData[GFX_ARGB32_OFFSET_B] =
+ NS_MIN(PRUint32(diffuseNL * NS_GET_B(color)), 255U);
+ targetData[GFX_ARGB32_OFFSET_G] =
+ NS_MIN(PRUint32(diffuseNL * NS_GET_G(color)), 255U);
+ targetData[GFX_ARGB32_OFFSET_R] =
+ NS_MIN(PRUint32(diffuseNL * NS_GET_R(color)), 255U);
targetData[GFX_ARGB32_OFFSET_A] = 255;
}
@@ -5460,27 +5424,24 @@ nsSVGFESpecularLightingElement::LightPixel(const float *N, const float *L,
float kS = mNumberAttributes[SPECULAR_CONSTANT].GetAnimValue();
float dotNH = DOT(N, H);
- if (dotNH > 0 && kS > 0) {
- float specularNH =
- kS * pow(dotNH, mNumberAttributes[SPECULAR_EXPONENT].GetAnimValue());
+ bool invalid = dotNH <= 0 || kS <= 0;
+ kS *= invalid ? 0 : 1;
+ PRUint8 minAlpha = invalid ? 255 : 0;
- targetData[GFX_ARGB32_OFFSET_B] =
- NS_MIN(PRUint32(specularNH * NS_GET_B(color)), 255U);
- targetData[GFX_ARGB32_OFFSET_G] =
- NS_MIN(PRUint32(specularNH * NS_GET_G(color)), 255U);
- targetData[GFX_ARGB32_OFFSET_R] =
- NS_MIN(PRUint32(specularNH * NS_GET_R(color)), 255U);
+ float specularNH =
+ kS * pow(dotNH, mNumberAttributes[SPECULAR_EXPONENT].GetAnimValue());
- targetData[GFX_ARGB32_OFFSET_A] =
- NS_MAX(targetData[GFX_ARGB32_OFFSET_B],
- NS_MAX(targetData[GFX_ARGB32_OFFSET_G],
- targetData[GFX_ARGB32_OFFSET_R]));
- } else {
- targetData[GFX_ARGB32_OFFSET_B] = 0;
- targetData[GFX_ARGB32_OFFSET_G] = 0;
- targetData[GFX_ARGB32_OFFSET_R] = 0;
- targetData[GFX_ARGB32_OFFSET_A] = 255;
- }
+ targetData[GFX_ARGB32_OFFSET_B] =
+ NS_MIN(PRUint32(specularNH * NS_GET_B(color)), 255U);
+ targetData[GFX_ARGB32_OFFSET_G] =
+ NS_MIN(PRUint32(specularNH * NS_GET_G(color)), 255U);
+ targetData[GFX_ARGB32_OFFSET_R] =
+ NS_MIN(PRUint32(specularNH * NS_GET_R(color)), 255U);
+
+ targetData[GFX_ARGB32_OFFSET_A] =
+ NS_MAX(minAlpha, NS_MAX(targetData[GFX_ARGB32_OFFSET_B],
+ NS_MAX(targetData[GFX_ARGB32_OFFSET_G],
+ targetData[GFX_ARGB32_OFFSET_R])));
}
//---------------------Image------------------------
@@ -5989,6 +5950,8 @@ nsSVGFEDisplacementMapElement::Filter(nsSVGFilterInstance *instance,
PRUint8* targetData = aTarget->mImage->Data();
PRUint32 stride = aTarget->mImage->Stride();
+ static PRUint8 dummyData[4] = { 0, 0, 0, 0 };
+
static const PRUint16 channelMap[5] = {
0,
GFX_ARGB32_OFFSET_R,
@@ -6011,13 +5974,20 @@ nsSVGFEDisplacementMapElement::Filter(nsSVGFilterInstance *instance,
PRInt32 sourceY = y +
NSToIntFloor(scaleOver255 * displacementData[targIndex + yChannel] +
scaleAdjustment);
- if (sourceX < 0 || sourceX >= width ||
- sourceY < 0 || sourceY >= height) {
- *(PRUint32*)(targetData + targIndex) = 0;
+
+ bool outOfBounds = sourceX < 0 || sourceX >= width ||
+ sourceY < 0 || sourceY >= height;
+ PRUint8* data;
+ PRInt32 multiplier;
+ if (outOfBounds) {
+ data = dummyData;
+ multiplier = 0;
} else {
- *(PRUint32*)(targetData + targIndex) =
- *(PRUint32*)(sourceData + sourceY * stride + 4 * sourceX);
+ data = sourceData;
+ multiplier = 1;
}
+ *(PRUint32*)(targetData + targIndex) =
+ *(PRUint32*)(data + multiplier * (sourceY * stride + 4 * sourceX));
}
}
return NS_OK;
diff --git a/content/svg/content/src/nsSVGSVGElement.cpp b/content/svg/content/src/nsSVGSVGElement.cpp
index 0fdeaada9103..04c47080fc5a 100644
--- a/content/svg/content/src/nsSVGSVGElement.cpp
+++ b/content/svg/content/src/nsSVGSVGElement.cpp
@@ -202,7 +202,6 @@ nsSVGSVGElement::nsSVGSVGElement(already_AddRefed aNodeInfo,
mCurrentScale(1.0f),
mPreviousTranslate(0.0f, 0.0f),
mPreviousScale(1.0f),
- mRedrawSuspendCount(0),
mStartAnimationOnBindToTree(!aFromParser),
mImageNeedsTransformInvalidation(false),
mIsPaintingSVGImageElement(false)
@@ -379,20 +378,9 @@ nsSVGSVGElement::GetCurrentTranslate(nsIDOMSVGPoint * *aCurrentTranslate)
NS_IMETHODIMP
nsSVGSVGElement::SuspendRedraw(PRUint32 max_wait_milliseconds, PRUint32 *_retval)
{
+ // suspendRedraw is a no-op in Mozilla, so it doesn't matter what
+ // we set the ID out-param to:
*_retval = 1;
-
- if (++mRedrawSuspendCount > 1)
- return NS_OK;
-
- nsIFrame* frame = GetPrimaryFrame();
- if (frame) {
- nsISVGSVGFrame* svgframe = do_QueryFrame(frame);
- // might fail this check if we've failed conditional processing
- if (svgframe) {
- svgframe->SuspendRedraw();
- }
- }
-
return NS_OK;
}
@@ -400,32 +388,15 @@ nsSVGSVGElement::SuspendRedraw(PRUint32 max_wait_milliseconds, PRUint32 *_retval
NS_IMETHODIMP
nsSVGSVGElement::UnsuspendRedraw(PRUint32 suspend_handle_id)
{
- if (mRedrawSuspendCount == 0) {
- return NS_ERROR_FAILURE;
- }
-
- if (mRedrawSuspendCount > 1) {
- --mRedrawSuspendCount;
- return NS_OK;
- }
-
- return UnsuspendRedrawAll();
+ // no-op
+ return NS_OK;
}
/* void unsuspendRedrawAll (); */
NS_IMETHODIMP
nsSVGSVGElement::UnsuspendRedrawAll()
{
- mRedrawSuspendCount = 0;
-
- nsIFrame* frame = GetPrimaryFrame();
- if (frame) {
- nsISVGSVGFrame* svgframe = do_QueryFrame(frame);
- // might fail this check if we've failed conditional processing
- if (svgframe) {
- svgframe->UnsuspendRedraw();
- }
- }
+ // no-op
return NS_OK;
}
diff --git a/content/svg/content/src/nsSVGSwitchElement.cpp b/content/svg/content/src/nsSVGSwitchElement.cpp
index abe51b1961a1..efcae0304b23 100644
--- a/content/svg/content/src/nsSVGSwitchElement.cpp
+++ b/content/svg/content/src/nsSVGSwitchElement.cpp
@@ -87,18 +87,22 @@ nsSVGSwitchElement::nsSVGSwitchElement(already_AddRefed aNodeInfo)
void
nsSVGSwitchElement::MaybeInvalidate()
{
- // We don't reuse UpdateActiveChild() and check if mActiveChild has changed
- // to determine if we should invalidate. If we did that,
- // nsSVGUtils::UpdateGraphic would not invalidate the old mActiveChild area!
+ // We must not change mActiveChild until after
+ // InvalidateAndScheduleBoundsUpdate has been called, otherwise
+ // it will not correctly invalidate the old mActiveChild area.
- if (FindActiveChild() == mActiveChild) {
+ nsIContent *newActiveChild = FindActiveChild();
+
+ if (newActiveChild == mActiveChild) {
return;
}
nsIFrame *frame = GetPrimaryFrame();
if (frame) {
- nsSVGUtils::UpdateGraphic(frame);
+ nsSVGUtils::InvalidateAndScheduleBoundsUpdate(frame);
}
+
+ mActiveChild = newActiveChild;
}
//----------------------------------------------------------------------
diff --git a/dom/base/ScreenOrientation.h b/dom/base/ScreenOrientation.h
index 90ba25c068df..938d171a6d60 100644
--- a/dom/base/ScreenOrientation.h
+++ b/dom/base/ScreenOrientation.h
@@ -8,6 +8,9 @@
namespace mozilla {
namespace dom {
+// Make sure that any change here is also made in
+// * mobile/android/base/GeckoScreenOrientationListener.java
+// * embedding/android/GeckoScreenOrientationListener.java
enum ScreenOrientation {
eScreenOrientation_Current = 0,
eScreenOrientation_PortraitPrimary = 1, // 00000001
diff --git a/dom/interfaces/events/nsIDOMDataTransfer.idl b/dom/interfaces/events/nsIDOMDataTransfer.idl
index 8517e87bd81b..f03361998ac2 100644
--- a/dom/interfaces/events/nsIDOMDataTransfer.idl
+++ b/dom/interfaces/events/nsIDOMDataTransfer.idl
@@ -40,7 +40,7 @@
interface nsIVariant;
interface nsIDOMFileList;
-[scriptable, uuid(E929ACB6-435C-4CB8-9AD1-AE3B9353BCC5)]
+[scriptable, uuid(7D73CFBF-EC30-4F8E-B6A4-BB31EB943580)]
interface nsIDOMDataTransfer : nsISupports
{
/**
@@ -264,8 +264,11 @@ interface nsIDOMDataTransfer : nsISupports
/**
* Creates a copy of the data transfer object, for the given event type and
- * user cancelled flag.
+ * user cancelled flag. If isCrossDomainSubFrameDrop is set, then this is a
+ * cross-domain drop from a subframe where access to the data should be
+ * prevented.
*/
[noscript] nsIDOMDataTransfer clone(in PRUint32 aEventType,
- in boolean aUserCancelled);
+ in boolean aUserCancelled,
+ in boolean isCrossDomainSubFrameDrop);
};
diff --git a/dom/plugins/test/mochitest/cocoa_focus.html b/dom/plugins/test/mochitest/cocoa_focus.html
index c67857c7f4f9..edc623d24401 100644
--- a/dom/plugins/test/mochitest/cocoa_focus.html
+++ b/dom/plugins/test/mochitest/cocoa_focus.html
@@ -33,8 +33,8 @@
const NSLeftMouseDown = 1,
NSLeftMouseUp = 2;
- // Don't run any tests if we're not testing the Cocoa event model.
if (plugin1.getEventModel() != 1) {
+ window.opener.todo(false, "Skipping this test when not testing the Cocoa event model");
window.opener.testsFinished();
return;
}
diff --git a/dom/plugins/test/mochitest/cocoa_window_focus.html b/dom/plugins/test/mochitest/cocoa_window_focus.html
index 3cee18df729a..71a864f1a1b1 100644
--- a/dom/plugins/test/mochitest/cocoa_window_focus.html
+++ b/dom/plugins/test/mochitest/cocoa_window_focus.html
@@ -26,8 +26,8 @@
var plugin1 = document.getElementById("plugin1");
var plugin2 = document.getElementById("plugin2");
- // Don't run any tests if we're not testing the Cocoa event model.
if (plugin1.getEventModel() != 1) {
+ window.opener.todo(false, "Skipping this test when not testing the Cocoa event model");
window.opener.testsFinished();
return;
}
diff --git a/dom/plugins/test/mochitest/test_pluginstream_seek_close.html b/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
index e8a02434a326..21b92cc8a412 100644
--- a/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
+++ b/dom/plugins/test/mochitest/test_pluginstream_seek_close.html
@@ -5,7 +5,7 @@
src="/tests/SimpleTest/SimpleTest.js">
-
+
+
+
+
diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list
index 52b4f0fb1343..dc9a818a7067 100644
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -352,5 +352,6 @@ load 707098.html
load 722137.html
load 725535.html
load 727601.html
-load 736389-1.xhtml
+asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966
+asserts(0-2) load 736389-1.xhtml # sometimes the above assertions are delayed and is reported on this test instead
load 736924-1.html
diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp
index 4ad3b8b41374..8dae61a3e276 100644
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -7621,12 +7621,11 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
if (aChange & nsChangeHint_RepaintFrame) {
if (aFrame->IsFrameOfType(nsIFrame::eSVG)) {
if (aChange & nsChangeHint_UpdateEffects) {
- // Invalidate the frame's old bounds, update its bounds, invalidate its new
- // bounds, and then inform anyone observing _us_ that we've changed:
- nsSVGUtils::UpdateGraphic(aFrame);
+ // Invalidate and update our area:
+ nsSVGUtils::InvalidateAndScheduleBoundsUpdate(aFrame);
} else {
// Just invalidate our area:
- nsSVGUtils::InvalidateCoveredRegion(aFrame);
+ nsSVGUtils::InvalidateBounds(aFrame);
}
} else {
aFrame->InvalidateOverflowRect();
@@ -10710,13 +10709,15 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
nsIContent* const content = aItem.mContent;
nsStyleContext* const styleContext = aItem.mStyleContext;
- nsIFrame *newFrame;
-
bool positioned =
NS_STYLE_DISPLAY_INLINE == aDisplay->mDisplay &&
(NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition ||
aDisplay->HasTransform());
- newFrame = NS_NewInlineFrame(mPresShell, styleContext);
+
+ nsIFrame* newFrame = NS_NewInlineFrame(mPresShell, styleContext);
+ if (!newFrame) {
+ return NS_ERROR_OUT_OF_MEMORY;
+ }
// Initialize the frame
InitAndRestoreFrame(aState, content, aParentFrame, nsnull, newFrame);
@@ -10736,7 +10737,11 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
nsresult rv = ConstructFramesFromItemList(aState, aItem.mChildItems, newFrame,
childItems);
if (NS_FAILED(rv)) {
- // Clean up?
+ // Clean up.
+ // Link up any successfully-created child frames here, so that we'll
+ // clean them up as well.
+ newFrame->SetInitialChildList(kPrincipalList, childItems);
+ newFrame->Destroy();
return rv;
}
diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp
index baf3df5ba2f8..977a5de33a84 100644
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -71,6 +71,7 @@
#include "nsINameSpaceManager.h"
#include "nsBlockFrame.h"
#include "gfxContext.h"
+#include "nsRenderingContext.h"
#include "nsIInterfaceRequestorUtils.h"
#include "gfxPlatform.h"
#include "gfxImageSurface.h"
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 69325124bc30..a188d1b27fa6 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -69,6 +69,7 @@
#include "gfxRect.h"
#include "gfxContext.h"
#include "gfxFont.h"
+#include "nsRenderingContext.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsCSSRendering.h"
#include "nsContentUtils.h"
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index b5e51d0df5a2..00f7df56c8ef 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -3965,9 +3965,12 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
mDocument->GetAnimationController()->FlushResampleRequests();
}
- nsAutoScriptBlocker scriptBlocker;
- mFrameConstructor->CreateNeededFrames();
- mFrameConstructor->ProcessPendingRestyles();
+ // The FlushResampleRequests() above flushed style changes.
+ if (!mIsDestroying) {
+ nsAutoScriptBlocker scriptBlocker;
+ mFrameConstructor->CreateNeededFrames();
+ mFrameConstructor->ProcessPendingRestyles();
+ }
}
// Dispatch any 'animationstart' events those (or earlier) restyles
diff --git a/layout/generic/crashtests/737313-1.html b/layout/generic/crashtests/737313-1.html
new file mode 100644
index 000000000000..e30f50ef88d0
--- /dev/null
+++ b/layout/generic/crashtests/737313-1.html
@@ -0,0 +1,5 @@
+
+
+
+
diff --git a/layout/generic/crashtests/737313-2.html b/layout/generic/crashtests/737313-2.html
new file mode 100644
index 000000000000..ba735f344af8
--- /dev/null
+++ b/layout/generic/crashtests/737313-2.html
@@ -0,0 +1,5 @@
+
+
+ some text
+
diff --git a/layout/generic/crashtests/737313-3.html b/layout/generic/crashtests/737313-3.html
new file mode 100644
index 000000000000..8dce15f53e26
--- /dev/null
+++ b/layout/generic/crashtests/737313-3.html
@@ -0,0 +1,5 @@
+
+
+ a block
+
diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list
index 843dfd10e4f2..1ad6748b2790 100644
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -386,3 +386,6 @@ load text-overflow-bug713610.html
load 700031.xhtml
load first-letter-638937.html
asserts(18) load first-letter-638937-2.html
+load 737313-1.html
+load 737313-2.html
+load 737313-3.html
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index aa56c6bcf1e9..276c9672e104 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -124,6 +124,7 @@
#include "nsDeckFrame.h"
#include "gfxContext.h"
+#include "nsRenderingContext.h"
#include "CSSCalc.h"
#include "nsAbsoluteContainingBlock.h"
diff --git a/layout/reftests/bugs/723484-1-ref.html b/layout/reftests/bugs/723484-1-ref.html
new file mode 100644
index 000000000000..124ee0cde09d
--- /dev/null
+++ b/layout/reftests/bugs/723484-1-ref.html
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/723484-1.html b/layout/reftests/bugs/723484-1.html
new file mode 100644
index 000000000000..0e3e8bb5d501
--- /dev/null
+++ b/layout/reftests/bugs/723484-1.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
index 1ae352e963c8..86287b079052 100644
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1693,6 +1693,7 @@ needs-focus != 703186-1.html 703186-2.html
fuzzy-if(d2d,1,19) fuzzy-if(cocoaWidget,1,170) == 718521.html 718521-ref.html
== 720987.html 720987-ref.html
== 722923-1.html 722923-1-ref.html
+== 723484-1.html 723484-1-ref.html
== 729143-1.html 729143-1-ref.html
needs-focus == 731726-1.html 731726-1-ref.html
== 735481-1.html 735481-1-ref.html
diff --git a/layout/reftests/svg/reftest.list b/layout/reftests/svg/reftest.list
index 867d7c09ca8c..2f020a51ad0b 100644
--- a/layout/reftests/svg/reftest.list
+++ b/layout/reftests/svg/reftest.list
@@ -227,9 +227,9 @@ random-if(gtk2Widget) == objectBoundingBox-and-fePointLight-02.svg objectBoundin
== svg-in-foreignObject-01.xhtml svg-in-foreignObject-01-ref.xhtml
== svg-in-foreignObject-02.xhtml svg-in-foreignObject-01-ref.xhtml # reuse -01-ref.xhtml
== switch-01.svg pass.svg
-== suspend-01.svg about:blank
+== suspend-01.svg pass.svg
== suspend-02.svg pass.svg
-fails == suspend-03.svg pass.svg # bug 724242
+== suspend-03.svg pass.svg
== suspend-04.svg pass.svg
== suspend-05.svg pass.svg
== suspend-06.svg pass.svg
diff --git a/layout/reftests/svg/suspend-01.svg b/layout/reftests/svg/suspend-01.svg
index ff98340cdca8..fa681fbe60da 100644
--- a/layout/reftests/svg/suspend-01.svg
+++ b/layout/reftests/svg/suspend-01.svg
@@ -4,10 +4,10 @@
http://creativecommons.org/licenses/publicdomain/
-->