mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to services-central
This commit is contained in:
commit
18f984fb4e
@ -75,6 +75,7 @@
|
||||
#include "nsIForm.h"
|
||||
#include "nsIFormControl.h"
|
||||
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIFrame.h"
|
||||
@ -682,15 +683,7 @@ nsAccessible::IsVisible(PRBool* aIsOffscreen)
|
||||
}
|
||||
|
||||
// The frame intersects the viewport, but we need to check the parent view chain :(
|
||||
nsIDocument* doc = mContent->GetOwnerDoc();
|
||||
if (!doc) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
nsIFrame* frameWithView =
|
||||
frame->HasView() ? frame : frame->GetAncestorWithViewExternal();
|
||||
nsIView* view = frameWithView->GetViewExternal();
|
||||
PRBool isVisible = CheckVisibilityInParentChain(doc, view);
|
||||
bool isVisible = nsCoreUtils::CheckVisibilityInParentChain(frame);
|
||||
if (isVisible && rectVisibility == nsRectVisibility_kVisible) {
|
||||
*aIsOffscreen = PR_FALSE;
|
||||
}
|
||||
@ -3251,44 +3244,6 @@ nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
PRBool nsAccessible::CheckVisibilityInParentChain(nsIDocument* aDocument, nsIView* aView)
|
||||
{
|
||||
nsIDocument* document = aDocument;
|
||||
nsIView* view = aView;
|
||||
// both view chain and widget chain are broken between chrome and content
|
||||
while (document != nsnull) {
|
||||
while (view != nsnull) {
|
||||
if (view->GetVisibility() == nsViewVisibility_kHide) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
view = view->GetParent();
|
||||
}
|
||||
|
||||
nsIDocument* parentDoc = document->GetParentDocument();
|
||||
if (parentDoc != nsnull) {
|
||||
nsIContent* content = parentDoc->FindContentForSubDocument(document);
|
||||
if (content != nsnull) {
|
||||
nsIPresShell* shell = parentDoc->GetShell();
|
||||
if (!shell) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
nsIFrame* frame = content->GetPrimaryFrame();
|
||||
while (frame != nsnull && !frame->HasView()) {
|
||||
frame = frame->GetParent();
|
||||
}
|
||||
|
||||
if (frame != nsnull) {
|
||||
view = frame->GetViewExternal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
document = parentDoc;
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAccessible::GetAttrValue(nsIAtom *aProperty, double *aValue)
|
||||
{
|
||||
|
@ -606,9 +606,6 @@ protected:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Helpers
|
||||
|
||||
// Check the visibility across both parent content and chrome
|
||||
PRBool CheckVisibilityInParentChain(nsIDocument* aDocument, nsIView* aView);
|
||||
|
||||
/**
|
||||
* Get the container node for an atomic region, defined by aria-atomic="true"
|
||||
* @return the container node
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
|
||||
#include "nsContentCID.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
@ -753,6 +754,30 @@ nsCoreUtils::IsColumnHidden(nsITreeColumn *aColumn)
|
||||
nsAccessibilityAtoms::_true, eCaseMatters);
|
||||
}
|
||||
|
||||
bool
|
||||
nsCoreUtils::CheckVisibilityInParentChain(nsIFrame* aFrame)
|
||||
{
|
||||
nsIView* view = aFrame->GetClosestView();
|
||||
if (view && !view->IsEffectivelyVisible())
|
||||
return false;
|
||||
|
||||
nsIPresShell* presShell = aFrame->PresContext()->GetPresShell();
|
||||
while (presShell) {
|
||||
if (!presShell->IsActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsIFrame* rootFrame = presShell->GetRootFrame();
|
||||
presShell = nsnull;
|
||||
if (rootFrame) {
|
||||
nsIFrame* frame = nsLayoutUtils::GetCrossDocParentFrame(rootFrame);
|
||||
if (frame) {
|
||||
presShell = frame->PresContext()->GetPresShell();
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessibleDOMStringList
|
||||
|
@ -367,6 +367,12 @@ public:
|
||||
return aContent->NodeInfo()->Equals(nsAccessibilityAtoms::th) ||
|
||||
aContent->HasAttr(kNameSpaceID_None, nsAccessibilityAtoms::scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the visibility across both parent content and chrome.
|
||||
*/
|
||||
static bool CheckVisibilityInParentChain(nsIFrame* aFrame);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -313,12 +313,7 @@ nsDocAccessible::NativeState()
|
||||
}
|
||||
|
||||
nsIFrame* frame = GetFrame();
|
||||
while (frame != nsnull && !frame->HasView()) {
|
||||
frame = frame->GetParent();
|
||||
}
|
||||
|
||||
if (frame == nsnull ||
|
||||
!CheckVisibilityInParentChain(mDocument, frame->GetViewExternal())) {
|
||||
if (!frame || !nsCoreUtils::CheckVisibilityInParentChain(frame)) {
|
||||
state |= states::INVISIBLE | states::OFFSCREEN;
|
||||
}
|
||||
|
||||
|
@ -2964,6 +2964,7 @@ function FillInHTMLTooltip(tipElement)
|
||||
var titleText = null;
|
||||
var XLinkTitleText = null;
|
||||
var SVGTitleText = null;
|
||||
var lookingForSVGTitle = true;
|
||||
var direction = tipElement.ownerDocument.dir;
|
||||
|
||||
// If the element is invalid per HTML5 Forms specifications and has no title,
|
||||
@ -2988,10 +2989,13 @@ function FillInHTMLTooltip(tipElement)
|
||||
(tipElement instanceof SVGAElement && tipElement.hasAttributeNS(XLinkNS, "href"))) {
|
||||
XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
|
||||
}
|
||||
if (tipElement instanceof SVGElement &&
|
||||
tipElement.parentNode instanceof SVGElement &&
|
||||
!(tipElement.parentNode instanceof SVGForeignObjectElement)) {
|
||||
// Looking for SVG title
|
||||
if (lookingForSVGTitle &&
|
||||
!(tipElement instanceof SVGElement &&
|
||||
tipElement.parentNode instanceof SVGElement &&
|
||||
!(tipElement.parentNode instanceof SVGForeignObjectElement))) {
|
||||
lookingForSVGTitle = false;
|
||||
}
|
||||
if (lookingForSVGTitle) {
|
||||
let length = tipElement.childNodes.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
let childNode = tipElement.childNodes[i];
|
||||
|
@ -359,13 +359,17 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
|
||||
|
||||
JSAutoRequest ar(ctx);
|
||||
|
||||
JSAutoEnterCompartment ac;
|
||||
if (!ac.enter(ctx, object))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
// The parameter for the listener function.
|
||||
JSObject* param = JS_NewObject(ctx, NULL, NULL, NULL);
|
||||
NS_ENSURE_TRUE(param, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
jsval targetv;
|
||||
nsContentUtils::WrapNative(ctx,
|
||||
JS_GetGlobalObject(ctx),
|
||||
JS_GetGlobalForObject(ctx, object),
|
||||
aTarget, &targetv);
|
||||
|
||||
// To keep compatibility with e10s message manager,
|
||||
@ -402,11 +406,6 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
|
||||
|
||||
jsval thisValue = JSVAL_VOID;
|
||||
|
||||
JSAutoEnterCompartment ac;
|
||||
|
||||
if (!ac.enter(ctx, object))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
jsval funval = JSVAL_VOID;
|
||||
if (JS_ObjectIsFunction(ctx, object)) {
|
||||
// If the listener is a JS function:
|
||||
@ -422,7 +421,7 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
|
||||
defaultThisValue = aTarget;
|
||||
}
|
||||
nsContentUtils::WrapNative(ctx,
|
||||
JS_GetGlobalObject(ctx),
|
||||
JS_GetGlobalForObject(ctx, object),
|
||||
defaultThisValue, &thisValue);
|
||||
} else {
|
||||
// If the listener is a JS object which has receiveMessage function:
|
||||
@ -446,8 +445,7 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
|
||||
JSObject* thisObject = JSVAL_TO_OBJECT(thisValue);
|
||||
|
||||
if (!tac.enter(ctx, thisObject) ||
|
||||
!JS_WrapValue(ctx, argv.jsval_addr()) ||
|
||||
!JS_WrapValue(ctx, &funval))
|
||||
!JS_WrapValue(ctx, argv.jsval_addr()))
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
JS_CallFunctionValue(ctx, thisObject,
|
||||
|
@ -13,36 +13,47 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=592366
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=592366">Mozilla Bug 592366</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe onload='runTest();'></iframe>
|
||||
<iframe onload='runTest();'></iframe>
|
||||
<iframe></iframe>
|
||||
<iframe></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/** Test for Bug 592366 **/
|
||||
var iframesToLoad = 2;
|
||||
function runTest() {
|
||||
--iframesToLoad;
|
||||
if (iframesToLoad) {
|
||||
|
||||
var gExecuted = false;
|
||||
|
||||
function hitEventLoop(times, next)
|
||||
{
|
||||
if (times == 0) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
ok(true, "Obligatory succeeding assertion.");
|
||||
SimpleTest.executeSoon(function() {
|
||||
hitEventLoop(times - 1, next);
|
||||
});
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addLoadEvent(function() {
|
||||
var s = document.createElement("script");
|
||||
s.src = "data:text/javascript,parent.ok(false, 'This script should not be executed.');"
|
||||
|
||||
s.src = "data:text/javascript,parent.gExecuted=true;";
|
||||
|
||||
var iframes = document.getElementsByTagName("iframe");
|
||||
|
||||
iframes[0].contentDocument.body.appendChild(s);
|
||||
iframes[1].contentDocument.body.appendChild(s);
|
||||
|
||||
setTimeout(function() {
|
||||
// It seems to work with 1 event loop hit locally but using 2 given that it
|
||||
// was hsivonen advice.
|
||||
hitEventLoop(2, function() {
|
||||
ok(!gExecuted, "The scripts should not have been executed");
|
||||
SimpleTest.finish();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -15,7 +15,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633913
|
||||
and
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=633913">Mozilla Bug 633913</a>
|
||||
<p id="display"></p>
|
||||
<iframe name="submit_frame" onload="onFormSubmission();" style="visibility: hidden;"></iframe>
|
||||
<iframe name="submit_frame" style="visibility: hidden;"></iframe>
|
||||
<div id="content" style="visibility: hidden;">
|
||||
<form id='f' method='get' target='submit_frame' action='foo'>
|
||||
<progress id='p'></progress>
|
||||
@ -255,24 +255,24 @@ function checkNotResetableAndFormSubmission(aElement)
|
||||
aElement.value = 42.0;
|
||||
aElement.max = 100.0;
|
||||
|
||||
// This is going to call onFormSubmission().
|
||||
document.getElementsByName('submit_frame')[0].addEventListener("load", function() {
|
||||
document.getElementsByName('submit_frame')[0].removeEventListener("load", arguments.callee, false);
|
||||
|
||||
/**
|
||||
* All elements values have been set just before the submission.
|
||||
* The input element value should be in the submit url but the progress
|
||||
* element value should not appear.
|
||||
*/
|
||||
is(frames['submit_frame'].location.href,
|
||||
'http://mochi.test:8888/tests/content/html/content/test/foo?a=tulip',
|
||||
"The progress element value should not be submitted");
|
||||
|
||||
checkNotResetable();
|
||||
}, false);
|
||||
|
||||
form.submit();
|
||||
}
|
||||
|
||||
function onFormSubmission()
|
||||
{
|
||||
/**
|
||||
* All elements values have been set just before the submission.
|
||||
* The input element value should be in the submit url but the progress
|
||||
* element value should not appear.
|
||||
*/
|
||||
is(frames['submit_frame'].location.href,
|
||||
'http://mochi.test:8888/tests/content/html/content/test/foo?a=tulip',
|
||||
"The progress element value should not be submitted");
|
||||
|
||||
checkNotResetable();
|
||||
}
|
||||
|
||||
function checkNotResetable()
|
||||
{
|
||||
// Try to reset the form.
|
||||
|
@ -13,8 +13,8 @@
|
||||
var a = document.getElementById("a");
|
||||
isnot(a, document.elementFromPoint(5, 5), "a shouldn't be found");
|
||||
isnot(a, document.elementFromPoint(5.25, 5.25), "a shouldn't be found");
|
||||
isnot(a, document.elementFromPoint(5.5, 5.5), "a shouldn't be found");
|
||||
isnot(a, document.elementFromPoint(5.75, 5.75), "a shouldn't be found");
|
||||
is(a, document.elementFromPoint(5.5, 5.5), "a should be found");
|
||||
is(a, document.elementFromPoint(5.75, 5.75), "a should be found");
|
||||
is(a, document.elementFromPoint(6, 6), "a should be found");
|
||||
is(a, document.elementFromPoint(105, 105), "a should be found");
|
||||
is(a, document.elementFromPoint(105.25, 105.25), "a should be found");
|
||||
|
@ -6937,9 +6937,9 @@ nsDocShell::RestoreFromHistory()
|
||||
mSavingOldViewer = CanSavePresentation(mLoadType, request, doc);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> oldMUDV(
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> oldMUDV(
|
||||
do_QueryInterface(mContentViewer));
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> newMUDV(
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> newMUDV(
|
||||
do_QueryInterface(viewer));
|
||||
PRInt32 minFontSize = 0;
|
||||
float textZoom = 1.0f;
|
||||
@ -7589,10 +7589,10 @@ nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer)
|
||||
float pageZoom;
|
||||
PRBool styleDisabled;
|
||||
// |newMUDV| also serves as a flag to set the data from the above vars
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> newMUDV;
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> newMUDV;
|
||||
|
||||
if (mContentViewer || parent) {
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> oldMUDV;
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> oldMUDV;
|
||||
if (mContentViewer) {
|
||||
// Get any interesting state from old content viewer
|
||||
// XXX: it would be far better to just reuse the document viewer ,
|
||||
|
@ -52,7 +52,7 @@
|
||||
interface nsIDOMNode;
|
||||
|
||||
|
||||
[scriptable, uuid(00d3454c-e125-4cce-bfec-adfbf0975e05)]
|
||||
[scriptable, uuid(79286cd6-8293-4def-ba26-76422efc3d2a)]
|
||||
interface nsIMarkupDocumentViewer : nsISupports
|
||||
{
|
||||
|
||||
@ -146,11 +146,7 @@ interface nsIMarkupDocumentViewer : nsISupports
|
||||
* Use this attribute to access all the Bidi options in one operation
|
||||
*/
|
||||
attribute PRUint32 bidiOptions;
|
||||
};
|
||||
|
||||
[scriptable, uuid(83b28afd-75a7-4d13-9265-625e36861f04)]
|
||||
interface nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH : nsIMarkupDocumentViewer
|
||||
{
|
||||
/** The minimum font size */
|
||||
attribute long minFontSize;
|
||||
|
||||
|
@ -219,9 +219,13 @@ Test.Unit.Runner = Class.create({
|
||||
if (!test.isWaiting) this.logger.start(test.name);
|
||||
test.run();
|
||||
if (test.isWaiting) {
|
||||
this.logger.message("Waiting for " + test.timeToWait + "ms");
|
||||
if (test.timeToWait) {
|
||||
this.logger.message("Waiting for " + test.timeToWait + "ms");
|
||||
test.timerID = setTimeout(this.runTests.bind(this), test.timeToWait);
|
||||
} else {
|
||||
this.logger.message("Waiting for finish");
|
||||
}
|
||||
test.runner = this;
|
||||
test.timerID = setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -488,7 +492,7 @@ Test.Unit.Testcase = Class.create(Test.Unit.Assertions, {
|
||||
},
|
||||
|
||||
isWaiting: false,
|
||||
timeToWait: 1000,
|
||||
timeToWait: null,
|
||||
timerID: -1,
|
||||
runner: null,
|
||||
assertions: 0,
|
||||
@ -502,15 +506,20 @@ Test.Unit.Testcase = Class.create(Test.Unit.Assertions, {
|
||||
this.timeToWait = time;
|
||||
},
|
||||
|
||||
cancelWait: function() {
|
||||
waitForFinish: function() {
|
||||
this.isWaiting = true;
|
||||
},
|
||||
|
||||
finish: function() {
|
||||
if (this.timerID > 0) {
|
||||
clearTimeout(this.timerID);
|
||||
this.timerID = -1;
|
||||
this.test = function(){};
|
||||
// continue test
|
||||
if (this.runner)
|
||||
this.runner.runTests();
|
||||
this.timeToWait = null;
|
||||
}
|
||||
this.test = function(){};
|
||||
// continue test
|
||||
if (this.runner)
|
||||
this.runner.runTests();
|
||||
},
|
||||
|
||||
run: function(rethrow) {
|
||||
|
@ -32,55 +32,6 @@ new Test.Unit.Runner({
|
||||
this.assertEqual("Hello world!", h2.innerHTML);
|
||||
},
|
||||
|
||||
testUpdater: function() {
|
||||
this.assertEqual("", $("content").innerHTML);
|
||||
|
||||
new Ajax.Updater("content", "../fixtures/content.html", { method:'get', onComplete: function() {
|
||||
this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase());
|
||||
$('content').update('');
|
||||
this.assertEqual("", $("content").innerHTML);
|
||||
new Ajax.Updater({ success:"content", failure:"content2" },
|
||||
"../fixtures/content.html",
|
||||
{ method:'get', parameters:{ pet:'monkey' }, onComplete: function() {
|
||||
this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase());
|
||||
this.assertEqual("", $("content2").innerHTML);
|
||||
$('content').update('');
|
||||
this.assertEqual("", $("content").innerHTML);
|
||||
new Ajax.Updater("", "../fixtures/content.html",
|
||||
{ method:'get', parameters:"pet=monkey", onComplete: function() {
|
||||
this.assertEqual("", $("content").innerHTML);
|
||||
this.cancelWait();
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this)
|
||||
});
|
||||
|
||||
this.wait(1000, function() {
|
||||
this.flunk("The request was timeouted.");
|
||||
});
|
||||
},
|
||||
|
||||
testUpdaterWithInsertion: function() {
|
||||
$('content').update();
|
||||
new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: Insertion.Top });
|
||||
this.wait(1000, function() {
|
||||
// bug 452706 this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase());
|
||||
$('content').update();
|
||||
new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: 'bottom' });
|
||||
this.wait(1000, function() {
|
||||
this.assertEqual(sentence, $("content").innerHTML.strip().toLowerCase());
|
||||
|
||||
$('content').update();
|
||||
new Ajax.Updater("content", "../fixtures/content.html", { method:'get', insertion: 'after' });
|
||||
this.wait(1000, function() {
|
||||
this.assertEqual('five dozen', $("content").next().innerHTML.strip().toLowerCase());
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
testUpdaterOptions: function() {
|
||||
var options = {
|
||||
method: 'get',
|
||||
@ -93,43 +44,6 @@ new Test.Unit.Runner({
|
||||
this.assertIdentical(Prototype.emptyFunction, options.onComplete);
|
||||
},
|
||||
|
||||
testResponders: function(){
|
||||
// check for internal responder
|
||||
this.assertEqual(1, Ajax.Responders.responders.length);
|
||||
|
||||
var dummyResponder = {
|
||||
onComplete: function(req) { /* dummy */ }
|
||||
};
|
||||
|
||||
Ajax.Responders.register(dummyResponder);
|
||||
this.assertEqual(2, Ajax.Responders.responders.length);
|
||||
|
||||
// don't add twice
|
||||
Ajax.Responders.register(dummyResponder);
|
||||
this.assertEqual(2, Ajax.Responders.responders.length);
|
||||
|
||||
Ajax.Responders.unregister(dummyResponder);
|
||||
this.assertEqual(1, Ajax.Responders.responders.length);
|
||||
|
||||
var responder = {
|
||||
onCreate: function(req){ responderCounter++ },
|
||||
onLoading: function(req){ responderCounter++ },
|
||||
onComplete: function(req){ responderCounter++ }
|
||||
};
|
||||
Ajax.Responders.register(responder);
|
||||
|
||||
this.assertEqual(0, responderCounter);
|
||||
this.assertEqual(0, Ajax.activeRequestCount);
|
||||
new Ajax.Request("../fixtures/content.html", { method:'get', parameters:"pet=monkey" });
|
||||
this.assertEqual(1, responderCounter);
|
||||
this.assertEqual(1, Ajax.activeRequestCount);
|
||||
|
||||
this.wait(1000,function() {
|
||||
this.assertEqual(3, responderCounter);
|
||||
this.assertEqual(0, Ajax.activeRequestCount);
|
||||
});
|
||||
},
|
||||
|
||||
testEvalResponseShouldBeCalledBeforeOnComplete: function() {
|
||||
if (this.isRunningFromRake) {
|
||||
this.assertEqual("", $("content").innerHTML);
|
||||
|
@ -43,71 +43,6 @@
|
||||
inPlaceEditor.dispose();
|
||||
}},
|
||||
|
||||
// Integration test, tests the entire cycle
|
||||
testInPlaceEditor: function() { with(this) {
|
||||
Event.simulateMouse('tobeedited','click');
|
||||
assertHidden($('tobeedited'));
|
||||
assertNotNull(document.forms[0]);
|
||||
assertEqual("cancel", document.forms[0].lastChild.innerHTML);
|
||||
assertVisible(document.forms[0]);
|
||||
|
||||
Event.simulateMouse(document.forms[0].lastChild,'click');
|
||||
assertNull(document.forms[0]);
|
||||
assertVisible($('tobeedited'));
|
||||
assertEqual("transparent", Element.getStyle('tobeedited','background-color'));
|
||||
|
||||
Event.simulateMouse('tobeedited','mouseover');
|
||||
Event.simulateMouse('tobeedited','click');
|
||||
|
||||
assertEqual("INPUT", document.forms[0].firstChild.tagName);
|
||||
assertEqual("To be edited", document.forms[0].firstChild.value);
|
||||
assertEqual("INPUT", document.forms[0].childNodes[1].tagName);
|
||||
assertEqual("submit", document.forms[0].childNodes[1].type);
|
||||
assertEqual("To be edited", document.forms[0].firstChild.value);
|
||||
assert(Element.hasClassName(document.forms[0], 'inplaceeditor-form'),
|
||||
"form doesn't have proper class: " + document.forms[0].className);
|
||||
|
||||
Event.simulateMouse(document.forms[0].childNodes[1],'click');
|
||||
|
||||
assertVisible($('tobeedited'));
|
||||
assertEqual("Saving...", $('tobeedited').innerHTML);
|
||||
assertEqual("transparent", Element.getStyle('tobeedited','background-color'));
|
||||
assert(Element.hasClassName($('tobeedited'), 'inplaceeditor-saving'),
|
||||
"doesn't have saving class");
|
||||
|
||||
wait(1000, function() {
|
||||
assertEqual("Server received: To be edited", $('tobeedited').innerHTML);
|
||||
assertNull(document.forms[0]);
|
||||
assertVisible($('tobeedited'));
|
||||
assert(!Element.hasClassName($('tobeedited'), 'inplaceeditor-saving'));
|
||||
});
|
||||
}},
|
||||
|
||||
testHovering: function() { with(this) {
|
||||
Event.simulateMouse('tobeedited','mouseover');
|
||||
assertEqual("rgb(255, 255, 153)", Element.getStyle('tobeedited','background-color'));
|
||||
|
||||
Event.simulateMouse('tobeedited','mouseout');
|
||||
wait(1100, function() {
|
||||
assertEqual("transparent", Element.getStyle('tobeedited','background-color'),
|
||||
"should be transparent after mouse leaves element");
|
||||
|
||||
Event.simulateMouse('tobeedited','click');
|
||||
})
|
||||
}},
|
||||
|
||||
testLoadsTextFromServer: function() { with(this) {
|
||||
inPlaceEditor.options.loadTextURL = '_ajax_inplaceeditor_text.html';
|
||||
inPlaceEditor.enterEditMode();
|
||||
assertEqual('Loading...', inPlaceEditor.form.value.value);
|
||||
assert(inPlaceEditor.form.value.disabled);
|
||||
assert(Element.hasClassName(inPlaceEditor.form, 'inplaceeditor-loading'));
|
||||
wait(1000, function() {
|
||||
assertEqual('Text from server', inPlaceEditor.form.value.value);
|
||||
assert(!inPlaceEditor.form.value.disabled);
|
||||
});
|
||||
}},
|
||||
|
||||
testDisposesProperly: function() { with(this) {
|
||||
assertEqual("transparent", Element.getStyle('tobeedited','background-color'));
|
||||
inPlaceEditor.dispose();
|
||||
@ -214,4 +149,4 @@
|
||||
// ]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -148,7 +148,7 @@ bool
|
||||
ShadowLayersParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
|
||||
InfallibleTArray<EditReply>* reply)
|
||||
{
|
||||
MOZ_LAYERS_LOG(("[ParentSide] recieved txn with %d edits", cset.Length()));
|
||||
MOZ_LAYERS_LOG(("[ParentSide] received txn with %d edits", cset.Length()));
|
||||
|
||||
if (mDestroyed || layer_manager()->IsDestroyed()) {
|
||||
return true;
|
||||
|
@ -204,6 +204,9 @@ void main()
|
||||
// Three textures, representing YCbCr planes of a video image
|
||||
@shader sYCbCrTextureLayerFS
|
||||
$LAYER_FRAGMENT$
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
uniform sampler2D uYTexture;
|
||||
uniform sampler2D uCbTexture;
|
||||
uniform sampler2D uCrTexture;
|
||||
|
@ -48,7 +48,6 @@ struct nsSize : public mozilla::BaseSize<nscoord, nsSize> {
|
||||
typedef mozilla::BaseSize<nscoord, nsSize> Super;
|
||||
|
||||
nsSize() : Super() {}
|
||||
nsSize(const nsSize& aSize) : Super(aSize) {}
|
||||
nsSize(nscoord aWidth, nscoord aHeight) : Super(aWidth, aHeight) {}
|
||||
|
||||
// Converts this size from aFromAPP, an appunits per pixel ratio, to aToAPP.
|
||||
@ -59,7 +58,6 @@ struct nsIntSize : public mozilla::BaseSize<PRInt32, nsIntSize> {
|
||||
typedef mozilla::BaseSize<PRInt32, nsIntSize> Super;
|
||||
|
||||
nsIntSize() : Super() {}
|
||||
nsIntSize(const nsIntSize& aSize) : Super(aSize) {}
|
||||
nsIntSize(PRInt32 aWidth, PRInt32 aHeight) : Super(aWidth, aHeight) {}
|
||||
};
|
||||
|
||||
|
32
gfx/tests/reftest/468496-1-ref.html
Normal file
32
gfx/tests/reftest/468496-1-ref.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>stretched image artifacts (test)</title>
|
||||
<style>
|
||||
div {
|
||||
height: 5px;
|
||||
background-image: url("data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=");
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
</style>
|
||||
</head><body>
|
||||
<div style="width: 540px">
|
||||
</div><div style="width: 541px">
|
||||
</div><div style="width: 542px">
|
||||
</div><div style="width: 543px">
|
||||
</div><div style="width: 544px">
|
||||
</div><div style="width: 545px">
|
||||
</div><div style="width: 546px">
|
||||
</div><div style="width: 547px">
|
||||
</div><div style="width: 548px">
|
||||
</div><div style="width: 549px">
|
||||
</div><div style="width: 550px">
|
||||
</div><div style="width: 551px">
|
||||
</div><div style="width: 552px">
|
||||
</div><div style="width: 553px">
|
||||
</div><div style="width: 554px">
|
||||
</div><div style="width: 555px">
|
||||
</div><div style="width: 556px">
|
||||
</div><div style="width: 557px">
|
||||
</div><div style="width: 558px">
|
||||
</div><div style="width: 559px">
|
||||
</div></body></html>
|
51
gfx/tests/reftest/468496-1.html
Normal file
51
gfx/tests/reftest/468496-1.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<title>stretched image artifacts (test)</title>
|
||||
<style>
|
||||
img { display: block; }
|
||||
div { height: 5px; }
|
||||
</style>
|
||||
</head><body>
|
||||
<div style="width: 540px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 541px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 542px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 543px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 544px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
|
||||
</div><div style="width: 545px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 546px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 547px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 548px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 549px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 550px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 551px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 552px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 553px">
|
||||
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 554px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 555px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 556px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 557px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 558px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div><div style="width: 559px">
|
||||
<img width="100%" height="2" src="data:image/gif;base64,R0lGODdhAQACAPABAAD/AP///ywAAAAAAQACAAACAkQKADs=">
|
||||
</div></body></html>
|
@ -1 +1,3 @@
|
||||
# 468496-1 will also detect bugs in video drivers.
|
||||
fails-if(/Mac\x20OS\x20X\x2010\.5/.test(http.oscpu)) fails-if(Android) == 468496-1.html 468496-1-ref.html # bug 486761, 660740
|
||||
== 611498-1.html 611498-ref.html
|
||||
|
@ -69,65 +69,57 @@ DeviceToImageTransform(gfxContext* aContext,
|
||||
static void
|
||||
PreparePatternForUntiledDrawing(gfxPattern* aPattern,
|
||||
const gfxMatrix& aDeviceToImage,
|
||||
gfxASurface::gfxSurfaceType aSurfaceType,
|
||||
nsRefPtr<gfxASurface> currentTarget,
|
||||
gfxASurface *currentTarget,
|
||||
const gfxPattern::GraphicsFilter aDefaultFilter)
|
||||
{
|
||||
// In theory we can handle this using cairo's EXTEND_PAD,
|
||||
// but implementation limitations mean we have to consult
|
||||
// the surface type.
|
||||
switch (aSurfaceType) {
|
||||
switch (currentTarget->GetType()) {
|
||||
|
||||
#ifdef MOZ_X11
|
||||
case gfxASurface::SurfaceTypeXlib:
|
||||
case gfxASurface::SurfaceTypeXcb:
|
||||
{
|
||||
// See bug 324698. This is a workaround for EXTEND_PAD not being
|
||||
// implemented correctly on linux in the X server.
|
||||
// See bugs 324698, 422179, and 468496. This is a workaround for
|
||||
// XRender's RepeatPad not being implemented correctly on old X
|
||||
// servers.
|
||||
//
|
||||
// Set the filter to CAIRO_FILTER_FAST --- otherwise,
|
||||
// pixman's sampling will sample transparency for the outside edges
|
||||
// and we'll get blurry edges. CAIRO_EXTEND_PAD would also work
|
||||
// here, if available
|
||||
// In this situation, cairo avoids XRender and instead reads back
|
||||
// to perform EXTEND_PAD with pixman. This is too slow so we
|
||||
// avoid EXTEND_PAD and set the filter to CAIRO_FILTER_FAST ---
|
||||
// otherwise, pixman's sampling will sample transparency for the
|
||||
// outside edges and we'll get blurry edges.
|
||||
//
|
||||
// But don't do this for simple downscales because it's horrible.
|
||||
// Downscaling means that device-space coordinates are
|
||||
// scaled *up* to find the image pixel coordinates.
|
||||
//
|
||||
// Update 8/11/09: The underlying X server/driver bugs are now
|
||||
// fixed, and cairo uses the fast XRender code-path as of 1.9.2
|
||||
// (commit a1d0a06b6275cac3974be84919993e187394fe43) --
|
||||
// but only if running on a 1.7 X server.
|
||||
// So we enable EXTEND_PAD provided that we're running a recent
|
||||
// enough cairo version (obviously, this is only relevant if
|
||||
// --enable-system-cairo is used) AND running on a recent
|
||||
// enough X server. This should finally bring linux up to par
|
||||
// with other systems.
|
||||
// Cairo, and hence Gecko, can use RepeatPad on Xorg 1.7. We
|
||||
// enable EXTEND_PAD provided that we're running on a recent
|
||||
// enough X server.
|
||||
|
||||
PRBool isDownscale =
|
||||
aDeviceToImage.xx >= 1.0 && aDeviceToImage.yy >= 1.0 &&
|
||||
aDeviceToImage.xy == 0.0 && aDeviceToImage.yx == 0.0;
|
||||
if (!isDownscale) {
|
||||
#ifdef MOZ_X11
|
||||
PRBool fastExtendPad = PR_FALSE;
|
||||
if (currentTarget->GetType() == gfxASurface::SurfaceTypeXlib &&
|
||||
cairo_version() >= CAIRO_VERSION_ENCODE(1,9,2)) {
|
||||
gfxXlibSurface *xlibSurface =
|
||||
static_cast<gfxXlibSurface *>(currentTarget.get());
|
||||
Display *dpy = xlibSurface->XDisplay();
|
||||
// This is the exact condition for cairo to use XRender for
|
||||
// EXTEND_PAD
|
||||
if (VendorRelease (dpy) < 60700000 &&
|
||||
VendorRelease (dpy) >= 10699000)
|
||||
fastExtendPad = PR_TRUE;
|
||||
}
|
||||
if (fastExtendPad) {
|
||||
aPattern->SetExtend(gfxPattern::EXTEND_PAD);
|
||||
aPattern->SetFilter(aDefaultFilter);
|
||||
} else
|
||||
#endif
|
||||
aPattern->SetFilter(gfxPattern::FILTER_FAST);
|
||||
gfxXlibSurface *xlibSurface =
|
||||
static_cast<gfxXlibSurface *>(currentTarget);
|
||||
Display *dpy = xlibSurface->XDisplay();
|
||||
// This is the exact condition for cairo to avoid XRender for
|
||||
// EXTEND_PAD
|
||||
if (VendorRelease(dpy) >= 60700000 ||
|
||||
VendorRelease(dpy) < 10699000) {
|
||||
|
||||
PRBool isDownscale =
|
||||
aDeviceToImage.xx >= 1.0 && aDeviceToImage.yy >= 1.0 &&
|
||||
aDeviceToImage.xy == 0.0 && aDeviceToImage.yx == 0.0;
|
||||
|
||||
gfxPattern::GraphicsFilter filter =
|
||||
isDownscale ? aDefaultFilter : gfxPattern::FILTER_FAST;
|
||||
aPattern->SetFilter(filter);
|
||||
|
||||
// Use the default EXTEND_NONE
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// else fall through to EXTEND_PAD and the default filter.
|
||||
}
|
||||
#endif
|
||||
|
||||
default:
|
||||
// turn on EXTEND_PAD.
|
||||
@ -161,11 +153,10 @@ gfxSurfaceDrawable::Draw(gfxContext* aContext,
|
||||
filter = gfxPattern::FILTER_FAST;
|
||||
}
|
||||
nsRefPtr<gfxASurface> currentTarget = aContext->CurrentSurface();
|
||||
gfxASurface::gfxSurfaceType surfaceType = currentTarget->GetType();
|
||||
gfxMatrix deviceSpaceToImageSpace =
|
||||
DeviceToImageTransform(aContext, aTransform);
|
||||
PreparePatternForUntiledDrawing(pattern, deviceSpaceToImageSpace,
|
||||
surfaceType, currentTarget, filter);
|
||||
currentTarget, filter);
|
||||
}
|
||||
#ifdef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
if (!mozilla::supports_neon()) {
|
||||
|
@ -395,7 +395,7 @@ TryLangForGroup(const nsACString& aOSLang, nsIAtom *aLangGroup,
|
||||
}
|
||||
|
||||
nsIAtom *atom =
|
||||
gLangService->LookupLanguage(NS_ConvertUTF8toUTF16(*aFcLang));
|
||||
gLangService->LookupLanguage(*aFcLang);
|
||||
|
||||
return atom == aLangGroup;
|
||||
}
|
||||
|
@ -52,8 +52,8 @@
|
||||
#include "nsIAtom.h"
|
||||
|
||||
#define NS_ILANGUAGEATOMSERVICE_IID \
|
||||
{0xE8ABCA7C, 0x3909, 0x4DBC, \
|
||||
{ 0x9D, 0x03, 0xD3, 0xB5, 0xBE, 0xE4, 0xFD, 0x3F }}
|
||||
{0xAF4C48CF, 0x8F76, 0x4477, \
|
||||
{ 0xA7, 0x0E, 0xAB, 0x09, 0x74, 0xE2, 0x41, 0xF0 }}
|
||||
|
||||
#define NS_LANGUAGEATOMSERVICE_CONTRACTID \
|
||||
"@mozilla.org/intl/nslanguageatomservice;1"
|
||||
@ -63,7 +63,7 @@ class nsILanguageAtomService : public nsISupports
|
||||
public:
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILANGUAGEATOMSERVICE_IID)
|
||||
|
||||
virtual nsIAtom* LookupLanguage(const nsAString &aLanguage,
|
||||
virtual nsIAtom* LookupLanguage(const nsACString &aLanguage,
|
||||
nsresult *aError = nsnull) = 0;
|
||||
virtual already_AddRefed<nsIAtom>
|
||||
LookupCharSet(const char *aCharSet, nsresult *aError = nsnull) = 0;
|
||||
|
@ -68,10 +68,10 @@ nsLanguageAtomService::InitLangGroupTable()
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsLanguageAtomService::LookupLanguage(const nsAString &aLanguage,
|
||||
nsLanguageAtomService::LookupLanguage(const nsACString &aLanguage,
|
||||
nsresult *aError)
|
||||
{
|
||||
nsAutoString lowered(aLanguage);
|
||||
nsCAutoString lowered(aLanguage);
|
||||
ToLowerCase(lowered);
|
||||
|
||||
nsCOMPtr<nsIAtom> lang = do_GetAtom(lowered);
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
// nsILanguageAtomService
|
||||
virtual NS_HIDDEN_(nsIAtom*)
|
||||
LookupLanguage(const nsAString &aLanguage, nsresult *aError);
|
||||
LookupLanguage(const nsACString &aLanguage, nsresult *aError);
|
||||
|
||||
virtual NS_HIDDEN_(already_AddRefed<nsIAtom>)
|
||||
LookupCharSet(const char *aCharSet, nsresult *aError);
|
||||
|
@ -86,7 +86,7 @@ nsDisplayListBuilder::nsDisplayListBuilder(nsIFrame* aReferenceFrame,
|
||||
mInTransform(PR_FALSE),
|
||||
mSyncDecodeImages(PR_FALSE),
|
||||
mIsPaintingToWindow(PR_FALSE),
|
||||
mSnappingEnabled(PR_TRUE),
|
||||
mSnappingEnabled(mMode != EVENT_DELIVERY),
|
||||
mHasDisplayPort(PR_FALSE),
|
||||
mHasFixedItems(PR_FALSE)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ private:
|
||||
class DocumentViewerImpl : public nsIDocumentViewer,
|
||||
public nsIContentViewerEdit,
|
||||
public nsIContentViewerFile,
|
||||
public nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH,
|
||||
public nsIMarkupDocumentViewer,
|
||||
public nsIDocumentViewerPrint
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
@ -335,9 +335,6 @@ public:
|
||||
// nsIMarkupDocumentViewer
|
||||
NS_DECL_NSIMARKUPDOCUMENTVIEWER
|
||||
|
||||
// nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH
|
||||
NS_DECL_NSIMARKUPDOCUMENTVIEWER_MOZILLA_2_0_BRANCH
|
||||
|
||||
#ifdef NS_PRINTING
|
||||
// nsIWebBrowserPrint
|
||||
NS_DECL_NSIWEBBROWSERPRINT
|
||||
@ -601,7 +598,6 @@ NS_INTERFACE_MAP_BEGIN(DocumentViewerImpl)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocumentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMarkupDocumentViewer)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewerFile)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIContentViewerEdit)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDocumentViewerPrint)
|
||||
@ -2749,7 +2745,7 @@ SetChildTextZoom(nsIMarkupDocumentViewer* aChild, void* aClosure)
|
||||
static void
|
||||
SetChildMinFontSize(nsIMarkupDocumentViewer* aChild, void* aClosure)
|
||||
{
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> branch =
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> branch =
|
||||
do_QueryInterface(aChild);
|
||||
branch->SetMinFontSize(NS_PTR_TO_INT32(aClosure));
|
||||
}
|
||||
|
@ -158,6 +158,7 @@ _TEST_FILES = \
|
||||
test_bug582771.html \
|
||||
test_bug603550.html \
|
||||
test_bug629838.html \
|
||||
test_bug646757.html \
|
||||
$(NULL)
|
||||
|
||||
# Tests for bugs 441782, 467672 and 570378 don't pass reliably on Windows, because of bug 469208
|
||||
|
44
layout/base/tests/test_bug646757.html
Normal file
44
layout/base/tests/test_bug646757.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=646757
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 646757</title>
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body style="margin:0" id="body">
|
||||
<div style="height:20.3px; width:400px; background:pink" id="d1"></div>
|
||||
<div style="height:20px; width:400px; background:yellow" id="d2"></div>
|
||||
<div style="height:9.7px; width:400px;" id="space1"></div>
|
||||
<div style="height:20.7px; width:400px; background:pink" id="d3"></div>
|
||||
<div style="height:20px; width:400px; background:yellow" id="d4"></div>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=646757">Mozilla Bug 646757</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
function testPoint(x, y, id) {
|
||||
is(document.elementFromPoint(x, y).id, id,
|
||||
"checking element at " + x + "," + y);
|
||||
}
|
||||
|
||||
/** Test for Bug 646757 **/
|
||||
testPoint(200, 20, "d1");
|
||||
testPoint(200, 20.2, "d1");
|
||||
testPoint(200, 20.4, "d2");
|
||||
testPoint(200, 21, "d2");
|
||||
|
||||
testPoint(200, 70, "d3");
|
||||
testPoint(200, 70.6, "d3");
|
||||
testPoint(200, 70.8, "d4");
|
||||
testPoint(200, 71, "d4");
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -89,7 +89,6 @@
|
||||
#include "nsBox.h"
|
||||
#include "nsIFrameTraversal.h"
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsILanguageAtomService.h"
|
||||
#include "nsStyleSheetService.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsFocusManager.h"
|
||||
|
@ -338,8 +338,6 @@ nsLayoutStatics::Shutdown()
|
||||
|
||||
nsCSSScanner::ReleaseGlobals();
|
||||
|
||||
NS_IF_RELEASE(nsRuleNode::gLangService);
|
||||
|
||||
nsTextFragment::Shutdown();
|
||||
|
||||
nsAttrValue::Shutdown();
|
||||
|
17
layout/generic/crashtests/660416.html
Normal file
17
layout/generic/crashtests/660416.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.documentElement.offsetHeight;
|
||||
var n = document.getElementById("a").firstChild;
|
||||
n.data = "";
|
||||
n.data = "z";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();" style="-moz-column-count: 3;"><span id="a">x‮</span><span>y</span></body>
|
||||
</html>
|
@ -359,3 +359,4 @@ load 646561-1.html
|
||||
load 646983-1.html
|
||||
load 647332-1.html
|
||||
load 650499-1.html
|
||||
load 660416.html
|
||||
|
@ -6105,7 +6105,8 @@ nsBlockFrame::AdjustForTextIndent(const nsLineBox* aLine,
|
||||
nscoord& start,
|
||||
nscoord& width)
|
||||
{
|
||||
if (!GetPrevContinuation() && aLine == begin_lines().get()) {
|
||||
if (!GetPrevContinuation() && aLine == begin_lines().get() &&
|
||||
(GetStyleVisibility()->mDirection == NS_STYLE_DIRECTION_LTR)) {
|
||||
// Adjust for the text-indent. See similar code in
|
||||
// nsLineLayout::BeginLineReflow.
|
||||
const nsStyleCoord &textIndent = GetStyleText()->mTextIndent;
|
||||
|
@ -1861,6 +1861,8 @@ static void
|
||||
AppendToTop(nsDisplayListBuilder* aBuilder, nsDisplayList* aDest,
|
||||
nsDisplayList* aSource, nsIFrame* aSourceFrame, PRBool aOwnLayer)
|
||||
{
|
||||
if (aSource->IsEmpty())
|
||||
return;
|
||||
if (aOwnLayer) {
|
||||
aDest->AppendNewToTop(
|
||||
new (aBuilder) nsDisplayOwnLayer(aBuilder, aSourceFrame, aSource));
|
||||
|
@ -626,28 +626,27 @@ PRInt32 nsTextFrame::GetInFlowContentLength() {
|
||||
return mContent->TextLength() - mContentOffset;
|
||||
}
|
||||
|
||||
nsTextFrame* nextBidi = nsnull;
|
||||
PRInt32 start = -1, end, endFlow;
|
||||
FlowLengthProperty* flowLength =
|
||||
static_cast<FlowLengthProperty*>(mContent->GetProperty(nsGkAtoms::flowlength));
|
||||
|
||||
if (flowLength && flowLength->mStartOffset <= mContentOffset &&
|
||||
/**
|
||||
* This frame must start inside the cached flow. If the flow starts at
|
||||
* mContentOffset but this frame is empty, logically it might be before the
|
||||
* start of the cached flow.
|
||||
*/
|
||||
if (flowLength &&
|
||||
(flowLength->mStartOffset < mContentOffset ||
|
||||
(flowLength->mStartOffset == mContentOffset && GetContentEnd() > mContentOffset)) &&
|
||||
flowLength->mEndFlowOffset > mContentOffset) {
|
||||
#ifdef DEBUG
|
||||
GetOffsets(start, end);
|
||||
NS_ASSERTION(flowLength->mEndFlowOffset >= end,
|
||||
"frame crosses fixed continuation boundary");
|
||||
NS_ASSERTION(flowLength->mEndFlowOffset >= GetContentEnd(),
|
||||
"frame crosses fixed continuation boundary");
|
||||
#endif
|
||||
return flowLength->mEndFlowOffset - mContentOffset;
|
||||
}
|
||||
|
||||
nextBidi = static_cast<nsTextFrame*>(GetLastInFlow()->GetNextContinuation());
|
||||
if (nextBidi) {
|
||||
nextBidi->GetOffsets(start, end);
|
||||
endFlow = start;
|
||||
} else {
|
||||
endFlow = mContent->TextLength();
|
||||
}
|
||||
nsTextFrame* nextBidi = static_cast<nsTextFrame*>(GetLastInFlow()->GetNextContinuation());
|
||||
PRInt32 endFlow = nextBidi ? nextBidi->GetContentOffset() : mContent->TextLength();
|
||||
|
||||
if (!flowLength) {
|
||||
flowLength = new FlowLengthProperty;
|
||||
|
@ -45,8 +45,9 @@ interface nsIDOMElement;
|
||||
interface nsIDOMDocument;
|
||||
interface nsIDOMCSSStyleRule;
|
||||
interface nsIDOMNode;
|
||||
interface nsIDOMNodeList;
|
||||
|
||||
[scriptable, uuid(e01c9987-1ba2-44f0-a6a7-3148b55b7e6d)]
|
||||
[scriptable, uuid(bb8f76f4-888e-11e0-9e35-5f8b6c85da46)]
|
||||
interface inIDOMUtils : nsISupports
|
||||
{
|
||||
// CSS utilities
|
||||
@ -60,6 +61,8 @@ interface inIDOMUtils : nsISupports
|
||||
// whether we are showing anonymous content.
|
||||
nsIDOMNode getParentForNode(in nsIDOMNode aNode,
|
||||
in boolean aShowingAnonymousContent);
|
||||
nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode,
|
||||
in boolean aShowingAnonymousContent);
|
||||
|
||||
// XBL utilities
|
||||
nsIArray getBindingURLs(in nsIDOMElement aElement);
|
||||
|
@ -149,6 +149,38 @@ inDOMUtils::GetParentForNode(nsIDOMNode* aNode,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::GetChildrenForNode(nsIDOMNode* aNode,
|
||||
PRBool aShowingAnonymousContent,
|
||||
nsIDOMNodeList** aChildren)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aNode);
|
||||
NS_PRECONDITION(aChildren, "Must have an out parameter");
|
||||
|
||||
nsCOMPtr<nsIDOMNodeList> kids;
|
||||
|
||||
if (aShowingAnonymousContent) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content) {
|
||||
nsRefPtr<nsBindingManager> bindingManager =
|
||||
inLayoutUtils::GetBindingManagerFor(aNode);
|
||||
if (bindingManager) {
|
||||
bindingManager->GetAnonymousNodesFor(content, getter_AddRefs(kids));
|
||||
if (!kids) {
|
||||
bindingManager->GetContentListFor(content, getter_AddRefs(kids));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!kids) {
|
||||
aNode->GetChildNodes(getter_AddRefs(kids));
|
||||
}
|
||||
|
||||
kids.forget(aChildren);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
inDOMUtils::GetCSSStyleRules(nsIDOMElement *aElement,
|
||||
const nsAString& aPseudo,
|
||||
|
@ -1242,24 +1242,17 @@ inDOMView::GetChildNodesFor(nsIDOMNode* aNode, nsCOMArray<nsIDOMNode>& aResult)
|
||||
}
|
||||
|
||||
if (mWhatToShow & nsIDOMNodeFilter::SHOW_ELEMENT) {
|
||||
// try to get the anonymous content
|
||||
nsCOMPtr<nsIDOMNodeList> kids;
|
||||
if (mShowAnonymous) {
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content) {
|
||||
nsRefPtr<nsBindingManager> bindingManager = inLayoutUtils::GetBindingManagerFor(aNode);
|
||||
if (bindingManager) {
|
||||
bindingManager->GetAnonymousNodesFor(content, getter_AddRefs(kids));
|
||||
if (!kids) {
|
||||
bindingManager->GetContentListFor(content, getter_AddRefs(kids));
|
||||
}
|
||||
}
|
||||
if (!mDOMUtils) {
|
||||
mDOMUtils = do_GetService("@mozilla.org/inspector/dom-utils;1");
|
||||
if (!mDOMUtils) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!kids) {
|
||||
aNode->GetChildNodes(getter_AddRefs(kids));
|
||||
}
|
||||
mDOMUtils->GetChildrenForNode(aNode, mShowAnonymous,
|
||||
getter_AddRefs(kids));
|
||||
|
||||
if (kids) {
|
||||
AppendKidsToArray(kids, aResult);
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ _TEST_FILES =\
|
||||
test_bug536379.html \
|
||||
test_bug536379-2.html \
|
||||
test_bug557726.html \
|
||||
test_bug609549.xhtml \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
69
layout/inspector/tests/test_bug609549.xhtml
Normal file
69
layout/inspector/tests/test_bug609549.xhtml
Normal file
@ -0,0 +1,69 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=609549
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 609549</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
|
||||
<bindings xmlns="http://www.mozilla.org/xbl">
|
||||
<binding id="testBinding">
|
||||
<!-- No linebreaks since this is html and whitespace is preserved. -->
|
||||
<content><div anonid="box-A">x</div><div anonid="box-B"><children includes="span"/></div><div anonid="box-C">x</div><children/></content>
|
||||
</binding>
|
||||
</bindings>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=609549">Mozilla Bug 609549</a>
|
||||
<div id="bound" style="-moz-binding: url(#testBinding);"><p id="p">lorem ipsum dolor sit amet</p><span id="sandwiched">sandwiched</span></div>
|
||||
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
|
||||
/** Test for Bug 609549 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
addLoadEvent(function() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
var domUtils = Components.classes["@mozilla.org/inspector/dom-utils;1"].
|
||||
getService(Components.interfaces.inIDOMUtils);
|
||||
ok("getChildrenForNode" in domUtils, "domUtils has no getChildrenForNode");
|
||||
var withoutAnons = domUtils.getChildrenForNode($("bound"), false);
|
||||
|
||||
is(withoutAnons.length, $("bound").childNodes.length,
|
||||
"withoutAnons should be the same length as childNodes");
|
||||
is(withoutAnons[0], $("p"), "didn't get paragraph - without anons");
|
||||
is(withoutAnons[1], $("sandwiched"),
|
||||
"didn't get sandwiched span - without anons");
|
||||
|
||||
var withAnons = domUtils.getChildrenForNode($("bound"), true);
|
||||
|
||||
is(withAnons.length, 4, "bad withAnons.length");
|
||||
is(withAnons[0].getAttribute("anonid"), "box-A",
|
||||
"didn't get anonymous box-A");
|
||||
is(withAnons[1].getAttribute("anonid"), "box-B",
|
||||
"didn't get anonymous box-B");
|
||||
is(withAnons[2].getAttribute("anonid"), "box-C",
|
||||
"didn't get anonymous box-C");
|
||||
is(withAnons[3].id, "p", "didn't get paragraph - with anons");
|
||||
|
||||
var bKids = domUtils.getChildrenForNode(withAnons[1], true);
|
||||
is(bKids.length, 1, "bKids.length is bad");
|
||||
is(bKids[0], $("sandwiched"),
|
||||
"didn't get sandwiched span inserted into box-B");
|
||||
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
]]>
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
15
layout/mathml/crashtests/655451-1.xhtml
Normal file
15
layout/mathml/crashtests/655451-1.xhtml
Normal file
@ -0,0 +1,15 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<script>
|
||||
|
||||
function boom()
|
||||
{
|
||||
document.documentElement.style.fontStyle = "oblique";
|
||||
var c = document.getElementById("c");
|
||||
c.parentNode.removeChild(c);
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="boom();"><math xmlns="http://www.w3.org/1998/Math/MathML"><frameset xmlns="http://www.w3.org/1999/xhtml"></frameset><msubsup id="c"/><mo><frameset xmlns="http://www.w3.org/1999/xhtml"></frameset></mo></math>x</body>
|
||||
</html>
|
@ -50,4 +50,5 @@ load 463763-1.xhtml
|
||||
load 463763-2.xhtml
|
||||
load 476547-1.xhtml
|
||||
load 477740-1.xhtml
|
||||
load 655451-1.xhtml
|
||||
load 654928-1.html
|
||||
|
@ -219,7 +219,7 @@ nsMathMLFrame::GetPresentationDataFrom(nsIFrame* aFrame,
|
||||
if (display->mDisplay == NS_STYLE_DISPLAY_BLOCK) {
|
||||
aPresentationData.flags |= NS_MATHML_DISPLAYSTYLE;
|
||||
}
|
||||
aPresentationData.mstyle = frame;
|
||||
aPresentationData.mstyle = frame->GetFirstContinuation();
|
||||
break;
|
||||
}
|
||||
frame = frame->GetParent();
|
||||
|
@ -502,7 +502,7 @@ nsPrintEngine::DoCommonPrint(PRBool aIsPrintPreview,
|
||||
if (aIsPrintPreview) {
|
||||
SetIsCreatingPrintPreview(PR_TRUE);
|
||||
SetIsPrintPreview(PR_TRUE);
|
||||
nsCOMPtr<nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH> viewer =
|
||||
nsCOMPtr<nsIMarkupDocumentViewer> viewer =
|
||||
do_QueryInterface(mDocViewerPrint);
|
||||
if (viewer) {
|
||||
viewer->SetTextZoom(1.0f);
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE HTML>
|
||||
<!-- these should make the select non-native -->
|
||||
<body onload="dump('\nDEBUG-bug660226: ' + document.activeElement + '\n\n');">
|
||||
<select size="3" style="-moz-appearance: none; border-width: 0"></select>
|
||||
<select size="3" style="-moz-appearance: none; border-width: 1px"></select>
|
||||
<select size="3" style="-moz-appearance: none; border-width: 2px"></select>
|
||||
@ -13,5 +14,6 @@
|
||||
<select size="3" style="-moz-appearance: none; background-color: white"></select>
|
||||
|
||||
<!-- these should let it stay native -->
|
||||
<select size="3"></select>
|
||||
<select size="3"></select>
|
||||
<select size="3" style="color: black"></select>
|
||||
<select size="3" style="font-weight: normal"></select>
|
||||
</body>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE HTML>
|
||||
<body onload="dump('\nDEBUG-bug660226: ' + document.activeElement + '\n\n');">
|
||||
<!-- these should make the select non-native -->
|
||||
<select size="3" style="border-width: 0"></select>
|
||||
<select size="3" style="border-width: 1px"></select>
|
||||
@ -15,3 +16,4 @@
|
||||
<!-- these should let it stay native -->
|
||||
<select size="3" style="color: black"></select>
|
||||
<select size="3" style="font-weight: normal"></select>
|
||||
</body>
|
||||
|
38
layout/reftests/text-decoration/641444-1-ref.html
Normal file
38
layout/reftests/text-decoration/641444-1-ref.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Mozilla text-decoration bug if direction:rtl and text-indent > 0</title>
|
||||
<style type="text/css">
|
||||
p { text-decoration: underline; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir="ltr">
|
||||
<p style="margin-left:-1em">text-indent:-1em</p>
|
||||
<p style="margin-left: 0em">text-indent: 0em</p>
|
||||
<p style="margin-left: 1em">text-indent: 1em</p>
|
||||
<p style="margin-left: 2em">text-indent: 2em</p>
|
||||
<p style="margin-left: 3em">text-indent: 3em</p>
|
||||
<p style="margin-left: 4em">text-indent: 4em</p>
|
||||
<p style="margin-left: 5em">text-indent: 5em</p>
|
||||
<p style="margin-left: 6em">text-indent: 6em</p>
|
||||
<p style="margin-left: 7em">text-indent: 7em</p>
|
||||
<p style="margin-left: 8em">text-indent: 8em</p>
|
||||
<p style="margin-left: 9em">text-indent: 9em</p>
|
||||
</div>
|
||||
<div dir="rtl">
|
||||
<p style="margin-right:-1em">text-indent:-1em</p>
|
||||
<p style="margin-right: 0em">text-indent: 0em</p>
|
||||
<p style="margin-right: 1em">text-indent: 1em</p>
|
||||
<p style="margin-right: 2em">text-indent: 2em</p>
|
||||
<p style="margin-right: 3em">text-indent: 3em</p>
|
||||
<p style="margin-right: 4em">text-indent: 4em</p>
|
||||
<p style="margin-right: 5em">text-indent: 5em</p>
|
||||
<p style="margin-right: 6em">text-indent: 6em</p>
|
||||
<p style="margin-right: 7em">text-indent: 7em</p>
|
||||
<p style="margin-right: 8em">text-indent: 8em</p>
|
||||
<p style="margin-right: 9em">text-indent: 9em</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
38
layout/reftests/text-decoration/641444-1.html
Normal file
38
layout/reftests/text-decoration/641444-1.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Mozilla text-decoration bug if direction:rtl and text-indent > 0</title>
|
||||
<style type="text/css">
|
||||
p { text-decoration: underline; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div dir="ltr">
|
||||
<p style="text-indent:-1em">text-indent:-1em</p>
|
||||
<p style="text-indent: 0em">text-indent: 0em</p>
|
||||
<p style="text-indent: 1em">text-indent: 1em</p>
|
||||
<p style="text-indent: 2em">text-indent: 2em</p>
|
||||
<p style="text-indent: 3em">text-indent: 3em</p>
|
||||
<p style="text-indent: 4em">text-indent: 4em</p>
|
||||
<p style="text-indent: 5em">text-indent: 5em</p>
|
||||
<p style="text-indent: 6em">text-indent: 6em</p>
|
||||
<p style="text-indent: 7em">text-indent: 7em</p>
|
||||
<p style="text-indent: 8em">text-indent: 8em</p>
|
||||
<p style="text-indent: 9em">text-indent: 9em</p>
|
||||
</div>
|
||||
<div dir="rtl">
|
||||
<p style="text-indent:-1em">text-indent:-1em</p>
|
||||
<p style="text-indent: 0em">text-indent: 0em</p>
|
||||
<p style="text-indent: 1em">text-indent: 1em</p>
|
||||
<p style="text-indent: 2em">text-indent: 2em</p>
|
||||
<p style="text-indent: 3em">text-indent: 3em</p>
|
||||
<p style="text-indent: 4em">text-indent: 4em</p>
|
||||
<p style="text-indent: 5em">text-indent: 5em</p>
|
||||
<p style="text-indent: 6em">text-indent: 6em</p>
|
||||
<p style="text-indent: 7em">text-indent: 7em</p>
|
||||
<p style="text-indent: 8em">text-indent: 8em</p>
|
||||
<p style="text-indent: 9em">text-indent: 9em</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -88,3 +88,4 @@ fails == text-decoration-zorder-1-quirks.html text-decoration-zorder-1-ref.html
|
||||
== table-quirk-2.html table-quirk-2-ref.html
|
||||
== text-decoration-propagation-1-quirks.html text-decoration-propagation-1-quirks-ref.html
|
||||
fails == text-decoration-propagation-1-standards.html text-decoration-propagation-1-standards-ref.html
|
||||
== 641444-1.html 641444-1-ref.html
|
||||
|
@ -67,7 +67,6 @@
|
||||
#include "nsSize.h"
|
||||
#include "imgIRequest.h"
|
||||
#include "nsRuleData.h"
|
||||
#include "nsILanguageAtomService.h"
|
||||
#include "nsIStyleRule.h"
|
||||
#include "nsBidiUtils.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
@ -1172,8 +1171,6 @@ nsRuleNode* nsRuleNode::CreateRootNode(nsPresContext* aPresContext)
|
||||
nsRuleNode(aPresContext, nsnull, nsnull, 0xff, PR_FALSE);
|
||||
}
|
||||
|
||||
nsILanguageAtomService* nsRuleNode::gLangService = nsnull;
|
||||
|
||||
nsRuleNode::nsRuleNode(nsPresContext* aContext, nsRuleNode* aParent,
|
||||
nsIStyleRule* aRule, PRUint8 aLevel,
|
||||
PRBool aIsImportant)
|
||||
@ -4528,17 +4525,11 @@ nsRuleNode::ComputeVisibilityData(void* aStartStruct,
|
||||
// this is not a real CSS property, it is a html attribute mapped to CSS struture
|
||||
const nsCSSValue* langValue = aRuleData->ValueForLang();
|
||||
if (eCSSUnit_Ident == langValue->GetUnit()) {
|
||||
if (!gLangService) {
|
||||
CallGetService(NS_LANGUAGEATOMSERVICE_CONTRACTID, &gLangService);
|
||||
}
|
||||
nsAutoString lang;
|
||||
langValue->GetStringValue(lang);
|
||||
|
||||
if (gLangService) {
|
||||
nsAutoString lang;
|
||||
langValue->GetStringValue(lang);
|
||||
|
||||
nsContentUtils::ASCIIToLower(lang);
|
||||
visibility->mLanguage = do_GetAtom(lang);
|
||||
}
|
||||
nsContentUtils::ASCIIToLower(lang);
|
||||
visibility->mLanguage = do_GetAtom(lang);
|
||||
}
|
||||
|
||||
COMPUTE_END_INHERITED(Visibility, visibility)
|
||||
|
@ -50,7 +50,6 @@
|
||||
|
||||
class nsStyleContext;
|
||||
struct PLDHashTable;
|
||||
class nsILanguageAtomService;
|
||||
struct nsRuleData;
|
||||
class nsIStyleRule;
|
||||
struct nsCSSValueList;
|
||||
@ -416,7 +415,6 @@ public:
|
||||
// (which comes from the presShell) to perform the allocation.
|
||||
void* operator new(size_t sz, nsPresContext* aContext) CPP_THROW_NEW;
|
||||
void Destroy() { DestroyInternal(nsnull); }
|
||||
static nsILanguageAtomService* gLangService;
|
||||
|
||||
// Implemented in nsStyleSet.h, since it needs to know about nsStyleSet.
|
||||
inline void AddRef();
|
||||
|
@ -650,7 +650,7 @@ let Content = {
|
||||
},
|
||||
|
||||
_setMinFontSize: function _setMinFontSize(aSize) {
|
||||
let viewer = docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH);
|
||||
let viewer = docShell.contentViewer.QueryInterface(Ci.nsIMarkupDocumentViewer);
|
||||
if (viewer)
|
||||
viewer.minFontSize = aSize;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
waitForExplicitFinish();
|
||||
requestLongerTimeout(2); // see bug 660123 -- this test is slow on Mac.
|
||||
|
||||
// A hold on the current timer, so it doens't get GCed out from
|
||||
// under us
|
||||
|
@ -787,6 +787,10 @@ nsHttpServer.prototype =
|
||||
// Fire a pending server-stopped notification if it's our responsibility.
|
||||
if (!this._hasOpenConnections() && this._socketClosed)
|
||||
this._notifyStopped();
|
||||
// Bug 508125: Add a GC here else we'll use gigabytes of memory running
|
||||
// mochitests. We can't rely on xpcshell doing an automated GC, as that
|
||||
// would interfere with testing GC stuff...
|
||||
gc();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1005,7 +1005,7 @@
|
||||
.download-progress[mode="undetermined"] .end-cap,
|
||||
.download-progress .progress .progress-bar {
|
||||
-moz-appearance: none;
|
||||
background-image: -moz-linear-gradient(#71CA83, #54B06C 49%, #43A05D 51%, #60BB76);
|
||||
background-image: -moz-linear-gradient(#92DDA0, #6FC483 49%, #5EB272 51%, #80CE91);
|
||||
margin-top: -1px;
|
||||
margin-bottom: -1px;
|
||||
border: 1px solid;
|
||||
|
@ -465,14 +465,8 @@ nsWindow::SetParent(nsIWidget *aNewParent)
|
||||
if (parent) {
|
||||
parent->RemoveChild(this);
|
||||
}
|
||||
if (aNewParent) {
|
||||
ReparentNativeWidget(aNewParent);
|
||||
aNewParent->AddChild(this);
|
||||
return NS_OK;
|
||||
}
|
||||
if (mWidget) {
|
||||
mWidget->setParentItem(0);
|
||||
}
|
||||
ReparentNativeWidget(aNewParent);
|
||||
aNewParent->AddChild(this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -73,9 +73,10 @@ struct nsID {
|
||||
*/
|
||||
|
||||
inline PRBool Equals(const nsID& other) const {
|
||||
// First cast to void* in order to silence the alignment warnings.
|
||||
return
|
||||
((PRUint64*) &m0)[0] == ((PRUint64*) &other.m0)[0] &&
|
||||
((PRUint64*) &m0)[1] == ((PRUint64*) &other.m0)[1];
|
||||
((PRUint64*)(void*) &m0)[0] == ((PRUint64*)(void*) &other.m0)[0] &&
|
||||
((PRUint64*)(void*) &m0)[1] == ((PRUint64*)(void*) &other.m0)[1];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user