зеркало из https://github.com/mozilla/gecko-dev.git
Merging mozilla-central once more to hopefully clear windows unit tests
This commit is contained in:
Коммит
596ccf5e7a
|
@ -203,9 +203,8 @@ public:
|
|||
|
||||
/**
|
||||
* Set accessible parent.
|
||||
* XXX: shouldn't be virtual, bug 496783
|
||||
*/
|
||||
virtual void SetParent(nsIAccessible *aParent);
|
||||
void SetParent(nsIAccessible *aParent);
|
||||
|
||||
/**
|
||||
* Set first accessible child.
|
||||
|
|
|
@ -232,9 +232,10 @@ nsresult
|
|||
nsHTMLLIAccessible::Shutdown()
|
||||
{
|
||||
if (mBulletAccessible) {
|
||||
// Ensure that weak pointer to this is nulled out
|
||||
// Ensure that pointer to this is nulled out.
|
||||
mBulletAccessible->Shutdown();
|
||||
}
|
||||
|
||||
nsresult rv = nsLinkableAccessible::Shutdown();
|
||||
mBulletAccessible = nsnull;
|
||||
return rv;
|
||||
|
@ -283,7 +284,7 @@ void nsHTMLLIAccessible::CacheChildren()
|
|||
|
||||
if (mBulletAccessible) {
|
||||
mBulletAccessible->SetNextSibling(mFirstChild);
|
||||
mBulletAccessible->SetParent(this); // Set weak parent;
|
||||
mBulletAccessible->SetParent(this);
|
||||
SetFirstChild(mBulletAccessible);
|
||||
++ mAccChildCount;
|
||||
}
|
||||
|
@ -294,8 +295,7 @@ void nsHTMLLIAccessible::CacheChildren()
|
|||
nsHTMLListBulletAccessible::
|
||||
nsHTMLListBulletAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell,
|
||||
const nsAString& aBulletText) :
|
||||
nsLeafAccessible(aDomNode, aShell), mWeakParent(nsnull),
|
||||
mBulletText(aBulletText)
|
||||
nsLeafAccessible(aDomNode, aShell), mBulletText(aBulletText)
|
||||
{
|
||||
mBulletText += ' '; // Otherwise bullets are jammed up against list text
|
||||
}
|
||||
|
@ -312,8 +312,6 @@ nsresult
|
|||
nsHTMLListBulletAccessible::Shutdown()
|
||||
{
|
||||
mBulletText.Truncate();
|
||||
mWeakParent = nsnull;
|
||||
|
||||
return nsLeafAccessible::Shutdown();
|
||||
}
|
||||
|
||||
|
@ -343,17 +341,12 @@ nsHTMLListBulletAccessible::GetStateInternal(PRUint32 *aState, PRUint32 *aExtraS
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLListBulletAccessible::SetParent(nsIAccessible *aParent)
|
||||
{
|
||||
mParent = nsnull;
|
||||
mWeakParent = aParent;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLListBulletAccessible::GetParent(nsIAccessible **aParentAccessible)
|
||||
nsHTMLListBulletAccessible::GetParent(nsIAccessible **aParent)
|
||||
{
|
||||
NS_IF_ADDREF(*aParentAccessible = mWeakParent);
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
|
||||
NS_IF_ADDREF(*aParent = mParent);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -109,11 +109,7 @@ public:
|
|||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
|
||||
// Don't cache via unique ID -- bullet accessible shares the same dom node as
|
||||
// this LI accessible. Also, don't cache via mParent/SetParent(), prevent
|
||||
// circular reference since li holds onto us.
|
||||
NS_IMETHOD GetParent(nsIAccessible **aParentAccessible);
|
||||
NS_IMETHOD GetParent(nsIAccessible **aParent);
|
||||
|
||||
// nsAccessNode
|
||||
virtual nsresult Shutdown();
|
||||
|
@ -121,7 +117,6 @@ public:
|
|||
// nsAccessible
|
||||
virtual nsresult GetRoleInternal(PRUint32 *aRole);
|
||||
virtual nsresult GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState);
|
||||
virtual void SetParent(nsIAccessible *aParent);
|
||||
virtual nsresult AppendTextTo(nsAString& aText, PRUint32 aStartOffset,
|
||||
PRUint32 aLength);
|
||||
|
||||
|
@ -132,7 +127,6 @@ protected:
|
|||
// nsIAnonymousFrame::GetText() ? However, in practice storing the bullet text
|
||||
// here should not be a problem if we invalidate the right parts of
|
||||
// the accessibility cache when mutation events occur.
|
||||
nsIAccessible *mWeakParent;
|
||||
nsString mBulletText;
|
||||
};
|
||||
|
||||
|
|
|
@ -68,7 +68,6 @@ _TEST_FILES =\
|
|||
states.js \
|
||||
table.js \
|
||||
value.js \
|
||||
test_accessnode_invalidation.html \
|
||||
test_actions.xul \
|
||||
test_actions_anchors.html \
|
||||
test_actions_aria.html \
|
||||
|
@ -103,6 +102,8 @@ _TEST_FILES =\
|
|||
test_events_valuechange.html \
|
||||
test_groupattrs.xul \
|
||||
test_groupattrs.html \
|
||||
test_invalidate_accessnode.html \
|
||||
test_invalidate_elmli.html \
|
||||
test_name.html \
|
||||
test_name.xul \
|
||||
test_name_button.html \
|
||||
|
|
|
@ -34,17 +34,26 @@ function waitForEvent(aEventType, aTarget, aFunc, aContext, aArg1, aArg2)
|
|||
{
|
||||
var handler = {
|
||||
handleEvent: function handleEvent(aEvent) {
|
||||
if (!aTarget || aTarget == aEvent.DOMNode) {
|
||||
unregisterA11yEventListener(aEventType, this);
|
||||
|
||||
window.setTimeout(
|
||||
function ()
|
||||
{
|
||||
aFunc.call(aContext, aArg1, aArg2);
|
||||
},
|
||||
0
|
||||
);
|
||||
if (aTarget) {
|
||||
if (aTarget instanceof nsIAccessible &&
|
||||
aTarget != aEvent.accessible)
|
||||
return;
|
||||
|
||||
if (aTarget instanceof nsIDOMNode &&
|
||||
aTarget != aEvent.DOMNode)
|
||||
return;
|
||||
}
|
||||
|
||||
unregisterA11yEventListener(aEventType, this);
|
||||
|
||||
window.setTimeout(
|
||||
function ()
|
||||
{
|
||||
aFunc.call(aContext, aArg1, aArg2);
|
||||
},
|
||||
0
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -91,6 +100,12 @@ function unregisterA11yEventListener(aEventType, aEventHandler)
|
|||
*/
|
||||
const INVOKER_ACTION_FAILED = 1;
|
||||
|
||||
/**
|
||||
* Return value of eventQueue.onFinish. Indicates eventQueue should not finish
|
||||
* tests.
|
||||
*/
|
||||
const DO_NOT_FINISH_TEST = 1;
|
||||
|
||||
/**
|
||||
* Common invoker checker (see eventSeq of eventQueue).
|
||||
*/
|
||||
|
@ -145,8 +160,8 @@ function invokerChecker(aEventType, aTarget)
|
|||
* getID: function(){} // returns invoker ID
|
||||
* };
|
||||
*
|
||||
* @param aEventType [optional] the default event type (isn't used if
|
||||
* invoker defines eventSeq property).
|
||||
* @param aEventType [in, optional] the default event type (isn't used if
|
||||
* invoker defines eventSeq property).
|
||||
*/
|
||||
function eventQueue(aEventType)
|
||||
{
|
||||
|
@ -240,8 +255,10 @@ function eventQueue(aEventType)
|
|||
gA11yEventApplicantsCount--;
|
||||
listenA11yEvents(false);
|
||||
|
||||
this.onFinish();
|
||||
SimpleTest.finish();
|
||||
var res = this.onFinish();
|
||||
if (res != DO_NOT_FINISH_TEST)
|
||||
SimpleTest.finish();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -521,6 +538,54 @@ function eventQueue(aEventType)
|
|||
this.mEventSeqIdx = -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deal with action sequence. Used when you need to execute couple of actions
|
||||
* each after other one.
|
||||
*/
|
||||
function sequence()
|
||||
{
|
||||
/**
|
||||
* Append new sequence item.
|
||||
*
|
||||
* @param aProcessor [in] object implementing interface
|
||||
* {
|
||||
* // execute item action
|
||||
* process: function() {},
|
||||
* // callback, is called when item was processed
|
||||
* onProcessed: function() {}
|
||||
* };
|
||||
* @param aEventType [in] event type of expected event on item action
|
||||
* @param aTarget [in] event target of expected event on item action
|
||||
* @param aItemID [in] identifier of item
|
||||
*/
|
||||
this.append = function sequence_append(aProcessor, aEventType, aTarget,
|
||||
aItemID)
|
||||
{
|
||||
var item = new sequenceItem(aProcessor, aEventType, aTarget, aItemID);
|
||||
this.items.push(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process next sequence item.
|
||||
*/
|
||||
this.processNext = function sequence_processNext()
|
||||
{
|
||||
this.idx++;
|
||||
if (this.idx >= this.items.length) {
|
||||
ok(false, "End of sequence: nothing to process!");
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
this.items[this.idx].startProcess();
|
||||
}
|
||||
|
||||
this.items = new Array();
|
||||
this.idx = -1;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Private implementation details.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -637,3 +702,42 @@ function dumpInfoToDOM(aInfo, aDumpNode)
|
|||
container.textContent = aInfo;
|
||||
dumpElm.appendChild(container);
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Sequence
|
||||
|
||||
/**
|
||||
* Base class of sequence item.
|
||||
*/
|
||||
function sequenceItem(aProcessor, aEventType, aTarget, aItemID)
|
||||
{
|
||||
// private
|
||||
|
||||
this.startProcess = function sequenceItem_startProcess()
|
||||
{
|
||||
this.queue.invoke();
|
||||
}
|
||||
|
||||
var item = this;
|
||||
|
||||
this.queue = new eventQueue();
|
||||
this.queue.onFinish = function()
|
||||
{
|
||||
aProcessor.onProcessed();
|
||||
return DO_NOT_FINISH_TEST;
|
||||
}
|
||||
|
||||
var invoker = {
|
||||
invoke: function invoker_invoke() {
|
||||
return aProcessor.process();
|
||||
},
|
||||
getID: function invoker_getID()
|
||||
{
|
||||
return aItemID;
|
||||
},
|
||||
eventSeq: [ new invokerChecker(aEventType, aTarget) ]
|
||||
};
|
||||
|
||||
this.queue.push(invoker);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ const ROLE_ROW = nsIAccessibleRole.ROLE_ROW;
|
|||
const ROLE_ROWHEADER = nsIAccessibleRole.ROLE_ROWHEADER;
|
||||
const ROLE_SECTION = nsIAccessibleRole.ROLE_SECTION;
|
||||
const ROLE_SLIDER = nsIAccessibleRole.ROLE_SLIDER;
|
||||
const ROLE_STATICTEXT = nsIAccessibleRole.ROLE_STATICTEXT;
|
||||
const ROLE_TABLE = nsIAccessibleRole.ROLE_TABLE;
|
||||
const ROLE_TEXT_CONTAINER = nsIAccessibleRole.ROLE_TEXT_CONTAINER;
|
||||
const ROLE_TEXT_LEAF = nsIAccessibleRole.ROLE_TEXT_LEAF;
|
||||
|
|
|
@ -0,0 +1,168 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Test HTML li and listitem bullet accessible cache</title>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/a11y/accessible/events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Helpers
|
||||
|
||||
function testDefunctAccessible(aAcc, aNodeOrId)
|
||||
{
|
||||
if (aNodeOrId)
|
||||
ok(!isAccessible(aNodeOrId),
|
||||
"Accessible for " + aNodeOrId + " wasn't properly shut down!");
|
||||
|
||||
ok(!aAcc.firstChild, "There is first child for shut down accessible!");
|
||||
ok(!aAcc.lastChild, "There is last child for shut down accessible!");
|
||||
ok(!aAcc.children.length, "There are children for shut down accessible!");
|
||||
|
||||
// nextSibling
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.nextSibling;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is next sibling for shut down accessible!");
|
||||
|
||||
// previousSibling
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.previousSibling;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is previous sibling for shut down accessible!");
|
||||
|
||||
// parent
|
||||
var success = false;
|
||||
try {
|
||||
aAcc.parent;
|
||||
} catch (e) {
|
||||
success = (e.result == Components.results.NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
ok(success, "There is parent for shut down accessible!");
|
||||
}
|
||||
|
||||
function testLiAccessibleTree()
|
||||
{
|
||||
// Test accessible tree.
|
||||
var accTree = {
|
||||
role: ROLE_LISTITEM,
|
||||
children: [
|
||||
{
|
||||
role: ROLE_STATICTEXT,
|
||||
children: []
|
||||
},
|
||||
{
|
||||
role: ROLE_TEXT_LEAF,
|
||||
children: []
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
testAccessibleTree("li", accTree);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Sequence item processors
|
||||
|
||||
function hideProcessor()
|
||||
{
|
||||
this.liNode = getNode("li");
|
||||
this.li = getAccessible(this.liNode);
|
||||
this.bullet = this.li.firstChild;
|
||||
|
||||
this.process = function hideProcessor_process()
|
||||
{
|
||||
this.liNode.style.display = "none";
|
||||
}
|
||||
|
||||
this.onProcessed = function hideProcessor_onProcessed()
|
||||
{
|
||||
window.setTimeout(
|
||||
function(aArg1, aArg2)
|
||||
{
|
||||
testDefunctAccessible(aArg1, aArg2);
|
||||
gSequence.processNext();
|
||||
},
|
||||
0, this.li, this.liNode
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function showProcessor()
|
||||
{
|
||||
this.liNode = getNode("li");
|
||||
|
||||
this.process = function showProcessor_process()
|
||||
{
|
||||
this.liNode.style.display = "list-item";
|
||||
}
|
||||
|
||||
this.onProcessed = function showProcessor_onProcessed()
|
||||
{
|
||||
testLiAccessibleTree();
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// Test
|
||||
|
||||
var gSequence = null;
|
||||
|
||||
function doTest()
|
||||
{
|
||||
testLiAccessibleTree();
|
||||
|
||||
gSequence = new sequence();
|
||||
|
||||
gSequence.append(new hideProcessor(), EVENT_HIDE, getAccessible("li"),
|
||||
"hide HTML li");
|
||||
gSequence.append(new showProcessor(), EVENT_SHOW, getNode("li"),
|
||||
"show HTML li");
|
||||
|
||||
gSequence.processNext(); // SimpleTest.finish() will be called in the end
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="setParent shouldn't be virtual"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=496783">Mozilla Bug 496783</a>
|
||||
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<ul>
|
||||
<li id="li">item1</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -105,14 +105,14 @@ STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
|
|||
endif
|
||||
LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
else
|
||||
EXTRA_DSO_LIBS += xul
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
TK_LIBS := $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
@ -308,7 +308,7 @@ libs:: $(srcdir)/profile/prefs.js
|
|||
libs:: $(srcdir)/blocklist.xml
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
||||
APP_NAME = $(MOZ_APP_DISPLAYNAME)
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ DEFINES += \
|
|||
-DPRE_RELEASE_SUFFIX="$(PRE_RELEASE_SUFFIX)" \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||
endif
|
||||
|
||||
|
@ -76,7 +76,7 @@ ifdef MOZ_UPDATER
|
|||
DEFINES += -DMOZ_UPDATER=1
|
||||
endif
|
||||
|
||||
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq ($(OS_ARCH),WINCE)
|
||||
DEFINES += -DCONTEXT_COPY_IMAGE_CONTENTS=1
|
||||
endif
|
||||
|
|
|
@ -450,7 +450,7 @@ var PlacesCommandHook = {
|
|||
* Adds a bookmark to the page loaded in the current tab.
|
||||
*/
|
||||
bookmarkCurrentPage: function PCH_bookmarkCurrentPage(aShowEditUI, aParent) {
|
||||
this.bookmarkPage(getBrowser().selectedBrowser, aParent, aShowEditUI);
|
||||
this.bookmarkPage(gBrowser.selectedBrowser, aParent, aShowEditUI);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -484,19 +484,18 @@ var PlacesCommandHook = {
|
|||
*/
|
||||
_getUniqueTabInfo: function BATC__getUniqueTabInfo() {
|
||||
var tabList = [];
|
||||
var seenURIs = [];
|
||||
var seenURIs = {};
|
||||
|
||||
var browsers = getBrowser().browsers;
|
||||
var browsers = gBrowser.browsers;
|
||||
for (var i = 0; i < browsers.length; ++i) {
|
||||
var webNav = browsers[i].webNavigation;
|
||||
var uri = webNav.currentURI;
|
||||
let uri = browsers[i].currentURI;
|
||||
|
||||
// skip redundant entries
|
||||
if (uri.spec in seenURIs)
|
||||
continue;
|
||||
|
||||
// add to the set of seen URIs
|
||||
seenURIs[uri.spec] = true;
|
||||
seenURIs[uri.spec] = null;
|
||||
tabList.push(uri);
|
||||
}
|
||||
return tabList;
|
||||
|
@ -1166,7 +1165,7 @@ var PlacesStarButton = {
|
|||
if (!starIcon)
|
||||
return;
|
||||
|
||||
var uri = getBrowser().currentURI;
|
||||
var uri = gBrowser.currentURI;
|
||||
this._starred = uri && (PlacesUtils.getMostRecentBookmarkForURI(uri) != -1 ||
|
||||
PlacesUtils.getMostRecentFolderForFeedURI(uri) != -1);
|
||||
if (this._starred) {
|
||||
|
|
|
@ -873,10 +873,17 @@ function makePreview(row)
|
|||
if (!mimeType)
|
||||
mimeType = getContentTypeFromHeaders(cacheEntryDescriptor);
|
||||
|
||||
// if we have a data url, get the MIME type from the url
|
||||
if (!mimeType && /^data:/.test(url)) {
|
||||
let dataMimeType = /^data:(image\/[^;,]+)/i.exec(url);
|
||||
if (dataMimeType)
|
||||
mimeType = dataMimeType[1].toLowerCase();
|
||||
}
|
||||
|
||||
var imageType;
|
||||
if (mimeType) {
|
||||
// We found the type, try to display it nicely
|
||||
var imageMimeType = /^image\/(.*)/.exec(mimeType);
|
||||
let imageMimeType = /^image\/(.*)/i.exec(mimeType);
|
||||
if (imageMimeType) {
|
||||
imageType = imageMimeType[1].toUpperCase();
|
||||
if (numFrames > 1)
|
||||
|
|
|
@ -140,7 +140,7 @@ _BROWSER_FILES = \
|
|||
browser_relatedTabs.js \
|
||||
$(NULL)
|
||||
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
_BROWSER_FILES += browser_bug462289.js
|
||||
else
|
||||
_BROWSER_FILES += browser_customize.js
|
||||
|
|
|
@ -49,7 +49,7 @@ SHARED_LIBRARY_LIBS = \
|
|||
../about/$(LIB_PREFIX)browserabout_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
|
||||
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
|
@ -72,7 +72,7 @@ EXTRA_DSO_LDOPTS += \
|
|||
|
||||
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
|
||||
# GTK2: Need to link with glib for GNOME shell service
|
||||
ifneq (,$(filter mac cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -72,7 +72,7 @@ CPPSRCS += nsIEProfileMigrator.cpp \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsSafariProfileMigrator.cpp \
|
||||
nsMacIEProfileMigrator.cpp \
|
||||
nsOmniWebProfileMigrator.cpp \
|
||||
|
|
|
@ -918,8 +918,7 @@ var PlacesUIUtils = {
|
|||
|
||||
var loadInBackground = where == "tabshifted" ? true : false;
|
||||
var replaceCurrentTab = where == "tab" ? false : true;
|
||||
browserWindow.getBrowser().loadTabs(urls, loadInBackground,
|
||||
replaceCurrentTab);
|
||||
browserWindow.gBrowser.loadTabs(urls, loadInBackground, replaceCurrentTab);
|
||||
},
|
||||
|
||||
openContainerNodeInTabs: function PU_openContainerInTabs(aNode, aEvent) {
|
||||
|
|
|
@ -54,7 +54,7 @@ DEFINES += \
|
|||
-DMOZ_APP_DISPLAYNAME=$(MOZ_APP_DISPLAYNAME) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter windows gtk2 mac cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows gtk2 cocoa, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DHAVE_SHELL_SERVICE=1
|
||||
endif
|
||||
|
||||
|
|
|
@ -30,8 +30,6 @@ browser.jar:
|
|||
* content/browser/preferences/sanitize.xul
|
||||
* content/browser/preferences/security.xul
|
||||
* content/browser/preferences/security.js
|
||||
* content/browser/preferences/securityWarnings.xul
|
||||
* content/browser/preferences/securityWarnings.js
|
||||
* content/browser/preferences/selectBookmark.xul
|
||||
* content/browser/preferences/selectBookmark.js
|
||||
* content/browser/preferences/tabs.xul
|
||||
|
|
|
@ -244,20 +244,6 @@ var gSecurityPane = {
|
|||
document.documentElement.openWindow("Toolkit:PasswordManager",
|
||||
"chrome://passwordmgr/content/passwordManager.xul",
|
||||
"", null);
|
||||
},
|
||||
|
||||
|
||||
// WARNING MESSAGES
|
||||
|
||||
/**
|
||||
* Displays the security warnings dialog which allows changing the
|
||||
* "submitting unencrypted information", "moving from secure to unsecure",
|
||||
* etc. dialogs that every user immediately disables when he sees them.
|
||||
*/
|
||||
showWarningMessageSettings: function ()
|
||||
{
|
||||
document.documentElement.openSubDialog("chrome://browser/content/preferences/securityWarnings.xul",
|
||||
"", null);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -141,20 +141,6 @@
|
|||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<!-- Warning Messages -->
|
||||
<hbox class="bottomBox">
|
||||
<groupbox id="warningMessagesGroup" orient="horizontal" flex="1"
|
||||
align="center">
|
||||
<caption label="&warnings.label;"/>
|
||||
|
||||
<description control="warningSettings" flex="1">&chooseWarnings.label;</description>
|
||||
<button id="warningSettings"
|
||||
label="&warningSettings.label;"
|
||||
accesskey="&warningSettings.accesskey;"
|
||||
oncommand="gSecurityPane.showWarningMessageSettings();"/>
|
||||
</groupbox>
|
||||
</hbox>
|
||||
|
||||
</prefpane>
|
||||
|
||||
</overlay>
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Gavin Sharp.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Gavin Sharp <gavin@gavinsharp.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
function secWarningSyncTo(aEvent) {
|
||||
var prefName = aEvent.target.getAttribute("preference") + ".show_once";
|
||||
var prefOnce = document.getElementById(prefName);
|
||||
prefOnce.value = false;
|
||||
return undefined;
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
|
||||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Gavin Sharp.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2006
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Gavin Sharp <gavin@gavinsharp.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK *****
|
||||
|
||||
<!DOCTYPE prefwindow SYSTEM "chrome://browser/locale/preferences/securityWarnings.dtd">
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/"?>
|
||||
|
||||
<prefwindow id="SecurityWarnings" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&securityWarnings.title;"
|
||||
dlgbuttons="accept,cancel">
|
||||
|
||||
<prefpane id="SecurityWarningsPane">
|
||||
<preferences>
|
||||
<preference id="security.warn_entering_secure"
|
||||
name="security.warn_entering_secure"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_entering_secure.show_once"
|
||||
name="security.warn_entering_secure.show_once"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_entering_weak"
|
||||
name="security.warn_entering_weak"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_entering_weak.show_once"
|
||||
name="security.warn_entering_weak.show_once"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_leaving_secure"
|
||||
name="security.warn_leaving_secure"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_leaving_secure.show_once"
|
||||
name="security.warn_leaving_secure.show_once"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_submit_insecure"
|
||||
name="security.warn_submit_insecure"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_submit_insecure.show_once"
|
||||
name="security.warn_submit_insecure.show_once"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_viewing_mixed"
|
||||
name="security.warn_viewing_mixed"
|
||||
type="bool"/>
|
||||
<preference id="security.warn_viewing_mixed.show_once"
|
||||
name="security.warn_viewing_mixed.show_once"
|
||||
type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<script type="application/x-javascript" src="chrome://browser/content/preferences/securityWarnings.js"/>
|
||||
|
||||
<description value="&security.warn_when;"/>
|
||||
<vbox class="indent">
|
||||
<checkbox id="warn_entering_secure"
|
||||
onsynctopreference="secWarningSyncTo(event);"
|
||||
label="&security.warn_entering_secure.label;"
|
||||
accesskey="&security.warn_entering_secure.accesskey;"
|
||||
preference="security.warn_entering_secure"/>
|
||||
<checkbox id="warn_entering_weak"
|
||||
onsynctopreference="secWarningSyncTo(event);"
|
||||
label="&security.warn_entering_weak.label;"
|
||||
accesskey="&security.warn_entering_weak.accesskey;"
|
||||
preference="security.warn_entering_weak"/>
|
||||
<checkbox id="warn_leaving_secure"
|
||||
onsynctopreference="secWarningSyncTo(event);"
|
||||
label="&security.warn_leaving_secure.label;"
|
||||
accesskey="&security.warn_leaving_secure.accesskey;"
|
||||
preference="security.warn_leaving_secure"/>
|
||||
<checkbox id="warn_submit_insecure"
|
||||
onsynctopreference="secWarningSyncTo(event);"
|
||||
label="&security.warn_submit_insecure.label;"
|
||||
accesskey="&security.warn_submit_insecure.accesskey;"
|
||||
preference="security.warn_submit_insecure"/>
|
||||
<checkbox id="warn_viewing_mixed"
|
||||
onsynctopreference="secWarningSyncTo(event);"
|
||||
label="&security.warn_viewing_mixed.label;"
|
||||
accesskey="&security.warn_viewing_mixed.accesskey;"
|
||||
preference="security.warn_viewing_mixed"/>
|
||||
</vbox>
|
||||
</prefpane>
|
||||
</prefwindow>
|
|
@ -187,7 +187,7 @@ PrivateBrowsingService.prototype = {
|
|||
while (viewSrcWindowsEnum.hasMoreElements()) {
|
||||
let win = viewSrcWindowsEnum.getNext();
|
||||
if (this._inPrivateBrowsing) {
|
||||
let plainURL = win.getBrowser().currentURI.spec;
|
||||
let plainURL = win.gBrowser.currentURI.spec;
|
||||
if (plainURL.indexOf("view-source:") == 0) {
|
||||
plainURL = plainURL.substr(12);
|
||||
this._viewSrcURLs.push(plainURL);
|
||||
|
|
|
@ -47,7 +47,7 @@ include $(topsrcdir)/config/rules.mk
|
|||
|
||||
# The browser chrome test for bug 415846 doesn't run on Mac because of its
|
||||
# bizarre special-and-unique snowflake of a help menu.
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
_NON_MAC_BROWSER_TESTS = browser_bug415846.js
|
||||
endif
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ interface nsIDOMNode;
|
|||
* by looking for "navigator:browser" windows.
|
||||
*
|
||||
* * "Tabbrowser tabs" are all the child nodes of a browser window's
|
||||
* |getBrowser().tabContainer| such as e.g. |getBrowser().selectedTab|.
|
||||
* |gBrowser.tabContainer| such as e.g. |gBrowser.selectedTab|.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(70592a0d-87d3-459c-8db7-dcb8d47af78e)]
|
||||
|
|
|
@ -948,7 +948,7 @@ SessionStoreService.prototype = {
|
|||
var sourceWindow = aTab.ownerDocument.defaultView;
|
||||
this._updateTextAndScrollDataForTab(sourceWindow, aTab.linkedBrowser, tabState, true);
|
||||
|
||||
var newTab = aWindow.getBrowser().addTab();
|
||||
var newTab = aWindow.gBrowser.addTab();
|
||||
this.restoreHistoryPrecursor(aWindow, [newTab], [tabState], 0, 0, 0);
|
||||
|
||||
return newTab;
|
||||
|
@ -1118,7 +1118,7 @@ SessionStoreService.prototype = {
|
|||
* Window reference
|
||||
*/
|
||||
_saveWindowHistory: function sss_saveWindowHistory(aWindow) {
|
||||
var tabbrowser = aWindow.getBrowser();
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
var tabs = tabbrowser.mTabs;
|
||||
var tabsData = this._windows[aWindow.__SSi].tabs = [];
|
||||
|
||||
|
@ -1399,7 +1399,7 @@ SessionStoreService.prototype = {
|
|||
* Window reference
|
||||
*/
|
||||
_updateTextAndScrollData: function sss_updateTextAndScrollData(aWindow) {
|
||||
var browsers = aWindow.getBrowser().browsers;
|
||||
var browsers = aWindow.gBrowser.browsers;
|
||||
for (var i = 0; i < browsers.length; i++) {
|
||||
try {
|
||||
var tabData = this._windows[aWindow.__SSi].tabs[i];
|
||||
|
@ -1917,7 +1917,7 @@ SessionStoreService.prototype = {
|
|||
*/
|
||||
restoreHistoryPrecursor:
|
||||
function sss_restoreHistoryPrecursor(aWindow, aTabs, aTabData, aSelectTab, aIx, aCount) {
|
||||
var tabbrowser = aWindow.getBrowser();
|
||||
var tabbrowser = aWindow.gBrowser;
|
||||
|
||||
// make sure that all browsers and their histories are available
|
||||
// - if one's not, resume this check in 100ms (repeat at most 10 times)
|
||||
|
@ -2031,7 +2031,7 @@ SessionStoreService.prototype = {
|
|||
var tab = aTabs.shift();
|
||||
var tabData = aTabData.shift();
|
||||
|
||||
var browser = aWindow.getBrowser().getBrowserForTab(tab);
|
||||
var browser = aWindow.gBrowser.getBrowserForTab(tab);
|
||||
var history = browser.webNavigation.sessionHistory;
|
||||
|
||||
if (history.count > 0) {
|
||||
|
@ -2727,7 +2727,7 @@ SessionStoreService.prototype = {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
var currentURI = aWindow.getBrowser().currentURI.clone();
|
||||
var currentURI = aWindow.gBrowser.currentURI.clone();
|
||||
// if the current URI contains a username/password, remove it
|
||||
try {
|
||||
currentURI.userPass = "";
|
||||
|
|
|
@ -51,7 +51,7 @@ ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
|
|||
XPIDLSRCS += nsIWindowsShellService.idl
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
XPIDLSRCS += nsIMacShellService.idl
|
||||
endif
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ endif
|
|||
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
|
||||
CPPSRCS = nsWindowsShellService.cpp
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS = nsMacShellService.cpp
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT), gtk2)
|
||||
|
|
|
@ -79,7 +79,9 @@ function test() {
|
|||
|
||||
let browser = gBrowser.getBrowserAtIndex(gPageB.index);
|
||||
browser.addProgressListener({
|
||||
onStateChange: function(webProgress, request, stateFlags, status) {
|
||||
onStateChange: function (webProgress, request, stateFlags, status) {
|
||||
info("onStateChange: " + stateFlags);
|
||||
|
||||
const complete = Ci.nsIWebProgressListener.STATE_IS_WINDOW +
|
||||
Ci.nsIWebProgressListener.STATE_IS_NETWORK +
|
||||
Ci.nsIWebProgressListener.STATE_STOP;
|
||||
|
@ -89,18 +91,13 @@ function test() {
|
|||
}
|
||||
},
|
||||
|
||||
onLocationChange: function() { return 0; },
|
||||
onProgressChange: function() { return 0; },
|
||||
onStatusChange: function() { return 0; },
|
||||
onSecurityChange: function() { return 0; },
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(Ci.nsISupportsWeakReference) ||
|
||||
iid.equals(Ci.nsIWebProgressListener) ||
|
||||
iid.equals(Ci.nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
onLocationChange: function () 0,
|
||||
onProgressChange: function () 0,
|
||||
onStatusChange: function () 0,
|
||||
onSecurityChange: function () 0,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
|
||||
Ci.nsIWebProgressListener,
|
||||
Ci.nsISupports])
|
||||
});
|
||||
|
||||
// test loading new content with a frame into a tab
|
||||
|
@ -111,6 +108,7 @@ function test() {
|
|||
|
||||
function onPageBLoadWithFrames(event) {
|
||||
gPageLoadCount++;
|
||||
info("onPageBLoadWithFrames: " + gPageLoadCount);
|
||||
}
|
||||
|
||||
function onPageBLoadComplete() {
|
||||
|
|
|
@ -103,7 +103,7 @@ $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
|
|||
GARBAGE += $(MOZ_PKG_MANIFEST)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
MOZ_PKG_MAC_DSSTORE=branding/dsstore
|
||||
MOZ_PKG_MAC_BACKGROUND=branding/background.png
|
||||
MOZ_PKG_MAC_ICON=branding/disk.icns
|
||||
|
|
|
@ -32,11 +32,3 @@
|
|||
|
||||
<!ENTITY savedPasswords.label "Saved Passwords…">
|
||||
<!ENTITY savedPasswords.accesskey "P">
|
||||
|
||||
|
||||
<!ENTITY warnings.label "Warning Messages">
|
||||
|
||||
<!ENTITY chooseWarnings.label "Choose which warning messages you want to see while browsing the web">
|
||||
|
||||
<!ENTITY warningSettings.label "Settings…">
|
||||
<!ENTITY warningSettings.accesskey "S">
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<!ENTITY securityWarnings.title "Security Warnings">
|
||||
|
||||
<!ENTITY security.warn_when "Show a warning dialog when:">
|
||||
<!ENTITY security.warn_entering_secure.label "I am about to view an encrypted page.">
|
||||
<!ENTITY security.warn_entering_secure.accesskey "v">
|
||||
<!ENTITY security.warn_entering_weak.label "I am about to view a page that uses low-grade encryption.">
|
||||
<!ENTITY security.warn_entering_weak.accesskey "g">
|
||||
<!ENTITY security.warn_leaving_secure.label "I leave an encrypted page for one that isn't encrypted.">
|
||||
<!ENTITY security.warn_leaving_secure.accesskey "l">
|
||||
<!ENTITY security.warn_submit_insecure.label "I submit information that's not encrypted.">
|
||||
<!ENTITY security.warn_submit_insecure.accesskey "s">
|
||||
<!ENTITY security.warn_viewing_mixed.label "I'm about to view an encrypted page that contains some unencrypted information.">
|
||||
<!ENTITY security.warn_viewing_mixed.accesskey "u">
|
|
@ -59,7 +59,6 @@
|
|||
locale/browser/preferences/preferences.properties (%chrome/browser/preferences/preferences.properties)
|
||||
locale/browser/preferences/privacy.dtd (%chrome/browser/preferences/privacy.dtd)
|
||||
locale/browser/preferences/security.dtd (%chrome/browser/preferences/security.dtd)
|
||||
locale/browser/preferences/securityWarnings.dtd (%chrome/browser/preferences/securityWarnings.dtd)
|
||||
locale/browser/preferences/tabs.dtd (%chrome/browser/preferences/tabs.dtd)
|
||||
locale/browser/sidebar/sidebar.properties (%chrome/browser/sidebar/sidebar.properties)
|
||||
% locale browser-region @AB_CD@ %locale/browser-region/
|
||||
|
|
|
@ -50,7 +50,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
# MacOS X Pinstripe
|
||||
#
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS = pinstripe
|
||||
else
|
||||
DIRS = winstripe
|
||||
|
|
|
@ -1,142 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
prefix=%prefix%
|
||||
exec_prefix=%exec_prefix%
|
||||
exec_prefix_set=no
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS] [LIBRARIES]
|
||||
Options:
|
||||
[--prefix[=DIR]]
|
||||
[--exec-prefix[=DIR]]
|
||||
[--version]
|
||||
[--defines]
|
||||
[--libs] [libraries]
|
||||
[--cflags] [components]
|
||||
[--idlflags]
|
||||
Components:
|
||||
*
|
||||
Libraries:
|
||||
xpcom
|
||||
nspr
|
||||
js
|
||||
jsj
|
||||
gfx
|
||||
EOF
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) optarg= ;;
|
||||
esac
|
||||
|
||||
case $1 in
|
||||
--prefix=*)
|
||||
prefix=$optarg
|
||||
if test $exec_prefix_set = no ; then
|
||||
exec_prefix=$optarg
|
||||
fi
|
||||
;;
|
||||
--prefix)
|
||||
echo_prefix=yes
|
||||
;;
|
||||
--exec-prefix=*)
|
||||
exec_prefix=$optarg
|
||||
exec_prefix_set=yes
|
||||
;;
|
||||
--exec-prefix)
|
||||
echo_exec_prefix=yes
|
||||
;;
|
||||
--version)
|
||||
echo %MOZILLA_VERSION%
|
||||
exit 0
|
||||
;;
|
||||
--cflags)
|
||||
if test "%includedir%" != /usr/include ; then
|
||||
includes="-I%includedir%"
|
||||
fi
|
||||
echo_cflags=yes
|
||||
;;
|
||||
--defines)
|
||||
echo_defines=yes
|
||||
;;
|
||||
--libs)
|
||||
echo_libs=yes
|
||||
;;
|
||||
--idlflags)
|
||||
echo_idlflags=yes
|
||||
;;
|
||||
xpcom|js|nspr|gfx|jsj)
|
||||
echo_components="$echo_components $1"
|
||||
echo_libraries="$echo_libraries $1"
|
||||
;;
|
||||
xpconnect)
|
||||
echo_components="$echo_components $1"
|
||||
;;
|
||||
"")
|
||||
usage 1 1>&2
|
||||
;;
|
||||
*)
|
||||
echo_components="$echo_components $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test "$echo_prefix" = "yes"; then
|
||||
echo $prefix
|
||||
fi
|
||||
if test "$echo_exec_prefix" = "yes"; then
|
||||
echo $exec_prefix
|
||||
fi
|
||||
|
||||
if test "$echo_defines" = "yes"; then
|
||||
echo %DEFS%
|
||||
fi
|
||||
|
||||
if test "$echo_cflags" = "yes"; then
|
||||
nspr_cflags="%FULL_NSPR_CFLAGS%"
|
||||
for n in $echo_components; do
|
||||
component_includes="$component_includes -I%includedir%/$n"
|
||||
done
|
||||
echo $component_includes $includes $nspr_cflags
|
||||
fi
|
||||
|
||||
if test "$echo_idlflags" = "yes"; then
|
||||
echo "-I%idldir%"
|
||||
fi
|
||||
|
||||
_nspr_libs="%FULL_NSPR_LIBS%"
|
||||
_xpcom_libs="-lxpcom $_nspr_libs"
|
||||
_js_libs="-ljs"
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
for l in $echo_libraries; do
|
||||
case "$l" in
|
||||
gfx)
|
||||
libs="$libs -lgkgfx $_xpcom_libs"
|
||||
;;
|
||||
xpcom)
|
||||
libs="$libs $_xpcom_libs"
|
||||
;;
|
||||
nspr)
|
||||
libs="$libs $_nspr_libs"
|
||||
;;
|
||||
js)
|
||||
libs="$libs $_js_libs"
|
||||
;;
|
||||
jsj)
|
||||
libs="$libs -ljsj $_js_libs $_xpcom_libs"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
echo -L%libdir% $libs
|
||||
fi
|
|
@ -1,8 +0,0 @@
|
|||
USE_PTHREADS=@MOZ_NSPRENV_USE_PTHREADS@
|
||||
BUILD_OPT=@MOZ_NSPRENV_BUILD_OPT@
|
||||
NS_USE_GCC=@MOZ_NSPRENV_NS_USE_GCC@
|
||||
NO_MDUPDATE=@MOZ_NSPRENV_NO_MDUPDATE@
|
||||
NS_USE_NATIVE=@MOZ_NSPRENV_NS_USE_NATIVE@
|
||||
MOZILLA_CLIENT=@MOZ_NSPRENV_MOZILLA_CLIENT@
|
||||
CLASSIC_NSPR=@MOZ_NSPRENV_CLASSIC_NSPR@
|
||||
GC_LEAK_DETECTOR=@MOZ_NSPRENV_GC_LEAK_DETECTOR@
|
|
@ -1,12 +0,0 @@
|
|||
DIST=@MOZ_NSPRENV_DIST@
|
||||
MOZ_NSPRENV_OVERRIDE_MAKE=@MOZ_NSPRENV_OVERRIDE_MAKE@
|
||||
MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS=@MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS@
|
||||
|
||||
ifdef MOZ_NSPRENV_OVERRIDE_MAKE
|
||||
MAKE=$(MOZ_NSPRENV_OVERRIDE_MAKE)
|
||||
endif
|
||||
|
||||
ifdef MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS
|
||||
DSO_LDOPTS=$(MOZ_NSPRENV_OVERRIDE_DSO_LDOPTS)
|
||||
endif
|
||||
|
|
@ -66,7 +66,7 @@ ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
|||
EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -233,8 +233,6 @@ MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
|
|||
MOZ_XTF = @MOZ_XTF@
|
||||
MOZ_NO_INSPECTOR_APIS = @MOZ_NO_INSPECTOR_APIS@
|
||||
MOZ_SVG = @MOZ_SVG@
|
||||
MOZ_ENABLE_CANVAS = @MOZ_ENABLE_CANVAS@
|
||||
MOZ_ENABLE_CANVAS3D = @MOZ_ENABLE_CANVAS3D@
|
||||
MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@
|
||||
MOZ_SMIL = @MOZ_SMIL@
|
||||
MOZ_XSLT_STANDALONE = @MOZ_XSLT_STANDALONE@
|
||||
|
|
|
@ -20,6 +20,6 @@ ifeq ($(OS_ARCH),IRIX)
|
|||
LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=80
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += -framework QuickTime -framework IOKit -lcrypto
|
||||
endif
|
||||
|
|
22
configure.in
22
configure.in
|
@ -4460,8 +4460,6 @@ MOZ_ACTIVEX_SCRIPTING_SUPPORT=
|
|||
MOZ_BRANDING_DIRECTORY=
|
||||
MOZ_OFFICIAL_BRANDING=
|
||||
MOZ_DBGRINFO_MODULES=
|
||||
MOZ_ENABLE_CANVAS=1
|
||||
MOZ_ENABLE_CANVAS3D=1
|
||||
MOZ_FEEDS=1
|
||||
MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon"
|
||||
MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
|
||||
|
@ -5782,24 +5780,6 @@ if test "$MOZ_MATHML"; then
|
|||
AC_DEFINE(MOZ_MATHML)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Canvas
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_ENABLE_CANVAS"; then
|
||||
AC_DEFINE(MOZ_ENABLE_CANVAS)
|
||||
fi
|
||||
AC_SUBST(MOZ_ENABLE_CANVAS)
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(webgl,
|
||||
[ --disable-webgl Disable WebGL context (canvas 3d)],
|
||||
MOZ_ENABLE_CANVAS3D=,
|
||||
MOZ_ENABLE_CANVAS3D=1 )
|
||||
|
||||
if test -n "$MOZ_ENABLE_CANVAS3D"; then
|
||||
AC_DEFINE(MOZ_ENABLE_CANVAS3D)
|
||||
fi
|
||||
AC_SUBST(MOZ_ENABLE_CANVAS3D)
|
||||
|
||||
dnl ========================================================
|
||||
dnl SVG
|
||||
dnl ========================================================
|
||||
|
@ -7399,7 +7379,7 @@ if test "$MOZ_TREE_CAIRO"; then
|
|||
if test "$MOZ_WIDGET_TOOLKIT" = "qt"; then
|
||||
QPAINTER_SURFACE_FEATURE="#define CAIRO_HAS_QPAINTER_SURFACE 1"
|
||||
fi
|
||||
if test "$MOZ_WIDGET_TOOLKIT" = "mac" -o "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
|
||||
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
|
||||
QUARTZ_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_SURFACE 1"
|
||||
QUARTZ_IMAGE_SURFACE_FEATURE="#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1"
|
||||
QUARTZ_FONT_FEATURE="#define CAIRO_HAS_QUARTZ_FONT 1"
|
||||
|
|
|
@ -43,6 +43,7 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = content
|
||||
XPIDL_MODULE = content_canvas
|
||||
|
||||
EXPORTS = \
|
||||
nsICanvasRenderingContextInternal.h \
|
||||
|
@ -50,14 +51,8 @@ EXPORTS = \
|
|||
WebGLArray.h \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
|
||||
XPIDL_MODULE = content_canvas
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsICanvasGLPrivate.idl \
|
||||
$(NULL)
|
||||
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -57,10 +57,10 @@ CPPSRCS = \
|
|||
|
||||
# only allow on platforms/toolkits we know are good
|
||||
ifneq (,$(NS_OSSO)$(WINCE)$(filter-out windows cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
MOZ_ENABLE_CANVAS3D=
|
||||
DISABLE_WEBGL=1
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
ifndef DISABLE_WEBGL
|
||||
|
||||
CPPSRCS += \
|
||||
WebGLContext.cpp \
|
||||
|
@ -90,7 +90,7 @@ DEFINES += -DUSE_WGL
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsGLPbufferCGL.cpp
|
||||
DEFINES += -DUSE_CGL
|
||||
endif
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#define MAX_SYMBOL_NAMES 5
|
||||
|
||||
#ifdef MOZ_X11
|
||||
#define GLX_GLXEXT_LEGACY
|
||||
#include <GL/glx.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(XP_UNIX) && defined(MOZ_X11)
|
||||
#define GLX_GLXEXT_LEGACY
|
||||
#include "GL/glx.h"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -55,9 +55,20 @@ class WGLWrap
|
|||
public:
|
||||
WGLWrap() : fCreatePbuffer(0) { }
|
||||
|
||||
bool InitEarly();
|
||||
bool Init();
|
||||
|
||||
public:
|
||||
// early init
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATECONTEXTPROC) (HDC hDC);
|
||||
PFNWGLCREATECONTEXTPROC fCreateContext;
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECURRENTPROC) (HDC hDC, HANDLE hglrc);
|
||||
PFNWGLMAKECURRENTPROC fMakeCurrent;
|
||||
typedef PROC (WINAPI * PFNWGLGETPROCADDRESSPROC) (LPCSTR proc);
|
||||
PFNWGLGETPROCADDRESSPROC fGetProcAddress;
|
||||
typedef BOOL (WINAPI * PFNWGLDELETECONTEXTPROC) (HANDLE hglrc);
|
||||
PFNWGLDELETECONTEXTPROC fDeleteContext;
|
||||
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEPBUFFERPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList);
|
||||
PFNWGLCREATEPBUFFERPROC fCreatePbuffer;
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERPROC) (HANDLE hPbuffer);
|
||||
|
@ -71,6 +82,23 @@ public:
|
|||
PFNWGLGETPIXELFORMATATTRIBIVPROC fGetPixelFormatAttribiv;
|
||||
};
|
||||
|
||||
bool
|
||||
WGLWrap::InitEarly()
|
||||
{
|
||||
if (fCreateContext)
|
||||
return true;
|
||||
|
||||
SymLoadStruct symbols[] = {
|
||||
{ (PRFuncPtr*) &fCreateContext, { "wglCreateContext", NULL } },
|
||||
{ (PRFuncPtr*) &fMakeCurrent, { "wglMakeCurrent", NULL } },
|
||||
{ (PRFuncPtr*) &fGetProcAddress, { "wglGetProcAddress", NULL } },
|
||||
{ (PRFuncPtr*) &fDeleteContext, { "wglDeleteContext", NULL } },
|
||||
{ NULL, { NULL } }
|
||||
};
|
||||
|
||||
return LoadSymbols(&symbols[0], false);
|
||||
}
|
||||
|
||||
bool
|
||||
WGLWrap::Init()
|
||||
{
|
||||
|
@ -108,7 +136,10 @@ nsGLPbufferWGL::Init(WebGLContext *priv)
|
|||
if (!gWGLWrap.OpenLibrary(opengl32))
|
||||
return PR_FALSE;
|
||||
|
||||
gWGLWrap.SetLookupFunc((LibrarySymbolLoader::PlatformLookupFunction) wglGetProcAddress);
|
||||
if (!gWGLWrap.InitEarly())
|
||||
return PR_FALSE;
|
||||
|
||||
gWGLWrap.SetLookupFunc((LibrarySymbolLoader::PlatformLookupFunction) gWGLWrap.fGetProcAddress);
|
||||
|
||||
mPriv = priv;
|
||||
|
||||
|
@ -156,13 +187,13 @@ nsGLPbufferWGL::Init(WebGLContext *priv)
|
|||
}
|
||||
|
||||
// create rendering context
|
||||
mGlewWglContext = wglCreateContext(mGlewDC);
|
||||
mGlewWglContext = gWGLWrap.fCreateContext(mGlewDC);
|
||||
if (!mGlewWglContext) {
|
||||
LogMessage("Canvas 3D: wglCreateContext failed");
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
if (!wglMakeCurrent(mGlewDC, (HGLRC) mGlewWglContext)) {
|
||||
if (!gWGLWrap.fMakeCurrent(mGlewDC, (HGLRC) mGlewWglContext)) {
|
||||
LogMessage("Canvas 3D: wglMakeCurrent failed");
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
@ -178,7 +209,7 @@ nsGLPbufferWGL::Init(WebGLContext *priv)
|
|||
return PR_FALSE;
|
||||
}
|
||||
|
||||
mGLWrap.SetLookupFunc((LibrarySymbolLoader::PlatformLookupFunction) wglGetProcAddress);
|
||||
mGLWrap.SetLookupFunc((LibrarySymbolLoader::PlatformLookupFunction) gWGLWrap.fGetProcAddress);
|
||||
|
||||
if (!mGLWrap.Init(GLES20Wrap::TRY_NATIVE_GL)) {
|
||||
LogMessage("Canvas 3D: GLWrap init failed");
|
||||
|
@ -224,7 +255,7 @@ nsGLPbufferWGL::Resize(PRInt32 width, PRInt32 height)
|
|||
0,
|
||||
height * mThebesSurface->Stride());
|
||||
|
||||
if (!wglMakeCurrent(mGlewDC, (HGLRC) mGlewWglContext)) {
|
||||
if (!gWGLWrap.fMakeCurrent(mGlewDC, (HGLRC) mGlewWglContext)) {
|
||||
fprintf (stderr, "Error: %d\n", GetLastError());
|
||||
LogMessage("Canvas 3D: wglMakeCurrent failed");
|
||||
return PR_FALSE;
|
||||
|
@ -350,7 +381,7 @@ TRY_FIND_AGAIN:
|
|||
}
|
||||
|
||||
mPbufferDC = gWGLWrap.fGetPbufferDC(mPbuffer);
|
||||
mPbufferContext = wglCreateContext(mPbufferDC);
|
||||
mPbufferContext = gWGLWrap.fCreateContext(mPbufferDC);
|
||||
|
||||
mWindowsSurface = new gfxWindowsSurface(gfxIntSize(width, height), gfxASurface::ImageFormatARGB32);
|
||||
if (mWindowsSurface && mWindowsSurface->CairoStatus() == 0)
|
||||
|
@ -370,7 +401,7 @@ nsGLPbufferWGL::Destroy()
|
|||
mThebesSurface = nsnull;
|
||||
|
||||
if (mPbuffer) {
|
||||
wglDeleteContext((HGLRC) mPbufferContext);
|
||||
gWGLWrap.fDeleteContext((HGLRC) mPbufferContext);
|
||||
gWGLWrap.fDestroyPbuffer(mPbuffer);
|
||||
mPbuffer = nsnull;
|
||||
}
|
||||
|
@ -381,7 +412,7 @@ nsGLPbufferWGL::~nsGLPbufferWGL()
|
|||
Destroy();
|
||||
|
||||
if (mGlewWglContext) {
|
||||
wglDeleteContext((HGLRC) mGlewWglContext);
|
||||
gWGLWrap.fDeleteContext((HGLRC) mGlewWglContext);
|
||||
mGlewWglContext = nsnull;
|
||||
}
|
||||
|
||||
|
@ -401,7 +432,7 @@ nsGLPbufferWGL::MakeContextCurrent()
|
|||
if (sCurrentContextToken == mPbufferContext)
|
||||
return;
|
||||
|
||||
wglMakeCurrent (mPbufferDC, (HGLRC) mPbufferContext);
|
||||
gWGLWrap.fMakeCurrent (mPbufferDC, (HGLRC) mPbufferContext);
|
||||
sCurrentContextToken = mPbufferContext;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
|
||||
DIRS = win
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS = mac
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
|
|
|
@ -96,7 +96,7 @@ LOCAL_INCLUDES = \
|
|||
-I$(topsrcdir)/uriloader/exthandler \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/uriloader/exthandler/mac
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
|
|
|
@ -430,13 +430,9 @@
|
|||
#include "nsIDOMSVGZoomEvent.h"
|
||||
#endif // MOZ_SVG
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
#include "nsIDOMCanvasRenderingContext2D.h"
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
#include "nsICanvasRenderingContextWebGL.h"
|
||||
#include "WebGLArray.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "nsIImageDocument.h"
|
||||
|
||||
|
@ -1148,7 +1144,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
|
||||
NS_DEFINE_CLASSINFO_DATA(HTMLCanvasElement, nsHTMLElementSH,
|
||||
ELEMENT_SCRIPTABLE_FLAGS)
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
NS_DEFINE_CLASSINFO_DATA(CanvasRenderingContext2D, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(CanvasGradient, nsDOMGenericSH,
|
||||
|
@ -1157,7 +1152,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(TextMetrics, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
#endif // MOZ_ENABLE_CANVAS
|
||||
|
||||
NS_DEFINE_CLASSINFO_DATA(SmartCardEvent, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
@ -1318,7 +1312,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
NS_DEFINE_CLASSINFO_DATA(Worker, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
NS_DEFINE_CLASSINFO_DATA(CanvasRenderingContextWebGL, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(WebGLBuffer, nsDOMGenericSH,
|
||||
|
@ -1347,7 +1340,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
NS_DEFINE_CLASSINFO_DATA(WebGLUnsignedIntArray, nsDOMGenericSH,
|
||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||
#endif
|
||||
};
|
||||
|
||||
// Objects that shuld be constructable through |new Name();|
|
||||
|
@ -1382,7 +1374,8 @@ struct nsConstructorFuncMapData
|
|||
static const nsConstructorFuncMapData kConstructorFuncMap[] =
|
||||
{
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(Worker, nsDOMWorker::NewWorker)
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
|
||||
// WebGL Array Types
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLFloatArray, NS_NewCanvasFloatArray)
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLByteArray, NS_NewCanvasByteArray)
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedByteArray, NS_NewCanvasUnsignedByteArray)
|
||||
|
@ -1390,7 +1383,6 @@ static const nsConstructorFuncMapData kConstructorFuncMap[] =
|
|||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedShortArray, NS_NewCanvasUnsignedShortArray)
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLIntArray, NS_NewCanvasIntArray)
|
||||
NS_DEFINE_CONSTRUCTOR_FUNC_DATA(WebGLUnsignedIntArray, NS_NewCanvasUnsignedIntArray)
|
||||
#endif
|
||||
};
|
||||
|
||||
nsIXPConnect *nsDOMClassInfo::sXPConnect = nsnull;
|
||||
|
@ -3391,7 +3383,6 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_GENERIC_HTML_MAP_ENTRIES
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMCanvasRenderingContext2D)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
@ -3407,7 +3398,6 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_MAP_BEGIN(TextMetrics, nsIDOMTextMetrics)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMTextMetrics)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
#endif // MOZ_ENABLE_CANVAS
|
||||
|
||||
DOM_CLASSINFO_MAP_BEGIN(XSLTProcessor, nsIXSLTProcessor)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIXSLTProcessor)
|
||||
|
@ -3641,7 +3631,6 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMEventTarget)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
DOM_CLASSINFO_MAP_BEGIN(CanvasRenderingContextWebGL, nsICanvasRenderingContextWebGL)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsICanvasRenderingContextWebGL)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
|
@ -3697,7 +3686,6 @@ nsDOMClassInfo::Init()
|
|||
DOM_CLASSINFO_MAP_BEGIN(WebGLUnsignedIntArray, nsIWebGLUnsignedIntArray)
|
||||
DOM_CLASSINFO_MAP_ENTRY(nsIWebGLUnsignedIntArray)
|
||||
DOM_CLASSINFO_MAP_END
|
||||
#endif
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
{
|
||||
|
|
|
@ -354,12 +354,10 @@ enum nsDOMClassInfoID {
|
|||
|
||||
// Canvas
|
||||
eDOMClassInfo_HTMLCanvasElement_id,
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
eDOMClassInfo_CanvasRenderingContext2D_id,
|
||||
eDOMClassInfo_CanvasGradient_id,
|
||||
eDOMClassInfo_CanvasPattern_id,
|
||||
eDOMClassInfo_TextMetrics_id,
|
||||
#endif
|
||||
|
||||
// SmartCard Events
|
||||
eDOMClassInfo_SmartCardEvent_id,
|
||||
|
@ -463,7 +461,7 @@ enum nsDOMClassInfoID {
|
|||
|
||||
eDOMClassInfo_Worker_id,
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
// WebGL
|
||||
eDOMClassInfo_CanvasRenderingContextWebGL_id,
|
||||
eDOMClassInfo_WebGLBuffer_id,
|
||||
eDOMClassInfo_WebGLTexture_id,
|
||||
|
@ -472,6 +470,7 @@ enum nsDOMClassInfoID {
|
|||
eDOMClassInfo_WebGLFramebuffer_id,
|
||||
eDOMClassInfo_WebGLRenderbuffer_id,
|
||||
|
||||
// WebGL Buffers
|
||||
eDOMClassInfo_WebGLFloatArray_id,
|
||||
eDOMClassInfo_WebGLByteArray_id,
|
||||
eDOMClassInfo_WebGLUnsignedByteArray_id,
|
||||
|
@ -479,7 +478,6 @@ enum nsDOMClassInfoID {
|
|||
eDOMClassInfo_WebGLUnsignedShortArray_id,
|
||||
eDOMClassInfo_WebGLIntArray_id,
|
||||
eDOMClassInfo_WebGLUnsignedIntArray_id,
|
||||
#endif
|
||||
|
||||
// This one better be the last one in this list
|
||||
eDOMClassInfoIDCount
|
||||
|
|
|
@ -46,10 +46,9 @@ MODULE = dom
|
|||
XPIDL_MODULE = dom_canvas
|
||||
GRE_MODULE = 1
|
||||
|
||||
XPIDLSRCS = nsIDOMCanvasRenderingContext2D.idl
|
||||
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
XPIDLSRCS += nsICanvasRenderingContextWebGL.idl
|
||||
endif
|
||||
XPIDLSRCS = \
|
||||
nsIDOMCanvasRenderingContext2D.idl \
|
||||
nsICanvasRenderingContextWebGL.idl \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -71,7 +71,7 @@ EXTRA_DSO_LDOPTS= \
|
|||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifeq (mac,$(MOZ_WIDGET_TOOLKIT))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ OS_LIBS += $(call EXPAND_LIBNAME,winspool comdlg32)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/mac
|
||||
endif
|
||||
|
||||
|
@ -109,7 +109,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -54,7 +54,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
|||
PLATFORM_DIR = win
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
PLATFORM_DIR = mac
|
||||
endif
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
BASEBROWSER = basebrowser-mac-macho
|
||||
CLIENTMANIFEST = client-mac-macho
|
||||
_PLATFORM = unix
|
||||
|
|
|
@ -81,7 +81,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(NULL)
|
||||
|
||||
# Need to link with CoreFoundation on Mac
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ AUTOCFG_JS_EXPORTS = \
|
|||
$(srcdir)/prefcalls.js \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
AUTOCFG_JS_EXPORTS += $(srcdir)/mac/platform.js
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT), windows)
|
||||
|
|
|
@ -182,7 +182,7 @@ CSRCS += $(PSPDF_BASE_CSRCS) $(PDF_CSRCS)
|
|||
EXPORTS_cairo += $(PDF_EXPORTS)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CSRCS += cairo-quartz-surface.c cairo-quartz-image-surface.c cairo-quartz-font.c
|
||||
EXPORTS_cairo += cairo-quartz.h cairo-quartz-image.h
|
||||
endif
|
||||
|
|
|
@ -92,7 +92,7 @@ EXPORTS += gfxPangoFonts.h
|
|||
EXPORTS += gfxPDFSurface.h
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXPORTS += gfxPlatformMac.h \
|
||||
gfxQuartzSurface.h \
|
||||
gfxQuartzImageSurface.h \
|
||||
|
|
|
@ -341,9 +341,9 @@ cairo_font_face_t *gfxOS2Font::CairoFontFace()
|
|||
FcPattern *fcPattern = FcPatternCreate();
|
||||
|
||||
// add (family) name to pattern
|
||||
// (the conversion should work, font names don't contain high bit chars)
|
||||
// convert name because FC stores it in UTF8 while we have it in UTF16
|
||||
FcPatternAddString(fcPattern, FC_FAMILY,
|
||||
(FcChar8 *)NS_LossyConvertUTF16toASCII(GetName()).get());
|
||||
(FcChar8 *)NS_ConvertUTF16toUTF8(GetName()).get());
|
||||
|
||||
// adjust font weight using the offset
|
||||
// The requirements outlined in gfxFont.h are difficult to meet without
|
||||
|
|
|
@ -55,7 +55,7 @@ CPPSRCS = \
|
|||
$(NULL)
|
||||
|
||||
# see also intl/locale/src/Makefile.in
|
||||
ifneq (,$(filter mac os2 windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter os2 windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
LOCALE_DIR = $(MOZ_WIDGET_TOOLKIT)
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT), cocoa)
|
||||
|
@ -86,7 +86,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
$(TK_LIBS) \
|
||||
$(NULL)
|
||||
|
|
|
@ -49,7 +49,7 @@ DIRS = public idl src
|
|||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
ifneq (,$(filter mac cocoa windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter cocoa windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS += tests_multilocale
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -47,7 +47,7 @@ LIBRARY_NAME = nslocale_s
|
|||
LIBXUL_LIBRARY = 1
|
||||
|
||||
|
||||
ifneq (,$(filter mac os2 windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter os2 windows, $(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS = $(MOZ_WIDGET_TOOLKIT)
|
||||
else
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT), cocoa)
|
||||
|
|
|
@ -87,7 +87,7 @@ else
|
|||
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||
CPPSRCS += nsWinCharset.cpp
|
||||
else
|
||||
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsMacCharset.cpp
|
||||
else
|
||||
ifeq ($(OS_ARCH),BeOS)
|
||||
|
@ -108,7 +108,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../util
|
||||
|
||||
ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -57,6 +57,31 @@ function hasAttribute(c, attrname)
|
|||
return false;
|
||||
}
|
||||
|
||||
// This is useful for detecting method overrides
|
||||
function signaturesMatch(m1, m2)
|
||||
{
|
||||
if (m1.shortName != m2.shortName)
|
||||
return false;
|
||||
|
||||
if (m1.isVirtual != m2.isVirtual)
|
||||
return false;
|
||||
|
||||
if (m1.isStatic != m2.isStatic)
|
||||
return false;
|
||||
|
||||
let p1 = m1.type.parameters;
|
||||
let p2 = m2.type.parameters;
|
||||
|
||||
if (p1.length != p2.length)
|
||||
return false;
|
||||
|
||||
for (let i = 0; i < p1.length; ++i)
|
||||
if (p1[i] !== p2[i])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const forward_functions = [
|
||||
'process_type',
|
||||
'process_tree_type',
|
||||
|
|
|
@ -49,7 +49,7 @@ PROGRAM = xpcshell$(BIN_SUFFIX)
|
|||
|
||||
CPPSRCS = xpcshell.cpp
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CMMSRCS += xpcshellMacUtils.mm
|
||||
endif
|
||||
|
||||
|
|
|
@ -697,8 +697,10 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
|
|||
|
||||
if isMethod:
|
||||
code = customMethodCall['code']
|
||||
elif isGetter:
|
||||
code = customMethodCall['getter_code']
|
||||
else:
|
||||
code = customMethodCall['getter_code' if isGetter else 'setter_code']
|
||||
code = customMethodCall['setter_code']
|
||||
stubName = templateName
|
||||
else:
|
||||
callTemplate = ""
|
||||
|
|
|
@ -197,6 +197,7 @@
|
|||
|
||||
#endif
|
||||
#include "nsPlaceholderFrame.h"
|
||||
#include "nsHTMLFrame.h"
|
||||
|
||||
// Content viewer interfaces
|
||||
#include "nsIContentViewer.h"
|
||||
|
@ -5247,12 +5248,23 @@ PresShell::RenderDocument(const nsRect& aRect, PRUint32 aFlags,
|
|||
(aFlags & RENDER_CARET) != 0);
|
||||
nsDisplayList list;
|
||||
|
||||
nsRect canvasArea(
|
||||
builder.ToReferenceFrame(rootFrame), rootFrame->GetSize());
|
||||
|
||||
nsRect rect(aRect);
|
||||
nsIFrame* rootScrollFrame = GetRootScrollFrame();
|
||||
if ((aFlags & RENDER_IGNORE_VIEWPORT_SCROLLING) && rootScrollFrame) {
|
||||
nsPoint pos = GetRootScrollFrameAsScrollable()->GetScrollPosition();
|
||||
nsIScrollableFrame* rootScrollableFrame =
|
||||
GetRootScrollFrameAsScrollable();
|
||||
nsPoint pos = rootScrollableFrame->GetScrollPosition();
|
||||
rect.MoveBy(-pos);
|
||||
builder.SetIgnoreScrollFrame(rootScrollFrame);
|
||||
|
||||
CanvasFrame* canvasFrame =
|
||||
do_QueryFrame(rootScrollableFrame->GetScrolledFrame());
|
||||
if (canvasFrame) {
|
||||
canvasArea = canvasFrame->CanvasArea();
|
||||
}
|
||||
}
|
||||
|
||||
builder.SetBackgroundOnly(PR_FALSE);
|
||||
|
@ -5262,7 +5274,7 @@ PresShell::RenderDocument(const nsRect& aRect, PRUint32 aFlags,
|
|||
// Add the canvas background color.
|
||||
nsresult rv =
|
||||
rootFrame->PresContext()->PresShell()->AddCanvasBackgroundColorItem(
|
||||
builder, list, rootFrame);
|
||||
builder, list, rootFrame, &canvasArea);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = rootFrame->BuildDisplayListForStackingContext(&builder, rect, &list);
|
||||
|
|
|
@ -78,6 +78,7 @@ _TEST_FILES = \
|
|||
decoration_line_rendering.js \
|
||||
test_bug495648.xul \
|
||||
bug495648.rdf \
|
||||
test_bug514127.html \
|
||||
$(NULL)
|
||||
# test_bug396024.html is currently disabled because it interacts badly with
|
||||
# the "You can't print-preview while the page is loading" dialog.
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=514127
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 514127</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"/>
|
||||
</head>
|
||||
<body>
|
||||
<p><a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=514127">Mozilla Bug 514127</a></p>
|
||||
|
||||
<!--
|
||||
iframe source is
|
||||
<html><body style='background: rgb(0,0,255); width: 100px; height: 50100px;'></body></html>
|
||||
-->
|
||||
<iframe id="source" width="50" height="50"
|
||||
src="data:text/html,%3Chtml%3E%3Cbody%20style%3D%27background%3A%20rgb%280%2C0%2C255%29%3B%20width%3A%20100px%3B%20height%3A%2050100px%3B%27%3E%3C%2Fbody%3E%3C%2Fhtml%3E"></iframe>
|
||||
<canvas id="scratch" width="50" height="50"></canvas>
|
||||
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 514127 **/
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var canvas = document.getElementById('scratch');
|
||||
var source = document.getElementById('source').contentWindow;
|
||||
var context = canvas.getContext("2d");
|
||||
|
||||
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||
context.drawWindow(source, 25, 50000, canvas.width, canvas.height,
|
||||
"transparent");
|
||||
|
||||
var data = context.getImageData(0, 0, canvas.width, canvas.height).data;
|
||||
var failed = false;
|
||||
for (var i = 0; i < data.length; i+=4) {
|
||||
if (data[i] != 0 || data[i+1] != 0 || data[i+2] != 255 || data[i+3] != 255) {
|
||||
failed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ok(!failed, "all pixels blue");
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -224,19 +224,10 @@ EXTRA_DSO_LDOPTS += $(MOZ_QT_LIBS) \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
OS_LIBS += -framework OpenGL
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
OS_LIBS += opengl32.lib
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add explicit X11 dependency when building against X11 toolkits
|
||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
|
|
|
@ -206,12 +206,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
|
|||
|
||||
#include "nsHTMLCanvasFrame.h"
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
#include "nsIDOMCanvasRenderingContext2D.h"
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
#include "nsICanvasRenderingContextWebGL.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class nsIDocumentLoaderFactory;
|
||||
|
||||
|
@ -403,12 +399,8 @@ nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
|
|||
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
nsresult NS_NewCanvasRenderingContext2D(nsIDOMCanvasRenderingContext2D** aResult);
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
nsresult NS_NewCanvasRenderingContextWebGL(nsICanvasRenderingContextWebGL** aResult);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
|
||||
|
||||
|
@ -540,12 +532,8 @@ MAKE_CTOR(CreateVideoDocument, nsIDocument, NS_NewVid
|
|||
#endif
|
||||
MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManager)
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D)
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsICanvasRenderingContextWebGL, NS_NewCanvasRenderingContextWebGL)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStyleSheetService, Init)
|
||||
|
||||
|
@ -1075,18 +1063,14 @@ static const nsModuleComponentInfo gComponents[] = {
|
|||
UnregisterHTMLAudioElement },
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_CANVAS
|
||||
{ "Canvas 2D Rendering Context",
|
||||
NS_CANVASRENDERINGCONTEXT2D_CID,
|
||||
"@mozilla.org/content/canvas-rendering-context;1?id=2d",
|
||||
CreateCanvasRenderingContext2D },
|
||||
#ifdef MOZ_ENABLE_CANVAS3D
|
||||
{ "Canvas WebGL Rendering Context",
|
||||
NS_CANVASRENDERINGCONTEXTWEBGL_CID,
|
||||
"@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl",
|
||||
CreateCanvasRenderingContextWebGL },
|
||||
#endif
|
||||
#endif
|
||||
|
||||
{ "XML document encoder",
|
||||
NS_TEXT_ENCODER_CID,
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
/* rendering object that goes directly inside the document's scrollbars */
|
||||
|
||||
#include "nsHTMLFrame.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsHTMLContainerFrame.h"
|
||||
|
@ -70,121 +71,6 @@
|
|||
|
||||
#define CANVAS_ABS_POS_CHILD_LIST NS_CONTAINER_LIST_COUNT_INCL_OC
|
||||
|
||||
// Interface IDs
|
||||
|
||||
/**
|
||||
* Root frame class.
|
||||
*
|
||||
* The root frame is the parent frame for the document element's frame.
|
||||
* It only supports having a single child frame which must be an area
|
||||
* frame
|
||||
*/
|
||||
class CanvasFrame : public nsHTMLContainerFrame,
|
||||
public nsIScrollPositionListener,
|
||||
public nsICanvasFrame {
|
||||
public:
|
||||
CanvasFrame(nsStyleContext* aContext)
|
||||
: nsHTMLContainerFrame(aContext), mDoPaintFocus(PR_FALSE),
|
||||
mAbsoluteContainer(nsGkAtoms::absoluteList) {}
|
||||
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
// nsISupports (nsIScrollPositionListener)
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
||||
|
||||
NS_IMETHOD Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
virtual void Destroy();
|
||||
|
||||
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
|
||||
nsFrameList& aChildList);
|
||||
NS_IMETHOD AppendFrames(nsIAtom* aListName,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD InsertFrames(nsIAtom* aListName,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame);
|
||||
|
||||
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
|
||||
virtual nsFrameList GetChildList(nsIAtom* aListName) const;
|
||||
|
||||
virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
virtual PRBool IsContainingBlock() const { return PR_TRUE; }
|
||||
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eCanContainOverflowContainers));
|
||||
}
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
|
||||
void PaintFocus(nsIRenderingContext& aRenderingContext, nsPoint aPt);
|
||||
|
||||
// nsIScrollPositionListener
|
||||
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
||||
virtual void ViewPositionDidChange(nsIScrollableView* aScrollable,
|
||||
nsTArray<nsIWidget::Configuration>* aConfigurations) {}
|
||||
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
||||
|
||||
// nsICanvasFrame
|
||||
NS_IMETHOD SetHasFocus(PRBool aHasFocus);
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
* @see nsGkAtoms::canvasFrame
|
||||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
virtual nsresult StealFrame(nsPresContext* aPresContext,
|
||||
nsIFrame* aChild,
|
||||
PRBool aForceNormal)
|
||||
{
|
||||
NS_ASSERTION(!aForceNormal, "No-one should be passing this in here");
|
||||
|
||||
// CanvasFrame keeps overflow container continuations of its child
|
||||
// frame in main child list
|
||||
nsresult rv = nsContainerFrame::StealFrame(aPresContext, aChild, PR_TRUE);
|
||||
if (NS_FAILED(rv)) {
|
||||
rv = nsContainerFrame::StealFrame(aPresContext, aChild);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent);
|
||||
|
||||
nsRect CanvasArea() const;
|
||||
|
||||
protected:
|
||||
virtual PRIntn GetSkipSides() const;
|
||||
|
||||
// Data members
|
||||
PRPackedBool mDoPaintFocus;
|
||||
nsCOMPtr<nsIViewManager> mViewManager;
|
||||
nsAbsoluteContainingBlock mAbsoluteContainer;
|
||||
|
||||
private:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
||||
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
nsIFrame*
|
||||
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
|
@ -197,6 +83,7 @@ NS_IMPL_FRAMEARENA_HELPERS(CanvasFrame)
|
|||
NS_IMPL_QUERY_INTERFACE1(CanvasFrame, nsIScrollPositionListener)
|
||||
|
||||
NS_QUERYFRAME_HEAD(CanvasFrame)
|
||||
NS_QUERYFRAME_ENTRY(CanvasFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsICanvasFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
|
||||
|
||||
|
|
|
@ -0,0 +1,172 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/* rendering object that goes directly inside the document's scrollbars */
|
||||
|
||||
#ifndef nsHTMLFrame_h___
|
||||
#define nsHTMLFrame_h___
|
||||
|
||||
|
||||
#include "nsHTMLContainerFrame.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsIView.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIRenderingContext.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIScrollPositionListener.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
|
||||
// for focus
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsICanvasFrame.h"
|
||||
|
||||
/**
|
||||
* Root frame class.
|
||||
*
|
||||
* The root frame is the parent frame for the document element's frame.
|
||||
* It only supports having a single child frame which must be an area
|
||||
* frame
|
||||
*/
|
||||
class CanvasFrame : public nsHTMLContainerFrame,
|
||||
public nsIScrollPositionListener,
|
||||
public nsICanvasFrame {
|
||||
public:
|
||||
CanvasFrame(nsStyleContext* aContext)
|
||||
: nsHTMLContainerFrame(aContext), mDoPaintFocus(PR_FALSE),
|
||||
mAbsoluteContainer(nsGkAtoms::absoluteList) {}
|
||||
|
||||
NS_DECL_QUERYFRAME_TARGET(CanvasFrame)
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
// nsISupports (nsIScrollPositionListener)
|
||||
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
||||
|
||||
NS_IMETHOD Init(nsIContent* aContent,
|
||||
nsIFrame* aParent,
|
||||
nsIFrame* aPrevInFlow);
|
||||
virtual void Destroy();
|
||||
|
||||
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
|
||||
nsFrameList& aChildList);
|
||||
NS_IMETHOD AppendFrames(nsIAtom* aListName,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD InsertFrames(nsIAtom* aListName,
|
||||
nsIFrame* aPrevFrame,
|
||||
nsFrameList& aFrameList);
|
||||
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
|
||||
nsIFrame* aOldFrame);
|
||||
|
||||
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
|
||||
virtual nsFrameList GetChildList(nsIAtom* aListName) const;
|
||||
|
||||
virtual nscoord GetMinWidth(nsIRenderingContext *aRenderingContext);
|
||||
virtual nscoord GetPrefWidth(nsIRenderingContext *aRenderingContext);
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus);
|
||||
virtual PRBool IsContainingBlock() const { return PR_TRUE; }
|
||||
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return nsHTMLContainerFrame::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eCanContainOverflowContainers));
|
||||
}
|
||||
|
||||
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
const nsRect& aDirtyRect,
|
||||
const nsDisplayListSet& aLists);
|
||||
|
||||
void PaintFocus(nsIRenderingContext& aRenderingContext, nsPoint aPt);
|
||||
|
||||
// nsIScrollPositionListener
|
||||
NS_IMETHOD ScrollPositionWillChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
||||
virtual void ViewPositionDidChange(nsIScrollableView* aScrollable,
|
||||
nsTArray<nsIWidget::Configuration>* aConfigurations) {}
|
||||
NS_IMETHOD ScrollPositionDidChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY);
|
||||
|
||||
// nsICanvasFrame
|
||||
NS_IMETHOD SetHasFocus(PRBool aHasFocus);
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
* @see nsGkAtoms::canvasFrame
|
||||
*/
|
||||
virtual nsIAtom* GetType() const;
|
||||
|
||||
virtual nsresult StealFrame(nsPresContext* aPresContext,
|
||||
nsIFrame* aChild,
|
||||
PRBool aForceNormal)
|
||||
{
|
||||
NS_ASSERTION(!aForceNormal, "No-one should be passing this in here");
|
||||
|
||||
// CanvasFrame keeps overflow container continuations of its child
|
||||
// frame in main child list
|
||||
nsresult rv = nsContainerFrame::StealFrame(aPresContext, aChild, PR_TRUE);
|
||||
if (NS_FAILED(rv)) {
|
||||
rv = nsContainerFrame::StealFrame(aPresContext, aChild);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHOD GetFrameName(nsAString& aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent);
|
||||
|
||||
nsRect CanvasArea() const;
|
||||
|
||||
protected:
|
||||
virtual PRIntn GetSkipSides() const;
|
||||
|
||||
// Data members
|
||||
PRPackedBool mDoPaintFocus;
|
||||
nsCOMPtr<nsIViewManager> mViewManager;
|
||||
nsAbsoluteContainingBlock mAbsoluteContainer;
|
||||
|
||||
private:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; }
|
||||
NS_IMETHOD_(nsrefcnt) Release() { return NS_OK; }
|
||||
};
|
||||
|
||||
#endif /* nsHTMLFrame_h___ */
|
|
@ -58,7 +58,7 @@ endif
|
|||
ifeq ($(OS_ARCH),BeOS)
|
||||
DIRS = icon/beos icon
|
||||
endif
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS = icon/mac icon
|
||||
endif
|
||||
endif # icon
|
||||
|
|
|
@ -2215,7 +2215,16 @@ imgContainer::RequestDecode()
|
|||
if (mDecoded)
|
||||
return NS_OK;
|
||||
|
||||
// If we're within the decoder, request asynchronously
|
||||
// If we've already got a full decoder running, we have nothing to do
|
||||
if (mDecoder && !(mDecoderFlags & imgIDecoder::DECODER_FLAG_HEADERONLY))
|
||||
return NS_OK;
|
||||
|
||||
// If our callstack goes through a header-only decoder, we have a problem.
|
||||
// We need to shutdown the header-only decoder and replace it with a full
|
||||
// decoder, but can't do that from within the decoder itself. Thus, we post
|
||||
// an asynchronous event to the event loop to do it later. Since
|
||||
// RequestDecode() is an asynchronous function this works fine (though it's
|
||||
// a little slower).
|
||||
if (mInDecoder) {
|
||||
nsRefPtr<imgDecodeRequestor> requestor = new imgDecodeRequestor(this);
|
||||
if (!requestor)
|
||||
|
|
|
@ -72,7 +72,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
|||
CPPSRCS += nsPluginsDirOS2.cpp
|
||||
CPPSRCS += nsPluginNativeWindowOS2.cpp
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsPluginsDirDarwin.cpp
|
||||
CPPSRCS += nsPluginNativeWindow.cpp
|
||||
else
|
||||
|
@ -101,7 +101,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ else
|
|||
CPPSRCS += nsAutodialWinCE.cpp
|
||||
endif
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += nsURLHelperOSX.cpp
|
||||
else
|
||||
CPPSRCS += nsURLHelperUnix.cpp
|
||||
|
|
|
@ -135,7 +135,7 @@ EXTRA_DSO_LDOPTS = \
|
|||
$(ZLIB_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
EXTRA_DSO_LDOPTS += \
|
||||
-framework SystemConfiguration \
|
||||
$(TK_LIBS) \
|
||||
|
|
|
@ -75,7 +75,7 @@ CPPSRCS += \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CPPSRCS += \
|
||||
nsBinHexDecoder.cpp \
|
||||
$(NULL)
|
||||
|
|
|
@ -122,7 +122,7 @@ EXTRA_DSO_LDOPTS += \
|
|||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ EXTRA_DSO_LDOPTS += \
|
|||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ VPATH = @srcdir@
|
|||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef MOZ_XUL
|
||||
ifeq (,$(filter qt beos os2 mac photon cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (,$(filter qt beos os2 photon cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS = public src
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -90,8 +90,8 @@ function test() {
|
|||
info("new load count is " + loadCount);
|
||||
|
||||
if (loadCount == 3) {
|
||||
window.getBrowser().removeEventListener("DOMContentLoaded", handleLoad, true);
|
||||
window.content.document.location.href = "about:blank";
|
||||
gBrowser.removeEventListener("DOMContentLoaded", handleLoad, true);
|
||||
content.location.href = "about:blank";
|
||||
executeSoon(check_next_uri);
|
||||
}
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ function test() {
|
|||
if (URIs.length) {
|
||||
let uri = URIs.shift();
|
||||
loadCount = 0;
|
||||
window.getBrowser().addEventListener("DOMContentLoaded", handleLoad, true);
|
||||
window.content.document.location.href = uri;
|
||||
gBrowser.addEventListener("DOMContentLoaded", handleLoad, true);
|
||||
content.location.href = uri;
|
||||
}
|
||||
else {
|
||||
setTimeout(confirm_results, LAZY_ADD_TIMER * 2);
|
||||
|
|
|
@ -57,7 +57,7 @@ else
|
|||
ifeq (,$(filter-out WINCE WINNT,$(OS_ARCH)))
|
||||
CPPSRCS += nsUserInfoWin.cpp
|
||||
else
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CMMSRCS += nsUserInfoMac.mm
|
||||
else
|
||||
CPPSRCS += nsUserInfoUnix.cpp
|
||||
|
|
|
@ -95,7 +95,7 @@ _TEST_FILES = findbar_window.xul \
|
|||
|
||||
# test_panel_focus.xul won't work if the Full Keyboard Access preference is set to
|
||||
# textboxes and lists only, so skip this test on Mac
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
_TEST_FILES += test_panel_focus.xul \
|
||||
window_panel_focus.xul
|
||||
else
|
||||
|
|
|
@ -135,7 +135,7 @@ _TEST_FILES = test_bug360220.xul \
|
|||
videomask.css \
|
||||
$(NULL)
|
||||
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
_TEST_FILES += test_menubar.xul \
|
||||
window_menubar.xul
|
||||
endif
|
||||
|
|
|
@ -148,12 +148,6 @@ COMPONENT_LIBS += \
|
|||
pipnss \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_XMLEXTRAS
|
||||
COMPONENT_LIBS += \
|
||||
xmlextras \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_PLUGINS
|
||||
DEFINES += -DMOZ_PLUGINS
|
||||
COMPONENT_LIBS += \
|
||||
|
@ -218,13 +212,6 @@ COMPONENT_LIBS += \
|
|||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_WEBSERVICES
|
||||
DEFINES += -DMOZ_WEBSERVICES
|
||||
COMPONENT_LIBS += \
|
||||
websrvcs \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_AUTH_EXTENSION
|
||||
COMPONENT_LIBS += auth
|
||||
DEFINES += -DMOZ_AUTH_EXTENSION
|
||||
|
@ -258,7 +245,7 @@ COMPONENT_LIBS += \
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq (,$(filter qt beos os2 mac photon cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (,$(filter qt beos os2 photon cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifdef MOZ_XUL
|
||||
ifdef MOZ_XPFE_COMPONENTS
|
||||
COMPONENT_LIBS += fileview
|
||||
|
@ -337,7 +324,7 @@ endif
|
|||
ifeq (os2,$(MOZ_WIDGET_TOOLKIT))
|
||||
COMPONENT_LIBS += wdgtos2
|
||||
endif
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
COMPONENT_LIBS += widget_mac
|
||||
endif
|
||||
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
@ -370,9 +357,6 @@ ifneq (,$(filter layout-debug,$(MOZ_EXTENSIONS)))
|
|||
COMPONENT_LIBS += gkdebug
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
EXTRA_DSO_LDOPTS += -framework OpenGL
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -77,12 +77,9 @@ DEFINES += \
|
|||
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
|
||||
ifneq ($(OS_ARCH),WINCE)
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
|
||||
ifdef MOZ_ENABLE_CANVAS3D
|
||||
OS_LIBS += $(call EXPAND_LIBNAME,opengl32)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += -lcups
|
||||
endif
|
||||
|
||||
|
|
|
@ -148,13 +148,6 @@
|
|||
#define PLUGINS_MODULES
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBSERVICES
|
||||
#define WEBSERVICES_MODULES \
|
||||
MODULE(nsWebServicesModule)
|
||||
#else
|
||||
#define WEBSERVICES_MODULES
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_XPFE_COMPONENTS
|
||||
#ifdef MOZ_RDF
|
||||
#define RDFAPP_MODULES \
|
||||
|
@ -230,12 +223,6 @@
|
|||
#define SPELLCHECK_MODULE
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_XMLEXTRAS
|
||||
#define XMLEXTRAS_MODULE MODULE(nsXMLExtrasModule)
|
||||
#else
|
||||
#define XMLEXTRAS_MODULE
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#ifdef MOZ_ENABLE_GTK2
|
||||
#define UNIXPROXY_MODULE MODULE(nsUnixProxyModule)
|
||||
|
@ -283,7 +270,6 @@
|
|||
ICON_MODULE \
|
||||
PLUGINS_MODULES \
|
||||
MODULE(nsLayoutModule) \
|
||||
WEBSERVICES_MODULES \
|
||||
MODULE(docshell_provider) \
|
||||
MODULE(embedcomponents) \
|
||||
MODULE(Browser_Embedding_Module) \
|
||||
|
@ -307,7 +293,6 @@
|
|||
MODULE(NSS) \
|
||||
SYSTEMPREF_MODULES \
|
||||
SPELLCHECK_MODULE \
|
||||
XMLEXTRAS_MODULE \
|
||||
LAYOUT_DEBUG_MODULE \
|
||||
UNIXPROXY_MODULE \
|
||||
OSXPROXY_MODULE \
|
||||
|
|
|
@ -76,7 +76,7 @@ endif
|
|||
|
||||
ifdef MOZ_CRASHREPORTER
|
||||
libs:: crashreporter.ini
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/crashreporter.app/Contents/MacOS
|
||||
else
|
||||
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
|
||||
|
|
|
@ -98,7 +98,7 @@ PACKAGER_NO_LIBS = 1
|
|||
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
|
||||
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
|
||||
else
|
||||
STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
|
||||
|
@ -108,7 +108,7 @@ $(STAGEDIST): AB_CD:=en-US
|
|||
$(STAGEDIST): UNPACKAGE=$(ZIP_IN)
|
||||
$(STAGEDIST): $(ZIP_IN)
|
||||
# only mac needs to remove the parent of STAGEDIST...
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
$(RM) -r -v $(DIST)/l10n-stage
|
||||
else
|
||||
# ... and windows doesn't like removing STAGEDIST itself, remove all children
|
||||
|
@ -133,7 +133,7 @@ repackage-zip:
|
|||
cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
|
||||
tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
|
||||
ifneq (en,$(AB))
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
|
||||
endif
|
||||
endif
|
||||
|
@ -148,7 +148,7 @@ ifdef MOZ_MAKE_COMPLETE_MAR
|
|||
endif
|
||||
# packaging done, undo l10n stuff
|
||||
ifneq (en,$(AB))
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -61,7 +61,7 @@ var timerService = {
|
|||
while (entries.hasMoreElements()) {
|
||||
var entry = entries.getNext().QueryInterface(Components.interfaces.nsISupportsCString).data;
|
||||
var value = catMan.getCategoryEntry(CATEGORY_UPDATE_TIMER, entry);
|
||||
var timerID = value.split(",")[3];
|
||||
var timerID = value.split(",")[2];
|
||||
if (id == timerID) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ include $(MOZILLA_DIR)/toolkit/mozapps/installer/package-name.mk
|
|||
# This is how we create the binary packages we release to the public.
|
||||
|
||||
ifndef MOZ_PKG_FORMAT
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
MOZ_PKG_FORMAT = DMG
|
||||
else
|
||||
ifeq (,$(filter-out OS2 WINNT WINCE BeOS, $(OS_ARCH)))
|
||||
|
|
|
@ -106,7 +106,7 @@ OS_CXXFLAGS += $(TK_CFLAGS)
|
|||
OS_LIBS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
HAVE_PROGRESSUI = 1
|
||||
CMMSRCS += progressui_osx.mm launchchild_osx.mm
|
||||
OS_LIBS += -framework Cocoa
|
||||
|
@ -142,7 +142,7 @@ libs:: updater.png
|
|||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
|
||||
endif
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
libs::
|
||||
$(NSINSTALL) -D $(DIST)/bin/updater.app
|
||||
rsync -a -C --exclude "*.in" $(srcdir)/macbuild/Contents $(DIST)/bin/updater.app
|
||||
|
|
|
@ -45,7 +45,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
DIRS = public src
|
||||
|
||||
# Use Qute for non-Mac non-Phoenix apps
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifndef MOZ_PHOENIX
|
||||
DIRS += skin
|
||||
endif
|
||||
|
|
|
@ -52,7 +52,7 @@ include $(DEPTH)/config/autoconf.mk
|
|||
# PMStripe overrides (toolkit/themes/pmstripe)
|
||||
# faststripe Winstripe + faststripe (no native theme components)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
DIRS = pinstripe
|
||||
else
|
||||
|
||||
|
|
|
@ -153,14 +153,6 @@ tier_gecko_dirs += \
|
|||
xpfe/appshell \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_XMLEXTRAS
|
||||
tier_gecko_dirs += extensions/xmlextras
|
||||
endif
|
||||
|
||||
ifdef MOZ_WEBSERVICES
|
||||
tier_gecko_dirs += extensions/webservices
|
||||
endif
|
||||
|
||||
ifdef MOZ_UNIVERSALCHARDET
|
||||
tier_gecko_dirs += extensions/universalchardet
|
||||
endif
|
||||
|
|
|
@ -77,7 +77,7 @@ endif
|
|||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
ifeq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LIBS = xul
|
||||
endif
|
||||
endif
|
||||
|
@ -92,7 +92,7 @@ LIBS += \
|
|||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_LIBXUL
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
LIBS += $(DIST)/bin/XUL
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -53,7 +53,7 @@ PACKAGE_BASE_DIR = $(DIST)
|
|||
# Default output location for update archive
|
||||
STAGE_DIR = $(DIST)/$(PKG_UPDATE_PATH)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
ifdef UNIVERSAL_BINARY
|
||||
ifneq (,$(filter %/l10n-stage,$(PACKAGE_BASE_DIR)))
|
||||
PACKAGE_DIR = $(PACKAGE_BASE_DIR)/$(MOZ_PKG_APPNAME)/$(MOZ_APP_DISPLAYNAME).app
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче