Merge cvs-trunk-mirror to mozilla-central. One conflict resolution: updated NSPR tag from client.mk into client.py

--HG--
rename : js/src/jsdbgapi.c => js/src/jsdbgapi.cpp
rename : js/src/jsinterp.c => js/src/jsinterp.cpp
rename : js/src/jsobj.c => js/src/jsobj.cpp
rename : js/src/jsopcode.c => js/src/jsopcode.cpp
rename : js/src/jsparse.c => js/src/jsparse.cpp
This commit is contained in:
Benjamin Smedberg 2008-05-02 14:08:43 -04:00
Родитель 858a24815d d116bc5e84
Коммит 7a92a2e692
139 изменённых файлов: 24730 добавлений и 37360 удалений

Просмотреть файл

@ -621,7 +621,7 @@ nsHTMLSelectOptionAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
// Upcall to nsAccessible, but skip nsHyperTextAccessible impl
// because we don't want EXT_STATE_EDITABLE or EXT_STATE_SELECTABLE_TEXT
nsresult rv = nsAccessible::GetState(aState, aExtraState);
NS_ENSURE_TRUE(rv, rv);
NS_ENSURE_SUCCESS(rv, rv);
if (!mDOMNode)
return NS_OK;

Просмотреть файл

@ -445,6 +445,7 @@ pref("alerts.slideIncrementTime", 10);
pref("alerts.totalOpenTime", 4000);
pref("browser.xul.error_pages.enabled", true);
pref("browser.xul.error_pages.expert_bad_cert", false);
// We want to make sure mail URLs are handled externally...
pref("network.protocol-handler.external.mailto", true); // for mail
@ -634,6 +635,13 @@ pref("urlclassifier.gethashtables", "goog-phish-shavar,goog-malware-shavar");
// the database.
pref("urlclassifier.confirm-age", 2700);
// Maximum size of the sqlite3 cache during an update, in bytes
#ifdef UNIX_BUT_NOT_MAC
pref("urlclassifier.updatecachemax", 104857600);
#else
pref("urlclassifier.updatecachemax", -1);
#endif
// URL for checking the reason for a malware warning.
pref("browser.safebrowsing.malware.reportURL", "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");

Просмотреть файл

@ -312,6 +312,23 @@
#endif
<key id="key_undoCloseTab" command="History:UndoCloseTab" key="&tabCmd.commandkey;" modifiers="accel,shift"/>
#ifdef XP_GNOME
#define NUM_SELECT_TAB_MODIFIER alt
#else
#define NUM_SELECT_TAB_MODIFIER accel
#endif
#expand <key id="key_selectTab1" oncommand="BrowserNumberTabSelection(event, 0);" key="1" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab2" oncommand="BrowserNumberTabSelection(event, 1);" key="2" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab3" oncommand="BrowserNumberTabSelection(event, 2);" key="3" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab4" oncommand="BrowserNumberTabSelection(event, 3);" key="4" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab5" oncommand="BrowserNumberTabSelection(event, 4);" key="5" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab6" oncommand="BrowserNumberTabSelection(event, 5);" key="6" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab7" oncommand="BrowserNumberTabSelection(event, 6);" key="7" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab8" oncommand="BrowserNumberTabSelection(event, 7);" key="8" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
#expand <key id="key_selectTab9" oncommand="BrowserNumberTabSelection(event, 8);" key="9" modifiers="__NUM_SELECT_TAB_MODIFIER__"/>
</keyset>
# Used by baseMenuOverlay

Просмотреть файл

@ -911,7 +911,7 @@ function delayedStartup()
gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);
window.addEventListener("keypress", ctrlNumberTabSelection, false);
window.addEventListener("keypress", onBrowserKeyPress, false);
// Ensure login manager is up and running.
Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
@ -1299,7 +1299,7 @@ SanitizeListener.prototype =
}
}
function ctrlNumberTabSelection(event)
function onBrowserKeyPress(event)
{
if (event.altKey && event.keyCode == KeyEvent.DOM_VK_RETURN) {
// XXXblake Proper fix is to just check whether focus is in the urlbar. However, focus with the autocomplete widget is all
@ -1311,38 +1311,10 @@ function ctrlNumberTabSelection(event)
return;
}
}
}
#ifdef XP_MACOSX
// Mac: Cmd+number
if (!event.metaKey || event.ctrlKey || event.altKey || event.shiftKey)
#else
#ifdef XP_UNIX
// Linux: Alt+number
if (!event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
#else
// Windows: Ctrl+number
if (!event.ctrlKey || event.metaKey || event.altKey || event.shiftKey)
#endif
#endif
return;
// \d in a RegExp will find any Unicode character with the "decimal digit"
// property (Nd)
var regExp = /\d/;
if (!regExp.test(String.fromCharCode(event.charCode)))
return;
// Some Unicode decimal digits are in the range U+xxx0 - U+xxx9 and some are
// in the range U+xxx6 - U+xxxF. Find the digit 1 corresponding to our
// character.
var digit1 = (event.charCode & 0xFFF0) | 1;
if (!regExp.test(String.fromCharCode(digit1)))
digit1 += 6;
var index = event.charCode - digit1;
if (index < 0)
return;
function BrowserNumberTabSelection(event, index)
{
// [Ctrl]+[9] always selects the last tab
if (index == 8)
index = gBrowser.tabContainer.childNodes.length - 1;

Просмотреть файл

@ -17,8 +17,7 @@
<html id="feedHandler"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:aaa="http://www.w3.org/2005/07/aaa">
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<head>
<title>&feedPage.title;</title>
<link rel="stylesheet"
@ -41,7 +40,7 @@
><xul:vbox
><xul:hbox align="center"
><xul:description id="subscribeUsingDescription"
/><xul:menulist id="handlersMenuList" aaa:labelledby="subscribeUsingDescription"
/><xul:menulist id="handlersMenuList" aria-labelledby="subscribeUsingDescription"
><xul:menupopup menugenerated="true" id="handlersMenuPopup"
><xul:menuitem id="liveBookmarksMenuItem" label="&feedLiveBookmarks;" class="menuitem-iconic" image="chrome://browser/skin/page-livemarks.png" selected="true"
/><xul:menuseparator

Просмотреть файл

@ -394,8 +394,12 @@ FeedWriter.prototype = {
*/
_setTitleText: function FW__setTitleText(container) {
if (container.title) {
this._setContentText(TITLE_ID, container.title.plainText());
this._document.title = container.title.plainText();
var title = container.title.plainText();
this._setContentText(TITLE_ID, title);
this._contentSandbox.document = this._document;
this._contentSandbox.title = title;
var codeStr = "document.title = title;"
Cu.evalInSandbox(codeStr, this._contentSandbox);
}
var feed = container.QueryInterface(Ci.nsIFeed);
@ -424,19 +428,21 @@ FeedWriter.prototype = {
[parts.getPropertyAsAString("title")]);
this._contentSandbox.feedTitleLink = feedTitleLink;
this._contentSandbox.titleText = titleText;
var codeStr = "feedTitleLink.setAttribute('title', titleText);";
Cu.evalInSandbox(codeStr, this._contentSandbox);
this._contentSandbox.feedTitleLink = null;
this._contentSandbox.titleText = null;
this._safeSetURIAttribute(feedTitleLink, "href",
parts.getPropertyAsAString("link"));
this._contentSandbox.feedTitleText = this._document.getElementById("feedTitleText");
this._contentSandbox.titleImageWidth = parseInt(parts.getPropertyAsAString("width")) + 15;
// Fix the margin on the main title, so that the image doesn't run over
// the underline
var feedTitleText = this._document.getElementById("feedTitleText");
var titleImageWidth = parseInt(parts.getPropertyAsAString("width")) + 15;
feedTitleText.style.marginRight = titleImageWidth + "px";
var codeStr = "feedTitleLink.setAttribute('title', titleText); " +
"feedTitleText.style.marginRight = titleImageWidth + 'px';";
Cu.evalInSandbox(codeStr, this._contentSandbox);
this._contentSandbox.feedTitleLink = null;
this._contentSandbox.titleText = null;
this._contentSandbox.feedTitleText = null;
this._contentSandbox.titleImageWidth = null;
this._safeSetURIAttribute(feedTitleLink, "href",
parts.getPropertyAsAString("link"));
}
catch (e) {
LOG("Failed to set Title Image (this is benign): " + e);
@ -959,7 +965,6 @@ FeedWriter.prototype = {
default:
codeStr = "header.className = 'feedBackground'; ";
header.className = "feedBackground";
}

Просмотреть файл

@ -453,14 +453,12 @@ BrowserGlue.prototype = {
var dirService = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties);
if (restoreDefaultBookmarks) {
var bookmarksFile = dirService.get("BMarks", Ci.nsILocalFile);
if (restoreDefaultBookmarks || !bookmarksFile.exists()) {
// get bookmarks.html file from default profile folder
var bookmarksFileName = "bookmarks.html";
var bookmarksFile = dirService.get("profDef", Ci.nsILocalFile);
bookmarksFile.append(bookmarksFileName);
bookmarksFile = dirService.get("profDef", Ci.nsILocalFile);
bookmarksFile.append("bookmarks.html");
}
else
var bookmarksFile = dirService.get("BMarks", Ci.nsILocalFile);
// import the file
try {

Просмотреть файл

@ -467,7 +467,7 @@ var BookmarkPropertiesPanel = {
this._element("locationRow").hidden =
hiddenRows.indexOf("location") != -1 || isQuery || !isBookmark;
this._element("keywordRow").hidden =
hiddenRows.indexOf("location") != -1 || isQuery || !isBookmark;
hiddenRows.indexOf("keyword") != -1 || isQuery || !isBookmark;
this._element("descriptionRow").hidden =
hiddenRows.indexOf("description")!= -1
this._element("folderRow").hidden =

Просмотреть файл

@ -989,6 +989,9 @@ PlacesController.prototype = {
* as part of another operation.
*/
remove: function PC_remove(aTxnName) {
if (!this._hasRemovableSelection(false))
return;
NS_ASSERT(aTxnName !== undefined, "Must supply Transaction Name");
var root = this._view.getResult().root;

Просмотреть файл

@ -230,7 +230,8 @@ var PlacesOrganizer = {
}
this._setSearchScopeForNode(node);
this._fillDetailsPane(node);
if (this._places.treeBoxObject.focused)
this._fillDetailsPane(node);
},
/**
@ -619,7 +620,8 @@ var PlacesOrganizer = {
},
onContentTreeSelect: function PO_onContentTreeSelect() {
this._fillDetailsPane(this._content.selectedNode);
if (this._content.treeBoxObject.focused)
this._fillDetailsPane(this._content.selectedNode);
},
_fillDetailsPane: function PO__fillDetailsPane(aSelectedNode) {
@ -643,7 +645,6 @@ var PlacesOrganizer = {
if (aSelectedNode && !PlacesUtils.nodeIsSeparator(aSelectedNode)) {
detailsDeck.selectedIndex = 1;
infoBox.hidden = false;
// Using the concrete itemId is arguably wrong. The bookmarks API
// does allow setting properties for folder shortcuts as well, but since
// the UI does not distinct between the couple, we better just show
@ -664,9 +665,6 @@ var PlacesOrganizer = {
}
else {
detailsDeck.selectedIndex = 0;
// The details deck has the height of its biggest child, so we hide the
// infoBox to allow it shrinking when there is no selection.
infoBox.hidden = true;
var selectItemDesc = document.getElementById("selectItemDescription");
var itemsCountLabel = document.getElementById("itemsCountText");
var rowCount = this._content.treeBoxObject.view.rowCount;

Просмотреть файл

@ -493,7 +493,7 @@
</treecols>
<treechildren flex="1"/>
</tree>
<hbox id="infoPaneBox">
<hbox id="infoPaneBox" style="height: 11em;">
<deck flex="1" id="detailsDeck">
<vbox id="itemsCountBox" align="center">
<spacer flex="3"/>
@ -506,6 +506,7 @@
</vbox>
<vbox id="infoBox" minimal="true">
<vbox id="editBookmarkPanelContent"/>
<spacer flex="1"/>
<hbox>
<button type="image" id="infoBoxExpander"
lesslabel="&detailsPane.less.label;"

Просмотреть файл

@ -327,10 +327,9 @@ PlacesTreeView.prototype = {
}
// now update the number of elements
if (previouslySelectedNodes.length > 0)
selection.selectEventsSuppressed = true;
selection.selectEventsSuppressed = true;
this._tree.beginUpdateBatch();
if (replaceCount)
this._tree.rowCountChanged(startReplacement, -replaceCount);
if (newElements.length)
@ -349,8 +348,8 @@ PlacesTreeView.prototype = {
}
// if we don't have a parent, we made it all the way to the root
// and didn't find a match, so we can open our item
if (!parent)
item.containerOpen = !item.containerOpen;
if (!parent && !item.containerOpen)
item.containerOpen = true;
}
}
@ -394,9 +393,8 @@ PlacesTreeView.prototype = {
selection.rangedSelect(previouslySelectedNodes[0].oldIndex,
previouslySelectedNodes[0].oldIndex, true);
}
selection.selectEventsSuppressed = false;
}
selection.selectEventsSuppressed = false;
},
_convertPRTimeToString: function PTV__convertPRTimeToString(aTime) {

Просмотреть файл

@ -57,14 +57,21 @@ function test() {
var toolbarId = PlacesUtils.toolbarFolderId;
var toolbarNode = PlacesUtils.getFolderContents(toolbarId).root;
is(toolbarNode.childCount, 0, "confirm toolbar is empty");
var oldCount = toolbarNode.childCount;
var testRootId = PlacesUtils.bookmarks.createFolder(toolbarId, "test root", -1);
is(toolbarNode.childCount, oldCount+1, "confirm test root node is a container, and is empty");
var testRootNode = toolbarNode.getChild(toolbarNode.childCount-1);
testRootNode.QueryInterface(Ci.nsINavHistoryContainerResultNode);
testRootNode.containerOpen = true;
is(testRootNode.childCount, 0, "confirm test root node is a container, and is empty");
// create folder A, fill it, validate it's contents
var folderAId = PlacesUtils.bookmarks.createFolder(toolbarId, "A", -1);
var folderAId = PlacesUtils.bookmarks.createFolder(testRootId, "A", -1);
populate(folderAId);
var folderANode = PlacesUtils.getFolderContents(folderAId).root;
validate(folderANode);
is(toolbarNode.childCount, 1, "create test folder");
is(testRootNode.childCount, 1, "create test folder");
// copy it, using the front-end helper functions
var serializedNode = PlacesUtils.wrapNode(folderANode, PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER);
@ -73,26 +80,26 @@ function test() {
ok(rawNode.type, "confirm json node");
var transaction = PlacesUIUtils.makeTransaction(rawNode,
PlacesUtils.TYPE_X_MOZ_PLACE_CONTAINER,
toolbarId,
testRootId,
-1,
true);
ok(transaction, "create transaction");
PlacesUIUtils.ptm.doTransaction(transaction);
// confirm copy
is(toolbarNode.childCount, 2, "create test folder via copy");
is(testRootNode.childCount, 2, "create test folder via copy");
// validate the copy
var folderBNode = toolbarNode.getChild(1);
var folderBNode = testRootNode.getChild(1);
validate(folderBNode);
// undo the transaction, confirm the removal
PlacesUIUtils.ptm.undoTransaction();
is(toolbarNode.childCount, 1, "confirm undo removed the copied folder");
is(testRootNode.childCount, 1, "confirm undo removed the copied folder");
// redo the transaction
PlacesUIUtils.ptm.redoTransaction();
is(toolbarNode.childCount, 2, "confirm redo re-copied the folder");
folderBNode = toolbarNode.getChild(1);
is(testRootNode.childCount, 2, "confirm redo re-copied the folder");
folderBNode = testRootNode.getChild(1);
validate(folderBNode);
// clean up

Просмотреть файл

@ -205,7 +205,7 @@ menuitem.bookmark-item {
}
.bookmark-item[query][dayContainer] {
list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
list-style-image: url("chrome://browser/skin/places/calendar.png");
}
.bookmark-item[query][hostContainer] {
@ -837,7 +837,6 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
}
/* Favicon */
#page-proxy-stack,
#page-proxy-favicon,
#urlbar-throbber {
width: 16px;
@ -845,7 +844,10 @@ toolbar[iconsize="small"] #paste-button[disabled="true"] {
}
#page-proxy-stack {
margin: 2px 3px;
width: 24px;
height: 20px;
padding: 2px 4px;
background: url(urlbar-favicon-glow.png) center center no-repeat;
}
#page-proxy-favicon:not([src]) {

Просмотреть файл

@ -23,6 +23,7 @@ classic.jar:
skin/classic/browser/Throbber-small.png
skin/classic/browser/Toolbar.png
skin/classic/browser/Toolbar-small.png
skin/classic/browser/urlbar-favicon-glow.png
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
skin/classic/browser/feeds/videoFeedIcon.png (feeds/videoFeedIcon.png)

Просмотреть файл

@ -65,12 +65,14 @@ treechildren::-moz-tree-image(title, query) {
list-style-image: url("chrome://browser/skin/places/query.png");
}
treechildren::-moz-tree-image(title, query, tagContainer) {
treechildren::-moz-tree-image(title, query, tagContainer),
treechildren::-moz-tree-image(container, OrganizerQuery_Tags) {
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
}
/* calendar icon for folders grouping items by date */
treechildren::-moz-tree-image(title, query, dayContainer) {
list-style-image: url("moz-icon://stock/gtk-directory?size=menu");
list-style-image: url("chrome://browser/skin/places/calendar.png");
}
treechildren::-moz-tree-image(title, query, hostContainer) {

Двоичные данные
browser/themes/gnomestripe/browser/urlbar-favicon-glow.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 619 B

Просмотреть файл

@ -144,7 +144,8 @@ treechildren::-moz-tree-image(query) {
list-style-image: url("chrome://browser/skin/places/query.png");
}
treechildren::-moz-tree-image(title, query, tagContainer) {
treechildren::-moz-tree-image(title, query, tagContainer),
treechildren::-moz-tree-image(container, OrganizerQuery_Tags) {
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
}

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 131 B

После

Ширина:  |  Высота:  |  Размер: 592 B

Просмотреть файл

@ -24,7 +24,7 @@
#identity-box[chromedir="ltr"]:-moz-system-metric(windows-default-theme) > hbox {
margin: -4px 0;
padding: 3px 2px 3px 4px;
padding: 3px 1px 3px 3px;
background-position: 0 3px;
-moz-border-radius-topleft: 14px;
-moz-border-radius-bottomleft: 14px;

Просмотреть файл

@ -186,8 +186,8 @@ menuitem.bookmark-item {
}
.bookmark-item[query][dayContainer] {
list-style-image: url("chrome://global/skin/icons/folder-item.png");
-moz-image-region: rect(0px, 32px, 16px, 16px);
list-style-image: url("chrome://browser/skin/places/calendar.png");
-moz-image-region: auto;
}
.bookmark-item[query][hostContainer] {
@ -1117,7 +1117,6 @@ toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover:active {
/* ::::: page proxy icon ::::: */
#page-proxy-stack,
#page-proxy-favicon,
#urlbar-throbber {
width: 16px;
@ -1125,7 +1124,10 @@ toolbar[iconsize="small"] #paste-button:not([disabled="true"]):hover:active {
}
#page-proxy-stack {
margin: 2px 3px;
width: 24px;
height: 20px;
padding: 2px 4px;
background: url(urlbar-favicon-glow.png) center center no-repeat;
}
#page-proxy-favicon:not([src]) {
@ -1838,7 +1840,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
border-right: 2px solid;
-moz-border-left-colors: ThreeDShadow rgba(255, 255, 255, 0.2);
-moz-border-right-colors: ThreeDShadow rgba(255, 255, 255, 0.2);
padding: 0 2px;
padding: 0 1px;
}
#identity-box[chromedir="ltr"]:not(:-moz-system-metric(windows-default-theme)) > hbox {
border-left: 1px solid;
@ -1846,7 +1848,7 @@ toolbarbutton.bookmark-item[dragover="true"][open="true"] {
}
#identity-box[chromedir="ltr"]:-moz-system-metric(windows-default-theme) > hbox {
margin: -11px -10px -11px 0;
padding: 10px 12px 10px 4px;
padding: 10px 11px 10px 3px;
border-top: 1px solid ThreeDDarkShadow;
border-bottom: 1px solid ThreeDDarkShadow;
border-right-style: none;

Просмотреть файл

@ -33,7 +33,8 @@ classic.jar:
skin/classic/browser/menu-forward.png (menu-forward.png)
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
skin/classic/browser/navbar-textbox-buttons.png (navbar-textbox-buttons.png)
skin/classic/browser/navbar-textbox-buttons.png
skin/classic/browser/urlbar-favicon-glow.png
skin/classic/browser/feeds/feed-icons-16.png (feeds/feed-icons-16.png)
skin/classic/browser/feeds/feedIcon.png (feeds/feedIcon.png)
skin/classic/browser/feeds/feedIcon16.png (feeds/feedIcon16.png)
@ -120,6 +121,7 @@ classic.jar:
skin/classic/aero/browser/monitor.png
skin/classic/aero/browser/monitor_16-10.png
skin/classic/aero/browser/navbar-textbox-buttons.png (navbar-textbox-buttons-aero.png)
skin/classic/aero/browser/urlbar-favicon-glow.png
skin/classic/aero/browser/feeds/feed-icons-16.png (feeds/feed-icons-16-aero.png)
skin/classic/aero/browser/feeds/feedIcon.png (feeds/feedIcon-aero.png)
skin/classic/aero/browser/feeds/feedIcon16.png (feeds/feedIcon16-aero.png)

Просмотреть файл

@ -49,7 +49,7 @@ treechildren::-moz-tree-image(title, open) {
}
treechildren::-moz-tree-image(title, container, livemark) {
list-style-image: url("chrome://browser/skin/page-livemarks.png");
list-style-image: url("chrome://browser/skin/livemark-folder.png");
-moz-image-region: auto;
}
@ -68,20 +68,27 @@ treechildren::-moz-tree-image(container, OrganizerQuery_BookmarksMenu) {
-moz-image-region: auto;
}
treechildren::-moz-tree-image(container, OrganizerQuery_UnfiledBookmarks) {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png");
-moz-image-region: auto;
}
/* query-nodes should be styled even if they're not expandable */
treechildren::-moz-tree-image(title, query) {
list-style-image: url("chrome://browser/skin/places/query.png");
-moz-image-region: auto;
}
treechildren::-moz-tree-image(title, query, tagContainer) {
treechildren::-moz-tree-image(title, query, tagContainer),
treechildren::-moz-tree-image(container, OrganizerQuery_Tags) {
list-style-image: url("chrome://mozapps/skin/places/tagContainerIcon.png");
-moz-image-region: auto;
}
/* calendar icon for folders grouping items by date */
treechildren::-moz-tree-image(title, query, dayContainer) {
list-style-image: url("chrome://global/skin/icons/folder-item.png");
-moz-image-region: rect(0px, 32px, 16px, 16px);
list-style-image: url("chrome://browser/skin/places/calendar.png");
-moz-image-region: auto;
}
treechildren::-moz-tree-image(title, query, hostContainer) {

Двоичные данные
browser/themes/winstripe/browser/urlbar-favicon-glow.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 619 B

Просмотреть файл

@ -1,6 +1,6 @@
#!/usr/bin/python
NSPR_CO_TAG = 'NSPR_4_7_1_BETA2'
NSPR_CO_TAG = 'NSPR_4_7_1_RTM'
NSS_CO_TAG = 'NSS_3_12_RC2'
NSPR_DIRS = ('nsprpub',)

Просмотреть файл

@ -4022,6 +4022,17 @@ nsContentUtils::DOMEventToNativeKeyEvent(nsIDOMEvent* aDOMEvent,
return PR_TRUE;
}
static PRBool
HasASCIIDigit(const nsTArray<nsShortcutCandidate>& aCandidates)
{
for (PRUint32 i = 0; i < aCandidates.Length(); ++i) {
PRUint32 ch = aCandidates[i].mCharCode;
if (ch >= '0' && ch <= '9')
return PR_TRUE;
}
return PR_FALSE;
}
/* static */
void
nsContentUtils::GetAccelKeyCandidates(nsIDOMEvent* aDOMEvent,
@ -4054,9 +4065,9 @@ nsContentUtils::GetAccelKeyCandidates(nsIDOMEvent* aDOMEvent,
aCandidates.AppendElement(key);
}
PRUint32 len = nativeKeyEvent->alternativeCharCodes.Length();
if (!nativeKeyEvent->isShift) {
for (PRUint32 i = 0;
i < nativeKeyEvent->alternativeCharCodes.Length(); ++i) {
for (PRUint32 i = 0; i < len; ++i) {
PRUint32 ch =
nativeKeyEvent->alternativeCharCodes[i].mUnshiftedCharCode;
if (!ch || ch == nativeKeyEvent->charCode)
@ -4065,9 +4076,23 @@ nsContentUtils::GetAccelKeyCandidates(nsIDOMEvent* aDOMEvent,
nsShortcutCandidate key(ch, PR_FALSE);
aCandidates.AppendElement(key);
}
// If unshiftedCharCodes doesn't have numeric but shiftedCharCode has it,
// this keyboard layout is AZERTY or similar layout, probably.
// In this case, Accel+[0-9] should be accessible without shift key.
// However, the priority should be lowest.
if (!HasASCIIDigit(aCandidates)) {
for (PRUint32 i = 0; i < len; ++i) {
PRUint32 ch =
nativeKeyEvent->alternativeCharCodes[i].mShiftedCharCode;
if (ch >= '0' && ch <= '9') {
nsShortcutCandidate key(ch, PR_FALSE);
aCandidates.AppendElement(key);
break;
}
}
}
} else {
for (PRUint32 i = 0;
i < nativeKeyEvent->alternativeCharCodes.Length(); ++i) {
for (PRUint32 i = 0; i < len; ++i) {
PRUint32 ch = nativeKeyEvent->alternativeCharCodes[i].mShiftedCharCode;
if (!ch)
continue;

Просмотреть файл

@ -79,6 +79,7 @@ GK_ATOM(accesskey, "accesskey")
GK_ATOM(acronym, "acronym")
GK_ATOM(action, "action")
GK_ATOM(active, "active")
GK_ATOM(activetitlebarcolor, "activetitlebarcolor")
GK_ATOM(actuate, "actuate")
GK_ATOM(address, "address")
GK_ATOM(after, "after")
@ -405,6 +406,7 @@ GK_ATOM(img, "img")
GK_ATOM(implementation, "implementation")
GK_ATOM(implements, "implements")
GK_ATOM(import, "import")
GK_ATOM(inactivetitlebarcolor, "inactivetitlebarcolor")
GK_ATOM(include, "include")
GK_ATOM(includes, "includes")
GK_ATOM(increment, "increment")
@ -842,7 +844,6 @@ GK_ATOM(thead, "thead")
GK_ATOM(thumb, "thumb")
GK_ATOM(title, "title")
GK_ATOM(titlebar, "titlebar")
GK_ATOM(titlebarcolor, "titlebarcolor")
GK_ATOM(titletip, "titletip")
GK_ATOM(toggled, "toggled")
GK_ATOM(token, "token")

Просмотреть файл

@ -757,8 +757,6 @@ nsHTMLContentSerializer::AppendElementStart(nsIDOMElement *aElement,
nsAutoString header;
child->GetAttr(kNameSpaceID_None, nsGkAtoms::httpEquiv, header);
printf("Header value = '%s'\n", NS_ConvertUTF16toUTF8(header).get());
if (header.LowerCaseEqualsLiteral("content-type")) {
hasMeta = PR_TRUE;
break;

Просмотреть файл

@ -3971,6 +3971,10 @@ nsHTMLDocument::SetEditingState(EditingState aState)
nsresult
nsHTMLDocument::EditingStateChanged()
{
if (mRemovedFromDocShell) {
return NS_OK;
}
if (mEditingState == eSettingUp || mEditingState == eTearingDown) {
// XXX We shouldn't recurse.
return NS_OK;

Просмотреть файл

@ -1143,9 +1143,10 @@ nsXULElement::AfterSetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
HideWindowChrome(aValue && NS_LITERAL_STRING("true").Equals(*aValue));
}
// titlebarcolor is settable on any root node (windows, dialogs, etc)
// (in)activetitlebarcolor is settable on any root node (windows, dialogs, etc)
nsIDocument *document = GetCurrentDoc();
if (aName == nsGkAtoms::titlebarcolor &&
if ((aName == nsGkAtoms::activetitlebarcolor ||
aName == nsGkAtoms::inactivetitlebarcolor) &&
document && document->GetRootContent() == this) {
nscolor color = NS_RGBA(0, 0, 0, 0);
@ -1153,7 +1154,7 @@ nsXULElement::AfterSetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
attrValue.ParseColor(*aValue, document);
attrValue.GetColorValue(color);
SetTitlebarColor(color);
SetTitlebarColor(color, aName == nsGkAtoms::activetitlebarcolor);
}
if (aName == nsGkAtoms::src && document) {
@ -1396,10 +1397,11 @@ nsXULElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, PRBool aNotify)
HideWindowChrome(PR_FALSE);
}
if (aName == nsGkAtoms::titlebarcolor &&
if ((aName == nsGkAtoms::activetitlebarcolor ||
aName == nsGkAtoms::inactivetitlebarcolor) &&
doc && doc->GetRootContent() == this) {
// Use 0, 0, 0, 0 as the "none" color.
SetTitlebarColor(NS_RGBA(0, 0, 0, 0));
SetTitlebarColor(NS_RGBA(0, 0, 0, 0), aName == nsGkAtoms::activetitlebarcolor);
}
// If the accesskey attribute is removed, unregister it here
@ -2453,7 +2455,7 @@ nsXULElement::HideWindowChrome(PRBool aShouldHide)
}
void
nsXULElement::SetTitlebarColor(nscolor aColor)
nsXULElement::SetTitlebarColor(nscolor aColor, PRBool aActive)
{
nsIDocument* doc = GetCurrentDoc();
if (!doc || doc->GetRootContent() != this) {
@ -2468,7 +2470,7 @@ nsXULElement::SetTitlebarColor(nscolor aColor)
nsCOMPtr<nsIWidget> mainWidget;
baseWindow->GetMainWidget(getter_AddRefs(mainWidget));
if (mainWidget) {
mainWidget->SetWindowTitlebarColor(aColor);
mainWidget->SetWindowTitlebarColor(aColor, aActive);
}
}
}

Просмотреть файл

@ -726,7 +726,7 @@ protected:
nsresult HideWindowChrome(PRBool aShouldHide);
void SetTitlebarColor(nscolor aColor);
void SetTitlebarColor(nscolor aColor, PRBool aActive);
const nsAttrName* InternalGetExistingAttrNameFromQName(const nsAString& aStr) const;

Просмотреть файл

@ -1011,12 +1011,9 @@ nsDocShell::FirePageHideNotification(PRBool aIsUnload)
kids[i]->FirePageHideNotification(aIsUnload);
}
}
}
// Now make sure our editor, if any, is detached before we go
// any farther.
if (mEditorData && aIsUnload) {
DetachEditorFromWindow();
// Now make sure our editor, if any, is detached before we go
// any farther.
DetachEditorFromWindow();
}
return NS_OK;
@ -3036,6 +3033,12 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
if (!messageStr.IsEmpty()) {
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
error.AssignLiteral("nssBadCert");
PRBool expert = PR_FALSE;
mPrefs->GetBoolPref("browser.xul.error_pages.expert_bad_cert",
&expert);
if (expert) {
cssClass.AssignLiteral("expertBadCert");
}
} else {
error.AssignLiteral("nssFailure2");
}
@ -3371,11 +3374,6 @@ nsDocShell::Reload(PRUint32 aReloadFlags)
}
// Need to purge detached editor here, else when we reload a page,
// the detached editor state causes SetDesignMode() to fail.
if (mOSHE)
mOSHE->SetEditorData(nsnull);
return rv;
}
@ -4879,8 +4877,13 @@ nsDocShell::Embed(nsIContentViewer * aContentViewer,
SetBaseUrlForWyciwyg(aContentViewer);
}
// XXX What if SetupNewViewer fails?
if (mLSHE)
if (mLSHE) {
// Restore the editing state, if it's stored in session history.
if (mLSHE->HasDetachedEditor()) {
ReattachEditorToWindow(mLSHE);
}
SetHistoryEntry(&mOSHE, mLSHE);
}
PRBool updateHistory = PR_TRUE;
@ -5326,29 +5329,20 @@ nsDocShell::CanSavePresentation(PRUint32 aLoadType,
return PR_TRUE;
}
PRBool
nsDocShell::HasDetachedEditor()
{
return (mOSHE && mOSHE->HasDetachedEditor()) ||
(mLSHE && mLSHE->HasDetachedEditor());
}
void
nsDocShell::ReattachEditorToWindow(nsIDOMWindow *aWindow, nsISHEntry *aSHEntry)
nsDocShell::ReattachEditorToWindow(nsISHEntry *aSHEntry)
{
NS_ASSERTION(!mEditorData,
"Why reattach an editor when we already have one?");
NS_ASSERTION(aWindow,
"Need a window to reattach to.");
NS_ASSERTION(HasDetachedEditor(),
NS_ASSERTION(aSHEntry && aSHEntry->HasDetachedEditor(),
"Reattaching when there's not a detached editor.");
if (mEditorData || !aWindow || !aSHEntry)
if (mEditorData || !aSHEntry)
return;
mEditorData = aSHEntry->ForgetEditorData();
if (mEditorData) {
nsresult res = mEditorData->ReattachToWindow(aWindow);
nsresult res = mEditorData->ReattachToWindow(this);
NS_ASSERTION(NS_SUCCEEDED(res), "Failed to reattach editing session");
}
}
@ -5356,18 +5350,21 @@ nsDocShell::ReattachEditorToWindow(nsIDOMWindow *aWindow, nsISHEntry *aSHEntry)
void
nsDocShell::DetachEditorFromWindow(nsISHEntry *aSHEntry)
{
if (!aSHEntry || !mEditorData)
if (!mEditorData)
return;
NS_ASSERTION(!aSHEntry->HasDetachedEditor(),
"Why detach an editor twice?");
NS_ASSERTION(!aSHEntry || !aSHEntry->HasDetachedEditor(),
"Detaching editor when it's already detached.");
nsresult res = mEditorData->DetachFromWindow();
NS_ASSERTION(NS_SUCCEEDED(res), "Failed to detach editor");
if (NS_SUCCEEDED(res)) {
// Make aSHEntry hold the owning ref to the editor data.
aSHEntry->SetEditorData(mEditorData.forget());
// Make aSHEntry hold the owning ref to the editor data.
if (aSHEntry)
aSHEntry->SetEditorData(mEditorData.forget());
else
mEditorData = nsnull;
}
#ifdef DEBUG
@ -5384,7 +5381,8 @@ nsDocShell::DetachEditorFromWindow(nsISHEntry *aSHEntry)
void
nsDocShell::DetachEditorFromWindow()
{
DetachEditorFromWindow(mOSHE);
if (mOSHE)
DetachEditorFromWindow(mOSHE);
}
nsresult
@ -5536,6 +5534,10 @@ nsDocShell::FinishRestore()
}
}
if (mOSHE && mOSHE->HasDetachedEditor()) {
ReattachEditorToWindow(mOSHE);
}
if (mContentViewer) {
nsCOMPtr<nsIDOMDocument> domDoc;
mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
@ -6004,11 +6006,6 @@ nsDocShell::RestoreFromHistory()
}
}
if (HasDetachedEditor()) {
nsCOMPtr<nsIDOMWindow> domWin = do_QueryInterface(privWin);
ReattachEditorToWindow(domWin, mLSHE);
}
// Simulate the completion of the load.
nsDocShell::FinishRestore();
@ -7147,10 +7144,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
mLoadType = aLoadType;
// Detach the current editor so that it can be restored from the
// bfcache later.
DetachEditorFromWindow();
// mLSHE should be assigned to aSHEntry, only after Stop() has
// been called. But when loading an error page, do not clear the
// mLSHE for the real page.
@ -7214,22 +7207,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
nsCOMPtr<nsIChannel> chan(do_QueryInterface(req));
DisplayLoadError(rv, aURI, nsnull, chan);
}
if (aSHEntry) {
if (aLoadType & LOAD_CMD_HISTORY) {
// We've just loaded a page from session history. Reattach
// its editing session if it has one.
nsCOMPtr<nsIDOMWindow> domWin;
CallGetInterface(this, static_cast<nsIDOMWindow**>(getter_AddRefs(domWin)));
ReattachEditorToWindow(domWin, aSHEntry);
} else {
// This is a non-history load from a session history entry. Purge any
// previous editing sessions, so that the the editing session will
// be recreated. This can happen when we reload something that's
// in the bfcache.
aSHEntry->SetEditorData(nsnull);
}
}
return rv;
}
@ -8729,9 +8706,12 @@ nsDocShell::ShouldDiscardLayoutState(nsIHttpChannel * aChannel)
NS_IMETHODIMP nsDocShell::GetEditor(nsIEditor * *aEditor)
{
NS_ENSURE_ARG_POINTER(aEditor);
nsresult rv = EnsureEditorData();
if (NS_FAILED(rv)) return rv;
if (!mEditorData) {
*aEditor = nsnull;
return NS_OK;
}
return mEditorData->GetEditor(aEditor);
}
@ -9037,9 +9017,12 @@ nsDocShell::EnsureScriptEnvironment()
NS_IMETHODIMP
nsDocShell::EnsureEditorData()
{
NS_ASSERTION(!HasDetachedEditor(), "EnsureEditorData() called when detached.\n");
if (!mEditorData && !mIsBeingDestroyed && !HasDetachedEditor()) {
PRBool openDocHasDetachedEditor = mOSHE && mOSHE->HasDetachedEditor();
if (!mEditorData && !mIsBeingDestroyed && !openDocHasDetachedEditor) {
// We shouldn't recreate the editor data if it already exists, or
// we're shutting down, or we already have a detached editor data
// stored in the session history. We should only have one editordata
// per docshell.
mEditorData = new nsDocShellEditorData(this);
}

Просмотреть файл

@ -525,7 +525,7 @@ protected:
// we are it's still OK to load this URI.
PRBool IsOKToLoadURI(nsIURI* aURI);
void ReattachEditorToWindow(nsIDOMWindow *aWindow, nsISHEntry *aSHEntry);
void ReattachEditorToWindow(nsISHEntry *aSHEntry);
void DetachEditorFromWindow(nsISHEntry *aSHEntry);
protected:
@ -677,10 +677,6 @@ protected:
static nsIURIFixup *sURIFixup;
// Returns true when the currently open document has a detached editor
// waiting to be reattached.
PRBool HasDetachedEditor();
public:
class InterfaceRequestorProxy : public nsIInterfaceRequestor {
public:

Просмотреть файл

@ -73,12 +73,12 @@ nsDocShellEditorData::~nsDocShellEditorData()
void
nsDocShellEditorData::TearDownEditor()
{
NS_ASSERTION(mIsDetached, "We should be detached before tearing down");
if (mEditor) {
mEditor->PreDestroy();
mEditor = nsnull;
}
mEditingSession = nsnull;
mIsDetached = PR_FALSE;
}
@ -244,12 +244,16 @@ nsDocShellEditorData::DetachFromWindow()
if (htmlDoc)
mDetachedEditingState = htmlDoc->GetEditingState();
mDocShell = nsnull;
return NS_OK;
}
nsresult
nsDocShellEditorData::ReattachToWindow(nsIDOMWindow *aWindow)
nsDocShellEditorData::ReattachToWindow(nsIDocShell* aDocShell)
{
mDocShell = aDocShell;
nsCOMPtr<nsIDOMWindow> domWindow = do_GetInterface(mDocShell);
nsresult rv = mEditingSession->ReattachToWindow(domWindow);
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -72,7 +72,7 @@ public:
nsresult SetEditor(nsIEditor *inEditor);
void TearDownEditor();
nsresult DetachFromWindow();
nsresult ReattachToWindow(nsIDOMWindow *aWindow);
nsresult ReattachToWindow(nsIDocShell *aDocShell);
protected:

Просмотреть файл

@ -68,7 +68,7 @@ interface nsILayoutHistoryState;
interface nsISecureBrowserUI;
interface nsIDOMStorage;
[scriptable, uuid(4b00222a-8d0a-46d7-a1fe-43bd89d19324)]
[scriptable, uuid(7d1cf6b9-daa3-476d-8f9f-9eb2a971a95c)]
interface nsIDocShell : nsISupports
{
/**

Просмотреть файл

@ -163,9 +163,10 @@
errContainer.parentNode.removeChild(errContainer);
var className = getCSSClass();
if (className) {
if (className && className != "expertBadCert") {
// Associate a CSS class with the root of the page, if one was passed in,
// to allow custom styling.
// Not "expertBadCert" though, don't want to deal with the favicon
document.documentElement.className = className;
// Also, if they specified a CSS class, they must supply their own
@ -177,6 +178,9 @@
favicon.setAttribute("href", "chrome://global/skin/icons/" + className + "_favicon.png");
faviconParent.appendChild(favicon);
}
if (className == "expertBadCert") {
showSecuritySection();
}
if (err == "nssBadCert") {
// Remove the "Try again" button for security exceptions, since it's

Просмотреть файл

@ -58,7 +58,7 @@ class nsDocShellEditorData;
[ptr] native nsDocShellEditorDataPtr(nsDocShellEditorData);
[scriptable, uuid(abe54136-49e5-44ca-a749-290038c6b85d)]
[scriptable, uuid(c16fde76-3108-450e-8c8c-ae8286f286ed)]
interface nsISHEntry : nsIHistoryEntry
{
/** URI for the document */

Просмотреть файл

@ -44,13 +44,19 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_BROWSER_TEST_FILES = \
browser_bug92473.js \
test-form_sjis.html \
browser_bug134911.js \
browser_bug349769.js \
browser_bug388121-1.js \
browser_bug388121-2.js \
$(NULL)
# the tests below use FUEL, which is a Firefox-specific feature
ifdef MOZ_PHOENIX
_BROWSER_TEST_FILES += \
browser_bug92473.js \
test-form_sjis.html \
browser_bug134911.js \
$(NULL)
endif
libs:: $(_BROWSER_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)

Просмотреть файл

@ -50,6 +50,7 @@ _TEST_FILES = \
test_bug278916.html \
test_bug279495.html \
test_bug386782.html \
test_bug430624.html \
test_bug430723.html \
test_child.html \
test_grandchild.html \

Просмотреть файл

@ -0,0 +1,55 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=430624
-->
<head>
<title>Test for Bug 430624</title>
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=430624">Mozilla Bug 430624</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test for Bug 430624 **/
function onLoad() {
window.frames[0].frameElement.onload = onReload;
window.frames[0].location = window.frames[0].location;
}
function onReload() {
var bodyElement = window.frames[0].frameElement.contentDocument.body;
sendChar('S', bodyElement);
sendChar('t', bodyElement);
sendChar('i', bodyElement);
sendChar('l', bodyElement);
sendChar('l', bodyElement);
sendChar(' ', bodyElement);
is(bodyElement.innerHTML, "Still contentEditable", "Check we're contentEditable after reload");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
<iframe onload="onLoad()" src="data:text/html;charset=utf-8,<body contenteditable>contentEditable</body>"></iframe>
</body>
</html>

Просмотреть файл

@ -2223,11 +2223,11 @@ nsGlobalWindow::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
nsCOMPtr<nsIScriptContext> kungFuDeathGrip2(GetContextInternal());
nsGlobalWindow* outer = GetOuterWindowInternal();
// if the window is deactivated while in full screen mode,
// restore OS chrome, and hide it again upon re-activation
if (outer && outer->mFullScreen) {
if (aVisitor.mEvent->message == NS_DEACTIVATE ||
aVisitor.mEvent->message == NS_ACTIVATE) {
if (aVisitor.mEvent->message == NS_DEACTIVATE ||
aVisitor.mEvent->message == NS_ACTIVATE) {
// if the window is deactivated while in full screen mode,
// restore OS chrome, and hide it again upon re-activation
if (outer && outer->mFullScreen) {
nsCOMPtr<nsIFullScreen> fullScreen =
do_GetService("@mozilla.org/browser/fullscreen;1");
if (fullScreen) {
@ -2237,6 +2237,51 @@ nsGlobalWindow::PostHandleEvent(nsEventChainPostVisitor& aVisitor)
fullScreen->HideAllOSChrome();
}
}
// Set / unset the "active" attribute on the documentElement
// of the top level window
nsCOMPtr<nsIWidget> mainWidget = GetMainWidget();
NS_ENSURE_TRUE(mainWidget, nsnull);
// Get the top level widget (if the main widget is a sheet, this will
// be the sheet's top (non-sheet) parent).
nsCOMPtr<nsIWidget> topLevelWidget = mainWidget->GetSheetWindowParent();
if (!topLevelWidget)
topLevelWidget = mainWidget;
// Get the top level widget's nsGlobalWindow
nsCOMPtr<nsIDOMWindowInternal> topLevelWindow;
if (topLevelWidget == mainWidget) {
topLevelWindow = static_cast<nsIDOMWindowInternal *>(this);
} else {
// This is a workaround for the following problem:
// When a window with an open sheet loses focus, only the sheet window
// receives the NS_DEACTIVATE event. However, it's not the sheet that
// should lose the "active" attribute, but the containing top level window.
void* clientData;
topLevelWidget->GetClientData(clientData); // clientData is nsXULWindow
nsISupports* data = static_cast<nsISupports*>(clientData);
nsCOMPtr<nsIInterfaceRequestor> req(do_QueryInterface(data));
topLevelWindow = do_GetInterface(req);
}
if (topLevelWindow) {
// Only set the attribute if the document is a XUL document and the
// window is a chrome window
nsCOMPtr<nsIDOMDocument> domDoc;
topLevelWindow->GetDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
nsCOMPtr<nsIDOMXULDocument> xulDoc(do_QueryInterface(doc));
nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(topLevelWindow);
if (xulDoc && chromeWin) {
nsCOMPtr<nsIContent> rootElem = doc->GetRootContent();
if (aVisitor.mEvent->message == NS_ACTIVATE)
rootElem->SetAttr(kNameSpaceID_None, nsGkAtoms::active,
NS_LITERAL_STRING("true"), PR_TRUE);
else
rootElem->UnsetAttr(kNameSpaceID_None, nsGkAtoms::active, PR_TRUE);
}
}
}
if (aVisitor.mEvent->message == NS_RESIZE_EVENT) {

Просмотреть файл

@ -0,0 +1,14 @@
<html>
<head>
<script>
function crash() {
window.frames[0].onload = null;
window.frames[0].location = 'data:text/html;charset=utf-8,2nd%20page';
}
</script>
</head>
<body onload="crash()">
<!-- iframe contents: <html><body onload="document.body.setAttribute('spellcheck', true);"></body></html> -->
<iframe src="data:text/html;charset=utf-8;base64,PGh0bWw%2BPGJvZHkgb25sb2FkPSJkb2N1bWVudC5ib2R5LnNldEF0dHJpYnV0ZSgnc3BlbGxjaGVjaycsIHRydWUpOyI%2BPC9ib2R5PjwvaHRtbD4%3D"></iframe>
</body>
</html>

Просмотреть файл

@ -1,3 +1,4 @@
load 382527-1.html
load 402172-1.html
load 407256-1.html
load 430624-1.html

Просмотреть файл

@ -1,640 +0,0 @@
<html>
<head>
<style type="text/css">
.glfuncs {
border: 1px solid gray;
width: 100%;
font-family: Lucida Sans Console, Lucida Console, Bitstream Vera Mono, Courier New, Courier, monospace;
font-size: x-small;
}
.gldifferent {
background: #ffeeee;
}
tr > th {
font-family: sans;
font-size: small;
background: #dddddd;
}
.glgroup {
padding-top: 5px;
font-family: sans;
font-size: small;
background: #ddddff;
}
</style>
</head>
<body>
<h3>API Mapping</h3>
<table class="glfuncs">
<tr style="font-family: sans">
<th width="50%">GL ES 2.0</th>
<th>GLWeb20Context</th>
</tr>
<tr><td class="glgroup" colspan="2"><b><i>Core GL ES 2.0</i></b></td></tr>
<tr>
<td>ActiveTexture (GLenum texture)</td>
</tr>
<tr>
<td>AttachShader (GLuint program, GLuint shader)</td>
</tr>
<tr>
<td>BindAttribLocation (GLuint program, GLuint index, const char *name)</td>
</tr>
<tr>
<td>BindBuffer (GLenum target, GLuint buffer)</td>
</tr>
<tr>
<td>BindTexture (GLenum target, GLuint texture)</td>
</tr>
<tr>
<td>BlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)</td>
</tr>
<tr>
<td>BlendEquation (GLenum mode)</td>
</tr>
<tr>
<td>BlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)</td>
</tr>
<tr>
<td>BlendFunc (GLenum sfactor, GLenum dfactor)</td>
</tr>
<tr>
<td>BlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)</td>
</tr>
<tr class="gldifferent">
<td>BufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage)</td>
<td>bufferData (uint target, Array data, uint elementType, uint usage)</td>
</tr>
<tr class="gldifferent">
<td>BufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data)</td>
<td>bufferSubData (uint target, uint offset, Array data, uint elementType)</td>
</tr>
<tr>
<td>Clear (GLbitfield mask)</td>
</tr>
<tr>
<td>ClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)</td>
</tr>
<tr class="gldifferent">
<td>ClearDepthf (GLclampf depth)</td>
<td>clearDepth (float depth);</td>
</tr>
<tr>
<td>ClearStencil (GLint s)</td>
</tr>
<tr>
<td>ColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)</td>
</tr>
<tr class="gldifferent">
<td>CompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)</td>
<td><i>see texImage2DHTML</i></td>
</tr>
<tr class="gldifferent">
<td>CompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)</td>
<td><i>see texSubImage2DHTML</i></td>
</tr>
<tr class="gldifferent">
<td>CopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)</td>
<td><i>TODO</i></td>
</tr>
<tr class="gldifferent">
<td>CopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)</td>
<td><i>TODO</i></td>
</tr>
<tr>
<td>uint glCreateProgram (void)</td>
</tr>
<tr>
<td>uint glCreateShader (GLenum type)</td>
</tr>
<tr>
<td>CullFace (GLenum mode)</td>
</tr>
<tr class="gldifferent">
<td>DeleteBuffers (GLsizei n, const GLuint *buffers)</td>
<td>deleteBuffers (Array buffers)</td>
</tr>
<tr class="gldifferent">
<td>DeleteTextures (GLsizei n, const GLuint *textures)</td>
<td>deleteTextures (Array textures)</td>
</tr>
<tr>
<td>DeleteProgram (GLuint program)</td>
</tr>
<tr>
<td>DeleteShader (GLuint shader)</td>
</tr>
<tr>
<td>DetachShader (GLuint program, GLuint shader)</td>
</tr>
<tr>
<td>DepthFunc (GLenum func)</td>
<td></td>
</tr>
<tr>
<td>DepthMask (GLboolean flag)</td>
<td></td>
</tr>
<tr>
<td>DepthRangef (GLclampf zNear, GLclampf zFar)</td>
<td></td>
</tr>
<tr>
<td>Disable (GLenum cap)</td>
<td></td>
</tr>
<tr>
<td>DisableVertexAttribArray (GLuint index)</td>
<td></td>
</tr>
<tr>
<td>DrawArrays (GLenum mode, GLint first, GLsizei count)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>DrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices)</td>
<td><i>TODO</i></td>
</tr>
<tr>
<td>Enable (GLenum cap)</td>
<td></td>
</tr>
<tr>
<td>EnableVertexAttribArray (GLuint index)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>Finish (void)</td>
<td><i>NONE</i></td>
</tr>
<tr class="gldifferent">
<td>Flush (void)</td>
<td><i>NONE</i></td>
</tr>
<tr>
<td>FrontFace (GLenum mode)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>GetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)</td><td>Object getActiveAttrib (uint program, uint index)<br>
obj = { type: ..., size: ..., name: ... }</td>
</tr>
<tr class="gldifferent">
<td>GetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)</td>
<td>Object getActiveUniform (uint program, uint index)<br>
obj = { type: ..., size: ..., name: ... }</td>
</tr>
<tr class="gldifferent">
<td>GetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)</td>
<td>Array getAttachedShaders (uint program)</td>
</tr>
<tr class="gldifferent">
<td>int glGetAttribLocation (GLuint program, const char *name)</td>
<td>int getAttribLocation (uint program, string name)</td>
</tr>
<tr class="gldifferent">
<td>GetBooleanv (GLenum pname, GLboolean *params)</td>
<td><i>see getParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetBufferParameteriv (GLenum target, GLenum pname, GLint *params)</td>
<td><i>see getBufferParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GenBuffers (GLsizei n, GLuint *buffers)</td>
<td>Array genBuffers (uint n)</td>
</tr>
<tr class="gldifferent">
<td>GenTextures (GLsizei n, GLuint *textures)</td>
<td>Array genTextures (uint n)</td>
</tr>
<tr>
<td>enum glGetError (void)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>GetFloatv (GLenum pname, GLfloat *params)</td>
<td><i>see getParameter</i></td>
</tr>
<tr class="gldifferent">
<tr>
<td>GetIntegerv (GLenum pname, GLint *params)</td>
<td><i>see getParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetPointerv (GLenum pname, void **params)</td>
<td><i>see getParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetProgramiv (GLuint program, GLenum pname, GLint *params)</td>
<td><i>see getProgramParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei *length, char *infolog)</td>
<td>string getProgramInfoLog (uint program)</td>
</tr>
<tr class="gldifferent">
<td>const GLubyte * glGetString (GLenum name)</td>
<td><i>see getParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetTexParameteriv (GLenum target, GLenum pname, GLint *params)</td>
<td><i>see getTexParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetTexParameterfv (GLenum target, GLenum pname, GLfloat *params)</td>
<td><i>see getTexParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetUniformfv (GLuint program, GLint location, GLfloat *params)</td>
<td><i>TODO</i></td>
</tr>
<tr class="gldifferent">
<td>GetUniformiv (GLuint program, GLint location, GLint *params)</td>
<td><i>TODO</i></td>
</tr>
<tr class="gldifferent">
<td>int glGetUniformLocation (GLuint program, const char *name)</td>
<td>int getUniformLocation (uint program, string name)</td>
</tr>
<tr class="gldifferent">
<td>GetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params)</td>
<td><i>see getVertexAttrib</i></td>
</tr>
<tr class="gldifferent">
<td>GetVertexAttribiv (GLuint index, GLenum pname, GLint *params)</td>
<td><i>see getVertexAttrib</i></td>
</tr>
<tr class="gldifferent">
<td>GetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer)</td>
<td><i>see getVertexAttrib</i></td>
</tr>
<tr>
<td>Hint (GLenum target, GLenum mode)</td>
<td></td>
</tr>
<tr>
<td>boolean glIsBuffer (GLuint buffer)</td>
<td></td>
</tr>
<tr>
<td>boolean glIsEnabled (GLenum cap)</td>
<td></td>
</tr>
<tr>
<td>boolean glIsProgram (GLuint program)</td>
<td></td>
</tr>
<tr>
<td>boolean glIsShader (GLuint shader)</td>
<td></td>
</tr>
<tr>
<td>boolean glIsTexture (GLuint texture)</td>
<td></td>
</tr>
<tr>
<td>LineWidth (GLfloat width)</td>
<td></td>
</tr>
<tr>
<td>LinkProgram (GLuint program)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>PixelStorei (GLenum pname, GLint param)</td>
<td><i>NONE</i></td>
</tr>
<tr>
<td>PointSize (GLfloat size)</td>
<td></td>
</tr>
<tr>
<td>PolygonOffset (GLfloat factor, GLfloat units)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>ReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)</td>
<td><i>NONE</i></td>
</tr>
<tr>
<td>SampleCoverage (GLclampf value, GLboolean invert)</td>
<td></td>
</tr>
<tr>
<td>Scissor (GLint x, GLint y, GLsizei width, GLsizei height)</td>
<td></td>
</tr>
<tr>
<td>StencilFunc (GLenum func, GLint ref, GLuint mask)</td>
<td></td>
</tr>
<tr>
<td>StencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)</td>
<td></td>
</tr>
<tr>
<td>StencilMask (GLuint mask)</td>
<td></td>
</tr>
<tr>
<td>StencilMaskSeparate (GLenum face, GLuint mask)</td>
<td></td>
</tr>
<tr>
<td>StencilOp (GLenum fail, GLenum zfail, GLenum zpass)</td>
<td></td>
</tr>
<tr>
<td>StencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>TexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)</td>
<td><i>see texImage2DHTML</i></td>
</tr>
<tr class="gldifferent">
<td>TexParameteri (GLenum target, GLenum pname, GLint param)</td>
<td><i>see texParameter</i></td>
</tr>
<tr class="gldifferent">
<td>TexParameterf (GLenum target, GLenum pname, GLfloat param)</td>
<td><i>see texParameter</i></td>
</tr>
<tr class="gldifferent">
<td>TexParameteriv (GLenum target, GLenum pname, const GLint *params)</td>
<td><i>see texParameter</i></td>
</tr>
<tr class="gldifferent">
<td>TexParameterfv (GLenum target, GLenum pname, const GLfloat *params)</td>
<td><i>see texParameter</i></td>
</tr>
<tr class="gldifferent">
<td>TexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)</td>
<td><i>see texSubImage2DHTML</i></td>
</tr>
<tr class="gldifferent">
<td>Uniform1i (GLint location, GLint x)<br>
Uniform2i (GLint location, GLint x, GLint y)<br>
Uniform3i (GLint location, GLint x, GLint y, GLint z)<br>
Uniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)<br>
Uniform1iv (GLint location, GLsizei count, const GLint *v)<br>
Uniform2iv (GLint location, GLsizei count, const GLint *v)<br>
Uniform3iv (GLint location, GLsizei count, const GLint *v)<br>
Uniform4iv (GLint location, GLsizei count, const GLint *v)</td>
<td><i>see uniformi</i></td>
</tr>
<tr class="gldifferent">
<td>Uniform1f (GLint location, GLfloat x)<br>
Uniform2f (GLint location, GLfloat x, GLfloat y)<br>
Uniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)<br>
Uniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)<br>
Uniform1fv (GLint location, GLsizei count, const GLfloat *v)<br>
Uniform2fv (GLint location, GLsizei count, const GLfloat *v)<br>
Uniform3fv (GLint location, GLsizei count, const GLfloat *v)<br>
Uniform4fv (GLint location, GLsizei count, const GLfloat *v)</td>
<td><i>see uniformf</i></td>
</tr>
<tr class="gldifferent">
<td>UniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)<br>
UniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)<br>
UniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)</td>
<td><i>see uniformMatrix</i></td>
</tr>
<tr>
<td>UseProgram (GLuint program)</td>
<td></td>
</tr>
<tr>
<td>ValidateProgram (GLuint program)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>VertexAttrib1f (GLuint indx, GLfloat x)<br>
VertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)<br>
VertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)<br>
VertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)<br>
VertexAttrib1fv (GLuint indx, const GLfloat *values)<br>
VertexAttrib2fv (GLuint indx, const GLfloat *values)<br>
VertexAttrib3fv (GLuint indx, const GLfloat *values)<br>
VertexAttrib4fv (GLuint indx, const GLfloat *values)</td>
<td><i>TODO</i></td>
</tr>
<tr class="gldifferent">
<td>VertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr)</td>
<td>vertexAttribPointer (uint index, Object bufferObject)<br>
vertexAttribPointer (uint index, uint size, uint elementType, Array data)
</td>
</tr>
<tr>
<td>Viewport (GLint x, GLint y, GLsizei width, GLsizei height)</td>
<td></td>
</tr>
<tr><td class="glgroup" colspan="2"><b><i>OES_framebuffer_object</i></b></td></tr>
<tr><td class="gldifferent"><i>TODO</i></td></tr>
<tr><td class="glgroup" colspan="2"><b><i>OES_mapbuffer</i></b></td></tr>
<tr><td class="gldifferent"><i>NOT SUPPORTED</i></td></tr>
<tr><td class="glgroup" colspan="2"><b><i>OES_texture_3D</i></b></td></tr>
<tr><td class="gldifferent"><i>TODO</i></td></tr>
<tr><td class="glgroup" colspan="2"><b><i>OES_shader_source</i></b></td></tr>
<tr><td class="gldifferent"><i>TODO</i></td></tr>
<tr>
<td>CompileShader (GLuint shader)</td>
<td></td>
</tr>
<tr class="gldifferent">
<td>GetShaderiv (GLuint shader, GLenum pname, GLint *params)</td>
<td><i>see getShaderParameter</i></td>
</tr>
<tr class="gldifferent">
<td>GetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog)</td>
<td>string getShaderInfoLog (uint shader)</td>
</tr>
<tr class="gldifferent">
<td>GetShaderSource (GLuint shader, GLsizei bufsize, GLsizei *length, char *source)</td>
<td><i>TODO</i></td>
</tr>
<tr class="gldifferent">
<td>ReleaseShaderCompilerOES(void)</td>
<td><i>NONE</i></td>
</tr>
<tr class="gldifferent">
<td>ShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length)</td>
<td>shaderSource(uint shader, string source)</td>
</table>
<tr><td class="glgroup" colspan="2"><b><i>OES_shader_binary</i></b></td></tr>
<tr><td class="gldifferent"><i>NOT SUPPORTED</i></td></tr>
<h3>API Additions</h3>
<table>
<tr>
<td>texImage2DHTML (uint target, DOMImageElement image)<br>
texImage2DHTML (uint target, int level, DOMImageElement image)</td>
</tr>
<tr>
<td>texSubImage2DHTML (uint target, DOMImageElement image, int xoff, int yoff, int width, int height)<br>
texSubImage2DHTML (uint target, int level, DOMImageElement image, int xoff, int yoff, int width, int height)</td>
</tr>
<tr>
<td>getParameter (uint pname)</td>
</tr>
<tr>
<td>getBufferParameter (uint target, uint pname)</td>
</tr>
<tr>
<td>getProgramParameter</td>
</tr>
<tr>
<td>getShaderParameter</td>
</tr>
<tr>
<td>getTexParameter</td>
</tr>
<tr>
<td>getVertexAttrib</td>
</tr>
<tr>
<td>texParameter</td>
</tr>
<tr>
<td>uniformf</td>
</tr>
<tr>
<td>uniformi</td>
</tr>
<tr>
<td>uniformMatrix</td>
</tr>
</table>
</body>

Просмотреть файл

@ -1,31 +0,0 @@
<?xml version="1.0"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:install-manifest">
<em:id>canvas3d@mozilla.com</em:id>
<em:version>0.1.18</em:version>
<em:type>2</em:type>
<em:targetApplication>
<!-- Firefox -->
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<!-- this version needs to be set to the exact version this
extension was built for, because of the way we're tied
to internal interfaces.
-->
<em:minVersion>3.0a8pre</em:minVersion>
<em:maxVersion>3.0</em:maxVersion>
</Description>
</em:targetApplication>
<!-- front-end metadata -->
<em:creator>Vladimir Vukicevic/mozilla.com</em:creator>
<em:name>Canvas 3D (Gecko 1.9)</em:name>
<em:description>Canvas 3D context(s) for Gecko 1.9</em:description>
<em:homepageURL>http://people.mozilla.com/~vladimir/canvas3d/</em:homepageURL>
<em:optionsURL>chrome://canvas3d/content/options.xul</em:optionsURL>
</Description>
</RDF>

Просмотреть файл

@ -1,3 +0,0 @@
canvas3d.jar:
% content canvas3d %content/canvas3d/
content/canvas3d/options.xul (resources/content/options.xul)

Просмотреть файл

@ -1,58 +0,0 @@
#
# ***** 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 canvas code.
#
# The Initial Developer of the Original Code is
# Mozilla
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Vladimir Vukicevic <vladimir@pobox.com>
#
# 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = canvas3d
XPI_NAME = canvas3d
XPIDLSRCS = \
nsICanvasRenderingContextGL.idl \
nsICanvasRenderingContextGLBuffer.idl \
nsICanvasRenderingContextGLWeb20.idl \
nsICanvasRenderingContextGLES11.idl \
nsICanvasGLPrivate.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -1,53 +0,0 @@
/* -*- Mode: IDL; 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 canvas 3D.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com>
*
* 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 ***** */
#include "nsISupports.idl"
/* These are private interface that's used to identify
* specific concrete classes so we know what we can cast.
*/
[scriptable, uuid(eba2aa03-ae19-46e2-bad7-6b966037e22c)]
interface nsICanvasGLBuffer : nsISupports
{
};
[scriptable, uuid(27310aab-1988-43e8-882e-6293c8c9df60)]
interface nsICanvasGLTexture : nsISupports
{
};

Просмотреть файл

@ -1,602 +0,0 @@
/* -*- Mode: IDL; 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 canvas 3D.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com>
*
* 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 ***** */
#include "nsISupports.idl"
interface nsIDOMHTMLCanvasElement;
[scriptable, uuid(0f3d8dae-7d43-490b-93e9-5ff908ac6ff5)]
interface nsICanvasRenderingContextGL : nsISupports
{
readonly attribute nsIDOMHTMLCanvasElement canvas;
/**
** GL constants
**/
/* types */
const PRUint32 BYTE = 0x1400;
const PRUint32 UNSIGNED_BYTE = 0x1401;
const PRUint32 SHORT = 0x1402;
const PRUint32 UNSIGNED_SHORT = 0x1403;
const PRUint32 INT = 0x1404;
const PRUint32 UNSIGNED_INT = 0x1405;
const PRUint32 FLOAT = 0x1406;
const PRUint32 TWO_BYTES = 0x1407;
const PRUint32 THREE_BYTES = 0x1408;
const PRUint32 FOUR_BYTES = 0x1409;
const PRUint32 DOUBLE = 0x140A;
/* ClearBufferMask */
const PRUint32 DEPTH_BUFFER_BIT = 0x00000100;
const PRUint32 STENCIL_BUFFER_BIT = 0x00000400;
const PRUint32 COLOR_BUFFER_BIT = 0x00004000;
/* BeginMode */
const PRUint32 POINTS = 0x0000;
const PRUint32 LINES = 0x0001;
const PRUint32 LINE_LOOP = 0x0002;
const PRUint32 LINE_STRIP = 0x0003;
const PRUint32 TRIANGLES = 0x0004;
const PRUint32 TRIANGLE_STRIP = 0x0005;
const PRUint32 TRIANGLE_FAN = 0x0006;
/* AlphaFunction */
const PRUint32 NEVER = 0x0200;
const PRUint32 LESS = 0x0201;
const PRUint32 EQUAL = 0x0202;
const PRUint32 LEQUAL = 0x0203;
const PRUint32 GREATER = 0x0204;
const PRUint32 NOTEQUAL = 0x0205;
const PRUint32 GEQUAL = 0x0206;
const PRUint32 ALWAYS = 0x0207;
/* BlendingFactorDest */
const PRUint32 ZERO = 0;
const PRUint32 ONE = 1;
const PRUint32 SRC_COLOR = 0x0300;
const PRUint32 ONE_MINUS_SRC_COLOR = 0x0301;
const PRUint32 SRC_ALPHA = 0x0302;
const PRUint32 ONE_MINUS_SRC_ALPHA = 0x0303;
const PRUint32 DST_ALPHA = 0x0304;
const PRUint32 ONE_MINUS_DST_ALPHA = 0x0305;
/* BlendingFactorSrc */
/* ZERO */
/* ONE */
const PRUint32 DST_COLOR = 0x0306;
const PRUint32 ONE_MINUS_DST_COLOR = 0x0307;
const PRUint32 SRC_ALPHA_SATURATE = 0x0308;
/* SRC_ALPHA */
/* ONE_MINUS_SRC_ALPHA */
/* DST_ALPHA */
/* ONE_MINUS_DST_ALPHA */
/* BlendEquationSeperate */
const PRUint32 FUNC_ADD = 0x8006;
const PRUint32 BLEND_EQUATION = 0x8009;
const PRUint32 BLEND_EQUATION_RGB = 0x8009;
const PRUint32 BLEND_EQUATION_ALPHA = 0x883D;
/* BlendSubtract */
const PRUint32 FUNC_SUBTRACT = 0x800A;
const PRUint32 FUNC_REVERSE_SUBTRACT = 0x800B;
/* Separate Blend Functions i.e. GL_OES_blend_func_seperate */
const PRUint32 BLEND_DST_RGB = 0x80C8;
const PRUint32 BLEND_SRC_RGB = 0x80C9;
const PRUint32 BLEND_DST_ALPHA = 0x80CA;
const PRUint32 BLEND_SRC_ALPHA = 0x80CB;
const PRUint32 CONSTANT_COLOR = 0x8001;
const PRUint32 ONE_MINUS_CONSTANT_COLOR = 0x8002;
const PRUint32 CONSTANT_ALPHA = 0x8003;
const PRUint32 ONE_MINUS_CONSTANT_ALPHA = 0x8004;
const PRUint32 BLEND_COLOR = 0x8005;
/* Buffer Objects */
const PRUint32 BUFFER_SIZE = 0x8764;
const PRUint32 BUFFER_USAGE = 0x8765;
const PRUint32 BUFFER_ACCESS = 0x88BB;
const PRUint32 CURRENT_VERTEX_ATTRIB = 0x8626;
/* ClipPlaneName */
const PRUint32 CLIP_PLANE0 = 0x3000;
const PRUint32 CLIP_PLANE1 = 0x3001;
const PRUint32 CLIP_PLANE2 = 0x3002;
const PRUint32 CLIP_PLANE3 = 0x3003;
const PRUint32 CLIP_PLANE4 = 0x3004;
const PRUint32 CLIP_PLANE5 = 0x3005;
/* ColorMaterialFace */
/* FRONT_AND_BACK */
/* ColorMaterialParameter */
/* AMBIENT_AND_DIFFUSE */
/* CullFaceMode */
const PRUint32 FRONT = 0x0404;
const PRUint32 BACK = 0x0405;
const PRUint32 FRONT_AND_BACK = 0x0408;
/* DepthFunction */
/* NEVER */
/* LESS */
/* EQUAL */
/* LEQUAL */
/* GREATER */
/* NOTEQUAL */
/* GEQUAL */
/* ALWAYS */
/* EnableCap */
const PRUint32 FOG = 0x0B60;
const PRUint32 LIGHTING = 0x0B50;
const PRUint32 TEXTURE_2D = 0x0DE1;
const PRUint32 CULL_FACE = 0x0B44;
const PRUint32 ALPHA_TEST = 0x0BC0;
const PRUint32 BLEND = 0x0BE2;
const PRUint32 COLOR_LOGIC_OP = 0x0BF2;
const PRUint32 DITHER = 0x0BD0;
const PRUint32 STENCIL_TEST = 0x0B90;
const PRUint32 DEPTH_TEST = 0x0B71;
/* LIGHT0 */
/* LIGHT1 */
/* LIGHT2 */
/* LIGHT3 */
/* LIGHT4 */
/* LIGHT5 */
/* LIGHT6 */
/* LIGHT7 */
const PRUint32 POINT_SMOOTH = 0x0B10;
const PRUint32 LINE_SMOOTH = 0x0B20;
const PRUint32 SCISSOR_TEST = 0x0C11;
const PRUint32 COLOR_MATERIAL = 0x0B57;
const PRUint32 NORMALIZE = 0x0BA1;
const PRUint32 RESCALE_NORMAL = 0x803A;
const PRUint32 POLYGON_OFFSET_FILL = 0x8037;
const PRUint32 VERTEX_ARRAY = 0x8074;
const PRUint32 NORMAL_ARRAY = 0x8075;
const PRUint32 COLOR_ARRAY = 0x8076;
const PRUint32 TEXTURE_COORD_ARRAY = 0x8078;
const PRUint32 MULTISAMPLE = 0x809D;
const PRUint32 SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
const PRUint32 SAMPLE_ALPHA_TO_ONE = 0x809F;
const PRUint32 SAMPLE_COVERAGE = 0x80A0;
/* ErrorCode */
const PRUint32 NO_ERROR = 0;
const PRUint32 INVALID_ENUM = 0x0500;
const PRUint32 INVALID_VALUE = 0x0501;
const PRUint32 INVALID_OPERATION = 0x0502;
const PRUint32 STACK_OVERFLOW = 0x0503;
const PRUint32 STACK_UNDERFLOW = 0x0504;
const PRUint32 OUT_OF_MEMORY = 0x0505;
/* FogMode */
/* LINEAR */
const PRUint32 EXP = 0x0800;
const PRUint32 EXP2 = 0x0801;
/* FogParameter */
const PRUint32 FOG_DENSITY = 0x0B62;
const PRUint32 FOG_START = 0x0B63;
const PRUint32 FOG_END = 0x0B64;
const PRUint32 FOG_MODE = 0x0B65;
const PRUint32 FOG_COLOR = 0x0B66;
/* FrontFaceDirection */
const PRUint32 CW = 0x0900;
const PRUint32 CCW = 0x0901;
/* GetPName */
const PRUint32 CURRENT_COLOR = 0x0B00;
const PRUint32 CURRENT_NORMAL = 0x0B02;
const PRUint32 CURRENT_TEXTURE_COORDS = 0x0B03;
const PRUint32 POINT_SIZE = 0x0B11;
const PRUint32 POINT_SIZE_MIN = 0x8126;
const PRUint32 POINT_SIZE_MAX = 0x8127;
const PRUint32 POINT_FADE_THRESHOLD_SIZE = 0x8128;
const PRUint32 POINT_DISTANCE_ATTENUATION = 0x8129;
const PRUint32 SMOOTH_POINT_SIZE_RANGE = 0x0B12;
const PRUint32 LINE_WIDTH = 0x0B21;
const PRUint32 SMOOTH_LINE_WIDTH_RANGE = 0x0B22;
const PRUint32 ALIASED_POINT_SIZE_RANGE = 0x846D;
const PRUint32 ALIASED_LINE_WIDTH_RANGE = 0x846E;
const PRUint32 CULL_FACE_MODE = 0x0B45;
const PRUint32 FRONT_FACE = 0x0B46;
const PRUint32 SHADE_MODEL = 0x0B54;
const PRUint32 DEPTH_RANGE = 0x0B70;
const PRUint32 DEPTH_WRITEMASK = 0x0B72;
const PRUint32 DEPTH_CLEAR_VALUE = 0x0B73;
const PRUint32 DEPTH_FUNC = 0x0B74;
const PRUint32 STENCIL_CLEAR_VALUE = 0x0B91;
const PRUint32 STENCIL_FUNC = 0x0B92;
const PRUint32 STENCIL_VALUE_MASK = 0x0B93;
const PRUint32 STENCIL_FAIL = 0x0B94;
const PRUint32 STENCIL_PASS_DEPTH_FAIL = 0x0B95;
const PRUint32 STENCIL_PASS_DEPTH_PASS = 0x0B96;
const PRUint32 STENCIL_REF = 0x0B97;
const PRUint32 STENCIL_WRITEMASK = 0x0B98;
const PRUint32 MATRIX_MODE = 0x0BA0;
// VIEWPORT -> VIEWPORT_VALUE, because viewport() conflicts
const PRUint32 VIEWPORT_VALUE = 0x0BA2;
const PRUint32 MODELVIEW_STACK_DEPTH = 0x0BA3;
const PRUint32 PROJECTION_STACK_DEPTH = 0x0BA4;
const PRUint32 TEXTURE_STACK_DEPTH = 0x0BA5;
const PRUint32 MODELVIEW_MATRIX = 0x0BA6;
const PRUint32 PROJECTION_MATRIX = 0x0BA7;
const PRUint32 TEXTURE_MATRIX = 0x0BA8;
const PRUint32 ALPHA_TEST_FUNC = 0x0BC1;
const PRUint32 ALPHA_TEST_REF = 0x0BC2;
const PRUint32 BLEND_DST = 0x0BE0;
const PRUint32 BLEND_SRC = 0x0BE1;
const PRUint32 LOGIC_OP_MODE = 0x0BF0;
const PRUint32 SCISSOR_BOX = 0x0C10;
/* SCISSOR_TEST */
const PRUint32 COLOR_CLEAR_VALUE = 0x0C22;
const PRUint32 COLOR_WRITEMASK = 0x0C23;
const PRUint32 UNPACK_ALIGNMENT = 0x0CF5;
const PRUint32 PACK_ALIGNMENT = 0x0D05;
const PRUint32 MAX_LIGHTS = 0x0D31;
const PRUint32 MAX_CLIP_PLANES = 0x0D32;
const PRUint32 MAX_TEXTURE_SIZE = 0x0D33;
const PRUint32 MAX_MODELVIEW_STACK_DEPTH = 0x0D36;
const PRUint32 MAX_PROJECTION_STACK_DEPTH = 0x0D38;
const PRUint32 MAX_TEXTURE_STACK_DEPTH = 0x0D39;
const PRUint32 MAX_VIEWPORT_DIMS = 0x0D3A;
const PRUint32 MAX_ELEMENTS_VERTICES = 0x80E8;
const PRUint32 MAX_ELEMENTS_INDICES = 0x80E9;
const PRUint32 MAX_TEXTURE_UNITS = 0x84E2;
const PRUint32 SUBPIXEL_BITS = 0x0D50;
const PRUint32 RED_BITS = 0x0D52;
const PRUint32 GREEN_BITS = 0x0D53;
const PRUint32 BLUE_BITS = 0x0D54;
const PRUint32 ALPHA_BITS = 0x0D55;
const PRUint32 DEPTH_BITS = 0x0D56;
const PRUint32 STENCIL_BITS = 0x0D57;
const PRUint32 POLYGON_OFFSET_UNITS = 0x2A00;
// POLYGON_OFFSET_FILL = 0x8037;
const PRUint32 POLYGON_OFFSET_FACTOR = 0x8038;
const PRUint32 TEXTURE_BINDING_2D = 0x8069;
const PRUint32 VERTEX_ARRAY_SIZE = 0x807A;
const PRUint32 VERTEX_ARRAY_TYPE = 0x807B;
const PRUint32 VERTEX_ARRAY_STRIDE = 0x807C;
const PRUint32 NORMAL_ARRAY_TYPE = 0x807E;
const PRUint32 NORMAL_ARRAY_STRIDE = 0x807F;
const PRUint32 COLOR_ARRAY_SIZE = 0x8081;
const PRUint32 COLOR_ARRAY_TYPE = 0x8082;
const PRUint32 COLOR_ARRAY_STRIDE = 0x8083;
const PRUint32 TEXTURE_COORD_ARRAY_SIZE = 0x8088;
const PRUint32 TEXTURE_COORD_ARRAY_TYPE = 0x8089;
const PRUint32 TEXTURE_COORD_ARRAY_STRIDE = 0x808A;
const PRUint32 VERTEX_ARRAY_POINTER = 0x808E;
const PRUint32 NORMAL_ARRAY_POINTER = 0x808F;
const PRUint32 COLOR_ARRAY_POINTER = 0x8090;
const PRUint32 TEXTURE_COORD_ARRAY_POINTER = 0x8092;
const PRUint32 SAMPLE_BUFFERS = 0x80A8;
const PRUint32 SAMPLES = 0x80A9;
const PRUint32 SAMPLE_COVERAGE_VALUE = 0x80AA;
const PRUint32 SAMPLE_COVERAGE_INVERT = 0x80AB;
/* GetTextureParameter */
/* TEXTURE_MAG_FILTER */
/* TEXTURE_MIN_FILTER */
/* TEXTURE_WRAP_S */
/* TEXTURE_WRAP_T */
/* HintMode */
const PRUint32 DONT_CARE = 0x1100;
const PRUint32 FASTEST = 0x1101;
const PRUint32 NICEST = 0x1102;
/* HintTarget */
const PRUint32 PERSPECTIVE_CORRECTION_HINT = 0x0C50;
const PRUint32 POINT_SMOOTH_HINT = 0x0C51;
const PRUint32 LINE_SMOOTH_HINT = 0x0C52;
const PRUint32 POLYGON_SMOOTH_HINT = 0x0C53;
const PRUint32 FOG_HINT = 0x0C54;
const PRUint32 GENERATE_MIPMAP_HINT = 0x8192;
/* LightModelParameter */
const PRUint32 LIGHT_MODEL_AMBIENT = 0x0B53;
const PRUint32 LIGHT_MODEL_TWO_SIDE = 0x0B52;
const PRUint32 LIGHT_MODEL_LOCAL_VIEWER = 0x0B51;
const PRUint32 LIGHT_MODEL_COLOR_CONTROL = 0x81F8;
/* LightParameter */
const PRUint32 AMBIENT = 0x1200;
const PRUint32 DIFFUSE = 0x1201;
const PRUint32 SPECULAR = 0x1202;
const PRUint32 POSITION = 0x1203;
const PRUint32 SPOT_DIRECTION = 0x1204;
const PRUint32 SPOT_EXPONENT = 0x1205;
const PRUint32 SPOT_CUTOFF = 0x1206;
const PRUint32 CONSTANT_ATTENUATION = 0x1207;
const PRUint32 LINEAR_ATTENUATION = 0x1208;
const PRUint32 QUADRATIC_ATTENUATION = 0x1209;
/* LogicOp */
/* CLEAR -> CLEAR_OP, because clear() is a method */
const PRUint32 CLEAR_OP = 0x1500;
const PRUint32 AND = 0x1501;
const PRUint32 AND_REVERSE = 0x1502;
const PRUint32 COPY = 0x1503;
const PRUint32 AND_INVERTED = 0x1504;
const PRUint32 NOOP = 0x1505;
const PRUint32 XOR = 0x1506;
const PRUint32 OR = 0x1507;
const PRUint32 NOR = 0x1508;
const PRUint32 EQUIV = 0x1509;
const PRUint32 INVERT = 0x150A;
const PRUint32 OR_REVERSE = 0x150B;
const PRUint32 COPY_INVERTED = 0x150C;
const PRUint32 OR_INVERTED = 0x150D;
const PRUint32 NAND = 0x150E;
const PRUint32 SET = 0x150F;
/* MaterialFace */
/* FRONT_AND_BACK */
/* MaterialParameter */
const PRUint32 EMISSION = 0x1600;
const PRUint32 SHININESS = 0x1601;
const PRUint32 AMBIENT_AND_DIFFUSE = 0x1602;
/* MatrixMode */
const PRUint32 MODELVIEW = 0x1700;
const PRUint32 PROJECTION = 0x1701;
const PRUint32 TEXTURE = 0x1702;
/* LightName */
const PRUint32 LIGHT0 = 0x4000;
const PRUint32 LIGHT1 = 0x4001;
const PRUint32 LIGHT2 = 0x4002;
const PRUint32 LIGHT3 = 0x4003;
const PRUint32 LIGHT4 = 0x4004;
const PRUint32 LIGHT5 = 0x4005;
const PRUint32 LIGHT6 = 0x4006;
const PRUint32 LIGHT7 = 0x4007;
/* Shaders */
const PRUint32 VERTEX_PROGRAM_POINT_SIZE = 0x8642;
//const PRUint32 VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
const PRUint32 FRAGMENT_SHADER = 0x8B30;
const PRUint32 VERTEX_SHADER = 0x8B31;
const PRUint32 MAX_VERTEX_ATTRIBS = 0x8869;
const PRUint32 MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A;
const PRUint32 MAX_VARYING_FLOATS = 0x8B4B;
const PRUint32 MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
const PRUint32 MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
const PRUint32 MAX_TEXTURE_IMAGE_UNITS = 0x8872;
const PRUint32 MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49;
const PRUint32 SHADER_TYPE = 0x8B4F;
const PRUint32 FLOAT_VEC2 = 0x8B50;
const PRUint32 FLOAT_VEC3 = 0x8B51;
const PRUint32 FLOAT_VEC4 = 0x8B52;
const PRUint32 INT_VEC2 = 0x8B53;
const PRUint32 INT_VEC3 = 0x8B54;
const PRUint32 INT_VEC4 = 0x8B55;
const PRUint32 BOOL = 0x8B56;
const PRUint32 BOOL_VEC2 = 0x8B57;
const PRUint32 BOOL_VEC3 = 0x8B58;
const PRUint32 BOOL_VEC4 = 0x8B59;
const PRUint32 FLOAT_MAT2 = 0x8B5A;
const PRUint32 FLOAT_MAT3 = 0x8B5B;
const PRUint32 FLOAT_MAT4 = 0x8B5C;
const PRUint32 SAMPLER_1D = 0x8B5D;
const PRUint32 SAMPLER_2D = 0x8B5E;
const PRUint32 SAMPLER_3D = 0x8B5F;
const PRUint32 SAMPLER_CUBE = 0x8B60;
const PRUint32 SAMPLER_1D_SHADOW = 0x8B61;
const PRUint32 SAMPLER_2D_SHADOW = 0x8B62;
const PRUint32 DELETE_STATUS = 0x8B80;
const PRUint32 LINK_STATUS = 0x8B82;
const PRUint32 VALIDATE_STATUS = 0x8B83;
const PRUint32 ATTACHED_SHADERS = 0x8B85;
const PRUint32 ACTIVE_UNIFORMS = 0x8B86;
const PRUint32 ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
const PRUint32 ACTIVE_ATTRIBUTES = 0x8B89;
const PRUint32 ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
const PRUint32 SHADING_LANGUAGE_VERSION = 0x8B8C;
const PRUint32 CURRENT_PROGRAM = 0x8B8D;
/* ShadingModel */
const PRUint32 FLAT = 0x1D00;
const PRUint32 SMOOTH = 0x1D01;
/* StencilFunction */
/* NEVER */
/* LESS */
/* EQUAL */
/* LEQUAL */
/* GREATER */
/* NOTEQUAL */
/* GEQUAL */
/* ALWAYS */
/* StencilOp */
/* ZERO */
const PRUint32 KEEP = 0x1E00;
const PRUint32 REPLACE = 0x1E01;
const PRUint32 INCR = 0x1E02;
const PRUint32 DECR = 0x1E03;
/* INVERT */
/* StringName */
const PRUint32 VENDOR = 0x1F00;
const PRUint32 RENDERER = 0x1F01;
const PRUint32 VERSION = 0x1F02;
const PRUint32 EXTENSIONS = 0x1F03;
/* TextureEnvMode */
const PRUint32 MODULATE = 0x2100;
const PRUint32 DECAL = 0x2101;
/* BLEND */
const PRUint32 ADD = 0x0104;
// REPLACE
/* COMBINE */
/* TextureEnvParameter */
const PRUint32 TEXTURE_ENV_MODE = 0x2200;
const PRUint32 TEXTURE_ENV_COLOR = 0x2201;
/* TextureEnvTarget */
const PRUint32 TEXTURE_ENV = 0x2300;
/* TextureMagFilter */
const PRUint32 NEAREST = 0x2600;
const PRUint32 LINEAR = 0x2601;
/* TextureMinFilter */
/* NEAREST */
/* LINEAR */
const PRUint32 NEAREST_MIPMAP_NEAREST = 0x2700;
const PRUint32 LINEAR_MIPMAP_NEAREST = 0x2701;
const PRUint32 NEAREST_MIPMAP_LINEAR = 0x2702;
const PRUint32 LINEAR_MIPMAP_LINEAR = 0x2703;
/* TextureParameterName */
const PRUint32 TEXTURE_MAG_FILTER = 0x2800;
const PRUint32 TEXTURE_MIN_FILTER = 0x2801;
const PRUint32 TEXTURE_WRAP_S = 0x2802;
const PRUint32 TEXTURE_WRAP_T = 0x2803;
const PRUint32 GENERATE_MIPMAP = 0x8191;
/* TextureUnit */
const PRUint32 TEXTURE0 = 0x84C0;
const PRUint32 TEXTURE1 = 0x84C1;
const PRUint32 TEXTURE2 = 0x84C2;
const PRUint32 TEXTURE3 = 0x84C3;
const PRUint32 TEXTURE4 = 0x84C4;
const PRUint32 TEXTURE5 = 0x84C5;
const PRUint32 TEXTURE6 = 0x84C6;
const PRUint32 TEXTURE7 = 0x84C7;
const PRUint32 TEXTURE8 = 0x84C8;
const PRUint32 TEXTURE9 = 0x84C9;
const PRUint32 TEXTURE10 = 0x84CA;
const PRUint32 TEXTURE11 = 0x84CB;
const PRUint32 TEXTURE12 = 0x84CC;
const PRUint32 TEXTURE13 = 0x84CD;
const PRUint32 TEXTURE14 = 0x84CE;
const PRUint32 TEXTURE15 = 0x84CF;
const PRUint32 TEXTURE16 = 0x84D0;
const PRUint32 TEXTURE17 = 0x84D1;
const PRUint32 TEXTURE18 = 0x84D2;
const PRUint32 TEXTURE19 = 0x84D3;
const PRUint32 TEXTURE20 = 0x84D4;
const PRUint32 TEXTURE21 = 0x84D5;
const PRUint32 TEXTURE22 = 0x84D6;
const PRUint32 TEXTURE23 = 0x84D7;
const PRUint32 TEXTURE24 = 0x84D8;
const PRUint32 TEXTURE25 = 0x84D9;
const PRUint32 TEXTURE26 = 0x84DA;
const PRUint32 TEXTURE27 = 0x84DB;
const PRUint32 TEXTURE28 = 0x84DC;
const PRUint32 TEXTURE29 = 0x84DD;
const PRUint32 TEXTURE30 = 0x84DE;
const PRUint32 TEXTURE31 = 0x84DF;
const PRUint32 ACTIVE_TEXTURE = 0x84E0;
const PRUint32 CLIENT_ACTIVE_TEXTURE = 0x84E1;
/* TextureWrapMode */
const PRUint32 REPEAT = 0x2901;
const PRUint32 CLAMP_TO_EDGE = 0x812F;
/* Texture combine + dot3 */
const PRUint32 SUBTRACT = 0x84E7;
const PRUint32 COMBINE = 0x8570;
const PRUint32 COMBINE_RGB = 0x8571;
const PRUint32 COMBINE_ALPHA = 0x8572;
const PRUint32 RGB_SCALE = 0x8573;
const PRUint32 ADD_SIGNED = 0x8574;
const PRUint32 INTERPOLATE = 0x8575;
const PRUint32 CONSTANT = 0x8576;
const PRUint32 PRIMARY_COLOR = 0x8577;
const PRUint32 PREVIOUS = 0x8578;
const PRUint32 OPERAND0_RGB = 0x8590;
const PRUint32 OPERAND1_RGB = 0x8591;
const PRUint32 OPERAND2_RGB = 0x8592;
const PRUint32 OPERAND0_ALPHA = 0x8598;
const PRUint32 OPERAND1_ALPHA = 0x8599;
const PRUint32 OPERAND2_ALPHA = 0x859A;
const PRUint32 ALPHA_SCALE = 0x0D1C;
const PRUint32 SRC0_RGB = 0x8580;
const PRUint32 SRC1_RGB = 0x8581;
const PRUint32 SRC2_RGB = 0x8582;
const PRUint32 SRC0_ALPHA = 0x8588;
const PRUint32 SRC1_ALPHA = 0x8589;
const PRUint32 SRC2_ALPHA = 0x858A;
const PRUint32 DOT3_RGB = 0x86AE;
const PRUint32 DOT3_RGBA = 0x86AF;
/* Vertex Arrays */
const PRUint32 VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
const PRUint32 VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
const PRUint32 VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
const PRUint32 VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
const PRUint32 VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
const PRUint32 VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
/* Buffers */
const PRUint32 STATIC_DRAW = 0x88E4;
const PRUint32 DYNAMIC_DRAW = 0x88E8;
const PRUint32 ARRAY_BUFFER = 0x8892;
const PRUint32 ELEMENT_ARRAY_BUFFER = 0x8893;
const PRUint32 ARRAY_BUFFER_BINDING = 0x8894;
const PRUint32 ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
/* Extensions */
const PRUint32 TEXTURE_RECTANGLE = 0x84F5;
const PRUint32 TEXTURE_BINDING_RECTANGLE = 0x84F6;
const PRUint32 MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8;
const PRUint32 TEXTURE_MAX_ANISOTROPY = 0x84FE;
const PRUint32 MAX_TEXTURE_MAX_ANISOTROPY = 0x84FF;
// Other
void swapBuffers ();
};

Просмотреть файл

@ -1,91 +0,0 @@
/* -*- Mode: IDL; 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 canvas 3D.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com>
*
* 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 ***** */
#include "nsISupports.idl"
interface nsICanvasRenderingContextGL;
[scriptable, uuid(14eb51cd-febe-41fa-b833-4c599719121e)]
interface nsICanvasRenderingContextGLBuffer : nsISupports
{
readonly attribute nsICanvasRenderingContextGL ownerContext;
readonly attribute PRBool disposed;
// immediately free the memory held by this buffer,
// even before this object is destroyed (e.g. by the JS GC)
void dispose();
readonly attribute PRUint32 usage; // either STATIC_DRAW or DYNAMIC_DRAW
readonly attribute PRUint32 length; // number of elements
readonly attribute PRUint32 type; // type of each element
};
[scriptable, uuid(27a45ca4-0847-4f2e-8e32-6d4966ff3e56)]
interface nsICanvasRenderingContextGLTexture : nsISupports
{
readonly attribute nsICanvasRenderingContextGL ownerContext;
readonly attribute PRBool disposed;
const PRUint32 TARGET_2D = 0;
const PRUint32 TARGET_RECT = 1;
readonly attribute PRUint32 target;
// in pixels; the texture coordinates
// are 0..w/h for TARGET_RECT, or 0.0 .. 1.0
// for TARGET_2D
readonly attribute PRUint32 width;
readonly attribute PRUint32 height;
const PRUint32 FILTER_TYPE_MAG = 0;
const PRUint32 FILTER_TYPE_MIN = 1;
const PRUint32 FILTER_NEAREST = 0;
const PRUint32 FILTER_LINER = 1;
void setFilter (in PRUint32 filterType, in PRUint32 filterMode);
const PRUint32 WRAP_TYPE_S = 0;
const PRUint32 WRAP_TYPE_T = 0;
const PRUint32 WRAP_CLAMP_TO_EDGE = 1;
const PRUint32 WRAP_REPEAT = 3;
const PRUint32 WRAP_MIRRORED_REPEAT = 4;
void setWrap (in PRUint32 wrapType, in PRUint32 wrapMode);
};

Просмотреть файл

@ -1,217 +0,0 @@
/* -*- Mode: IDL; 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 canvas 3D.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com>
*
* 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 ***** */
#include "nsICanvasRenderingContextGL.idl"
#include "nsICanvasRenderingContextGLBuffer.idl"
interface nsIDOMHTMLElement;
interface nsIDOMHTMLCanvasElement;
[scriptable, uuid(619a102d-6c58-4660-ba35-60d9b8de92ab)]
interface nsICanvasRenderingContextGLES11 : nsICanvasRenderingContextGL
{
/**
** GL ES 1.1 API
**
** Section numbers refer to the GL ES Common/Common-Lite Profile Specification 1.0 document
**/
void enable (in PRUint32 mode);
void disable (in PRUint32 mode);
void clientActiveTexture (in PRUint32 texture);
void enableClientState (in PRUint32 mode);
void disableClientState (in PRUint32 mode);
// 2.5 GL Errors
PRUint32 getError ();
// 2.7 Vertex Specification
void normal (in float nx, in float ny, in float nz);
void multiTexCoord (in PRUint32 target, in float s, in float t, in float r, in float q);
void color (in float r, in float g, in float b, in float a);
// 2.8 Vertex Arrays
// Note: these are handled via scriptable helpers to avoid unnencessary type conversions
//X void vertexPointer (in PRUint8 size, in PRUint32 type, in object [] vertexArray);
void vertexPointer ();
//X void normalPointer (in PRUint32 type, in object [] normalArray);
void normalPointer ();
//X void texCoordPointer (in PRUint8 size, in PRUint32 type, in object [] texCoordArray);
void texCoordPointer ();
//X void colorPointer (in PRUint8 size, in PRUint32 type, in object [] colorArray);
void colorPointer ();
//X void drawElements (in PRUint32 mode, in PRUint32 count, in PRUint32 type, in object [] indices);
void drawElements ();
void drawArrays (in PRUint32 mode, in PRUint32 first, in PRUint32 count);
// 2.9 Buffer Objects
void genBuffers (in PRUint32 n);
/* [array of buffers] */
void deleteBuffers ();
void bindBuffer (in PRUint32 target, in PRUint32 buffer);
/* array, type, usage */
void bufferData ();
/* offset, array, type */
void bufferSubData ();
// JS buffer objects; will use buffer objects extension if available,
// otherwise will just store in client memeory
//void bindBufferObject (in PRUint32 target, in nsICanvasRenderingContextGLES11Buffer obj);
//X nsICanvasRenderingContextGLES11Buffer
//X createBuffer(in PRInt32 usage, in PRInt32 componentSize, in PRInt32 type, in [] array);
nsICanvasRenderingContextGLBuffer createBuffer();
// 2.11 Coordinate Transformations
void depthRange (in float zNear, in float zFar);
void viewport (in PRInt32 x, in PRInt32 y, in PRInt32 width, in PRInt32 height);
void matrixMode (in PRUint32 mode);
//X void loadMatrix (in float [] matrix);
void loadMatrix ();
//X void multMatrix (in float [] matrix);
void multMatrix ();
void loadIdentity ();
void rotate (in float angle, in float x, in float y, in float z);
void scale (in float x, in float y, in float z);
void translate (in float x, in float y, in float z);
void frustum (in float left, in float right, in float bottom, in float top, in float zNear, in float zFar);
void ortho (in float left, in float right, in float bottom, in float top, in float zNear, in float zFar);
void pushMatrix ();
void popMatrix ();
// 2.12 Clipping
//void clipPlane (in PRUint32 plane, in float [] equation);
//void getClipPlane (in PRUint32 pname, out float [] equation);
// 2.14 Colors and Coloring
void frontFace (in PRUint32 face);
void material ();
void getMaterial ();
void light ();
void getLight ();
void lightModel ();
void shadeModel (in PRUint32 pname);
// 3.3 Points
void pointSize (in float size);
void pointParameter ();
void lineWidth (in float width);
// 3.5 Polygons
void cullFace (in PRUint32 mode);
void polygonOffset (in float factor, in float units);
// 3.6 Pixel Rectangles
// glReadPixels is not supported (XXX well, it might be)
// and TexImage2D behaves differently, so no need for PixelStore[i]
// 3.8.5 Texture State
void activeTexture (in PRUint32 texture);
nsICanvasRenderingContextGLTexture createTextureObject (in nsIDOMHTMLElement imageOrCanvas);
void bindTextureObject (in nsICanvasRenderingContextGLTexture texture);
void deleteTextureObject (in nsICanvasRenderingContextGLTexture texture);
// This needs some work; we need to allow specifying the internal format, so that
// we can load A/L/LA images as well as RGB/RGBA, which is all we'd get from a DOM Image
void texImage2DHTML (in PRUint32 target, in nsIDOMHTMLElement imageOrCanvas);
//void texSubImage2DHTML (...);
void texParameter();
void getTexParameter();
void bindTexture (in PRUint32 target, in PRUint32 texid);
void deleteTextures ();
void genTextures (in PRUint32 n);
//boolean isTexture (in PRUint32 texture);
void texEnv();
void getTexEnv();
// 3.9 Fog
//X (this is called glFog{fi}[v], but we can't call it "fog" because
// we have FOG as a glEnable const already)
void fogParameter ();
// 4.1 Per-Fragment Operations
void scissor (in PRInt32 x, in PRInt32 y, in PRInt32 width, in PRInt32 height);
void sampleCoverage (in float value, in boolean invert);
void alphaFunc (in PRUint32 func, in float ref);
void stencilFunc (in PRUint32 func, in PRInt32 ref, in PRUint32 mask);
void stencilMask (in PRUint32 mask);
void stencilOp (in PRUint32 fail, in PRUint32 zfail, in PRUint32 zpass);
void depthFunc (in PRUint32 func);
void depthMask (in boolean flag);
void blendFunc (in PRUint32 sfactor, in PRUint32 dfactor);
void logicOp (in PRUint32 opcode);
// 4.2 Whole Framebuffer Operations
void colorMask (in boolean red, in boolean green, in boolean blue, in boolean alpha);
void clear (in PRUint32 mask);
void clearColor (in float red, in float green, in float blue, in float alpha);
void clearDepth (in float depth);
void clearStencil (in PRInt32 s);
// 4.3 Drawing, Reading, and Copying Pixels
// we should support ReadPixels at some point
// 5.5 Flush and Finish
// I'm not sure if this is useful for our purposes; we can't block the UI, soo...
// 5.6 Hints
void hint (in PRUint32 target, in PRUint32 mode);
// 6.1 Querying GL State
// getBooleanv, getIntegerv, getFloatv, getDoublev, getString
// are all rolled into a single function that uses scriptable
// magic to return the right type of jsobj. Colors are always
// returned as normalized floats (0.0 .. 1.0).
void getParameter (in PRUint32 pname);
// More other
void gluPerspective (in float fovy, in float aspect, in float znear, in float zfar);
void gluLookAt (in float eyex, in float eyey, in float eyez,
in float ctrx, in float ctry, in float ctrz,
in float upx, in float upy, in float upz);
};

Просмотреть файл

@ -1,185 +0,0 @@
/* -*- Mode: IDL; 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 canvas 3D.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com>
*
* 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 ***** */
#include "nsICanvasRenderingContextGL.idl"
#include "nsICanvasRenderingContextGLBuffer.idl"
interface nsIDOMHTMLElement;
[scriptable, uuid(209a9c93-495e-4085-a3e4-29354b404cc4)]
interface nsICanvasRenderingContextGLWeb20 : nsICanvasRenderingContextGL
{
void activeTexture (in PRUint32 texture);
void attachShader (in PRUint32 program, in PRUint32 shader);
void bindAttribLocation (in PRUint32 program, in PRUint32 index, in string name);
void bindBuffer (in PRUint32 target, in PRUint32 buffer);
void bindTexture (in PRUint32 target, in PRUint32 texid);
void blendColor (in float red, in float green, in float blue, in float alpha);
void blendEquation (in PRUint32 mode);
void blendEquationSeparate (in PRUint32 modeRGB, in PRUint32 modeAlpha);
void blendFunc (in PRUint32 sfactor, in PRUint32 dfactor);
void blendFuncSeparate (in PRUint32 srcRGB, in PRUint32 dstRGB, in PRUint32 srcAlpha, in PRUint32 dstAlpha);
/* array, type, usage */
void bufferData ();
/* offset, array, type */
void bufferSubData ();
void clear (in PRUint32 mask);
void clearColor (in float red, in float green, in float blue, in float alpha);
void clearDepth (in float depth);
void clearStencil (in PRInt32 s);
void colorMask (in boolean red, in boolean green, in boolean blue, in boolean alpha);
// NO compressedTexImage2D
// NO compressedTexSubImage2D
// YES copyTexImage2D
PRUint32 createProgram ();
PRUint32 createShader (in PRUint32 type);
void cullFace (in PRUint32 face);
/* [array of buffers] */
void deleteBuffers ();
void deleteTextures ();
void deleteProgram (in PRUint32 program);
void deleteShader (in PRUint32 shader);
void detachShader (in PRUint32 program, in PRUint32 shader);
void depthFunc (in PRUint32 func);
void depthMask (in boolean flag);
void depthRange (in float zNear, in float zFar);
void disable (in PRUint32 mode);
void disableVertexAttribArray (in PRUint32 index);
void drawArrays (in PRUint32 mode, in PRUint32 first, in PRUint32 count);
void drawElements ();
void enable (in PRUint32 mode);
void enableVertexAttribArray (in PRUint32 index);
// NO Finish
// NO Flush
void frontFace (in PRUint32 face);
// getActiveAttrib returns an object: { name: "..", size: .., type: .. }
void getActiveAttrib (in PRUint32 program, in PRUint32 index);
// getActiveUniform returns an object: { name: "..", size: .., type: .. }
void getActiveUniform (in PRUint32 program, in PRUint32 index);
// returns an array of shader IDs
void getAttachedShaders (in PRUint32 program);
PRInt32 getAttribLocation (in PRUint32 program, in string name);
// getBooleanv, getIntegerv, getFloatv, getDoublev, getString
// are all rolled into a single function that uses scriptable
// magic to return the right type of jsobj. Colors are always
// returned as normalized floats (0.0 .. 1.0).
void getParameter (in PRUint32 pname);
void getBufferParameter (in PRUint32 target, in PRUint32 pname);
void genBuffers (in PRUint32 n);
void genTextures (in PRUint32 n);
PRUint32 getError ();
void getProgramParameter (in PRUint32 program, in PRUint32 pname);
string getProgramInfoLog (in PRUint32 program);
void getTexParameter(in PRUint32 target, in PRUint32 pname);
void getUniform (in PRUint32 program, in PRUint32 location);
PRInt32 getUniformLocation (in PRUint32 program, in string name);
void getVertexAttrib (in PRUint32 index, in PRUint32 pname);
// NO void getVertexAttribPointerv
void hint (in PRUint32 target, in PRUint32 mode);
boolean isBuffer (in PRUint32 buffer);
boolean isEnabled (in PRUint32 cap);
boolean isProgram (in PRUint32 program);
boolean isShader (in PRUint32 shader);
boolean isTexture (in PRUint32 texture);
void lineWidth (in float width);
void linkProgram (in PRUint32 program);
// nO pixelStore
void polygonOffset (in float factor, in float units);
// NO readPixels
void sampleCoverage (in float value, in boolean invert);
void scissor (in PRInt32 x, in PRInt32 y, in PRInt32 width, in PRInt32 height);
void stencilFunc (in PRUint32 func, in PRInt32 ref, in PRUint32 mask);
void stencilFuncSeparate (in PRUint32 face, in PRUint32 func, in PRInt32 ref, in PRUint32 mask);
void stencilMask (in PRUint32 mask);
void stencilMaskSeparate (in PRUint32 face, in PRUint32 mask);
void stencilOp (in PRUint32 fail, in PRUint32 zfail, in PRUint32 zpass);
void stencilOpSeparate (in PRUint32 face, in PRUint32 fail, in PRUint32 zfail, in PRUint32 zpass);
void texImage2DHTML (in PRUint32 target, in nsIDOMHTMLElement imageOrCanvas);
void texParameter();
// YES void texSubImage2DHTML (...);
// need better names for this
void uniformi();
void uniformf();
void uniformMatrix();
void useProgram (in PRUint32 program);
void validateProgram (in PRUint32 program);
void vertexAttrib ();
void vertexAttribPointer ();
void viewport (in PRInt32 x, in PRInt32 y, in PRInt32 width, in PRInt32 height);
void compileShader (in PRUint32 shader);
void getShaderParameter (in PRUint32 shader, in PRUint32 pname);
string getShaderInfoLog (in PRUint32 shader);
string getShaderSource (in PRUint32 shader);
void shaderSource(in PRUint32 shader, in string source);
};

Просмотреть файл

@ -1,14 +0,0 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<prefwindow id="canvas3d-options" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<prefpane>
<preferences>
<preference id="webcontent" name="extensions.canvas3d.enabledForWebContent" type="bool"/>
</preferences>
<checkbox label="Enable 3D canvas in web content" preference="webcontent"/>
</prefpane>
</prefwindow>

Просмотреть файл

@ -1,142 +0,0 @@
#
# ***** 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 canvas code.
#
# The Initial Developer of the Original Code is
# Mozilla
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Vladimir Vukicevic <vladimir@pobox.com>
#
# 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 *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = canvas3d
LIBRARY_NAME = canvas3d
XPI_NAME = canvas3d
EXPORT_LIBRARY = 0
IS_COMPONENT = 1
MODULE_NAME = nsCanvas3DModule
GRE_MODULE = 1
BUILD_STATIC_LIBS =
USE_STATIC_LIBS = 1
REQUIRES = \
xpcom \
string \
unicharutil \
xpconnect \
thebes \
cairo \
content \
dom \
caps \
js \
imglib2 \
necko \
gfx \
layout \
widget \
locale \
pref \
view \
$(NULL)
ifdef MOZ_X11
EXTRA_DSO_LIBS += GL GLU X11
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
# nothing
endif
ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa))
# nothing
endif
CSRCS = glew.c \
$(NULL)
CPPSRCS = nsCanvas3DModule.cpp \
nsCanvasRenderingContextGL.cpp \
nsCanvasRenderingContextGLES11.cpp \
nsCanvasRenderingContextGLWeb20.cpp \
nsGLPbuffer.cpp \
$(NULL)
DEFINES += -DXPCOM_GLUE -DXPCOM_GLUE_USE_NSPR -DGLEW_MX -DGLEW_STATIC
EXTRA_DSO_LIBS += xpcom
ifdef MOZ_ENABLE_LIBXUL
ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
EXTRA_DSO_LIBS += xul
endif
else
EXTRA_DSO_LIBS += thebes
endif
# Hack for getting an extension built against static vs. dynamic versions of firefox
##ifeq (,$(BUILD_STATIC_LIBS))
#EXTRA_DSO_LIBS += gkgfx
#endif
include $(topsrcdir)/config/rules.mk
LOCAL_INCLUDES += -I$(srcdir)
CFLAGS += $(RTL_FLAGS)
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(TK_CFLAGS)
EXTRA_DSO_LIBS += $(NSPR_LIBS)
ifdef MOZ_X11
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
EXTRA_DSO_LDOPTS += opengl32.lib glu32.lib usp10.lib
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
EXTRA_DSO_LDOPTS += -framework AGL -framework OpenGL
ifdef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LDOPTS += $(DIST)/bin/XUL
endif
endif
EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) $(MOZ_JS_LIBS) $(XPCOM_GLUE_LDOPTS)

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,107 +0,0 @@
/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// vim:expandtab:ts=4 sw=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 Mozilla.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com> (original author)
*
* 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 ***** */
#include "nsServiceManagerUtils.h"
#include "nsIComponentManager.h"
#include "nsIGenericFactory.h"
#ifndef MOZILLA_1_8_BRANCH
#include "nsIClassInfoImpl.h"
#endif
#include "nsICanvasRenderingContextGLES11.h"
#include "nsICanvasRenderingContextGLWeb20.h"
// {21788585-e91c-448c-8bb9-6c51aba9735f}
#define NS_CANVASRENDERINGCONTEXTGLES11_CID \
{ 0x21788585, 0xe91c, 0x448c, { 0x8b, 0xb9, 0x6c, 0x51, 0xab, 0xa9, 0x73, 0x5f } }
// {8CB888F5-D754-4e5b-8C72-A5CC798CBB8F}
#define NS_CANVASRENDERINGCONTEXTGLWEB20_CID \
{ 0x8cb888f5, 0xd754, 0x4e5b, { 0x8c, 0x72, 0xa5, 0xcc, 0x79, 0x8c, 0xbb, 0x8f } }
nsresult NS_NewCanvasRenderingContextGLES11(nsICanvasRenderingContextGLES11** aResult);
nsresult NS_NewCanvasRenderingContextGLWeb20(nsICanvasRenderingContextGLWeb20** aResult);
#define MAKE_CTOR(ctor_, iface_, func_) \
static NS_IMETHODIMP \
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
{ \
*aResult = nsnull; \
if (aOuter) \
return NS_ERROR_NO_AGGREGATION; \
iface_* inst; \
nsresult rv = func_(&inst); \
if (NS_SUCCEEDED(rv)) { \
rv = inst->QueryInterface(aIID, aResult); \
NS_RELEASE(inst); \
} \
return rv; \
}
NS_DECL_CLASSINFO(nsCanvasRenderingContextGLES11)
MAKE_CTOR(CreateCanvasRenderingContextGLES11, nsICanvasRenderingContextGLES11, NS_NewCanvasRenderingContextGLES11)
NS_DECL_CLASSINFO(nsCanvasRenderingContextGLWeb20)
MAKE_CTOR(CreateCanvasRenderingContextGLWeb20, nsICanvasRenderingContextGLWeb20, NS_NewCanvasRenderingContextGLWeb20)
static const nsModuleComponentInfo components[] = {
{ "GLES 1.1 Canvas Context",
NS_CANVASRENDERINGCONTEXTGLES11_CID,
"@mozilla.org/content/canvas-rendering-context;1?id=moz-gles11",
CreateCanvasRenderingContextGLES11,
nsnull, nsnull, nsnull,
NS_CI_INTERFACE_GETTER_NAME(nsCanvasRenderingContextGLES11),
nsnull, &NS_CLASSINFO_NAME(nsCanvasRenderingContextGLES11),
nsIClassInfo::DOM_OBJECT
},
{ "GLES 2.0 Canvas Context",
NS_CANVASRENDERINGCONTEXTGLWEB20_CID,
"@mozilla.org/content/canvas-rendering-context;1?id=moz-glweb20",
CreateCanvasRenderingContextGLWeb20,
nsnull, nsnull, nsnull,
NS_CI_INTERFACE_GETTER_NAME(nsCanvasRenderingContextGLWeb20),
nsnull, &NS_CLASSINFO_NAME(nsCanvasRenderingContextGLWeb20),
nsIClassInfo::DOM_OBJECT
},
};
NS_IMPL_NSGETMODULE(nsCanvas3DModule, components)

Просмотреть файл

@ -1,865 +0,0 @@
/* -*- Mode: C++; tab-width: 20; 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com> (original author)
*
* 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 ***** */
#include "prmem.h"
#include "prlog.h"
#include "nsCanvasRenderingContextGL.h"
#include "nsICanvasRenderingContextGL.h"
#include "nsIRenderingContext.h"
#include "nsICanvasRenderingContextInternal.h"
#include "nsIDOMHTMLCanvasElement.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIDocument.h"
#include "nsTransform2D.h"
#include "nsIScriptSecurityManager.h"
#include "nsISecurityCheckedComponent.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "gfxIImageFrame.h"
#include "nsIDOMHTMLCanvasElement.h"
#include "nsICanvasElement.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsIImageLoadingContent.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIImage.h"
#include "nsDOMError.h"
#include "nsIJSRuntimeService.h"
#include "nsIPrefService.h"
#include "nsIClassInfoImpl.h"
#include "nsServiceManagerUtils.h"
#include "nsDOMError.h"
#include "nsIXPConnect.h"
#include "jsapi.h"
// GLEW will pull in the GL bits that we want/need
#include "glew.h"
// we're hoping that something is setting us up the remap
#include "gfxContext.h"
#include "gfxASurface.h"
#ifdef MOZ_X11
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include "cairo-xlib.h"
#endif
nsIXPConnect *gXPConnect = nsnull;
JSRuntime *gScriptRuntime = nsnull;
nsIJSRuntimeService *gJSRuntimeService = nsnull;
// CanvasGLBuffer
NS_DECL_CLASSINFO(CanvasGLBuffer)
NS_IMPL_ADDREF(CanvasGLBuffer)
NS_IMPL_RELEASE(CanvasGLBuffer)
NS_IMPL_CI_INTERFACE_GETTER1(CanvasGLBuffer, nsICanvasRenderingContextGLBuffer)
NS_INTERFACE_MAP_BEGIN(CanvasGLBuffer)
NS_INTERFACE_MAP_ENTRY(nsICanvasRenderingContextGLBuffer)
NS_INTERFACE_MAP_ENTRY(nsISecurityCheckedComponent)
NS_INTERFACE_MAP_ENTRY(nsICanvasGLBuffer)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICanvasRenderingContextGLBuffer)
NS_IMPL_QUERY_CLASSINFO(CanvasGLBuffer)
NS_INTERFACE_MAP_END
// CanvasGLTexture
NS_DECL_CLASSINFO(CanvasGLTexture)
NS_IMPL_ADDREF(CanvasGLTexture)
NS_IMPL_RELEASE(CanvasGLTexture)
NS_IMPL_CI_INTERFACE_GETTER1(CanvasGLTexture, nsICanvasRenderingContextGLTexture)
NS_INTERFACE_MAP_BEGIN(CanvasGLTexture)
NS_INTERFACE_MAP_ENTRY(nsICanvasRenderingContextGLTexture)
NS_INTERFACE_MAP_ENTRY(nsICanvasGLTexture)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsICanvasRenderingContextGLTexture)
NS_IMPL_QUERY_CLASSINFO(CanvasGLTexture)
NS_INTERFACE_MAP_END
/**
** CanvasGLBuffer
**/
static int bufferCount = 0;
CanvasGLBuffer::CanvasGLBuffer(nsCanvasRenderingContextGLPrivate *owner)
: mDisposed(PR_TRUE),
mLength(0), mSize(0), mType(0), mUsage(GL_STATIC_DRAW),
mBufferID(0)
{
owner->GetWeakReference(getter_AddRefs(mOwnerContext));
bufferCount++;
//fprintf (stderr, "VVVV Created; Buffers now: %d\n", bufferCount); fflush(stderr);
}
CanvasGLBuffer::~CanvasGLBuffer()
{
Dispose();
--bufferCount;
//fprintf (stderr, "VVVV Released; Buffers now: %d\n", bufferCount); fflush(stderr);
}
/* nsISecurityCheckedComponent bits */
static char* cloneAllAccess()
{
static const char allAccess[] = "allAccess";
return (char*)nsMemory::Clone(allAccess, sizeof(allAccess));
}
NS_IMETHODIMP
CanvasGLBuffer::CanCreateWrapper(const nsIID* iid, char **_retval) {
*_retval = cloneAllAccess();
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::CanCallMethod(const nsIID *iid, const PRUnichar *methodName, char **_retval) {
*_retval = cloneAllAccess();
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::CanGetProperty(const nsIID *iid, const PRUnichar *propertyName, char **_retval) {
*_retval = cloneAllAccess();
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::CanSetProperty(const nsIID *iid, const PRUnichar *propertyName, char **_retval) {
*_retval = cloneAllAccess();
return NS_OK;
}
nsresult
CanvasGLBuffer::Init(PRUint32 usage,
PRUint32 size,
PRUint32 type,
JSContext *ctx,
JSObject *arrayObj,
jsuint arrayLen)
{
nsresult rv;
//fprintf (stderr, "VVVV CanvasGLBuffer::Init\n");
if (!mDisposed)
Dispose();
if (usage != GL_STATIC_DRAW &&
usage != GL_DYNAMIC_DRAW)
return NS_ERROR_INVALID_ARG;
rv = JSArrayToSimpleBuffer(mSimpleBuffer, type, size, ctx, arrayObj, arrayLen);
if (NS_FAILED(rv))
return rv;
mUsage = usage;
mSize = size;
mType = type;
mLength = arrayLen;
mBufferID = 0;
mDisposed = PR_FALSE;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::Dispose()
{
if (mDisposed)
return NS_OK;
if (mBufferID) {
nsCOMPtr<nsICanvasRenderingContextInternal> ctx = do_QueryReferent(mOwnerContext);
if (ctx) {
nsCanvasRenderingContextGLPrivate *priv = (nsCanvasRenderingContextGLPrivate*) ctx.get();
mGlewContextPtr = priv->glewGetContext();
priv->MakeContextCurrent();
glDeleteBuffers(1, &mBufferID);
mBufferID = 0;
}
}
mSimpleBuffer.Release();
mDisposed = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::GetOwnerContext(nsICanvasRenderingContextGL **retval)
{
nsCOMPtr<nsICanvasRenderingContextInternal> ctx = do_QueryReferent(mOwnerContext);
if (ctx) {
nsCanvasRenderingContextGLPrivate *priv = (nsCanvasRenderingContextGLPrivate*) ctx.get();
*retval = priv->GetSelf();
} else {
*retval = nsnull;
}
NS_IF_ADDREF(*retval);
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::GetDisposed(PRBool *retval)
{
*retval = mDisposed;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::GetUsage(PRUint32 *usage)
{
if (mDisposed)
return NS_ERROR_FAILURE;
*usage = mUsage;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::GetLength(PRUint32 *retval)
{
if (mDisposed)
return NS_ERROR_FAILURE;
*retval = mLength;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLBuffer::GetType(PRUint32 *retval)
{
if (mDisposed)
return NS_ERROR_FAILURE;
*retval = mType;
return NS_OK;
}
/**
** CanvasGLTexture
**/
CanvasGLTexture::CanvasGLTexture(nsCanvasRenderingContextGLPrivate *owner)
: mDisposed(PR_FALSE),
//mGlitzTextureSurface(nsnull), mGlitzTextureObject(nsnull),
mWidth(0), mHeight(0)
{
owner->GetWeakReference(getter_AddRefs(mOwnerContext));
}
CanvasGLTexture::~CanvasGLTexture()
{
Dispose();
}
nsresult
CanvasGLTexture::Init()
{
return NS_OK;
}
nsresult
CanvasGLTexture::Dispose()
{
if (mDisposed)
return NS_OK;
mDisposed = PR_TRUE;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::GetDisposed(PRBool *retval)
{
*retval = mDisposed;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::GetOwnerContext(nsICanvasRenderingContextGL **retval)
{
nsCOMPtr<nsICanvasRenderingContextInternal> ctx = do_QueryReferent(mOwnerContext);
if (ctx) {
nsCanvasRenderingContextGLPrivate *priv = (nsCanvasRenderingContextGLPrivate*) ctx.get();
*retval = priv->GetSelf();
} else {
*retval = nsnull;
}
NS_IF_ADDREF(*retval);
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::GetTarget(PRUint32 *aResult)
{
//*aResult = glitz_texture_object_get_target (mGlitzTextureObject);
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::GetWidth(PRUint32 *aWidth)
{
*aWidth = mWidth;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::GetHeight(PRUint32 *aHeight)
{
*aHeight = mHeight;
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::SetFilter(PRUint32 filterType, PRUint32 filterMode)
{
if (filterType < 0 || filterType > 1 ||
filterMode < 0 || filterMode > 1)
{
return NS_ERROR_DOM_SYNTAX_ERR;
}
//glitz_texture_object_set_filter (mGlitzTextureObject, (glitz_texture_filter_type_t)filterType, (glitz_texture_filter_t)filterMode);
return NS_OK;
}
NS_IMETHODIMP
CanvasGLTexture::SetWrap(PRUint32 wrapType, PRUint32 wrapMode)
{
if (wrapType != GL_TEXTURE_WRAP_S &&
wrapType != GL_TEXTURE_WRAP_T)
return NS_ERROR_DOM_SYNTAX_ERR;
if (wrapMode != GL_CLAMP_TO_EDGE &&
wrapMode != GL_REPEAT &&
wrapMode != GL_MIRRORED_REPEAT)
return NS_ERROR_DOM_SYNTAX_ERR;
//glitz_texture_object_set_wrap (mGlitzTextureObject, (glitz_texture_wrap_type_t)wrapType, (glitz_texture_wrap_t)wrapMode);
return NS_OK;
}
nsresult
JSArrayToSimpleBuffer (SimpleBuffer& sbuffer,
PRUint32 typeParam,
PRUint32 sizeParam,
JSContext *ctx,
JSObject *arrayObj,
jsuint arrayLen)
{
sbuffer.Prepare(typeParam, sizeParam, arrayLen);
if (typeParam == GL_SHORT) {
short *ptr = (short*) sbuffer.data;
for (PRUint32 i = 0; i < arrayLen; i++) {
jsval jv;
int32 iv;
::JS_GetElement(ctx, arrayObj, i, &jv);
::JS_ValueToECMAInt32(ctx, jv, &iv);
*ptr++ = (short) iv;
}
} else if (typeParam == GL_FLOAT) {
float *ptr = (float*) sbuffer.data;
for (PRUint32 i = 0; i < arrayLen; i++) {
jsval jv;
jsdouble dv;
::JS_GetElement(ctx, arrayObj, i, &jv);
::JS_ValueToNumber(ctx, jv, &dv);
*ptr++ = (float) dv;
}
} else if (typeParam == GL_UNSIGNED_BYTE) {
unsigned char *ptr = (unsigned char*) sbuffer.data;
for (PRUint32 i = 0; i < arrayLen; i++) {
jsval jv;
uint32 iv;
::JS_GetElement(ctx, arrayObj, i, &jv);
::JS_ValueToECMAUint32(ctx, jv, &iv);
*ptr++ = (unsigned char) iv;
}
} else if (typeParam == GL_UNSIGNED_SHORT) {
PRUint16 *ptr = (PRUint16*) sbuffer.data;
for (PRUint32 i = 0; i < arrayLen; i++) {
jsval jv;
uint32 iv;
::JS_GetElement(ctx, arrayObj, i, &jv);
::JS_ValueToECMAUint32(ctx, jv, &iv);
*ptr++ = (unsigned short) iv;
}
} else if (typeParam == GL_UNSIGNED_INT) {
PRUint32 *ptr = (PRUint32*) sbuffer.data;
for (PRUint32 i = 0; i < arrayLen; i++) {
jsval jv;
uint32 iv;
::JS_GetElement(ctx, arrayObj, i, &jv);
::JS_ValueToECMAUint32(ctx, jv, &iv);
*ptr++ = iv;
}
} else {
return NS_ERROR_NOT_IMPLEMENTED;
}
return NS_OK;
}
void
nsCanvasRenderingContextGLPrivate::MakeContextCurrent()
{
mGLPbuffer->MakeContextCurrent();
}
void
nsCanvasRenderingContextGLPrivate::LostCurrentContext(void *closure)
{
//nsCanvasRenderingContextGLPrivate* self = (nsCanvasRenderingContextGLPrivate*) closure;
}
//
// nsICanvasRenderingContextInternal
//
NS_IMETHODIMP
nsCanvasRenderingContextGLPrivate::SetCanvasElement(nsICanvasElement* aParentCanvas)
{
nsresult rv;
if (aParentCanvas == nsnull) {
// we get this on shutdown; we should do some more cleanup here,
// but instead we just let our destructor do it.
return NS_OK;
}
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: hello?"));
if (!SafeToCreateCanvas3DContext())
return NS_ERROR_FAILURE;
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: is anyone there?"));
mGLPbuffer = new nsGLPbuffer();
if (!mGLPbuffer->Init(this))
return NS_ERROR_FAILURE;
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: it's dark in here."));
// Let's find our prefs
nsCOMPtr<nsIPrefService> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
mPrefWireframe = PR_FALSE;
nsCOMPtr<nsIPrefBranch> prefBranch;
rv = prefService->GetBranch("extensions.canvas3d.", getter_AddRefs(prefBranch));
if (NS_SUCCEEDED(rv)) {
PRBool val;
rv = prefBranch->GetBoolPref("wireframe", &val);
if (NS_SUCCEEDED(rv))
mPrefWireframe = val;
}
fprintf (stderr, "Wireframe: %d\n", mPrefWireframe);
if (!ValidateGL()) {
// XXX over here we need to destroy mGLPbuffer and create a mesa buffer
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: Couldn't validate OpenGL implementation; is everything needed present?"));
return NS_ERROR_FAILURE;
}
mCanvasElement = aParentCanvas;
fprintf (stderr, "VVVV SetCanvasElement: %p\n", mCanvasElement);
return NS_OK;
}
NS_IMETHODIMP
nsCanvasRenderingContextGLPrivate::SetDimensions(PRInt32 width, PRInt32 height)
{
fprintf (stderr, "VVVV CanvasGLBuffer::SetDimensions %d %d\n", width, height);
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: look! there's a light!"));
if (mWidth == width && mHeight == height)
return NS_OK;
if (!mGLPbuffer->Resize(width, height)) {
LogMessage(NS_LITERAL_CSTRING("mGLPbuffer->Resize failed"));
return NS_ERROR_FAILURE;
}
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: maybe that's the way out."));
mWidth = width;
mHeight = height;
return NS_OK;
}
NS_IMETHODIMP
nsCanvasRenderingContextGLPrivate::Render(gfxContext *ctx)
{
nsresult rv = NS_OK;
if (!mGLPbuffer)
return NS_OK;
if (!mGLPbuffer->ThebesSurface())
return NS_OK;
nsRefPtr<gfxASurface> surf = mGLPbuffer->ThebesSurface();
nsRefPtr<gfxPattern> pat = CanvasGLThebes::CreatePattern(surf);
gfxMatrix m;
m.Translate(gfxPoint(0.0, mGLPbuffer->Height()));
m.Scale(1.0, -1.0);
pat->SetMatrix(m);
// XXX I don't want to use PixelSnapped here, but layout doesn't guarantee
// pixel alignment for this stuff!
ctx->NewPath();
ctx->PixelSnappedRectangleAndSetPattern(gfxRect(0, 0, mWidth, mHeight), pat);
ctx->Fill();
return rv;
}
NS_IMETHODIMP
nsCanvasRenderingContextGLPrivate::GetInputStream(const char* aMimeType,
const PRUnichar* aEncoderOptions,
nsIInputStream **aStream)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
/**
** Helpers that really should be in some sort of cross-context shared library
**/
nsresult
nsCanvasRenderingContextGLPrivate::CairoSurfaceFromElement(nsIDOMElement *imgElt,
gfxASurface **aThebesSurface,
PRUint8 **imgData,
PRInt32 *widthOut, PRInt32 *heightOut,
nsIURI **uriOut, PRBool *forceWriteOnlyOut)
{
nsresult rv;
nsCOMPtr<imgIContainer> imgContainer;
nsCOMPtr<nsIImageLoadingContent> imageLoader = do_QueryInterface(imgElt);
if (imageLoader) {
nsCOMPtr<imgIRequest> imgRequest;
rv = imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST,
getter_AddRefs(imgRequest));
NS_ENSURE_SUCCESS(rv, rv);
if (!imgRequest)
// XXX ERRMSG we need to report an error to developers here! (bug 329026)
return NS_ERROR_NOT_AVAILABLE;
PRUint32 status;
imgRequest->GetImageStatus(&status);
if ((status & imgIRequest::STATUS_LOAD_COMPLETE) == 0)
return NS_ERROR_NOT_AVAILABLE;
nsCOMPtr<nsIURI> uri;
rv = imageLoader->GetCurrentURI(uriOut);
NS_ENSURE_SUCCESS(rv, rv);
*forceWriteOnlyOut = PR_FALSE;
rv = imgRequest->GetImage(getter_AddRefs(imgContainer));
NS_ENSURE_SUCCESS(rv, rv);
} else {
// maybe a canvas
nsCOMPtr<nsICanvasElement> canvas = do_QueryInterface(imgElt);
if (canvas) {
PRUint32 w, h;
rv = canvas->GetSize(&w, &h);
NS_ENSURE_SUCCESS(rv, rv);
nsRefPtr<gfxImageSurface> surf =
CanvasGLThebes::CreateImageSurface(gfxIntSize(w, h), gfxASurface::ImageFormatARGB32);
nsRefPtr<gfxContext> ctx = CanvasGLThebes::CreateContext(surf);
ctx->SetOperator(gfxContext::OPERATOR_CLEAR);
ctx->Paint();
ctx->SetOperator(gfxContext::OPERATOR_OVER);
rv = canvas->RenderContexts(ctx);
if (NS_FAILED(rv))
return rv;
NS_ADDREF(surf.get());
*aThebesSurface = surf;
*imgData = surf->Data();
*widthOut = w;
*heightOut = h;
*uriOut = nsnull;
*forceWriteOnlyOut = canvas->IsWriteOnly();
return NS_OK;
} else {
NS_WARNING("No way to get surface from non-canvas, non-imageloader");
return NS_ERROR_NOT_AVAILABLE;
}
}
if (!imgContainer)
return NS_ERROR_NOT_AVAILABLE;
nsCOMPtr<gfxIImageFrame> frame;
rv = imgContainer->GetCurrentFrame(getter_AddRefs(frame));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIImage> img(do_GetInterface(frame));
PRInt32 imgWidth, imgHeight;
rv = frame->GetWidth(&imgWidth);
rv |= frame->GetHeight(&imgHeight);
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
if (widthOut)
*widthOut = imgWidth;
if (heightOut)
*heightOut = imgHeight;
rv = img->GetSurface(aThebesSurface);
NS_ENSURE_SUCCESS(rv, rv);
*imgData = nsnull;
return NS_OK;
}
void
nsCanvasRenderingContextGLPrivate::DoDrawImageSecurityCheck(nsIURI* aURI, PRBool forceWriteOnly)
{
/* So; this is causing dll woes under win32. Until we figure that out, we just return. */
return;
#if 0
fprintf (stderr, "DoDrawImageSecuritycheck this 1: %p\n", this);
if (mCanvasElement->IsWriteOnly())
return;
fprintf (stderr, "DoDrawImageSecuritycheck this 2: %p\n", this);
if (!aURI)
return;
fprintf (stderr, "DoDrawImageSecuritycheck this 3: %p\n", this);
if (forceWriteOnly) {
mCanvasElement->SetWriteOnly();
return;
}
fprintf (stderr, "DoDrawImageSecuritycheck this 4: %p\n", this);
nsCOMPtr<nsINode> elem = do_QueryInterface(mCanvasElement);
if (elem) {
rv = elem->NodePrincipal()->CheckMayLoad(aURI, PR_TRUE);
if (NS_SUCCEEDED(rv)) {
// Same origin
return;
}
}
fprintf (stderr, "DoDrawImageSecuritycheck this 5: %p\n", this); fflush(stderr);
mCanvasElement->SetWriteOnly();
#endif
}
nsCanvasRenderingContextGLPrivate::nsCanvasRenderingContextGLPrivate()
: mGLPbuffer(nsnull), mWidth(0), mHeight(0), mCanvasElement(nsnull)
{
// grab the xpconnect service
if (!gXPConnect) {
nsresult rv = CallGetService(nsIXPConnect::GetCID(), &gXPConnect);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to get XPConnect!");
return;
}
} else {
NS_ADDREF(gXPConnect);
}
if (!gJSRuntimeService) {
nsresult rv = CallGetService("@mozilla.org/js/xpc/RuntimeService;1",
&gJSRuntimeService);
if (NS_FAILED(rv)) {
// uh..
NS_ERROR("Failed to get JS RuntimeService!");
return;
}
gJSRuntimeService->GetRuntime(&gScriptRuntime);
if (!gScriptRuntime) {
NS_RELEASE(gJSRuntimeService);
gJSRuntimeService = nsnull;
NS_ERROR("Unable to get JS runtime from JS runtime service");
}
} else {
NS_ADDREF(gJSRuntimeService);
}
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: where am I?"));
}
nsCanvasRenderingContextGLPrivate::~nsCanvasRenderingContextGLPrivate()
{
delete mGLPbuffer;
mGLPbuffer = nsnull;
// get rid of the context
if (gXPConnect && gXPConnect->Release() == 0)
gXPConnect = nsnull;
if (gJSRuntimeService && gJSRuntimeService->Release() == 0) {
gJSRuntimeService = nsnull;
gScriptRuntime = nsnull;
}
}
nsresult
nsCanvasRenderingContextGLPrivate::DoSwapBuffers()
{
mGLPbuffer->SwapBuffers();
// then invalidate the region and do a redraw
if (!mCanvasElement)
return NS_OK;
mCanvasElement->InvalidateFrame();
return NS_OK;
}
PRBool
nsCanvasRenderingContextGLPrivate::SafeToCreateCanvas3DContext()
{
nsresult rv;
// first see if we're a chrome context
PRBool is_caller_chrome = PR_FALSE;
nsCOMPtr<nsIScriptSecurityManager> ssm =
do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
rv = ssm->SubjectPrincipalIsSystem(&is_caller_chrome);
if (NS_SUCCEEDED(rv) && is_caller_chrome)
return TRUE;
// not chrome? check pref.
// check whether it's safe to create a 3d context via a pref
nsCOMPtr<nsIPrefService> prefService = do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
// our pref is 'extensions.canvas3d.enabledForWebContent'
nsCOMPtr<nsIPrefBranch> prefBranch;
rv = prefService->GetBranch("extensions.canvas3d.", getter_AddRefs(prefBranch));
NS_ENSURE_SUCCESS(rv, PR_FALSE);
PRBool enabled;
rv = prefBranch->GetBoolPref("enabledForWebContent", &enabled);
NS_ENSURE_SUCCESS(rv, PR_FALSE);
if (enabled)
return PR_TRUE;
LogMessage(NS_LITERAL_CSTRING("Canvas 3D: Web content tried to create 3D Canvas Context, but pref extensions.canvas3d.enabledForWebContent is not set!"));
return PR_FALSE;
}
gfxImageSurface *
CanvasGLThebes::CreateImageSurface (const gfxIntSize &isize,
gfxASurface::gfxImageFormat fmt)
{
/*void *p = NS_Alloc(sizeof(gfxImageSurface));*/
return new /*(p)*/ gfxImageSurface (isize, fmt);
}
gfxContext *
CanvasGLThebes::CreateContext (gfxASurface *surf)
{
void *p = NS_Alloc(sizeof(gfxContext));
return new (p) gfxContext (surf);
}
gfxPattern *
CanvasGLThebes::CreatePattern (gfxASurface *surf)
{
/*void *p = NS_Alloc(sizeof(gfxPattern));*/
return new /*(p)*/ gfxPattern(surf);
}
/*
* We need this here, because nsAString has a different type name based on whether it's
* used internally or externally. BeginPrinting isn't ever called, but gfxImageSurface
* wants to inherit the default definition, and it can't find it. So instead, we just
* stick a stub here to shut the compiler up, because we never call this method.
*/
nsresult
gfxASurface::BeginPrinting(const nsAString& aTitle, const nsAString& aPrintToFileName)
{
return NS_ERROR_NOT_IMPLEMENTED;
}

Просмотреть файл

@ -1,666 +0,0 @@
/* -*- Mode: C++; tab-width: 20; 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com> (original author)
*
* 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 ***** */
#ifndef _NSCANVASRENDERINGCONTEXTGL_H_
#define _NSCANVASRENDERINGCONTEXTGL_H_
#include "nsICanvasRenderingContextGL.h"
#include <stdlib.h>
#include "prmem.h"
#include "nsStringGlue.h"
#include "nsICanvasRenderingContextGLBuffer.h"
#include "nsICanvasRenderingContextInternal.h"
#include "nsIDOMHTMLCanvasElement.h"
#include "nsICanvasGLPrivate.h"
#include "nsIScriptSecurityManager.h"
#include "nsISecurityCheckedComponent.h"
#include "nsWeakReference.h"
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "gfxIImageFrame.h"
#include "nsIDOMHTMLCanvasElement.h"
#include "nsICanvasElement.h"
#include "nsIDOMHTMLImageElement.h"
#include "nsIImageLoadingContent.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIImage.h"
#include "nsDOMError.h"
#include "nsIJSRuntimeService.h"
#include "nsIServiceManager.h"
#include "nsIConsoleService.h"
#include "nsDOMError.h"
#include "nsServiceManagerUtils.h"
#include "nsIXPConnect.h"
#include "jsapi.h"
#include "gfxContext.h"
#include "glew.h"
#include "nsGLPbuffer.h"
extern nsIXPConnect *gXPConnect;
extern JSRuntime *gScriptRuntime;
extern nsIJSRuntimeService *gJSRuntimeService;
class nsICanvasRenderingContextGL;
class nsCanvasRenderingContextGLES11;
class nsCanvasRenderingContextGLWeb20;
class nsCanvasRenderingContextGLPrivate :
public nsICanvasRenderingContextInternal,
public nsSupportsWeakReference
{
friend class nsGLPbuffer;
public:
nsCanvasRenderingContextGLPrivate();
virtual ~nsCanvasRenderingContextGLPrivate();
virtual nsICanvasRenderingContextGL *GetSelf() = 0;
virtual PRBool ValidateGL() { return PR_TRUE; }
void MakeContextCurrent();
static void LostCurrentContext(void *closure);
inline GLEWContext *glewGetContext() {
return mGLPbuffer->glewGetContext();
}
#ifdef XP_WIN
inline WGLEWContext *wglewGetContext() {
return mGLPbuffer->wglewGetContext();
}
#endif
// nsICanvasRenderingContextInternal
NS_IMETHOD SetCanvasElement(nsICanvasElement* aParentCanvas);
NS_IMETHOD SetDimensions(PRInt32 width, PRInt32 height);
NS_IMETHOD Render(gfxContext *ctx);
NS_IMETHOD GetInputStream(const char* aMimeType,
const PRUnichar* aEncoderOptions,
nsIInputStream **aStream);
protected:
PRBool SafeToCreateCanvas3DContext();
nsresult DoSwapBuffers();
nsresult CairoSurfaceFromElement(nsIDOMElement *imgElt,
gfxASurface **aThebesSurface,
PRUint8 **imgData,
PRInt32 *widthOut, PRInt32 *heightOut,
nsIURI **uriOut, PRBool *forceWriteOnlyOut);
void DoDrawImageSecurityCheck(nsIURI* aURI, PRBool forceWriteOnly);
nsGLPbuffer *mGLPbuffer;
PRInt32 mWidth, mHeight;
nsICanvasElement* mCanvasElement;
PRPackedBool mPrefWireframe;
static inline PRBool JSValToFloatArray (JSContext *ctx, jsval val,
jsuint cnt, float *array)
{
JSObject *arrayObj;
jsuint arrayLen;
jsval jv;
jsdouble dv;
if (!::JS_ValueToObject(ctx, val, &arrayObj) ||
arrayObj == NULL ||
!::JS_IsArrayObject(ctx, arrayObj) ||
!::JS_GetArrayLength(ctx, arrayObj, &arrayLen) ||
(arrayLen < cnt))
return PR_FALSE;
for (jsuint i = 0; i < cnt; i++) {
::JS_GetElement(ctx, arrayObj, i, &jv);
if (!::JS_ValueToNumber(ctx, jv, &dv))
return PR_FALSE;
array[i] = (float) dv;
}
return PR_TRUE;
}
static inline PRBool JSValToDoubleArray (JSContext *ctx, jsval val,
jsuint cnt, double *array)
{
JSObject *arrayObj;
jsuint arrayLen;
jsval jv;
jsdouble dv;
if (!::JS_ValueToObject(ctx, val, &arrayObj) ||
arrayObj == NULL ||
!::JS_IsArrayObject(ctx, arrayObj) ||
!::JS_GetArrayLength(ctx, arrayObj, &arrayLen) ||
(arrayLen < cnt))
return PR_FALSE;
for (jsuint i = 0; i < cnt; i++) {
::JS_GetElement(ctx, arrayObj, i, &jv);
if (!::JS_ValueToNumber(ctx, jv, &dv))
return PR_FALSE;
array[i] = dv;
}
return PR_TRUE;
}
static inline PRBool JSValToJSArrayAndLength (JSContext *ctx, jsval val,
JSObject **outObj, jsuint *outLen)
{
JSObject *obj = nsnull;
jsuint len;
if (!::JS_ValueToObject(ctx, val, &obj) ||
obj == NULL ||
!::JS_IsArrayObject(ctx, obj) ||
!::JS_GetArrayLength(ctx, obj, &len))
{
return PR_FALSE;
}
*outObj = obj;
*outLen = len;
return PR_TRUE;
}
template<class T>
static nsresult JSValToSpecificInterface(JSContext *ctx, jsval val, T **out)
{
if (JSVAL_IS_NULL(val)) {
*out = nsnull;
return NS_OK;
}
if (!JSVAL_IS_OBJECT(val))
return NS_ERROR_DOM_SYNTAX_ERR;
nsCOMPtr<nsISupports> isup;
nsresult rv = gXPConnect->WrapJS(ctx, JSVAL_TO_OBJECT(val),
NS_GET_IID(nsISupports),
getter_AddRefs(isup));
if (NS_FAILED(rv))
return NS_ERROR_DOM_SYNTAX_ERR;
nsCOMPtr<T> obj = do_QueryInterface(isup);
if (!obj)
return NS_ERROR_DOM_SYNTAX_ERR;
NS_ADDREF(*out = obj.get());
return NS_OK;
}
static inline JSObject *ArrayToJSArray (JSContext *ctx,
const PRInt32 *vals,
const PRUint32 len)
{
// XXX handle ints that are too big to fit
nsAutoArrayPtr<jsval> jsvector(new jsval[len]);
for (PRUint32 i = 0; i < len; i++)
jsvector[i] = INT_TO_JSVAL(vals[i]);
return JS_NewArrayObject(ctx, len, jsvector);
}
static inline JSObject *ArrayToJSArray (JSContext *ctx,
const PRUint32 *vals,
const PRUint32 len)
{
// XXX handle ints that are too big to fit
nsAutoArrayPtr<jsval> jsvector(new jsval[len]);
for (PRUint32 i = 0; i < len; i++)
jsvector[i] = INT_TO_JSVAL(vals[i]);
return JS_NewArrayObject(ctx, len, jsvector);
}
void LogMessage (const nsCString& errorString) {
nsCOMPtr<nsIConsoleService> console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
if (console)
console->LogStringMessage(NS_ConvertUTF8toUTF16(errorString).get());
}
};
class NativeJSContext {
public:
NativeJSContext() {
error = gXPConnect->GetCurrentNativeCallContext(&ncc);
if (NS_FAILED(error))
return;
if (!ncc) {
error = NS_ERROR_FAILURE;
return;
}
ctx = nsnull;
error = ncc->GetJSContext(&ctx);
if (NS_FAILED(error))
return;
JS_BeginRequest(ctx);
ncc->GetArgc(&argc);
ncc->GetArgvPtr(&argv);
}
~NativeJSContext() {
JS_EndRequest(ctx);
}
PRBool AddGCRoot (void *aPtr, const char *aName) {
return JS_AddNamedRootRT(gScriptRuntime, aPtr, aName);
}
void ReleaseGCRoot (void *aPtr) {
JS_RemoveRootRT(gScriptRuntime, aPtr);
}
void SetRetVal (PRInt32 val) {
if (INT_FITS_IN_JSVAL(val))
SetRetVal(INT_TO_JSVAL(val));
else
SetRetVal((double) val);
}
void SetRetVal (PRUint32 val) {
if (INT_FITS_IN_JSVAL(val))
SetRetVal(INT_TO_JSVAL((int) val));
else
SetRetVal((double) val);
}
void SetRetVal (double val) {
jsval *vp;
ncc->GetRetValPtr(&vp);
JS_NewDoubleValue(ctx, val, vp);
}
void SetBoolRetVal (PRBool val) {
if (val)
SetRetVal(JSVAL_TRUE);
else
SetRetVal(JSVAL_FALSE);
}
void SetRetVal (PRInt32 *vp, PRUint32 len) {
nsAutoArrayPtr<jsval> jsvector(new jsval[len]);
for (PRUint32 i = 0; i < len; i++)
jsvector[i] = INT_TO_JSVAL(vp[i]);
JSObject *jsarr = JS_NewArrayObject(ctx, len, jsvector.get());
SetRetVal(OBJECT_TO_JSVAL(jsarr));
}
void SetRetVal (float *fp, PRUint32 len) {
nsAutoArrayPtr<jsval> jsvector(new jsval[len]);
if (!JS_EnterLocalRootScope(ctx))
return; // XXX ???
for (PRUint32 i = 0; i < len; i++)
JS_NewDoubleValue(ctx, (jsdouble) fp[i], &jsvector[i]);
JSObject *jsarr = JS_NewArrayObject(ctx, len, jsvector.get());
SetRetVal(OBJECT_TO_JSVAL(jsarr));
JS_LeaveLocalRootScope(ctx);
}
void SetRetVal (jsval val) {
jsval *vp;
ncc->GetRetValPtr(&vp);
*vp = val;
ncc->SetReturnValueWasSet(PR_TRUE);
}
nsAXPCNativeCallContext *ncc;
nsresult error;
JSContext *ctx;
PRUint32 argc;
jsval *argv;
};
class JSObjectHelper {
public:
JSObjectHelper(NativeJSContext *jsctx)
: mCtx (jsctx)
{
mObject = JS_NewObject(mCtx->ctx, NULL, NULL, NULL);
if (!mObject)
return;
if (!mCtx->AddGCRoot(&mObject, "JSObjectHelperCanvas3D"))
mObject = nsnull;
}
~JSObjectHelper() {
if (mObject && mCtx)
mCtx->ReleaseGCRoot(&mObject);
}
PRBool DefineProperty(const char *name, PRInt32 val) {
// XXX handle too big ints
if (!JS_DefineProperty(mCtx->ctx, mObject, name, INT_TO_JSVAL(val), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
PRBool DefineProperty(const char *name, PRUint32 val) {
// XXX handle too big ints
if (!JS_DefineProperty(mCtx->ctx, mObject, name, INT_TO_JSVAL((int)val), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
PRBool DefineProperty(const char *name, double val) {
jsval dv;
if (!JS_NewDoubleValue(mCtx->ctx, val, &dv))
return PR_FALSE;
if (!JS_DefineProperty(mCtx->ctx, mObject, name, dv, NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
PRBool DefineProperty(const char *name, JSObject *val) {
if (!JS_DefineProperty(mCtx->ctx, mObject, name, OBJECT_TO_JSVAL(val), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
// Blah. We can't name this DefineProperty also because PRBool is the same as PRInt32
PRBool DefineBoolProperty(const char *name, PRBool val) {
if (!JS_DefineProperty(mCtx->ctx, mObject, name, val ? JS_TRUE : JS_FALSE, NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
// We can't use ns*Substring, because we don't have internal linkage
#if 0
PRBool DefineProperty(const char *name, const nsCSubstring& val) {
JSString *jsstr = JS_NewStringCopyN(mCtx->ctx, val.BeginReading(), val.Length());
if (!jsstr ||
!JS_DefineProperty(mCtx->ctx, mObject, name, STRING_TO_JSVAL(jsstr), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
PRBool DefineProperty(const char *name, const nsSubstring& val) {
JSString *jsstr = JS_NewUCStringCopyN(mCtx->ctx, val.BeginReading(), val.Length());
if (!jsstr ||
!JS_DefineProperty(mCtx->ctx, mObject, name, STRING_TO_JSVAL(jsstr), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
#endif
PRBool DefineProperty(const char *name, const char *val, PRUint32 len) {
JSString *jsstr = JS_NewStringCopyN(mCtx->ctx, val, len);
if (!jsstr ||
!JS_DefineProperty(mCtx->ctx, mObject, name, STRING_TO_JSVAL(jsstr), NULL, NULL, JSPROP_ENUMERATE))
return PR_FALSE;
return PR_TRUE;
}
JSObject *Object() {
return mObject;
}
protected:
NativeJSContext *mCtx;
JSObject *mObject;
};
class SimpleBuffer {
public:
SimpleBuffer() : type(GL_FLOAT), data(nsnull), length(0), capacity(0), sizePerVertex(0) {
}
~SimpleBuffer() {
Release();
}
inline PRUint32 ElementSize() {
if (type == GL_FLOAT) return sizeof(float);
if (type == GL_SHORT) return sizeof(short);
if (type == GL_UNSIGNED_SHORT) return sizeof(unsigned short);
if (type == GL_BYTE) return 1;
if (type == GL_UNSIGNED_BYTE) return 1;
if (type == GL_INT) return sizeof(int);
if (type == GL_UNSIGNED_INT) return sizeof(unsigned int);
if (type == GL_DOUBLE) return sizeof(double);
return 0;
}
void Clear() {
Release();
}
void Set(PRUint32 t, PRUint32 spv, PRUint32 count, void* vals) {
Prepare(t, spv, count);
if (count)
memcpy(data, vals, count*ElementSize());
}
void Prepare(PRUint32 t, PRUint32 spv, PRUint32 count) {
if (count == 0) {
Release();
} else {
EnsureCapacity(PR_FALSE, count*ElementSize());
type = t;
length = count;
sizePerVertex = spv;
}
}
void Release() {
if (data)
PR_Free(data);
length = 0;
capacity = 0;
data = nsnull;
}
void EnsureCapacity(PRBool preserve, PRUint32 cap) {
if (capacity >= cap)
return;
void* newdata = PR_Malloc(cap);
if (preserve && length)
memcpy(newdata, data, length*ElementSize());
PR_Free(data);
data = newdata;
capacity = cap;
}
PRUint32 type;
void* data;
PRUint32 length; // # of elements
PRUint32 capacity; // bytes!
PRUint32 sizePerVertex; // OpenGL "size" param; num coordinates per vertex
};
nsresult JSArrayToSimpleBuffer (SimpleBuffer& sbuffer,
PRUint32 typeParam,
PRUint32 sizeParam,
JSContext *ctx,
JSObject *arrayObj,
jsuint arrayLen);
class CanvasGLTexture :
public nsICanvasRenderingContextGLTexture,
public nsICanvasGLTexture
{
friend class nsCanvasRenderingContextGLES11;
friend class nsCanvasRenderingContextGLWeb20;
public:
CanvasGLTexture(nsCanvasRenderingContextGLPrivate *owner);
~CanvasGLTexture();
NS_DECL_ISUPPORTS
NS_DECL_NSICANVASRENDERINGCONTEXTGLTEXTURE
nsresult Init();
nsresult Dispose();
protected:
PRBool mDisposed;
nsCOMPtr<nsIWeakReference> mOwnerContext;
//glitz_surface_t *mGlitzTextureSurface;
//glitz_texture_object_t *mGlitzTextureObject;
PRUint32 mWidth;
PRUint32 mHeight;
};
class CanvasGLBuffer :
public nsICanvasRenderingContextGLBuffer,
public nsISecurityCheckedComponent,
public nsICanvasGLBuffer
{
friend class nsCanvasRenderingContextGLES11;
friend class nsCanvasRenderingContextGLWeb20;
public:
CanvasGLBuffer(nsCanvasRenderingContextGLPrivate *owner);
~CanvasGLBuffer();
// Init can be called multiple times to reinitialize this
// buffer object
nsresult Init (PRUint32 usage,
PRUint32 size,
PRUint32 type,
JSContext *ctx,
JSObject *arrayObj,
jsuint arrayLen);
SimpleBuffer& GetSimpleBuffer() { return mSimpleBuffer; }
NS_DECL_ISUPPORTS
NS_DECL_NSICANVASRENDERINGCONTEXTGLBUFFER
NS_DECL_NSISECURITYCHECKEDCOMPONENT
protected:
CanvasGLBuffer() { }
inline GLEWContext *glewGetContext() {
return mGlewContextPtr;
}
nsCOMPtr<nsIWeakReference> mOwnerContext;
GLEWContext *mGlewContextPtr;
PRBool mDisposed;
PRUint32 mLength;
PRUint32 mSize;
PRUint32 mType;
PRUint32 mUsage;
SimpleBuffer mSimpleBuffer;
GLuint mBufferID;
};
class CanvasGLThebes {
public:
static gfxImageSurface *CreateImageSurface (const gfxIntSize &isize,
gfxASurface::gfxImageFormat fmt);
static gfxContext *CreateContext (gfxASurface *surf);
static gfxPattern *CreatePattern (gfxASurface *surf);
};
/* Helper macros for when we're just wrapping a gl method, so that
* we can avoid having to type this 500 times. Note that these MUST
* NOT BE USED if we need to check any of the parameters.
*/
#define GL_SAME_METHOD_0(glname, name) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name() { \
MakeContextCurrent(); gl##glname(); return NS_OK; \
}
#define GL_SAME_METHOD_1(glname, name, t1) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1) { \
MakeContextCurrent(); gl##glname(a1); return NS_OK; \
}
#define GL_SAME_METHOD_2(glname, name, t1, t2) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1, t2 a2) { \
MakeContextCurrent(); gl##glname(a1,a2); return NS_OK; \
}
#define GL_SAME_METHOD_3(glname, name, t1, t2, t3) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1, t2 a2, t3 a3) { \
MakeContextCurrent(); gl##glname(a1,a2,a3); return NS_OK; \
}
#define GL_SAME_METHOD_4(glname, name, t1, t2, t3, t4) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1, t2 a2, t3 a3, t4 a4) { \
MakeContextCurrent(); gl##glname(a1,a2,a3,a4); return NS_OK; \
}
#define GL_SAME_METHOD_5(glname, name, t1, t2, t3, t4, t5) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) { \
MakeContextCurrent(); gl##glname(a1,a2,a3,a4,a5); return NS_OK; \
}
#define GL_SAME_METHOD_6(glname, name, t1, t2, t3, t4, t5, t6) \
NS_IMETHODIMP NSGL_CONTEXT_NAME::name(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6) { \
MakeContextCurrent(); gl##glname(a1,a2,a3,a4,a5,a6); return NS_OK; \
}
#endif /* _NSCANVASRENDERINGCONTEXTGL_H_ */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,470 +0,0 @@
/* -*- Mode: C++; tab-width: 20; 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com> (original author)
*
* 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 ***** */
// this must be first, else windows.h breaks us
#include "nsICanvasRenderingContextGL.h"
#include "nsGLPbuffer.h"
#include "nsCanvasRenderingContextGL.h"
#include "gfxContext.h"
void *nsGLPbuffer::sCurrentContextToken = nsnull;
static PRUint32 gActiveBuffers = 0;
nsGLPbuffer::nsGLPbuffer()
: mWidth(0), mHeight(0)
#ifdef XP_WIN
, mGlewWindow(nsnull), mGlewDC(nsnull), mGlewWglContext(nsnull),
mPbuffer(nsnull), mPbufferDC(nsnull), mPbufferContext(nsnull)
#elif defined(XP_UNIX) && defined(MOZ_X11)
, mDisplay(nsnull), mFBConfig(0), mPbuffer(0), mPbufferContext(0)
#elif defined(XP_MACOSX)
, mContext(nsnull), mPbuffer(nsnull)
#endif
{
gActiveBuffers++;
fprintf (stderr, "nsGLPbuffer: gActiveBuffers: %d\n", gActiveBuffers);
}
PRBool
nsGLPbuffer::Init(nsCanvasRenderingContextGLPrivate *priv)
{
mPriv = priv;
#ifdef XP_WIN
WNDCLASS wc;
PIXELFORMATDESCRIPTOR pfd;
if (!GetClassInfo(GetModuleHandle(NULL), "GLEW", &wc)) {
ZeroMemory(&wc, sizeof(WNDCLASS));
wc.hInstance = GetModuleHandle(NULL);
wc.lpfnWndProc = DefWindowProc;
wc.lpszClassName = "GLEW";
if (!RegisterClass(&wc)) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: RegisterClass failed"));
return PR_FALSE;
}
}
// create window
mGlewWindow = CreateWindow("GLEW", "GLEW", 0, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, NULL, NULL, GetModuleHandle(NULL), NULL);
if (!mGlewWindow) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: CreateWindow failed"));
return PR_FALSE;
}
// get the device context
mGlewDC = GetDC(mGlewWindow);
if (!mGlewDC) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: GetDC failed"));
return PR_FALSE;
}
// find default pixel format
ZeroMemory(&pfd, sizeof(PIXELFORMATDESCRIPTOR));
pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
int pixelformat = ChoosePixelFormat(mGlewDC, &pfd);
// set the pixel format for the dc
if (!SetPixelFormat(mGlewDC, pixelformat, &pfd)) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: SetPixelFormat failed"));
return PR_FALSE;
}
// create rendering context
mGlewWglContext = wglCreateContext(mGlewDC);
if (!mGlewWglContext) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: wglCreateContext failed"));
return PR_FALSE;
}
if (!wglMakeCurrent(mGlewDC, mGlewWglContext)) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: wglMakeCurrent failed"));
return PR_FALSE;
}
PRInt64 t1 = PR_Now();
if (wglewInit() != GLEW_OK) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: WGLEW init failed"));
return PR_FALSE;
}
PRInt64 t2 = PR_Now();
fprintf (stderr, "nsGLPbuffer::Init!\n");
#elif defined(XP_UNIX) && defined(MOZ_X11)
mDisplay = XOpenDisplay(NULL);
if (!mDisplay) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: XOpenDisplay failed"));
return PR_FALSE;
}
int attrib[] = { GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
GLX_RENDER_TYPE, GLX_RGBA_BIT,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DEPTH_SIZE, 1,
None };
int num;
GLXFBConfig *configs = glXChooseFBConfig(mDisplay, DefaultScreen(mDisplay),
attrib, &num);
fprintf(stderr, "CANVAS3D FBCONFIG: %d %p\n", num, configs);
if (!configs) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: No GLXFBConfig found"));
return PR_FALSE;
}
// choose first matching config;
mFBConfig = *configs;
XFree(configs);
// create dummy pbuffer so glewInit will be happy
mPbufferContext = glXCreateNewContext(mDisplay, mFBConfig, GLX_RGBA_TYPE,
nsnull, True);
PRInt64 t1 = PR_Now();
Resize(2, 2);
MakeContextCurrent();
PRInt64 t2 = PR_Now();
fprintf (stderr, "nsGLPbuffer::Init!\n");
#elif defined(XP_MACOSX)
PRInt64 t1 = PR_Now();
PRInt64 t2 = t1;
GLint attrib[] = {
AGL_RGBA,
AGL_PBUFFER,
AGL_RED_SIZE, 8,
AGL_GREEN_SIZE, 8,
AGL_BLUE_SIZE, 8,
AGL_ALPHA_SIZE, 8,
AGL_DEPTH_SIZE, 1,
0
};
mPixelFormat = aglChoosePixelFormat(NULL, 0, &attrib[0]);
if (!mPixelFormat)
return PR_FALSE;
// we need a context for glewInit
Resize(2, 2);
MakeContextCurrent();
#else
return PR_FALSE;
#endif
if (glewInit() != GLEW_OK) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: GLEW init failed"));
return PR_FALSE;
}
PRInt64 t3 = PR_Now();
fprintf (stderr, "nsGLPbuffer:: Initialization took t2-t1: %f t3-t2: %f\n",
((double)(t2-t1))/1000.0, ((double)(t3-t2))/1000.0);
fflush (stderr);
return PR_TRUE;
}
PRBool
nsGLPbuffer::Resize(PRInt32 width, PRInt32 height)
{
if (mWidth == width &&
mHeight == height)
{
return PR_TRUE;
}
Destroy();
mThebesSurface = CanvasGLThebes::CreateImageSurface(gfxIntSize(width, height), gfxASurface::ImageFormatARGB32);
if (mThebesSurface->CairoStatus() != 0) {
fprintf (stderr, "image surface failed\n");
return PR_FALSE;
}
// clear the surface
memset (mThebesSurface->Data(),
0,
height * mThebesSurface->Stride());
#ifdef XP_WIN
if (!wglMakeCurrent(mGlewDC, mGlewWglContext)) {
fprintf (stderr, "Error: %d\n", GetLastError());
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: wglMakeCurrent failed"));
return PR_FALSE;
}
if (!WGLEW_ARB_pbuffer || !WGLEW_ARB_pixel_format)
{
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: WGL_ARB_pbuffer or WGL_ARB_pixel_format not available."));
return PR_FALSE;
}
int attribs[] = {
WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
WGL_DRAW_TO_PBUFFER_ARB, GL_TRUE,
WGL_DOUBLE_BUFFER_ARB, GL_FALSE,
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_COLOR_BITS_ARB, 32,
WGL_RED_BITS_ARB, 8,
WGL_GREEN_BITS_ARB, 8,
WGL_BLUE_BITS_ARB, 8,
WGL_ALPHA_BITS_ARB, 8,
0
};
float fattribs[] = { 0.0f };
UINT numFormats = 0;
//fprintf (stderr, "EXT: %p ARB: %p rest: %s\n", wglewGetContext()->__wglewChoosePixelFormatEXT, wglewGetContext()->__wglewChoosePixelFormatARB, wglGetExtensionsStringARB(mGlewDC));
if (!wglChoosePixelFormatARB(mGlewDC,
attribs,
fattribs,
0,
NULL,
&numFormats) ||
numFormats == 0)
{
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: wglChoosePixelFormat failed (or couldn't find any matching formats)."));
ReleaseDC(NULL, mGlewDC);
return PR_FALSE;
}
nsAutoArrayPtr<int> formats = new int [numFormats];
wglChoosePixelFormatARB(mGlewDC, attribs, NULL, numFormats, formats, &numFormats);
int chosenFormat = -1;
int question,answer;
for (int priority = 6; priority > 0; priority--) {
//fprintf (stderr, "---- priority: %d\n", priority);
for (UINT i = 0; i < numFormats; i++) {
int fmt = formats[i];
#define CHECK_ATTRIB(q, test) \
question = (q); \
if (!wglGetPixelFormatAttribivARB(mGlewDC, fmt, 0, 1, &question, &answer)) { \
/*fprintf (stderr, "check for %d failed\n", q);*/ \
continue; \
} \
/*fprintf (stderr, #q " -> %d\n", answer);*/ \
if (test) { \
continue; \
}
//fprintf (stderr, "Format %d:\n", fmt);
switch (priority) {
case 6:
CHECK_ATTRIB(WGL_ACCUM_BITS_ARB, answer != 0)
case 5:
CHECK_ATTRIB(WGL_STENCIL_BITS_ARB, answer != 0)
// XXX we only pick 2xAA here, should let user choose
case 4:
CHECK_ATTRIB(WGL_SAMPLE_BUFFERS_ARB, answer != 1)
case 3:
CHECK_ATTRIB(WGL_SAMPLES_ARB, answer != 2)
case 2:
CHECK_ATTRIB(WGL_DEPTH_BITS_ARB, answer < 8)
case 1:
CHECK_ATTRIB(WGL_COLOR_BITS_ARB, answer != 32)
default:
chosenFormat = fmt;
}
#undef CHECK_ATTRIB
}
if (chosenFormat != -1)
break;
}
if (chosenFormat == -1) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: Couldn't find a suitable pixel format!"));
return PR_FALSE;
}
// ok, we now have a pixel format
fprintf (stderr, "***** Chose pixel format: %d\n", chosenFormat);
int pbattribs = 0;
mPbuffer = wglCreatePbufferARB(mGlewDC, chosenFormat, width, height, &pbattribs);
if (!mPbuffer) {
mPriv->LogMessage(NS_LITERAL_CSTRING("Canvas 3D: Failed to create pbuffer"));
return PR_FALSE;
}
mPbufferDC = wglGetPbufferDCARB(mPbuffer);
mPbufferContext = wglCreateContext(mPbufferDC);
#elif defined(XP_UNIX) && defined(MOZ_X11)
int attrib[] = { GLX_PBUFFER_WIDTH, width,
GLX_PBUFFER_HEIGHT, height,
None };
mPbuffer = glXCreatePbuffer(mDisplay, mFBConfig, attrib);
#elif defined(XP_MACOSX)
mContext = aglCreateContext(mPixelFormat, NULL);
if (!mContext)
return PR_FALSE;
GLint screen = aglGetVirtualScreen(mContext);
if (screen == -1
|| !aglCreatePBuffer(width, height, GL_TEXTURE_RECTANGLE_EXT,
GL_RGBA, 0, &mPbuffer)
|| !aglSetPBuffer (mContext, mPbuffer, 0, 0, screen))
{
return PR_FALSE;
}
MakeContextCurrent();
#endif
mWidth = width;
mHeight = height;
fprintf (stderr, "Resize: %d %d\n", width, height);
return PR_TRUE;
}
void
nsGLPbuffer::Destroy()
{
sCurrentContextToken = nsnull;
mThebesSurface = nsnull;
#ifdef XP_WIN
if (mPbuffer) {
wglDeleteContext(mPbufferContext);
wglDestroyPbufferARB(mPbuffer);
mPbuffer = nsnull;
}
#elif defined(XP_UNIX) && defined(MOZ_X11)
if (mPbuffer) {
glXDestroyPbuffer(mDisplay, mPbuffer);
mPbuffer = nsnull;
}
#else defined(XP_MACOSX)
if (mContext) {
aglDestroyContext(mContext);
mContext = nsnull;
}
if (mPbuffer) {
aglDestroyPBuffer(mPbuffer);
mPbuffer = nsnull;
}
#endif
}
nsGLPbuffer::~nsGLPbuffer()
{
Destroy();
#ifdef XP_WIN
if (mGlewWindow) {
wglDeleteContext(mGlewWglContext);
DestroyWindow(mGlewWindow);
mGlewWindow = nsnull;
}
#elif defined(XP_UNIX) && defined(MOZ_X11)
if (mPbuffer)
glXDestroyPbuffer(mDisplay, mPbuffer);
if (mPbufferContext)
glXDestroyContext(mDisplay, mPbufferContext);
if (mDisplay)
XCloseDisplay(mDisplay);
#else defined(XP_MACOSX)
if (mPbuffer)
aglDestroyPBuffer(mPbuffer);
if (mContext)
aglDestroyContext(mContext);
#endif
gActiveBuffers--;
fprintf (stderr, "nsGLPbuffer: gActiveBuffers: %d\n", gActiveBuffers);
fflush (stderr);
}
void
nsGLPbuffer::MakeContextCurrent()
{
#ifdef XP_WIN
if (sCurrentContextToken == mPbufferContext)
return;
wglMakeCurrent (mPbufferDC, mPbufferContext);
sCurrentContextToken = mPbufferContext;
#elif defined(XP_UNIX) && defined(MOZ_X11)
glXMakeContextCurrent(mDisplay, mPbuffer, mPbuffer, mPbufferContext);
#elif defined(XP_MACOSX)
aglSetCurrentContext(mContext);
#endif
}
void
nsGLPbuffer::SwapBuffers()
{
MakeContextCurrent();
glReadPixels (0, 0, mWidth, mHeight, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, mThebesSurface->Data());
}
gfxImageSurface*
nsGLPbuffer::ThebesSurface()
{
return mThebesSurface;
}

Просмотреть файл

@ -1,129 +0,0 @@
/* -*- Mode: C++; tab-width: 20; 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Vladimir Vukicevic <vladimir@pobox.com> (original author)
*
* 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 ***** */
#ifndef NSGLPBUFFER_H_
#define NSGLPBUFFER_H_
#include "gfxASurface.h"
#include "gfxImageSurface.h"
#include "glew.h"
#ifdef XP_WIN
#include <windows.h>
#include "wglew.h"
#endif
#if defined(XP_UNIX) && defined(MOZ_X11)
#include "GL/glx.h"
#endif
#ifdef XP_MACOSX
#include <AGL/agl.h>
#endif
class nsCanvasRenderingContextGLPrivate;
class nsGLPbuffer {
public:
nsGLPbuffer();
~nsGLPbuffer();
PRBool Init(nsCanvasRenderingContextGLPrivate *priv);
PRBool Resize(PRInt32 width, PRInt32 height);
void Destroy();
void MakeContextCurrent();
void SwapBuffers();
gfxImageSurface* ThebesSurface();
inline GLEWContext *glewGetContext() {
return &mGlewContext;
}
#ifdef XP_WIN
inline WGLEWContext *wglewGetContext() {
return &mWGlewContext;
}
#endif
PRInt32 Width() { return mWidth; }
PRInt32 Height() { return mHeight; }
protected:
static void *sCurrentContextToken;
nsCanvasRenderingContextGLPrivate *mPriv;
PRInt32 mWidth, mHeight;
GLEWContext mGlewContext;
nsRefPtr<gfxImageSurface> mThebesSurface;
#ifdef XP_WIN
// this is the crap that we need to get the gl entry points
HWND mGlewWindow;
HDC mGlewDC;
HGLRC mGlewWglContext;
// and this is the actual stuff that we need to render
HPBUFFERARB mPbuffer;
HDC mPbufferDC;
HGLRC mPbufferContext;
WGLEWContext mWGlewContext;
#endif
#if defined(XP_UNIX) && defined(MOZ_X11)
Display *mDisplay;
GLXFBConfig mFBConfig;
GLXPbuffer mPbuffer;
GLXContext mPbufferContext;
#endif
#ifdef XP_MACOSX
AGLPixelFormat mPixelFormat;
AGLContext mContext;
AGLPbuffer mPbuffer;
#endif
};
#endif /* NSGLPBUFFER_H_ */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,934 +0,0 @@
/*
** The OpenGL Extension Wrangler Library
** Copyright (C) 2002-2006, Milan Ikits <milan ikits[]ieee org>
** Copyright (C) 2002-2006, Marcelo E. Magallon <mmagallo[]debian org>
** Copyright (C) 2002, Lev Povalahev
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
**
** * Redistributions of source code must retain the above copyright notice,
** this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright notice,
** this list of conditions and the following disclaimer in the documentation
** and/or other materials provided with the distribution.
** * The name of the author may be used to endorse or promote products
** derived from this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
** THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __wglew_h__
#define __wglew_h__
#define __WGLEW_H__
#ifdef __wglext_h_
#error wglext.h included before wglew.h
#endif
#define __wglext_h_
#if !defined(APIENTRY) && !defined(__CYGWIN__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN 1
# endif
#include <windows.h>
#endif
/*
* GLEW_STATIC needs to be set when using the static version.
* GLEW_BUILD is set when building the DLL version.
*/
#ifdef GLEW_STATIC
# define GLEWAPI extern
#else
# ifdef GLEW_BUILD
# define GLEWAPI extern __declspec(dllexport)
# else
# define GLEWAPI extern __declspec(dllimport)
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* -------------------------- WGL_3DFX_multisample ------------------------- */
#ifndef WGL_3DFX_multisample
#define WGL_3DFX_multisample 1
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
#define WGL_SAMPLES_3DFX 0x2061
#define WGLEW_3DFX_multisample WGLEW_GET_VAR(__WGLEW_3DFX_multisample)
#endif /* WGL_3DFX_multisample */
/* ------------------------- WGL_3DL_stereo_control ------------------------ */
#ifndef WGL_3DL_stereo_control
#define WGL_3DL_stereo_control 1
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
#define wglSetStereoEmitterState3DL WGLEW_GET_FUN(__wglewSetStereoEmitterState3DL)
#define WGLEW_3DL_stereo_control WGLEW_GET_VAR(__WGLEW_3DL_stereo_control)
#endif /* WGL_3DL_stereo_control */
/* ------------------------- WGL_ARB_buffer_region ------------------------- */
#ifndef WGL_ARB_buffer_region
#define WGL_ARB_buffer_region 1
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
#define wglCreateBufferRegionARB WGLEW_GET_FUN(__wglewCreateBufferRegionARB)
#define wglDeleteBufferRegionARB WGLEW_GET_FUN(__wglewDeleteBufferRegionARB)
#define wglRestoreBufferRegionARB WGLEW_GET_FUN(__wglewRestoreBufferRegionARB)
#define wglSaveBufferRegionARB WGLEW_GET_FUN(__wglewSaveBufferRegionARB)
#define WGLEW_ARB_buffer_region WGLEW_GET_VAR(__WGLEW_ARB_buffer_region)
#endif /* WGL_ARB_buffer_region */
/* ----------------------- WGL_ARB_extensions_string ----------------------- */
#ifndef WGL_ARB_extensions_string
#define WGL_ARB_extensions_string 1
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
#define wglGetExtensionsStringARB WGLEW_GET_FUN(__wglewGetExtensionsStringARB)
#define WGLEW_ARB_extensions_string WGLEW_GET_VAR(__WGLEW_ARB_extensions_string)
#endif /* WGL_ARB_extensions_string */
/* ----------------------- WGL_ARB_make_current_read ----------------------- */
#ifndef WGL_ARB_make_current_read
#define WGL_ARB_make_current_read 1
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (VOID);
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
#define wglGetCurrentReadDCARB WGLEW_GET_FUN(__wglewGetCurrentReadDCARB)
#define wglMakeContextCurrentARB WGLEW_GET_FUN(__wglewMakeContextCurrentARB)
#define WGLEW_ARB_make_current_read WGLEW_GET_VAR(__WGLEW_ARB_make_current_read)
#endif /* WGL_ARB_make_current_read */
/* -------------------------- WGL_ARB_multisample -------------------------- */
#ifndef WGL_ARB_multisample
#define WGL_ARB_multisample 1
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
#define WGL_SAMPLES_ARB 0x2042
#define WGLEW_ARB_multisample WGLEW_GET_VAR(__WGLEW_ARB_multisample)
#endif /* WGL_ARB_multisample */
/* ---------------------------- WGL_ARB_pbuffer ---------------------------- */
#ifndef WGL_ARB_pbuffer
#define WGL_ARB_pbuffer 1
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
#define WGL_PBUFFER_LARGEST_ARB 0x2033
#define WGL_PBUFFER_WIDTH_ARB 0x2034
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
#define WGL_PBUFFER_LOST_ARB 0x2036
DECLARE_HANDLE(HPBUFFERARB);
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList);
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int* piValue);
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
#define wglCreatePbufferARB WGLEW_GET_FUN(__wglewCreatePbufferARB)
#define wglDestroyPbufferARB WGLEW_GET_FUN(__wglewDestroyPbufferARB)
#define wglGetPbufferDCARB WGLEW_GET_FUN(__wglewGetPbufferDCARB)
#define wglQueryPbufferARB WGLEW_GET_FUN(__wglewQueryPbufferARB)
#define wglReleasePbufferDCARB WGLEW_GET_FUN(__wglewReleasePbufferDCARB)
#define WGLEW_ARB_pbuffer WGLEW_GET_VAR(__WGLEW_ARB_pbuffer)
#endif /* WGL_ARB_pbuffer */
/* -------------------------- WGL_ARB_pixel_format ------------------------- */
#ifndef WGL_ARB_pixel_format
#define WGL_ARB_pixel_format 1
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_NEED_PALETTE_ARB 0x2004
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
#define WGL_SWAP_METHOD_ARB 0x2007
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
#define WGL_TRANSPARENT_ARB 0x200A
#define WGL_SHARE_DEPTH_ARB 0x200C
#define WGL_SHARE_STENCIL_ARB 0x200D
#define WGL_SHARE_ACCUM_ARB 0x200E
#define WGL_SUPPORT_GDI_ARB 0x200F
#define WGL_SUPPORT_OPENGL_ARB 0x2010
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_STEREO_ARB 0x2012
#define WGL_PIXEL_TYPE_ARB 0x2013
#define WGL_COLOR_BITS_ARB 0x2014
#define WGL_RED_BITS_ARB 0x2015
#define WGL_RED_SHIFT_ARB 0x2016
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_GREEN_SHIFT_ARB 0x2018
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_BLUE_SHIFT_ARB 0x201A
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_ALPHA_SHIFT_ARB 0x201C
#define WGL_ACCUM_BITS_ARB 0x201D
#define WGL_ACCUM_RED_BITS_ARB 0x201E
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
#define WGL_DEPTH_BITS_ARB 0x2022
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_AUX_BUFFERS_ARB 0x2024
#define WGL_NO_ACCELERATION_ARB 0x2025
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
#define WGL_FULL_ACCELERATION_ARB 0x2027
#define WGL_SWAP_EXCHANGE_ARB 0x2028
#define WGL_SWAP_COPY_ARB 0x2029
#define WGL_SWAP_UNDEFINED_ARB 0x202A
#define WGL_TYPE_RGBA_ARB 0x202B
#define WGL_TYPE_COLORINDEX_ARB 0x202C
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, FLOAT *pfValues);
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int* piAttributes, int *piValues);
#define wglChoosePixelFormatARB WGLEW_GET_FUN(__wglewChoosePixelFormatARB)
#define wglGetPixelFormatAttribfvARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvARB)
#define wglGetPixelFormatAttribivARB WGLEW_GET_FUN(__wglewGetPixelFormatAttribivARB)
#define WGLEW_ARB_pixel_format WGLEW_GET_VAR(__WGLEW_ARB_pixel_format)
#endif /* WGL_ARB_pixel_format */
/* ----------------------- WGL_ARB_pixel_format_float ---------------------- */
#ifndef WGL_ARB_pixel_format_float
#define WGL_ARB_pixel_format_float 1
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
#define WGLEW_ARB_pixel_format_float WGLEW_GET_VAR(__WGLEW_ARB_pixel_format_float)
#endif /* WGL_ARB_pixel_format_float */
/* ------------------------- WGL_ARB_render_texture ------------------------ */
#ifndef WGL_ARB_render_texture
#define WGL_ARB_render_texture 1
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
#define WGL_TEXTURE_FORMAT_ARB 0x2072
#define WGL_TEXTURE_TARGET_ARB 0x2073
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
#define WGL_TEXTURE_RGB_ARB 0x2075
#define WGL_TEXTURE_RGBA_ARB 0x2076
#define WGL_NO_TEXTURE_ARB 0x2077
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
#define WGL_TEXTURE_1D_ARB 0x2079
#define WGL_TEXTURE_2D_ARB 0x207A
#define WGL_MIPMAP_LEVEL_ARB 0x207B
#define WGL_CUBE_MAP_FACE_ARB 0x207C
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
#define WGL_FRONT_LEFT_ARB 0x2083
#define WGL_FRONT_RIGHT_ARB 0x2084
#define WGL_BACK_LEFT_ARB 0x2085
#define WGL_BACK_RIGHT_ARB 0x2086
#define WGL_AUX0_ARB 0x2087
#define WGL_AUX1_ARB 0x2088
#define WGL_AUX2_ARB 0x2089
#define WGL_AUX3_ARB 0x208A
#define WGL_AUX4_ARB 0x208B
#define WGL_AUX5_ARB 0x208C
#define WGL_AUX6_ARB 0x208D
#define WGL_AUX7_ARB 0x208E
#define WGL_AUX8_ARB 0x208F
#define WGL_AUX9_ARB 0x2090
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int* piAttribList);
#define wglBindTexImageARB WGLEW_GET_FUN(__wglewBindTexImageARB)
#define wglReleaseTexImageARB WGLEW_GET_FUN(__wglewReleaseTexImageARB)
#define wglSetPbufferAttribARB WGLEW_GET_FUN(__wglewSetPbufferAttribARB)
#define WGLEW_ARB_render_texture WGLEW_GET_VAR(__WGLEW_ARB_render_texture)
#endif /* WGL_ARB_render_texture */
/* ----------------------- WGL_ATI_pixel_format_float ---------------------- */
#ifndef WGL_ATI_pixel_format_float
#define WGL_ATI_pixel_format_float 1
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
#define GL_RGBA_FLOAT_MODE_ATI 0x8820
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
#define WGLEW_ATI_pixel_format_float WGLEW_GET_VAR(__WGLEW_ATI_pixel_format_float)
#endif /* WGL_ATI_pixel_format_float */
/* -------------------- WGL_ATI_render_texture_rectangle ------------------- */
#ifndef WGL_ATI_render_texture_rectangle
#define WGL_ATI_render_texture_rectangle 1
#define WGL_TEXTURE_RECTANGLE_ATI 0x21A5
#define WGLEW_ATI_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_ATI_render_texture_rectangle)
#endif /* WGL_ATI_render_texture_rectangle */
/* -------------------------- WGL_EXT_depth_float -------------------------- */
#ifndef WGL_EXT_depth_float
#define WGL_EXT_depth_float 1
#define WGL_DEPTH_FLOAT_EXT 0x2040
#define WGLEW_EXT_depth_float WGLEW_GET_VAR(__WGLEW_EXT_depth_float)
#endif /* WGL_EXT_depth_float */
/* ---------------------- WGL_EXT_display_color_table ---------------------- */
#ifndef WGL_EXT_display_color_table
#define WGL_EXT_display_color_table 1
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
typedef void (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (GLushort* table, GLuint length);
#define wglBindDisplayColorTableEXT WGLEW_GET_FUN(__wglewBindDisplayColorTableEXT)
#define wglCreateDisplayColorTableEXT WGLEW_GET_FUN(__wglewCreateDisplayColorTableEXT)
#define wglDestroyDisplayColorTableEXT WGLEW_GET_FUN(__wglewDestroyDisplayColorTableEXT)
#define wglLoadDisplayColorTableEXT WGLEW_GET_FUN(__wglewLoadDisplayColorTableEXT)
#define WGLEW_EXT_display_color_table WGLEW_GET_VAR(__WGLEW_EXT_display_color_table)
#endif /* WGL_EXT_display_color_table */
/* ----------------------- WGL_EXT_extensions_string ----------------------- */
#ifndef WGL_EXT_extensions_string
#define WGL_EXT_extensions_string 1
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
#define wglGetExtensionsStringEXT WGLEW_GET_FUN(__wglewGetExtensionsStringEXT)
#define WGLEW_EXT_extensions_string WGLEW_GET_VAR(__WGLEW_EXT_extensions_string)
#endif /* WGL_EXT_extensions_string */
/* ----------------------- WGL_EXT_make_current_read ----------------------- */
#ifndef WGL_EXT_make_current_read
#define WGL_EXT_make_current_read 1
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (VOID);
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
#define wglGetCurrentReadDCEXT WGLEW_GET_FUN(__wglewGetCurrentReadDCEXT)
#define wglMakeContextCurrentEXT WGLEW_GET_FUN(__wglewMakeContextCurrentEXT)
#define WGLEW_EXT_make_current_read WGLEW_GET_VAR(__WGLEW_EXT_make_current_read)
#endif /* WGL_EXT_make_current_read */
/* -------------------------- WGL_EXT_multisample -------------------------- */
#ifndef WGL_EXT_multisample
#define WGL_EXT_multisample 1
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
#define WGL_SAMPLES_EXT 0x2042
#define WGLEW_EXT_multisample WGLEW_GET_VAR(__WGLEW_EXT_multisample)
#endif /* WGL_EXT_multisample */
/* ---------------------------- WGL_EXT_pbuffer ---------------------------- */
#ifndef WGL_EXT_pbuffer
#define WGL_EXT_pbuffer 1
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
#define WGL_PBUFFER_LARGEST_EXT 0x2033
#define WGL_PBUFFER_WIDTH_EXT 0x2034
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
DECLARE_HANDLE(HPBUFFEREXT);
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int* piAttribList);
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int* piValue);
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
#define wglCreatePbufferEXT WGLEW_GET_FUN(__wglewCreatePbufferEXT)
#define wglDestroyPbufferEXT WGLEW_GET_FUN(__wglewDestroyPbufferEXT)
#define wglGetPbufferDCEXT WGLEW_GET_FUN(__wglewGetPbufferDCEXT)
#define wglQueryPbufferEXT WGLEW_GET_FUN(__wglewQueryPbufferEXT)
#define wglReleasePbufferDCEXT WGLEW_GET_FUN(__wglewReleasePbufferDCEXT)
#define WGLEW_EXT_pbuffer WGLEW_GET_VAR(__WGLEW_EXT_pbuffer)
#endif /* WGL_EXT_pbuffer */
/* -------------------------- WGL_EXT_pixel_format ------------------------- */
#ifndef WGL_EXT_pixel_format
#define WGL_EXT_pixel_format 1
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
#define WGL_ACCELERATION_EXT 0x2003
#define WGL_NEED_PALETTE_EXT 0x2004
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
#define WGL_SWAP_METHOD_EXT 0x2007
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
#define WGL_TRANSPARENT_EXT 0x200A
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
#define WGL_SHARE_DEPTH_EXT 0x200C
#define WGL_SHARE_STENCIL_EXT 0x200D
#define WGL_SHARE_ACCUM_EXT 0x200E
#define WGL_SUPPORT_GDI_EXT 0x200F
#define WGL_SUPPORT_OPENGL_EXT 0x2010
#define WGL_DOUBLE_BUFFER_EXT 0x2011
#define WGL_STEREO_EXT 0x2012
#define WGL_PIXEL_TYPE_EXT 0x2013
#define WGL_COLOR_BITS_EXT 0x2014
#define WGL_RED_BITS_EXT 0x2015
#define WGL_RED_SHIFT_EXT 0x2016
#define WGL_GREEN_BITS_EXT 0x2017
#define WGL_GREEN_SHIFT_EXT 0x2018
#define WGL_BLUE_BITS_EXT 0x2019
#define WGL_BLUE_SHIFT_EXT 0x201A
#define WGL_ALPHA_BITS_EXT 0x201B
#define WGL_ALPHA_SHIFT_EXT 0x201C
#define WGL_ACCUM_BITS_EXT 0x201D
#define WGL_ACCUM_RED_BITS_EXT 0x201E
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
#define WGL_DEPTH_BITS_EXT 0x2022
#define WGL_STENCIL_BITS_EXT 0x2023
#define WGL_AUX_BUFFERS_EXT 0x2024
#define WGL_NO_ACCELERATION_EXT 0x2025
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
#define WGL_FULL_ACCELERATION_EXT 0x2027
#define WGL_SWAP_EXCHANGE_EXT 0x2028
#define WGL_SWAP_COPY_EXT 0x2029
#define WGL_SWAP_UNDEFINED_EXT 0x202A
#define WGL_TYPE_RGBA_EXT 0x202B
#define WGL_TYPE_COLORINDEX_EXT 0x202C
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int* piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, FLOAT *pfValues);
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int* piAttributes, int *piValues);
#define wglChoosePixelFormatEXT WGLEW_GET_FUN(__wglewChoosePixelFormatEXT)
#define wglGetPixelFormatAttribfvEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribfvEXT)
#define wglGetPixelFormatAttribivEXT WGLEW_GET_FUN(__wglewGetPixelFormatAttribivEXT)
#define WGLEW_EXT_pixel_format WGLEW_GET_VAR(__WGLEW_EXT_pixel_format)
#endif /* WGL_EXT_pixel_format */
/* -------------------------- WGL_EXT_swap_control ------------------------- */
#ifndef WGL_EXT_swap_control
#define WGL_EXT_swap_control 1
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
#define wglGetSwapIntervalEXT WGLEW_GET_FUN(__wglewGetSwapIntervalEXT)
#define wglSwapIntervalEXT WGLEW_GET_FUN(__wglewSwapIntervalEXT)
#define WGLEW_EXT_swap_control WGLEW_GET_VAR(__WGLEW_EXT_swap_control)
#endif /* WGL_EXT_swap_control */
/* --------------------- WGL_I3D_digital_video_control --------------------- */
#ifndef WGL_I3D_digital_video_control
#define WGL_I3D_digital_video_control 1
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue);
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue);
#define wglGetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewGetDigitalVideoParametersI3D)
#define wglSetDigitalVideoParametersI3D WGLEW_GET_FUN(__wglewSetDigitalVideoParametersI3D)
#define WGLEW_I3D_digital_video_control WGLEW_GET_VAR(__WGLEW_I3D_digital_video_control)
#endif /* WGL_I3D_digital_video_control */
/* ----------------------------- WGL_I3D_gamma ----------------------------- */
#ifndef WGL_I3D_gamma
#define WGL_I3D_gamma 1
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT* puRed, USHORT *puGreen, USHORT *puBlue);
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int* piValue);
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT* puRed, const USHORT *puGreen, const USHORT *puBlue);
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int* piValue);
#define wglGetGammaTableI3D WGLEW_GET_FUN(__wglewGetGammaTableI3D)
#define wglGetGammaTableParametersI3D WGLEW_GET_FUN(__wglewGetGammaTableParametersI3D)
#define wglSetGammaTableI3D WGLEW_GET_FUN(__wglewSetGammaTableI3D)
#define wglSetGammaTableParametersI3D WGLEW_GET_FUN(__wglewSetGammaTableParametersI3D)
#define WGLEW_I3D_gamma WGLEW_GET_VAR(__WGLEW_I3D_gamma)
#endif /* WGL_I3D_gamma */
/* ---------------------------- WGL_I3D_genlock ---------------------------- */
#ifndef WGL_I3D_genlock
#define WGL_I3D_genlock 1
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
#define WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D 0x2045
#define WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D 0x2046
#define WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D 0x2047
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT* uRate);
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT* uDelay);
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT* uEdge);
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT* uSource);
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL* pFlag);
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT* uMaxLineDelay, UINT *uMaxPixelDelay);
#define wglDisableGenlockI3D WGLEW_GET_FUN(__wglewDisableGenlockI3D)
#define wglEnableGenlockI3D WGLEW_GET_FUN(__wglewEnableGenlockI3D)
#define wglGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGenlockSampleRateI3D)
#define wglGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGenlockSourceDelayI3D)
#define wglGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGenlockSourceEdgeI3D)
#define wglGenlockSourceI3D WGLEW_GET_FUN(__wglewGenlockSourceI3D)
#define wglGetGenlockSampleRateI3D WGLEW_GET_FUN(__wglewGetGenlockSampleRateI3D)
#define wglGetGenlockSourceDelayI3D WGLEW_GET_FUN(__wglewGetGenlockSourceDelayI3D)
#define wglGetGenlockSourceEdgeI3D WGLEW_GET_FUN(__wglewGetGenlockSourceEdgeI3D)
#define wglGetGenlockSourceI3D WGLEW_GET_FUN(__wglewGetGenlockSourceI3D)
#define wglIsEnabledGenlockI3D WGLEW_GET_FUN(__wglewIsEnabledGenlockI3D)
#define wglQueryGenlockMaxSourceDelayI3D WGLEW_GET_FUN(__wglewQueryGenlockMaxSourceDelayI3D)
#define WGLEW_I3D_genlock WGLEW_GET_VAR(__WGLEW_I3D_genlock)
#endif /* WGL_I3D_genlock */
/* -------------------------- WGL_I3D_image_buffer ------------------------- */
#ifndef WGL_I3D_image_buffer
#define WGL_I3D_image_buffer 1
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, HANDLE* pEvent, LPVOID *pAddress, DWORD *pSize, UINT count);
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hdc, LPVOID* pAddress, UINT count);
#define wglAssociateImageBufferEventsI3D WGLEW_GET_FUN(__wglewAssociateImageBufferEventsI3D)
#define wglCreateImageBufferI3D WGLEW_GET_FUN(__wglewCreateImageBufferI3D)
#define wglDestroyImageBufferI3D WGLEW_GET_FUN(__wglewDestroyImageBufferI3D)
#define wglReleaseImageBufferEventsI3D WGLEW_GET_FUN(__wglewReleaseImageBufferEventsI3D)
#define WGLEW_I3D_image_buffer WGLEW_GET_VAR(__WGLEW_I3D_image_buffer)
#endif /* WGL_I3D_image_buffer */
/* ------------------------ WGL_I3D_swap_frame_lock ------------------------ */
#ifndef WGL_I3D_swap_frame_lock
#define WGL_I3D_swap_frame_lock 1
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (VOID);
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (VOID);
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL* pFlag);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL* pFlag);
#define wglDisableFrameLockI3D WGLEW_GET_FUN(__wglewDisableFrameLockI3D)
#define wglEnableFrameLockI3D WGLEW_GET_FUN(__wglewEnableFrameLockI3D)
#define wglIsEnabledFrameLockI3D WGLEW_GET_FUN(__wglewIsEnabledFrameLockI3D)
#define wglQueryFrameLockMasterI3D WGLEW_GET_FUN(__wglewQueryFrameLockMasterI3D)
#define WGLEW_I3D_swap_frame_lock WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_lock)
#endif /* WGL_I3D_swap_frame_lock */
/* ------------------------ WGL_I3D_swap_frame_usage ----------------------- */
#ifndef WGL_I3D_swap_frame_usage
#define WGL_I3D_swap_frame_usage 1
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float* pUsage);
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD* pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
#define wglBeginFrameTrackingI3D WGLEW_GET_FUN(__wglewBeginFrameTrackingI3D)
#define wglEndFrameTrackingI3D WGLEW_GET_FUN(__wglewEndFrameTrackingI3D)
#define wglGetFrameUsageI3D WGLEW_GET_FUN(__wglewGetFrameUsageI3D)
#define wglQueryFrameTrackingI3D WGLEW_GET_FUN(__wglewQueryFrameTrackingI3D)
#define WGLEW_I3D_swap_frame_usage WGLEW_GET_VAR(__WGLEW_I3D_swap_frame_usage)
#endif /* WGL_I3D_swap_frame_usage */
/* -------------------------- WGL_NV_float_buffer -------------------------- */
#ifndef WGL_NV_float_buffer
#define WGL_NV_float_buffer 1
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
#define WGLEW_NV_float_buffer WGLEW_GET_VAR(__WGLEW_NV_float_buffer)
#endif /* WGL_NV_float_buffer */
/* ---------------------- WGL_NV_render_depth_texture ---------------------- */
#ifndef WGL_NV_render_depth_texture
#define WGL_NV_render_depth_texture 1
#define WGL_NO_TEXTURE_ARB 0x2077
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
#define WGL_DEPTH_COMPONENT_NV 0x20A7
#define WGLEW_NV_render_depth_texture WGLEW_GET_VAR(__WGLEW_NV_render_depth_texture)
#endif /* WGL_NV_render_depth_texture */
/* -------------------- WGL_NV_render_texture_rectangle -------------------- */
#ifndef WGL_NV_render_texture_rectangle
#define WGL_NV_render_texture_rectangle 1
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
#define WGLEW_NV_render_texture_rectangle WGLEW_GET_VAR(__WGLEW_NV_render_texture_rectangle)
#endif /* WGL_NV_render_texture_rectangle */
/* ----------------------- WGL_NV_vertex_array_range ----------------------- */
#ifndef WGL_NV_vertex_array_range
#define WGL_NV_vertex_array_range 1
typedef void * (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
#define wglAllocateMemoryNV WGLEW_GET_FUN(__wglewAllocateMemoryNV)
#define wglFreeMemoryNV WGLEW_GET_FUN(__wglewFreeMemoryNV)
#define WGLEW_NV_vertex_array_range WGLEW_GET_VAR(__WGLEW_NV_vertex_array_range)
#endif /* WGL_NV_vertex_array_range */
/* -------------------------- WGL_OML_sync_control ------------------------- */
#ifndef WGL_OML_sync_control
#define WGL_OML_sync_control 1
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32* numerator, INT32 *denominator);
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64* ust, INT64 *msc, INT64 *sbc);
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, INT fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64* ust, INT64 *msc, INT64 *sbc);
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64* ust, INT64 *msc, INT64 *sbc);
#define wglGetMscRateOML WGLEW_GET_FUN(__wglewGetMscRateOML)
#define wglGetSyncValuesOML WGLEW_GET_FUN(__wglewGetSyncValuesOML)
#define wglSwapBuffersMscOML WGLEW_GET_FUN(__wglewSwapBuffersMscOML)
#define wglSwapLayerBuffersMscOML WGLEW_GET_FUN(__wglewSwapLayerBuffersMscOML)
#define wglWaitForMscOML WGLEW_GET_FUN(__wglewWaitForMscOML)
#define wglWaitForSbcOML WGLEW_GET_FUN(__wglewWaitForSbcOML)
#define WGLEW_OML_sync_control WGLEW_GET_VAR(__WGLEW_OML_sync_control)
#endif /* WGL_OML_sync_control */
/* ------------------------------------------------------------------------- */
#ifdef GLEW_MX
#define WGLEW_EXPORT
#else
#define WGLEW_EXPORT GLEWAPI
#endif /* GLEW_MX */
#ifdef GLEW_MX
struct WGLEWContextStruct
{
#endif /* GLEW_MX */
WGLEW_EXPORT PFNWGLSETSTEREOEMITTERSTATE3DLPROC __wglewSetStereoEmitterState3DL;
WGLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC __wglewCreateBufferRegionARB;
WGLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC __wglewDeleteBufferRegionARB;
WGLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC __wglewRestoreBufferRegionARB;
WGLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC __wglewSaveBufferRegionARB;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC __wglewGetCurrentReadDCARB;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC __wglewMakeContextCurrentARB;
WGLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB;
WGLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB;
WGLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB;
WGLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB;
WGLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB;
WGLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB;
WGLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB;
WGLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC __wglewBindDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC __wglewCreateDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC __wglewDestroyDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC __wglewLoadDisplayColorTableEXT;
WGLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT;
WGLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC __wglewGetCurrentReadDCEXT;
WGLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC __wglewMakeContextCurrentEXT;
WGLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC __wglewCreatePbufferEXT;
WGLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC __wglewDestroyPbufferEXT;
WGLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC __wglewGetPbufferDCEXT;
WGLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC __wglewQueryPbufferEXT;
WGLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC __wglewReleasePbufferDCEXT;
WGLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC __wglewChoosePixelFormatEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC __wglewGetPixelFormatAttribfvEXT;
WGLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC __wglewGetPixelFormatAttribivEXT;
WGLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT;
WGLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT;
WGLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC __wglewGetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC __wglewSetDigitalVideoParametersI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC __wglewGetGammaTableI3D;
WGLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC __wglewGetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC __wglewSetGammaTableI3D;
WGLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC __wglewSetGammaTableParametersI3D;
WGLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC __wglewDisableGenlockI3D;
WGLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC __wglewEnableGenlockI3D;
WGLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC __wglewGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC __wglewGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC __wglewGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC __wglewGenlockSourceI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC __wglewGetGenlockSampleRateI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC __wglewGetGenlockSourceDelayI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC __wglewGetGenlockSourceEdgeI3D;
WGLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC __wglewGetGenlockSourceI3D;
WGLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC __wglewIsEnabledGenlockI3D;
WGLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC __wglewQueryGenlockMaxSourceDelayI3D;
WGLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC __wglewAssociateImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC __wglewCreateImageBufferI3D;
WGLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC __wglewDestroyImageBufferI3D;
WGLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC __wglewReleaseImageBufferEventsI3D;
WGLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC __wglewDisableFrameLockI3D;
WGLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC __wglewEnableFrameLockI3D;
WGLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC __wglewIsEnabledFrameLockI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC __wglewQueryFrameLockMasterI3D;
WGLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC __wglewBeginFrameTrackingI3D;
WGLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC __wglewEndFrameTrackingI3D;
WGLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC __wglewGetFrameUsageI3D;
WGLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC __wglewQueryFrameTrackingI3D;
WGLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC __wglewAllocateMemoryNV;
WGLEW_EXPORT PFNWGLFREEMEMORYNVPROC __wglewFreeMemoryNV;
WGLEW_EXPORT PFNWGLGETMSCRATEOMLPROC __wglewGetMscRateOML;
WGLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC __wglewGetSyncValuesOML;
WGLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC __wglewSwapBuffersMscOML;
WGLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC __wglewSwapLayerBuffersMscOML;
WGLEW_EXPORT PFNWGLWAITFORMSCOMLPROC __wglewWaitForMscOML;
WGLEW_EXPORT PFNWGLWAITFORSBCOMLPROC __wglewWaitForSbcOML;
WGLEW_EXPORT GLboolean __WGLEW_3DFX_multisample;
WGLEW_EXPORT GLboolean __WGLEW_3DL_stereo_control;
WGLEW_EXPORT GLboolean __WGLEW_ARB_buffer_region;
WGLEW_EXPORT GLboolean __WGLEW_ARB_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_ARB_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_ARB_multisample;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_ARB_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_ARB_render_texture;
WGLEW_EXPORT GLboolean __WGLEW_ATI_pixel_format_float;
WGLEW_EXPORT GLboolean __WGLEW_ATI_render_texture_rectangle;
WGLEW_EXPORT GLboolean __WGLEW_EXT_depth_float;
WGLEW_EXPORT GLboolean __WGLEW_EXT_display_color_table;
WGLEW_EXPORT GLboolean __WGLEW_EXT_extensions_string;
WGLEW_EXPORT GLboolean __WGLEW_EXT_make_current_read;
WGLEW_EXPORT GLboolean __WGLEW_EXT_multisample;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pbuffer;
WGLEW_EXPORT GLboolean __WGLEW_EXT_pixel_format;
WGLEW_EXPORT GLboolean __WGLEW_EXT_swap_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_digital_video_control;
WGLEW_EXPORT GLboolean __WGLEW_I3D_gamma;
WGLEW_EXPORT GLboolean __WGLEW_I3D_genlock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_image_buffer;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_lock;
WGLEW_EXPORT GLboolean __WGLEW_I3D_swap_frame_usage;
WGLEW_EXPORT GLboolean __WGLEW_NV_float_buffer;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_depth_texture;
WGLEW_EXPORT GLboolean __WGLEW_NV_render_texture_rectangle;
WGLEW_EXPORT GLboolean __WGLEW_NV_vertex_array_range;
WGLEW_EXPORT GLboolean __WGLEW_OML_sync_control;
#ifdef GLEW_MX
}; /* WGLEWContextStruct */
#endif /* GLEW_MX */
/* ------------------------------------------------------------------------- */
#ifdef GLEW_MX
typedef struct WGLEWContextStruct WGLEWContext;
GLEWAPI GLenum wglewContextInit (WGLEWContext* ctx);
GLEWAPI GLboolean wglewContextIsSupported (WGLEWContext* ctx, const char* name);
#define wglewInit() wglewContextInit(wglewGetContext())
#define wglewIsSupported(x) wglewContextIsSupported(wglewGetContext(), x)
#define WGLEW_GET_VAR(x) wglewGetContext()->x
#define WGLEW_GET_FUN(x) wglewGetContext()->x
#else /* GLEW_MX */
#define WGLEW_GET_VAR(x) x
#define WGLEW_GET_FUN(x) x
GLEWAPI GLboolean wglewIsSupported (const char* name);
#endif /* GLEW_MX */
GLEWAPI GLboolean wglewGetExtension (const char* name);
#ifdef __cplusplus
}
#endif
#undef GLEWAPI
#endif /* __wglew_h__ */

Просмотреть файл

@ -1,20 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script type="application/x-javascript">
function doload() {
var cvs = document.getElementById('canvas');
var ctx = cvs.getContext('moz-gles11');
ctx.clearColor(.2,.2,.2,1);
ctx.clear(ctx.COLOR_BUFFER_BIT);
ctx.swapBuffers();
}
</script>
</head>
<body onload="doload()">
<canvas id="canvas" width="400" height="400" style="border: 2px solid black;"></canvas>
</body>
</html>

Просмотреть файл

@ -1,102 +0,0 @@
<html>
<head>
<script type="application/x-javascript">
function makeImageCanvas() {
var cvs = document.createElement('canvas');
cvs.width = 128;
cvs.height = 128;
var ctx = cvs.getContext('2d');
/*
var grad = ctx.createLinearGradient(0, 0, 128, 128);
grad.addColorStop(0.0, "rgba(200,0,0,1.0)");
grad.addColorStop(0.5, "rgba(0,200,0,1.0)");
grad.addColorStop(1.0, "rgba(0,0,200,1.0)");
ctx.fillStyle = grad;
*/
ctx.fillStyle = "red";
ctx.fillRect(0, 0, 128, 128);
return cvs;
}
function doload() {
var cvs = document.getElementById('canvas');
var gl = cvs.getContext('moz-gles11');
gl.clearColor(.2,.2,.4,1);
gl.clear(gl.COLOR_BUFFER_BIT);
// (optinally) set up lighting
if (0) {
gl.enable(gl.LIGHTING);
gl.light(gl.LIGHT0, gl.AMBIENT, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.DIFFUSE, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.POSITION, [3, 3, -5, 0]);
gl.light(gl.LIGHT0, gl.SPECULAR, [1, 1, 1, 1]);
gl.enable(gl.LIGHT0);
}
// set up our viewing parameters
gl.matrixMode(gl.PROJECTION);
gl.loadIdentity();
gl.gluPerspective(45, 1, 0.1, 20);
gl.matrixMode(gl.MODELVIEW);
gl.loadIdentity();
gl.gluLookAt(0, 0, 4,
0, 0, 0,
0, 1, 0);
// set up texture
var texId = (gl.genTextures(1))[0];
gl.bindTexture(gl.TEXTURE_2D, texId);
var img = makeImageCanvas();
gl.texParameter(gl.TEXTURE_2D, gl.GENERATE_MIPMAP, true);
gl.texImage2DHTML(gl.TEXTURE_2D, img);
gl.enable(gl.TEXTURE_2D);
// set up and draw geometry
var vertArray = [ -1, 1, 0,
-1, -1, 0,
1, 1, 0,
1, -1, 0 ];
var normArray = [ 0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1 ];
var texCoordArray = [ 0, 1,
0, 0,
1, 1,
1, 0 ];
var colorArray = [ 1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1 ];
gl.vertexPointer(3, gl.FLOAT, vertArray);
gl.normalPointer(gl.FLOAT, normArray);
gl.texCoordPointer(2, gl.FLOAT, texCoordArray);
gl.colorPointer(4, gl.FLOAT, colorArray);
gl.enableClientState(gl.VERTEX_ARRAY);
gl.enableClientState(gl.NORMAL_ARRAY);
gl.enableClientState(gl.TEXTURE_COORD_ARRAY);
gl.enableClientState(gl.COLOR_ARRAY);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertArray.length / 3);
gl.disableClientState(gl.VERTEX_ARRAY);
gl.disableClientState(gl.NORMAL_ARRAY);
gl.disableClientState(gl.TEXTURE_COORD_ARRAY);
gl.disableClientState(gl.COLOR_ARRAY);
gl.swapBuffers();
}
</script>
</head>
<body onload="doload()">
<canvas id="canvas" width="400" height="400" style="border: 2px solid black;"></canvas>
</body>
</html>

Просмотреть файл

@ -1,100 +0,0 @@
<html>
<head>
<script type="application/x-javascript">
var gl = null;
function draw() {
// set up and draw geometry
var vertArray = [ -1, 1, 0,
-1, -1, 0,
1, 1, 0,
1, -1, 0 ];
var normArray = [ 0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1 ];
var texCoordArray = [ 0, 1,
0, 0,
1, 1,
1, 0 ];
var colorArray = [ 1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1 ];
gl.vertexPointer(3, gl.FLOAT, vertArray);
gl.normalPointer(gl.FLOAT, normArray);
gl.texCoordPointer(2, gl.FLOAT, texCoordArray);
gl.colorPointer(4, gl.FLOAT, colorArray);
gl.enableClientState(gl.VERTEX_ARRAY);
gl.enableClientState(gl.NORMAL_ARRAY);
gl.enableClientState(gl.TEXTURE_COORD_ARRAY);
gl.enableClientState(gl.COLOR_ARRAY);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, vertArray.length / 3);
gl.disableClientState(gl.VERTEX_ARRAY);
gl.disableClientState(gl.NORMAL_ARRAY);
gl.disableClientState(gl.TEXTURE_COORD_ARRAY);
gl.disableClientState(gl.COLOR_ARRAY);
}
function startTextureLoad() {
var img = document.createElement("img");
img.onload = function () {
// set up texture
var texId = (gl.genTextures(1))[0];
gl.bindTexture(gl.TEXTURE_2D, texId);
gl.texParameter(gl.TEXTURE_2D, gl.GENERATE_MIPMAP, true);
gl.texImage2DHTML(gl.TEXTURE_2D, img);
gl.enable(gl.TEXTURE_2D);
draw();
gl.swapBuffers();
};
img.src = "tex.png";
}
function doload() {
var cvs = document.getElementById('canvas');
gl = cvs.getContext('moz-gles11');
gl.clearColor(.2,.2,.4,1);
gl.clear(gl.COLOR_BUFFER_BIT);
// (optionally) set up lighting
if (0) {
gl.enable(gl.LIGHTING);
gl.light(gl.LIGHT0, gl.AMBIENT, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.DIFFUSE, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.POSITION, [3, 3, -5, 0]);
gl.light(gl.LIGHT0, gl.SPECULAR, [1, 1, 1, 1]);
gl.enable(gl.LIGHT0);
}
// set up our viewing parameters
gl.matrixMode(gl.PROJECTION);
gl.loadIdentity();
gl.gluPerspective(45, 1, 0.1, 20);
gl.matrixMode(gl.MODELVIEW);
gl.loadIdentity();
gl.gluLookAt(0, 0, 4,
0, 0, 0,
0, 1, 0);
startTextureLoad();
draw ();
gl.swapBuffers();
}
</script>
</head>
<body onload="doload()">
<canvas id="canvas" width="400" height="400" style="border: 2px solid black;"></canvas>
</body>
</html>

Просмотреть файл

@ -1,122 +0,0 @@
<html>
<head>
<script type="application/x-javascript">
var gl = null;
var buffers = { };
function bufferSetup() {
var vertArray = [ -1, 1, 0,
-1, -1, 0,
1, 1, 0,
1, -1, 0 ];
var normArray = [ 0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1 ];
var texCoordArray = [ 0, 1,
0, 0,
1, 1,
1, 0 ];
var colorArray = [ 1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1 ];
buffers.vertex = gl.createBuffer(gl.STATIC_DRAW,
3, gl.FLOAT,
vertArray);
buffers.normal = gl.createBuffer(gl.STATIC_DRAW,
3, gl.FLOAT,
normArray);
buffers.texCoord = gl.createBuffer(gl.STATIC_DRAW,
2, gl.FLOAT,
texCoordArray);
buffers.color = gl.createBuffer(gl.STATIC_DRAW,
4, gl.FLOAT,
colorArray);
}
function draw() {
// set up and draw geometry
gl.vertexPointer(buffers.vertex);
gl.normalPointer(buffers.normal);
gl.texCoordPointer(buffers.texCoord);
gl.colorPointer(buffers.color);
gl.enableClientState(gl.VERTEX_ARRAY);
gl.enableClientState(gl.NORMAL_ARRAY);
gl.enableClientState(gl.TEXTURE_COORD_ARRAY);
gl.enableClientState(gl.COLOR_ARRAY);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
gl.disableClientState(gl.VERTEX_ARRAY);
gl.disableClientState(gl.NORMAL_ARRAY);
gl.disableClientState(gl.TEXTURE_COORD_ARRAY);
gl.disableClientState(gl.COLOR_ARRAY);
}
function startTextureLoad() {
var img = document.createElement("img");
img.onload = function () {
// set up texture
var texId = (gl.genTextures(1))[0];
gl.bindTexture(gl.TEXTURE_2D, texId);
gl.texParameter(gl.TEXTURE_2D, gl.GENERATE_MIPMAP, true);
gl.texImage2DHTML(gl.TEXTURE_2D, img);
gl.enable(gl.TEXTURE_2D);
draw();
gl.swapBuffers();
};
img.src = "tex.png";
}
function doload() {
var cvs = document.getElementById('canvas');
gl = cvs.getContext('moz-gles11');
gl.clearColor(.2,.2,.4,1);
gl.clear(gl.COLOR_BUFFER_BIT);
// (optionally) set up lighting
if (0) {
gl.enable(gl.LIGHTING);
gl.light(gl.LIGHT0, gl.AMBIENT, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.DIFFUSE, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.POSITION, [3, 3, -5, 0]);
gl.light(gl.LIGHT0, gl.SPECULAR, [1, 1, 1, 1]);
gl.enable(gl.LIGHT0);
}
// set up our viewing parameters
gl.matrixMode(gl.PROJECTION);
gl.loadIdentity();
gl.gluPerspective(45, 1, 0.1, 20);
gl.matrixMode(gl.MODELVIEW);
gl.loadIdentity();
gl.gluLookAt(0, 0, 4,
0, 0, 0,
0, 1, 0);
startTextureLoad();
bufferSetup();
draw ();
gl.swapBuffers();
}
</script>
</head>
<body onload="doload()">
<canvas id="canvas" width="400" height="400" style="border: 2px solid black;"></canvas>
</body>
</html>

Просмотреть файл

@ -1,137 +0,0 @@
<html>
<head>
<script type="application/x-javascript">
var gl = null;
var buffers = { };
function bufferSetup() {
var vertArray = [ -1, 1, 0,
-1, -1, 0,
1, 1, 0,
1, -1, 0 ];
var normArray = [ 0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1 ];
var texCoordArray = [ 0, 1,
0, 0,
1, 1,
1, 0 ];
var colorArray = [ 1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1,
1, 1, 1, 1 ];
buffers.vertex = gl.createBuffer(gl.STATIC_DRAW,
3, gl.FLOAT,
vertArray);
buffers.normal = gl.createBuffer(gl.STATIC_DRAW,
3, gl.FLOAT,
normArray);
buffers.texCoord = gl.createBuffer(gl.STATIC_DRAW,
2, gl.FLOAT,
texCoordArray);
buffers.color = gl.createBuffer(gl.STATIC_DRAW,
4, gl.FLOAT,
colorArray);
}
function draw() {
// set up and draw geometry
gl.vertexPointer(buffers.vertex);
gl.normalPointer(buffers.normal);
gl.texCoordPointer(buffers.texCoord);
gl.colorPointer(buffers.color);
gl.enableClientState(gl.VERTEX_ARRAY);
gl.enableClientState(gl.NORMAL_ARRAY);
gl.enableClientState(gl.TEXTURE_COORD_ARRAY);
gl.enableClientState(gl.COLOR_ARRAY);
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
gl.disableClientState(gl.VERTEX_ARRAY);
gl.disableClientState(gl.NORMAL_ARRAY);
gl.disableClientState(gl.TEXTURE_COORD_ARRAY);
gl.disableClientState(gl.COLOR_ARRAY);
}
function startTextureLoad() {
var img = document.createElement("img");
img.onload = function () {
// set up texture
var texId = (gl.genTextures(1))[0];
gl.bindTexture(gl.TEXTURE_2D, texId);
gl.texParameter(gl.TEXTURE_2D, gl.GENERATE_MIPMAP, true);
gl.texImage2DHTML(gl.TEXTURE_2D, img);
gl.enable(gl.TEXTURE_2D);
};
img.src = "tex.png";
}
var tlast = 0;
var alast = 0;
function animStep() {
gl.clearColor(.2,.2,.4,1);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.loadIdentity();
gl.gluLookAt(0, 0, 4,
0, 0, 0,
0, 1, 0);
// rotate at 'speed' degrees per second
const speed = 40;
if (tlast != 0) {
var tdelta = Date.now() - tlast;
var ang = (alast + ((tdelta / 1000) * speed)) % 360.0;
gl.rotate(ang, 0, 1, 0);
alast = ang;
}
tlast = Date.now();
draw ();
gl.swapBuffers();
}
function doload() {
var cvs = document.getElementById('canvas');
gl = cvs.getContext('moz-gles11');
// (optionally) set up lighting
if (0) {
gl.enable(gl.LIGHTING);
gl.light(gl.LIGHT0, gl.AMBIENT, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.DIFFUSE, [1.0, 1.0, 1.0, 1]);
gl.light(gl.LIGHT0, gl.POSITION, [3, 3, -5, 0]);
gl.light(gl.LIGHT0, gl.SPECULAR, [1, 1, 1, 1]);
gl.enable(gl.LIGHT0);
}
gl.matrixMode(gl.PROJECTION);
gl.loadIdentity();
gl.gluPerspective(45, 1, 0.1, 20);
gl.matrixMode(gl.MODELVIEW);
startTextureLoad();
bufferSetup();
setInterval (animStep, 100);
animStep();
}
</script>
</head>
<body onload="doload()">
<canvas id="canvas" width="400" height="400" style="border: 2px solid black;"></canvas>
</body>
</html>

Двоичные данные
extensions/canvas3d/test/tex.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.3 KiB

Просмотреть файл

@ -76,15 +76,21 @@ _TEST_FILES = \
file_loopback_inner.html \
$(NULL)
# the tests below use Firefox-specific features
ifdef MOZ_PHOENIX
_BROWSER_TEST_FILES = \
browser_test_favicon.js \
$(NULL)
endif
libs:: $(_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
# see above, only defined for Firefox
ifdef MOZ_PHOENIX
libs:: $(_BROWSER_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
endif
XPCSHELL_TESTS = unit

Просмотреть файл

@ -13,7 +13,7 @@
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>3.0a1</em:minVersion>
<em:maxVersion>3.0b4pre</em:maxVersion>
<em:maxVersion>3.0.*</em:maxVersion>
</Description>
</em:targetApplication>
@ -22,7 +22,7 @@
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>3.0a1pre</em:minVersion>
<em:maxVersion>3.0a1pre</em:maxVersion>
<em:maxVersion>3.0.*</em:maxVersion>
</Description>
</em:targetApplication>
@ -31,7 +31,7 @@
<Description>
<em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
<em:minVersion>0.8pre</em:minVersion>
<em:maxVersion>0.8pre</em:maxVersion>
<em:maxVersion>0.8.*</em:maxVersion>
</Description>
</em:targetApplication>
@ -40,7 +40,7 @@
<Description>
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
<em:minVersion>2.0a</em:minVersion>
<em:maxVersion>2.0a1pre</em:maxVersion>
<em:maxVersion>2.0.*</em:maxVersion>
</Description>
</em:targetApplication>

Просмотреть файл

@ -6508,6 +6508,7 @@ interrupt:
BEGIN_CASE(JSOP_ENTERBLOCK)
LOAD_OBJECT(0);
JS_ASSERT(!OBJ_IS_CLONED_BLOCK(obj));
JS_ASSERT(fp->spbase + OBJ_BLOCK_DEPTH(cx, obj) == regs.sp);
vp = regs.sp + OBJ_BLOCK_COUNT(cx, obj);
JS_ASSERT(regs.sp < vp);

Просмотреть файл

@ -1938,63 +1938,69 @@ js_CloneBlockObject(JSContext *cx, JSObject *proto, JSObject *parent,
{
JSObject *clone;
JS_ASSERT(STOBJ_GET_CLASS(proto) == &js_BlockClass);
JS_ASSERT(!OBJ_IS_CLONED_BLOCK(proto));
clone = js_NewObject(cx, &js_BlockClass, proto, parent, 0);
if (!clone)
return NULL;
STOBJ_SET_SLOT(clone, JSSLOT_PRIVATE, PRIVATE_TO_JSVAL(fp));
STOBJ_SET_SLOT(clone, JSSLOT_BLOCK_DEPTH,
OBJ_GET_SLOT(cx, proto, JSSLOT_BLOCK_DEPTH));
JS_ASSERT(OBJ_IS_CLONED_BLOCK(clone));
return clone;
}
/*
* XXXblock this reverses a path in the property tree -- try to share
* the prototype's scope harder!
*/
static JSBool
js_ReallocSlots(JSContext *cx, JSObject *obj, uint32 nslots,
JSBool exactAllocation);
JSBool
js_PutBlockObject(JSContext *cx, JSBool normalUnwind)
{
JSStackFrame *fp;
JSObject *obj;
uintN depth, slot;
JSScopeProperty *sprop;
uintN depth, count;
/* Blocks have one fixed slot available for the first local.*/
JS_STATIC_ASSERT(JS_INITIAL_NSLOTS == JSSLOT_BLOCK_DEPTH + 2);
fp = cx->fp;
obj = fp->scopeChain;
JS_ASSERT(OBJ_GET_CLASS(cx, obj) == &js_BlockClass);
JS_ASSERT(OBJ_GET_PRIVATE(cx, obj) == cx->fp);
JS_ASSERT(OBJ_IS_CLONED_BLOCK(obj));
/* Block and its locals must be on the current stack for GC safety. */
JS_ASSERT((size_t) OBJ_BLOCK_DEPTH(cx, obj) <=
(size_t) (fp->regs->sp - fp->spbase));
/*
* Block objects should never be exposed to scripts. Thus the clone should
* not own the property map and rather always share it with the prototype
* object. This allows to skip updating OBJ_SCOPE(obj)->map.freeslot after
* we copy the stack slots into reserved slots.
*/
JS_ASSERT(OBJ_SCOPE(obj)->object != obj);
if (normalUnwind) {
depth = OBJ_BLOCK_DEPTH(cx, obj);
for (sprop = OBJ_SCOPE(obj)->lastProp; sprop; sprop = sprop->parent) {
if (sprop->getter != js_BlockClass.getProperty)
continue;
if (!(sprop->flags & SPROP_HAS_SHORTID))
continue;
slot = depth + (uintN) sprop->shortid;
JS_ASSERT(slot < (size_t) (fp->regs->sp - fp->spbase));
if (!js_DefineNativeProperty(cx, obj, sprop->id,
fp->spbase[slot], NULL, NULL,
JSPROP_ENUMERATE | JSPROP_PERMANENT,
SPROP_HAS_SHORTID, sprop->shortid,
NULL)) {
/*
* Stop adding properties if we failed due to out-of-memory or
* other quit-asap errors.
*/
if (!cx->throwing) {
normalUnwind = JS_FALSE;
goto out;
}
}
}
/* Block objects should not have reserved slots before they are put. */
JS_ASSERT(STOBJ_NSLOTS(obj) == JS_INITIAL_NSLOTS);
/* The block and its locals must be on the current stack for GC safety. */
depth = OBJ_BLOCK_DEPTH(cx, obj);
count = OBJ_BLOCK_COUNT(cx, obj);
JS_ASSERT(depth <= (size_t) (fp->regs->sp - fp->spbase));
JS_ASSERT(count <= (size_t) (fp->regs->sp - fp->spbase - depth));
/* See comments in CheckDestructuring from jsparse.c. */
JS_ASSERT(count >= 1);
obj->fslots[JSSLOT_BLOCK_DEPTH + 1] = fp->spbase[depth];
if (normalUnwind && count > 1) {
--count;
JS_LOCK_OBJ(cx, obj);
if (!js_ReallocSlots(cx, obj, JS_INITIAL_NSLOTS + count, JS_TRUE))
normalUnwind = JS_FALSE;
else
memcpy(obj->dslots, fp->spbase + depth + 1, count * sizeof(jsval));
JS_UNLOCK_OBJ(cx, obj);
}
out:
/* We must clear the private slot even with errors. */
JS_SetPrivate(cx, obj, NULL);
fp->scopeChain = OBJ_GET_PARENT(cx, obj);
@ -2004,41 +2010,50 @@ js_PutBlockObject(JSContext *cx, JSBool normalUnwind)
static JSBool
block_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
uintN index;
JSStackFrame *fp;
jsint slot;
JS_ASSERT(JS_InstanceOf(cx, obj, &js_BlockClass, NULL));
JS_ASSERT(OBJ_IS_CLONED_BLOCK(obj));
if (!JSVAL_IS_INT(id))
return JS_TRUE;
index = (uint16) JSVAL_TO_INT(id);
fp = (JSStackFrame *) JS_GetPrivate(cx, obj);
if (!fp)
if (fp) {
index += OBJ_BLOCK_DEPTH(cx, obj);
JS_ASSERT(index < fp->script->depth);
*vp = fp->spbase[index];
return JS_TRUE;
}
slot = OBJ_BLOCK_DEPTH(cx, obj) + (uint16) JSVAL_TO_INT(id);
JS_ASSERT((uintN)slot < fp->script->depth);
*vp = fp->spbase[slot];
return JS_TRUE;
/* Reserve slots start with the first slot after the private. */
index += JSSLOT_BLOCK_DEPTH - JSSLOT_PRIVATE;
return JS_GetReservedSlot(cx, obj, index, vp);
}
static JSBool
block_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
uintN index;
JSStackFrame *fp;
jsint slot;
JS_ASSERT(JS_InstanceOf(cx, obj, &js_BlockClass, NULL));
if (!JSVAL_IS_INT(id))
return JS_TRUE;
index = (uint16) JSVAL_TO_INT(id);
fp = (JSStackFrame *) JS_GetPrivate(cx, obj);
if (!fp)
if (fp) {
index += OBJ_BLOCK_DEPTH(cx, obj);
JS_ASSERT(index < fp->script->depth);
fp->spbase[index] = *vp;
return JS_TRUE;
}
slot = OBJ_BLOCK_DEPTH(cx, obj) + (uint16) JSVAL_TO_INT(id);
JS_ASSERT((uintN)slot < fp->script->depth);
fp->spbase[slot] = *vp;
return JS_TRUE;
/* Reserve slots start with the first slot after the private. */
index += JSSLOT_BLOCK_DEPTH - JSSLOT_PRIVATE;
return JS_SetReservedSlot(cx, obj, index, *vp);
}
#if JS_HAS_XDR
@ -2180,13 +2195,19 @@ block_xdrObject(JSXDRState *xdr, JSObject **objp)
# define block_xdrObject NULL
#endif
static uint32
block_reserveSlots(JSContext *cx, JSObject *obj)
{
return OBJ_IS_CLONED_BLOCK(obj) ? OBJ_BLOCK_COUNT(cx, obj) : 0;
}
JSClass js_BlockClass = {
"Block",
JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(1) |
JSCLASS_IS_ANONYMOUS | JSCLASS_HAS_CACHED_PROTO(JSProto_Block),
JS_PropertyStub, JS_PropertyStub, block_getProperty, block_setProperty,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
NULL, NULL, NULL, NULL, block_xdrObject, NULL, NULL, NULL
NULL, NULL, NULL, NULL, block_xdrObject, NULL, NULL, block_reserveSlots
};
JSObject*
@ -2283,8 +2304,8 @@ FreeSlots(JSContext *cx, JSObject *obj)
(JS_ASSERT((words) > 1), (words) - 1 + JS_INITIAL_NSLOTS)
static JSBool
ReallocSlots(JSContext *cx, JSObject *obj, uint32 nslots,
JSBool exactAllocation)
js_ReallocSlots(JSContext *cx, JSObject *obj, uint32 nslots,
JSBool exactAllocation)
{
jsval *old, *slots;
uint32 oslots, nwords, owords, log, i;
@ -2551,7 +2572,7 @@ js_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto,
nslots = map->freeslot;
JS_ASSERT(nslots >= JSSLOT_PRIVATE);
if (nslots > JS_INITIAL_NSLOTS &&
!ReallocSlots(cx, obj, nslots, JS_TRUE)) {
!js_ReallocSlots(cx, obj, nslots, JS_TRUE)) {
js_DropObjectMap(cx, map, obj);
obj->map = NULL;
goto bad;
@ -2867,11 +2888,11 @@ js_AllocSlot(JSContext *cx, JSObject *obj, uint32 *slotp)
}
if (map->freeslot >= STOBJ_NSLOTS(obj) &&
!ReallocSlots(cx, obj, map->freeslot + 1, JS_FALSE)) {
!js_ReallocSlots(cx, obj, map->freeslot + 1, JS_FALSE)) {
return JS_FALSE;
}
/* ReallocSlots or js_FreeSlot should set the free slots to void. */
/* js_ReallocSlots or js_FreeSlot should set the free slots to void. */
JS_ASSERT(STOBJ_GET_SLOT(obj, map->freeslot) == JSVAL_VOID);
*slotp = map->freeslot++;
return JS_TRUE;
@ -2888,8 +2909,8 @@ js_FreeSlot(JSContext *cx, JSObject *obj, uint32 slot)
if (map->freeslot == slot + 1) {
map->freeslot = slot;
/* When shrinking ReallocSlots always returns true. */
ReallocSlots(cx, obj, slot, JS_FALSE);
/* When shrinking, js_ReallocSlots always returns true. */
js_ReallocSlots(cx, obj, slot, JS_FALSE);
}
}
@ -5120,7 +5141,7 @@ js_SetRequiredSlot(JSContext *cx, JSObject *obj, uint32 slot, jsval v)
if (clasp->reserveSlots)
nslots += clasp->reserveSlots(cx, obj);
JS_ASSERT(slot < nslots);
if (!ReallocSlots(cx, obj, nslots, JS_TRUE)) {
if (!js_ReallocSlots(cx, obj, nslots, JS_TRUE)) {
JS_UNLOCK_SCOPE(cx, scope);
return JS_FALSE;
}

Просмотреть файл

@ -310,7 +310,6 @@ extern JSClass js_BlockClass;
* JSSLOT_BLOCK_DEPTH int depth of block slots in frame
*
* After JSSLOT_BLOCK_DEPTH come one or more slots for the block locals.
* OBJ_BLOCK_COUNT depends on this arrangement.
*
* A With object is like a Block object, in that both have one reserved slot
* telling the stack depth of the relevant slots (the slot whose value is the
@ -321,8 +320,10 @@ extern JSClass js_BlockClass;
*/
#define JSSLOT_BLOCK_DEPTH (JSSLOT_PRIVATE + 1)
#define OBJ_IS_CLONED_BLOCK(obj) \
(OBJ_SCOPE(obj)->object != (obj))
#define OBJ_BLOCK_COUNT(cx,obj) \
((obj)->map->freeslot - (JSSLOT_BLOCK_DEPTH + 1))
(OBJ_SCOPE(obj)->entryCount)
#define OBJ_BLOCK_DEPTH(cx,obj) \
JSVAL_TO_INT(STOBJ_GET_SLOT(obj, JSSLOT_BLOCK_DEPTH))
#define OBJ_SET_BLOCK_DEPTH(cx,obj,depth) \

Просмотреть файл

@ -1653,7 +1653,9 @@ BindLet(JSContext *cx, BindData *data, JSAtom *atom, JSTreeContext *tc)
/* Use JSPROP_ENUMERATE to aid the disassembler. */
return js_DefineNativeProperty(cx, blockObj, ATOM_TO_JSID(atom),
JSVAL_VOID, NULL, NULL,
JSPROP_ENUMERATE | JSPROP_PERMANENT,
JSPROP_ENUMERATE |
JSPROP_PERMANENT |
JSPROP_SHARED,
SPROP_HAS_SHORTID, (int16) n, NULL);
}
@ -2137,7 +2139,9 @@ CheckDestructuring(JSContext *cx, BindData *data,
ATOM_TO_JSID(cx->runtime->
atomState.emptyAtom),
JSVAL_VOID, NULL, NULL,
JSPROP_ENUMERATE | JSPROP_PERMANENT,
JSPROP_ENUMERATE |
JSPROP_PERMANENT |
JSPROP_SHARED,
SPROP_HAS_SHORTID, 0, NULL);
if (!ok)
goto out;

Просмотреть файл

@ -164,12 +164,12 @@ TEST_ID=js1_5/Array/regress-330812.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TE
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.22.*fc6, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=unknown, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=2.6.18.*el5, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*` Assertion failure: !JS_IS_RUNTIME_LOCKED(rt), at `.``*`jsgc.c:
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i386|powerpc), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*` Assertion failure: !JS_IS_RUNTIME_LOCKED(rt), at `.``*`jsgc.c:
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 3
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=powerpc, TEST_KERNEL=8.11.0, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i386, TEST_KERNEL=9.2.2, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=powerpc, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Array/regress-350256-03.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=unknown, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Error/regress-354246.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_5/Error/regress-354246.js:`.``*`: x is not defined
TEST_ID=js1_5/Exceptions/regress-121658.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=powerpc, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Expressions/regress-394673.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*``(`InternalError:`|`reason:`)``?` too much recursion
@ -187,6 +187,7 @@ TEST_ID=js1_5/Function/regress-338121-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAIL
TEST_ID=js1_5/Function/regress-338121-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i386|powerpc), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`/js1_5/Function/regress-338121-03.js:`.``*`: out of memory
TEST_ID=js1_5/Function/regress-338121-03.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`/js1_5/Function/regress-338121-03.js:`.``*`: out of memory
TEST_ID=js1_5/GC/regress-203278-2.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`/js1_5/GC/regress-203278-2.js:102: out of memory
TEST_ID=js1_5/GC/regress-203278-2.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.22.*fc6, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED signal 11
TEST_ID=js1_5/GC/regress-338653.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`(`EXIT STATUS: TIMED OUT`|`EXIT STATUS: CRASHED 0 signal 9`)`
TEST_ID=js1_5/GC/regress-338653.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/GC/regress-338653.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED
@ -196,6 +197,7 @@ TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILE
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i386, TEST_KERNEL=9.2.2, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 5 `.``*`/js1_5/GC/regress-346794.js:`.``*`: out of memory
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/GC/regress-346794.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/GC/regress-348532.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Unknown expected: Unknown actual: error reason: http://test.mozilla.com/tests/mozilla.org/js/js1_5/GC/regress-348532.js:`.``*`: too much recursion
@ -209,6 +211,7 @@ TEST_ID=js1_5/GC/regress-383269-02.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TE
TEST_ID=js1_5/GC/regress-383269-02.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`uncaught exception: generate_big_object_graph() leaked
TEST_ID=js1_5/GC/regress-383269-02.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*` uncaught exception: generate_big_object_graph() leaked
TEST_ID=js1_5/Regress/regress-203278-1.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=x86_64, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`/js1_5/Regress/regress-203278-1.js:`.``*`: out of memory
TEST_ID=js1_5/Regress/regress-203278-1.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.22.*fc6, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED signal 11
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i686|x86_64), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i386|powerpc), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
@ -222,7 +225,10 @@ TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i386, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=powerpc, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`/js1_5/Regress/regress-271716-n.js:`.``*`: out of memory
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=2.6.18.*el5, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Regress/regress-271716-n.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=unknown, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 3 `.``*`/js1_5/Regress/regress-271716-n.js:`.``*`: out of memory
TEST_ID=js1_5/Regress/regress-303213.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=2.6.18.*el5, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 5 actual: Actual exit 0, signal 9
TEST_ID=js1_5/Regress/regress-303213.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=2.6.18.*el5, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED signal 9
TEST_ID=js1_5/Regress/regress-303213.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.22.*fc6, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Regress/regress-303213.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`(`EXIT STATUS: TIMED OUT`|`EXIT STATUS: CRASHED`)`
TEST_ID=js1_5/Regress/regress-312588.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i686|x86_64), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/Regress/regress-312588.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i386|powerpc), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
@ -290,6 +296,7 @@ TEST_ID=js1_5/extensions/regress-336409-2.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAI
TEST_ID=js1_5/extensions/regress-336410-1.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 5 actual: Actual exit 0, signal 6 reason: BUGNUMBER: 336410 STATUS: Integer overflow in array_toSource --- NOTE: IN THIS TESTCASE, WE EXPECT EXIT CODE 0 --- --- NOTE: IN THIS TESTCASE, WE EXPECT EXIT CODE 5 --- STATUS: Creating 64M length string STATUS: Done. length = 67108864 STATUS: Creating array STATUS: object.toSource()
TEST_ID=js1_5/extensions/regress-336410-2.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=athlon, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 5 actual: Actual exit 0, signal 6 reason: BUGNUMBER: 336410 STATUS: Integer overflow in array_toSource --- NOTE: IN THIS TESTCASE, WE EXPECT EXIT CODE 0 --- --- NOTE: IN THIS TESTCASE, WE EXPECT EXIT CODE 5 --- STATUS: Creating 128M length string STATUS: Done. length = 134217728 STATUS: Creating array STATUS: object.toSource()
TEST_ID=js1_5/extensions/regress-342960.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/extensions/regress-342960.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.22.*fc6, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/extensions/regress-342960.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=browser, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/extensions/regress-345967.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=(browser|shell), TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(athlon|i686), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
TEST_ID=js1_5/extensions/regress-345967.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=(browser|shell), TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=(i386|powerpc), TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT
@ -348,6 +355,7 @@ TEST_ID=js1_5/extensions/regress-381205.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILE
TEST_ID=js1_5/extensions/regress-381304.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`/js1_5/extensions/regress-381304.js:`.``*`: `(`SyntaxError: `)``?`missing : after property id
TEST_ID=js1_5/extensions/regress-385134.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`, reason: Testcase produced no output!
TEST_ID=js1_5/extensions/regress-407019.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`Expected match to '/Illegal operation on WrappedNative prototype object/', Actual value 'TypeError: window.Option is not a function'
TEST_ID=js1_5/extensions/regress-429264.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=opt, TEST_TYPE=shell, TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=i686, TEST_KERNEL=2.6.24.*fc8, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 0 signal 11
TEST_ID=js1_5/extensions/toLocaleFormat-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=linux, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Date.toLocaleFormat("xxxx%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y%Y") expected: Sat Jan 01 -0051 00:00:00 `.``*` actual: xxxx-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51 reason: Expected value 'Sat Jan 01 -0051 00:00:00 `.``*`', Actual value 'xxxx-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51-51'
TEST_ID=js1_5/extensions/toLocaleFormat-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Date.toLocaleFormat("%Y %y") expected: -1 99 actual: -001 -1 reason: Expected value '-1 99', Actual value '-001 -1'
TEST_ID=js1_5/extensions/toLocaleFormat-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=mac, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Date.toLocaleFormat("%Y %y") expected: -51 49 actual: -051 -51 reason: Expected value '-51 49', Actual value '-051 -51'
@ -437,6 +445,8 @@ TEST_ID=js1_7/extensions/regress-379566.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILE
TEST_ID=js1_7/extensions/regress-380933.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=.*, TEST_TYPE=.*, TEST_OS=.*, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`Expected match to '/TypeError: Array.prototype.toSource called on incompatible Function/', Actual value 'No Error'
TEST_ID=js1_7/extensions/regress-381301.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=uneval of object with native-function getter expected: ( { get x decodeURI ( ) { [ native code ] } } ) actual: ( { get x ( ) { [ native code ] } ) reason: Expected value ' ( { get x decodeURI ( ) { [ native code ] } } ) ', Actual value ' ( { get x ( ) { [ native code ] } ) '
TEST_ID=js1_7/extensions/regress-381303.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=object toSource when a property has both a getter and a setter expected: ( { get inn ( ) { return this . for ; } , set inn ( value ) { this . for = value ; } } ) actual: ( { get inn ( ) { return this [ ' for ' ] ; } , set inn ( value ) { this [ ' for ' ] = value ; } } ) reason: Expected value ' ( { get inn ( ) { return this . for ; } , set inn ( value ) { this . for = value ; } } ) ', Actual value ' ( { get inn ( ) { return this [ ' for ' ] ; } , set inn ( value ) { this [ ' for ' ] = value ; } } ) '
TEST_ID=js1_7/extensions/regress-429266.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=(linux|mac), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*`Assertion failure: nuses == 0 || *pcstack[pcdepth - 1] == JSOP_ENTERBLOCK, at jsopcode.c:
TEST_ID=js1_7/extensions/regress-429266.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 0 actual: Actual exit 3, signal 0 reason: BUGNUMBER: 429266 STATUS: Do not assert: nuses == 0 || *pcstack[pcdepth - 1] == JSOP_ENTERBLOCK
TEST_ID=js1_7/geniter/regress-347739.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=generator_instance.close readonly and immune: 2 expected: Inside finally: 1 Inside finally: 2 actual: Inside finally: 2 reason: Expected value 'Inside finally: 1 Inside finally: 2 ', Actual value 'Inside finally: 2 '
TEST_ID=js1_7/geniter/regress-349012-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_7/geniter/regress-349012-01.js:`.``*`: yield from closing generator function gen() {try {try {yield 1;} finally {actual += "Inner finally";yield 2;}} finally {actual += ",Outer finally";}}
TEST_ID=js1_7/geniter/regress-349012-01.js, TEST_BRANCH=1.9.0, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=closing a generator fails to report error if yield during close is ignored expected: Inner finally,Outer finally actual: reason: Expected value 'Inner finally,Outer finally', Actual value ''
@ -462,7 +472,7 @@ TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILE
TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=Test reduceRight of empty array without initializer. : TypeError: reduce of empty array with no initial value expected: TypeError: reduce of empty array with no initial value actual: TypeError: arr0elms.reduceRight is not a function reason: Expected value 'TypeError: reduce of empty array with no initial value', Actual value 'TypeError: arr0elms.reduceRight is not a function'
TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_7/regress/regress-363040-01.js:`.``*`: `(`TypeError: `)``?`arr0elms.reduce is not a function
TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_7/regress/regress-363040-01.js:`.``*`: `(`TypeError: `)``?`arr0elms.reduce is not a function
TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: BUGNUMBER: 363040 STATUS: Array.prototype.reduce, Array.prototype.reduceRight FAILED! expected: [reported from test()] Expected value 'TypeError: reduce of empty array with no initial value', Actual value 'TypeError: arr0elms.reduce is not a function' FAILED! expected: [reported from test()] Expected value 'TypeError: reduce of empty array with no initial value', Actual value 'TypeError: arr0elms.reduceRight is not a function'
TEST_ID=js1_7/regress/regress-363040-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*` Expected value 'TypeError: reduce of empty array with no initial value', Actual value 'TypeError: arr0elms.reduce is not a function'
TEST_ID=js1_7/regress/regress-363040-02.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_7/regress/regress-363040-02.js:`.``*`: `(`TypeError: `)``?`arr.reduce is not a function
TEST_ID=js1_7/regress/regress-363040-02.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`/js1_7/regress/regress-363040-02.js:`.``*`: `(`TypeError: `)``?`arr.reduce is not a function
TEST_ID=js1_7/regress/regress-372331.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: `.``*`: uncaught exception: for-in binds name to early
@ -481,6 +491,9 @@ TEST_ID=js1_7/regress/regress-375695.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED,
TEST_ID=js1_7/regress/regress-375695.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 3
TEST_ID=js1_7/regress/regress-375695.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=`.``*`reason: Testcase produced no output!
TEST_ID=js1_7/regress/regress-385133-01.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=shell, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED
TEST_ID=js1_7/regress/regress-389605.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=(browser|shell), TEST_OS=(linux|mac), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED `.``*` Assertion failure: OBJ_GET_CLASS(cx, obj) == &js_BlockClass, at `.``*`jsinterp.c:
TEST_ID=js1_7/regress/regress-389605.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=browser, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: CRASHED 3
TEST_ID=js1_7/regress/regress-389605.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=debug, TEST_TYPE=shell, TEST_OS=win32, TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION= expected: Expected exit 0 actual: Actual exit 3, signal 0
TEST_ID=js1_7/regress/regress-406477.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=eval of function x() in a function with an argument "x" and "let x" expected: actual: Unexpected test_param_result value: 1NLUnexpected test_var_result value: 1NL reason: Expected value '', Actual value 'Unexpected test_param_result value: 1NLUnexpected test_var_result value: 1NL'
TEST_ID=js1_7/regress/regress-410649.js, TEST_BRANCH=(1.8.1|1.9.0), TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=(browser|shell), TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=type for destructuring parameter case expected: function actual: number reason: Expected value 'function', Actual value 'number'
TEST_ID=js1_8/genexps/regress-384991.js, TEST_BRANCH=1.8.1, TEST_RESULT=FAILED, TEST_BUILDTYPE=(debug|opt), TEST_TYPE=browser, TEST_OS=(linux|mac|win32), TEST_MACHINE=.*, TEST_PROCESSORTYPE=.*, TEST_KERNEL=.*, TEST_DATE=.*, TEST_TIMEZONE=.*, TEST_DESCRIPTION=EXIT STATUS: TIMED OUT

Просмотреть файл

@ -67,7 +67,7 @@ usage()
{
cat <<EOF
usage: runtests.sh -p products -b branches -T buildtypes -B buildcommands -e extra [-v] \\
-S -R -X exclude -I include -c -t
-S -R -X excludetests -I includetests -c -t
variable description
=============== ============================================================
@ -87,13 +87,13 @@ variable description
Spider and execute the tests one after another in the same
process. -R will start an new instance of Firefox for each
test. This has no effect for shell based tests.
-X exclude optional. By default the test will exclude the
-X excludetests optional. By default the test will exclude the
tests listed in spidermonkey-n-\$branch.tests,
performance-\$branch.tests. exclude is a list of either
performance-\$branch.tests. excludetests is a list of either
individual tests, manifest files or sub-directories which
will override the default exclusion list.
-I include optional. By default the test will include the
JavaScript tests appropriate for the branch. include is a
-I includetests optional. By default the test will include the
JavaScript tests appropriate for the branch. includetests is a
list of either individual tests, manifest files or
sub-directories which will override the default inclusion
list.
@ -129,8 +129,8 @@ do
verboseflag="-v";;
R) restart=1;;
S) summary=1;;
X) exclude=$OPTARG;;
I) include=$OPTARG;;
X) excludetests=$OPTARG;;
I) includetests=$OPTARG;;
Z) gczeal="-Z $OPTARG";;
c) crashes=1;;
t) timeouts=1;;

Просмотреть файл

@ -38,13 +38,13 @@
# ***** END LICENSE BLOCK *****
if [[ -z "$TEST_DIR" ]]; then
cat <<EOF
cat <<EOF
`basename $0`: error
TEST_DIR, the location of the Sisyphus framework,
is required to be set prior to calling this script.
EOF
exit 2
exit 2
fi
if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
@ -75,7 +75,7 @@ usage()
{
cat <<EOF
usage: $SCRIPT -p product -b branch -T buildtype -x executablepath -N profilename \\
-R -X exclude -I include -c -t -F [-d datafiles]
-R -X excludetests -I includetests -c -t -F [-d datafiles]
variable description
=============== ============================================================
@ -88,13 +88,13 @@ variable description
spider and execute the tests one after another in the same
process. -R will start an new instance of Firefox for each
test.
-X exclude optional. By default the test will exclude the
-X excludetests optional. By default the test will exclude the
tests listed in spidermonkey-n-\$branch.tests,
performance-\$branch.tests. exclude is a list of either
performance-\$branch.tests. excludetests is a list of either
individual tests, manifest files or sub-directories which
will override the default exclusion list.
-I include optional. By default the test will include the
JavaScript tests appropriate for the branch. include is a
-I includetests optional. By default the test will include the
JavaScript tests appropriate for the branch. includetests is a
list of either individual tests, manifest files or
sub-directories which will override the default inclusion
list.
@ -129,8 +129,8 @@ do
N) profilename=$OPTARG;;
x) executablepath=$OPTARG;;
R) restart=1;;
X) exclude=$OPTARG;;
I) include=$OPTARG;;
X) excludetests=$OPTARG;;
I) includetests=$OPTARG;;
c) crashes=1;;
t) timeouts=1;;
F) filesonly=1;;
@ -146,7 +146,7 @@ if [[ -n "$datafiles" ]]; then
done
fi
dumpvars product branch buildtype profilename executablepath restart exclude include crashes timeouts filesonly gczeal datafiles | sed "s|^|arguments: |"
dumpvars product branch buildtype profilename executablepath restart excludetests includetests crashes timeouts filesonly gczeal datafiles | sed "s|^|arguments: |"
if [[ -z "$product" || -z "$branch" || -z "$executablepath" || -z "$profilename" ]]; then
usage
@ -162,57 +162,57 @@ if ! make failures.txt; then
error "during make failures.txt" $LINENO
fi
includetests="included-$branch-browser-$buildtype.tests"
rm -f $includetests
touch $includetests
includetestsfile="included-$branch-browser-$buildtype.tests"
rm -f $includetestsfile
touch $includetestsfile
if [[ -z "$include" ]]; then
if [[ -z "$includetests" ]]; then
# by default include tests appropriate for the branch
include="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
includetests="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
case "$branch" in
1.8.0)
;;
1.8.1)
include="$include js1_7"
includetests="$includetests js1_7"
;;
1.9.0)
include="$include js1_7 js1_8"
includetests="$includetests js1_7 js1_8"
;;
esac
fi
for i in $include; do
for i in $includetests; do
if [[ -f "$i" ]]; then
echo "# including $i" >> $includetests
echo "# including $i" >> $includetestsfile
if echo $i | grep -q '\.js$'; then
echo $i >> $includetests
echo $i >> $includetestsfile
else
cat $i >> $includetests
cat $i >> $includetestsfile
fi
elif [[ -d "$i" ]]; then
find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetests
find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetestsfile
fi
done
excludetests="excluded-$branch-browser-$buildtype.tests"
rm -f $excludetests
touch $excludetests
excludetestsfile="excluded-$branch-browser-$buildtype.tests"
rm -f $excludetestsfile
touch $excludetestsfile
if [[ -z "$exclude" ]]; then
exclude="spidermonkey-n-$branch.tests performance-$branch.tests"
if [[ -z "$excludetests" ]]; then
excludetests="spidermonkey-n-$branch.tests performance-$branch.tests"
fi
for e in $exclude; do
for e in $excludetests; do
if [[ -f "$e" ]]; then
echo "# excluding $e" >> $excludetests
echo "# excluding $e" >> $excludetestsfile
if echo $e | grep -q '\.js$'; then
echo $e >> $excludetests
echo $e >> $excludetestsfile
else
cat $e >> $excludetests
cat $e >> $excludetestsfile
fi
elif [[ -d "$e" ]]; then
find $e -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $excludetests
find $e -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $excludetestsfile
fi
done
@ -235,13 +235,13 @@ case "$OSID" in
esac
if [[ -z "$timeouts" ]]; then
echo "# exclude tests that time out" >> $excludetests
echo "# exclude tests that time out" >> $excludetestsfile
egrep "TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*browser[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*EXIT STATUS: TIMED OUT" \
failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetests
failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
fi
if [[ -z "$crashes" ]]; then
echo "# exclude tests that crash" >> $excludetests
echo "# exclude tests that crash" >> $excludetestsfile
pattern="TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*browser[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*"
case "$buildtype" in
opt)
@ -251,7 +251,7 @@ if [[ -z "$crashes" ]]; then
pattern="${pattern}(EXIT STATUS: CRASHED|Assertion failure:)"
;;
esac
egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetests
egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
fi
@ -269,13 +269,13 @@ cat > $urlhtml <<EOF
<ul>
EOF
cat $includetests | while read jsfile
cat $includetestsfile | while read jsfile
do
if echo $jsfile | grep -q '^#'; then
continue
fi
if ! grep -q $jsfile $excludetests; then
if ! grep -q $jsfile $excludetestsfile; then
result=`echo $jsfile | sed 's/.*js\([0-9]\)_\([0-9]\).*/\1.\2/'`
@ -302,32 +302,32 @@ EOF
chmod a+r $urlhtml
cat $includetests | sed 's|^|include: |'
cat $excludetests | sed 's|^|exclude: |'
cat $includetestsfile | sed 's|^|include: |'
cat $excludetestsfile | sed 's|^|exclude: |'
if [[ -z "$filesonly" ]]; then
if [[ "$restart" == "1" ]]; then
cat "$urllist" | while read url;
do
edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "$url"
if time timed_run.py $TEST_JSEACH_TIMEOUT "$url" \
"$executable" -P "$profilename" \
-spider -start -quit \
-uri "$url" \
-depth 0 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
-hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "$url"
if time timed_run.py $TEST_JSEACH_TIMEOUT "$url" \
"$executable" -P "$profilename" \
-spider -start -quit \
-uri "$url" \
-depth 0 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
-hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
true;
fi
done
else
edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml"
if ! time timed_run.py $TEST_JSALL_TIMEOUT "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
"$executable" -P "$profilename" \
-spider -start -quit \
-uri "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
-depth 1 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
-hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
edit-talkback.sh -p "$product" -b "$branch" -x "$executablepath" -i "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml"
if ! time timed_run.py $TEST_JSALL_TIMEOUT "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
"$executable" -P "$profilename" \
-spider -start -quit \
-uri "http://$TEST_HTTP/$TEST_WWW_JS/$urlhtml" \
-depth 1 -timeout "$TEST_JSEACH_PAGE_TIMEOUT" \
-hook "http://$TEST_HTTP/$TEST_WWW_JS/userhookeach.js"; then
error "timed_run.py ended abnormally: $?" $LINENO
fi
fi

Просмотреть файл

@ -38,13 +38,13 @@
# ***** END LICENSE BLOCK *****
if [[ -z "$TEST_DIR" ]]; then
cat <<EOF
cat <<EOF
`basename $0`: error
TEST_DIR, the location of the Sisyphus framework,
is required to be set prior to calling this script.
EOF
exit 2
exit 2
fi
if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
@ -78,13 +78,13 @@ variable description
-b branch required. 1.8.0|1.8.1|1.9.0
-s sourcepath required. path to js shell source directory mozilla/js/src
-T buildtype required. one of opt debug
-X exclude optional. By default the test will exclude the
-X excludetests optional. By default the test will exclude the
tests listed in spidermonkey-n-\$branch.tests,
performance-\$branch.tests. exclude is a list of either
performance-\$branch.tests. excludetests is a list of either
individual tests, manifest files or sub-directories which
will override the default exclusion list.
-I include optional. By default the test will include the
JavaScript tests appropriate for the branch. include is a
-I includetests optional. By default the test will include the
JavaScript tests appropriate for the branch. includetests is a
list of either individual tests, manifest files or
sub-directories which will override the default inclusion
list.
@ -112,8 +112,8 @@ do
b) branch=$OPTARG;;
s) sourcepath=$OPTARG;;
T) buildtype=$OPTARG;;
X) exclude=$OPTARG;;
I) include=$OPTARG;;
X) excludetests=$OPTARG;;
I) includetests=$OPTARG;;
C) crashes=1;;
T) timeouts=1;;
Z) gczeal="-Z $OPTARG";;
@ -128,7 +128,7 @@ if [[ -n "$datafiles" ]]; then
done
fi
dumpvars branch sourcepath buildtype exclude include crashes timeouts gczeal datafiles | sed "s|^|arguments: |"
dumpvars branch sourcepath buildtype excludetests includetests crashes timeouts gczeal datafiles | sed "s|^|arguments: |"
if [[ -z "$branch" || -z "$sourcepath" || -z "$buildtype" ]]; then
usage
@ -146,60 +146,60 @@ if ! make failures.txt; then
error "during make failures.txt" $LINENO
fi
#includetests=`mktemp includetests.XXXXX`
includetests="included-$branch-shell-$buildtype.tests"
rm -f $includetests
touch $includetests
#includetestsfile=`mktemp includetestsfile.XXXXX`
includetestsfile="included-$branch-shell-$buildtype.tests"
rm -f $includetestsfile
touch $includetestsfile
if [[ -z "$include" ]]; then
if [[ -z "$includetests" ]]; then
# by default include tests appropriate for the branch
include="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
includetests="e4x ecma ecma_2 ecma_3 js1_1 js1_2 js1_3 js1_4 js1_5 js1_6"
case "$branch" in
1.8.0)
;;
1.8.1)
include="$include js1_7"
includetests="$includetests js1_7"
;;
1.9.0)
include="$include js1_7 js1_8"
includetests="$includetests js1_7 js1_8"
;;
esac
fi
for i in $include; do
for i in $includetests; do
if [[ -f "$i" ]]; then
echo "# including $i" >> $includetests
echo "# including $i" >> $includetestsfile
if echo $i | grep -q '\.js$'; then
echo $i >> $includetests
echo $i >> $includetestsfile
else
cat $i >> $includetests
cat $i >> $includetestsfile
fi
elif [[ -d "$i" ]]; then
find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetests
find $i -name '*.js' -print | egrep -v '(shell|browser|template|jsref|userhook.*|\.#.*)\.js' | sed 's/^\.\///' | sort >> $includetestsfile
fi
done
#excludetests=`mktemp excludetests.XXXXX`
excludetests="excluded-$branch-shell-$buildtype.tests"
rm -f $excludetests
touch $excludetests
#excludetestsfile=`mktemp excludetestsfile.XXXXX`
excludetestsfile="excluded-$branch-shell-$buildtype.tests"
rm -f $excludetestsfile
touch $excludetestsfile
if [[ -z "$exclude" ]]; then
exclude="spidermonkey-n-$branch.tests performance-$branch.tests"
if [[ -z "$excludetests" ]]; then
excludetests="spidermonkey-n-$branch.tests performance-$branch.tests"
fi
for e in $exclude; do
for e in $excludetests; do
if [[ -f "$e" ]]; then
echo "# excluding $e" >> $excludetests
echo "# excluding $e" >> $excludetestsfile
if echo $e | grep -q '\.js$'; then
echo $e >> $excludetests
echo $e >> $excludetestsfile
else
cat $e >> $excludetests
cat $e >> $excludetestsfile
fi
elif [[ -d "$e" ]]; then
find $e -name '*.js' -print | egrep -v '(shell|browser|template|userhook.*|\.#.*).js' | sed 's/^\.\///' | sort >> $excludetests
find $e -name '*.js' -print | egrep -v '(shell|browser|template|userhook.*|\.#.*).js' | sed 's/^\.\///' | sort >> $excludetestsfile
fi
done
@ -222,13 +222,13 @@ case "$OSID" in
esac
if [[ -z "$timeouts" ]]; then
echo "# exclude tests that time out" >> $excludetests
echo "# exclude tests that time out" >> $excludetestsfile
egrep "TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*shell[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*EXIT STATUS: TIMED OUT" \
failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetests
failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
fi
if [[ -z "$crashes" ]]; then
echo "# exclude tests that crash" >> $excludetests
echo "# exclude tests that crash" >> $excludetestsfile
pattern="TEST_BRANCH=([^,]*$branch[^,]*|[.][*]), TEST_RESULT=FAILED, TEST_BUILDTYPE=([^,]*$buildtype[^,]*|[.][*]), TEST_TYPE=([^,]*shell[^,]*|[.][*]), TEST_OS=([^,]*$OSID[^,]*|[.][*]), .*, TEST_PROCESSORTYPE=([^,]*$arch[^,]*|[.][*]), TEST_KERNEL=([^,]*$kernel[^,]*|[.][*]), .*, TEST_DESCRIPTION=.*"
case "$buildtype" in
opt)
@ -238,22 +238,22 @@ if [[ -z "$crashes" ]]; then
pattern="${pattern}(EXIT STATUS: CRASHED|Assertion failure:)"
;;
esac
egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetests
egrep "$pattern" failures.txt | sed 's/TEST_ID=\([^,]*\),.*/\1/' | sort | uniq >> $excludetestsfile
fi
cat $includetests | sed 's|^|include: |'
cat $excludetests | sed 's|^|exclude: |'
cat $includetestsfile | sed 's|^|include: |'
cat $excludetestsfile | sed 's|^|exclude: |'
if ! time perl jsDriver.pl \
-l $includetests \
-L $excludetests \
-s $executable \
-l $includetestsfile \
-L $excludetestsfile \
-s $executable \
-e sm$buildtype \
-o "-S 524288 $gczeal" \
-R \
-T $TEST_JSSHELL_TIMEOUT \
-f /dev/null \
-o "-S 524288 $gczeal" \
-R \
-T $TEST_JSSHELL_TIMEOUT \
-f /dev/null \
-Q; then
error "$product-$branch-$buildtype-$OSID: jsDriver.pl" $LINENO
fi

Просмотреть файл

@ -6832,8 +6832,8 @@ nsBlockFrame::WidthToClearPastFloats(nsBlockReflowState& aState,
aState.ComputeReplacedBlockOffsetsForFloats(aFrame, leftOffset, rightOffset,
&result);
nscoord availWidth = aState.mContentArea.width - leftOffset - rightOffset
+ result.marginLeft + result.marginRight;
// result.marginLeft has already been subtracted from leftOffset (etc.)
nscoord availWidth = aState.mContentArea.width - leftOffset - rightOffset;
// Force the outer frame to shrink-wrap (otherwise it just sizes to
// the available width unconditionally).
result.borderBoxWidth =

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testcase, bug 430813</title>
<style type="text/css">
table, td { border-spacing: 0; margin: 0; padding: 0; }
td { background: aqua; }
</style>
</head>
<body style="border: 1px solid; width: 500px; height: 600px;">
<table style="margin-right: 50px"><tr><td>
This should be near the top of the page, not 200px down.
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</td></tr></table>
</body></html>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testcase, bug 430813</title>
<style type="text/css">
table, td { border-spacing: 0; margin: 0; padding: 0; }
td { background: aqua; }
</style>
</head>
<body style="border: 1px solid; width: 500px; height: 600px;">
<div style="float:right;height:200px;width:50px"></div>
<table style="margin-right: 10px"><tr><td>
This should be near the top of the page, not 200px down.
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</td></tr></table>
</body></html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testcase, bug 430813</title>
<style type="text/css">
table, td { border-spacing: 0; margin: 0; padding: 0; }
td { background: aqua; }
</style>
</head>
<body style="border: 1px solid; width: 500px; height: 600px;">
<table style="margin-left: 50px; margin-right: 10px"><tr><td>
This should be near the top of the page, not 200px down.
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</td></tr></table>
</body></html>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testcase, bug 430813</title>
<style type="text/css">
table, td { border-spacing: 0; margin: 0; padding: 0; }
td { background: aqua; }
</style>
</head>
<body style="border: 1px solid; width: 500px; height: 600px;">
<div style="float:left;height:200px;width:50px"></div>
<table style="margin-right: 10px"><tr><td>
This should be near the top of the page, not 200px down.
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
</td></tr></table>
</body></html>

Просмотреть файл

@ -817,4 +817,5 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == 424074-1-ref2.xul 424074-1-ref3.xul
== 428521-1c.html 428521-1-ref.html
== 429849-1.html 429849-1-ref.html
== 430412-1.html 430412-1-ref.html
== 430813-1.html 430813-1-ref.html
== 430813-2.html 430813-2-ref.html

Просмотреть файл

@ -466,6 +466,8 @@ const PRInt32 nsCSSProps::kColorKTable[] = {
eCSSKeyword__moz_oddtreerow, nsILookAndFeel::eColor__moz_oddtreerow,
eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT,
eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR,
eCSSKeyword__moz_win_mediatext, nsILookAndFeel::eColor__moz_win_mediatext,
eCSSKeyword__moz_win_communicationstext, nsILookAndFeel::eColor__moz_win_communicationstext,
eCSSKeyword_UNKNOWN,-1
};

Просмотреть файл

@ -1935,8 +1935,12 @@ pref("layout.css.dpi", -1); // max(96dpi, System setting)
pref("font.alias-list", "sans,sans-serif,serif,monospace");
/* Fonts only needs lists if we have a default that might not be available. */
/* Tms Rmn, Helv and Courier are ALWAYS available on OS/2 */
pref("font.mathfont-family", "STIXNonUnicode, STIXSize1, STIXGeneral, DejaVu Sans");
// Languages only need lists if we have a default that might not be available.
// Tms Rmn and Helv cannot be used by Thebes but the OS/2 version of FontConfig
// maps them to Times New Roman and Helvetica, respectively. Those fonts and
// Courier are available on OS/2 by default.
pref("font.name.serif.ar", "Tms Rmn");
pref("font.name.sans-serif.ar", "Helv");
@ -1951,12 +1955,13 @@ pref("font.name.sans-serif.he", "Helv");
pref("font.name.monospace.he", "Courier");
pref("font.name.serif.ja", "Times New Roman WT J");
pref("font.name-list.serif.ja", "Times New Roman WT J, Times New Roman MT 30, Tms Rmn");
pref("font.name-list.serif.ja", "Times New Roman WT J, Times New Roman WT, Times New Roman MT 30, Tms Rmn");
pref("font.name.sans-serif.ja", "Helv");
pref("font.name.monospace.ja", "Courier");
pref("font.name.monospace.ja", "Kochi Gothic");
pref("font.name-list.monospace.ja", "Kochi Gothic, Kochi Mincho, Courier New, Courier");
pref("font.name.serif.ko", "Times New Roman WT K");
pref("font.name-list.serif.ko", "Times New Roman WT K, Times New Roman MT 30, Tms Rmn");
pref("font.name-list.serif.ko", "Times New Roman WT K, Times New Roman WT, Times New Roman MT 30, Tms Rmn");
pref("font.name.sans-serif.ko", "Helv");
pref("font.name.monospace.ko", "Courier");
@ -1973,48 +1978,52 @@ pref("font.name.sans-serif.x-baltic", "Helv");
pref("font.name.monospace.x-baltic", "Courier");
pref("font.name.serif.x-central-euro", "Tms Rmn");
pref("font.name.sans-serif.x-central-euro", "Tms Rmn");
pref("font.name.sans-serif.x-central-euro", "Helv");
pref("font.name.monospace.x-central-euro", "Courier");
pref("font.name.serif.x-cyrillic", "Tms Rmn");
pref("font.name.sans-serif.x-cyrillic", "Tms Rmn");
pref("font.name.sans-serif.x-cyrillic", "Helv");
pref("font.name.monospace.x-cyrillic", "Courier");
/* The unicode fonts must ALWAYS have a list with one valid font */
// Unicode fonts
// Fontconfig will match substrings, so that we only need to list e.g.
// Times New Roman WT and it will search for the J, SC, TC, K variants.
// The DejaVu fonts are shipped with eCS, so list them first but include all
// fonts that OS/2 users are likely to have.
pref("font.name.serif.x-unicode", "Times New Roman MT 30");
pref("font.name-list.serif.x-unicode", "Times New Roman MT 30, Times New Roman WT J, Times New Roman WT SC, Times New Roman WT TC, Times New Roman WT K, Tms Rmn");
pref("font.name.sans-serif.x-unicode", "Times New Roman MT 30");
pref("font.name-list.sans-serif.x-unicode", "Times New Roman MT 30, Times New Roman WT J, Times New Roman WT SC, Times New Roman WT TC, Times New Roman WT K, Helv");
pref("font.name.monospace.x-unicode", "Times New Roman MT 30");
pref("font.name-list.monospace.x-unicode", "Times New Roman MT 30, Times New Roman WT J, Times New Roman WT SC, Times New Roman WT TC, Times New Roman WT K, Courier");
pref("font.name-list.serif.x-unicode", "Deja Vu Serif, FreeSerif, Times New Roman WT, Times New Roman MT 30, Gentium, Doulos SIL, TITUS Cyberbit Basic, Bitstream Cyberbit, Charis SIL, Georgia, Tms Rmn");
pref("font.name.sans-serif.x-unicode", "Lucida Sans Unicode");
pref("font.name-list.sans-serif.x-unicode", "Deja Vu Sans, FreeSans, Arial Unicode, Lucida Sans Unicode, Code2002, Code2001, Code2000, Arial, Helv");
pref("font.name.monospace.x-unicode", "Deja Vu Sans Mono");
pref("font.name-list.monospace.x-unicode", "Deja Vu Sans Mono, FreeMono, Andale Mono, Monotype Sans Duospace WT J, Courier New, Courier");
pref("font.name.fantasy.x-unicode", "Times New Roman MT 30");
pref("font.name-list.fantasy.x-unicode", "Times New Roman MT 30, Times New Roman WT J, Times New Roman WT SC, Times New Roman WT TC, Times New Roman WT K, Helv");
pref("font.name-list.fantasy.x-unicode", "Deja Vu Serif, FreeSerif, Junicode, Times New Roman WT, Times New Roman MT 30, Doulos SIL, TITUS Cyberbit Basic, Bitstream Cyberbit, Charis SIL, Arial Unicode, Lucida Sans Unicode, Code2002, Code2001, Code2000");
pref("font.name.cursive.x-unicode", "Times New Roman MT 30");
pref("font.name-list.cursive.x-unicode", "Times New Roman MT 30, Times New Roman WT J, Times New Roman WT SC, Times New Roman WT TC, Times New Roman WT K, Helv");
pref("font.name-list.cursive.x-unicode", "Deja Vu Serif, FreeSerif, Times New Roman WT, Times New Roman MT 30, Doulos SIL, TITUS Cyberbit Basic, Bitstream Cyberbit, Charis SIL, Arial Unicode, Lucida Sans Unicode, Code2002, Code2001, Code2000");
pref("font.name.serif.x-western", "Tms Rmn");
pref("font.name.sans-serif.x-western", "Helv");
pref("font.name.monospace.x-western", "Courier");
pref("font.name.serif.zh-CN", "Times New Roman WT SC");
pref("font.name-list.serif.zh_CN", "Times New Roman WT SC, Times New Roman MT 30, Tms Rmn");
pref("font.name-list.serif.zh_CN", "Times New Roman WT SC, Times New Roman MT 30, Times New Roman WT, Tms Rmn");
pref("font.name.sans-serif.zh-CN", "Helv");
pref("font.name.monospace.zh-CN", "Courier");
pref("font.name.serif.zh-TW", "Times New Roman WT TC");
pref("font.name-list.serif.zh-TW", "Times New Roman WT TC, Times New Roman MT 30, Tms Rmn");
pref("font.name-list.serif.zh-TW", "Times New Roman WT TC, Times New Roman MT 30, Times New Roman WT, Tms Rmn");
pref("font.name.sans-serif.zh-TW", "Helv");
pref("font.name.monospace.zh-TW", "Courier");
// XXX : just copied values for zh-TW. TO CHANGE if necessary
// just copied values from zh-TW
pref("font.name.serif.zh-HK", "Times New Roman WT TC");
pref("font.name-list.serif.zh-HK", "Times New Roman WT TC, Times New Roman MT 30, Tms Rmn");
pref("font.name-list.serif.zh-HK", "Times New Roman WT TC, Times New Roman MT 30, Times New Roman WT, Tms Rmn");
pref("font.name.sans-serif.zh-HK", "Helv");
pref("font.name.monospace.zh-HK", "Courier");
pref("font.default", "serif");
pref("font.default.ar", "sans-serif");
pref("font.default.ar", "serif");
pref("font.size.variable.ar", 16);
pref("font.size.fixed.ar", 13);
@ -2022,15 +2031,15 @@ pref("font.default.el", "serif");
pref("font.size.variable.el", 16);
pref("font.size.fixed.el", 13);
pref("font.default.he", "sans-serif");
pref("font.default.he", "serif");
pref("font.size.variable.he", 16);
pref("font.size.fixed.he", 13);
pref("font.default.ja", "sans-serif");
pref("font.default.ja", "serif");
pref("font.size.variable.ja", 16);
pref("font.size.fixed.ja", 16);
pref("font.default.ko", "sans-serif");
pref("font.default.ko", "serif");
pref("font.size.variable.ko", 16);
pref("font.size.fixed.ko", 16);
@ -2070,15 +2079,15 @@ pref("font.default.x-western", "serif");
pref("font.size.variable.x-western", 16);
pref("font.size.fixed.x-western", 13);
pref("font.default.zh-CN", "sans-serif");
pref("font.default.zh-CN", "serif");
pref("font.size.variable.zh-CN", 16);
pref("font.size.fixed.zh-CN", 16);
pref("font.default.zh-TW", "sans-serif");
pref("font.default.zh-TW", "serif");
pref("font.size.variable.zh-TW", 16);
pref("font.size.fixed.zh-TW", 16);
pref("font.default.zh-HK", "sans-serif");
pref("font.default.zh-HK", "serif");
pref("font.size.variable.zh-HK", 16);
pref("font.size.fixed.zh-HK", 16);

Просмотреть файл

@ -69,7 +69,7 @@ TOOL_DIRS += samples/default/windows
endif
ifeq ($(OS_ARCH),OS2)
TOOL_DIRS += samples/default/os2
TOOL_DIRS += samples/default/os2 os2wrapper
ifdef ENABLE_TESTS
TOOL_DIRS += tools/tester/common tools/tester/os2
endif

Просмотреть файл

@ -1,4 +1,3 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
@ -12,19 +11,21 @@
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is canvas code.
# The Original Code is InnoTek Plugin Wrapper code.
#
# The Initial Developer of the Original Code is
# Mozilla
# Portions created by the Initial Developer are Copyright (C) 2006
# InnoTek Systemberatung GmbH.
# Portions created by the Initial Developer are Copyright (C) 2003-2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Vladimir Vukicevic <vladimir@pobox.com>
# InnoTek Systemberatung GmbH / Knut St. Osmundsen
# Peter Weilbacher <mozilla@weilbacher.org>
# Walter Meinl <wuno@lsvw.de>
#
# 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"),
# 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
@ -36,21 +37,63 @@
#
# ***** END LICENSE BLOCK *****
DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = canvas3d
DIRS = public src
MODULE = plugin
XPIDL_MODULE = ipluginw
LIBRARY_NAME = ipluginw
FORCE_SHARED_LIB = 1
IS_COMPONENT = 1
MODULE_NAME = nsInnoTekPluginWrapperModule
XPI_NAME = canvas3d
INSTALL_EXTENSION_ID = canvas3d@mozilla.com
XPI_PKGNAME = canvas3d
USE_EXTENSION_MANIFEST = 1
REQUIRES = xpcom \
xpconnect \
string \
java \
pref \
necko \
caps \
intl \
uconv \
unicharutil \
dom \
gfx \
content \
widget \
mimetype \
oji \
exthandler \
docshell \
windowwatcher \
liveconnect \
imglib2 \
layout \
js \
$(NULL)
DIST_FILES = install.rdf
CSRCS = \
util_debug.c \
$(NULL)
CPPSRCS = \
nsInnoTekPluginWrapperModule.cpp \
wrap_XPCOM.cpp \
$(NULL)
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \
$(EXTRA_DSO_LIBS) \
$(MOZ_NECKO_UTIL_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
ifdef MOZ_ENABLE_LIBXUL
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX)
endif
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1 @@
Plugin wrapper for OS/2 to enable old plugins to work with GCC-compiled builds.

Просмотреть файл

@ -0,0 +1,183 @@
/* ***** 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 InnoTek Plugin Wrapper code.
*
* The Initial Developer of the Original Code is
* InnoTek Systemberatung GmbH.
* Portions created by the Initial Developer are Copyright (C) 2003-2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* InnoTek Systemberatung GmbH / Knut St. Osmundsen
* Peter Weilbacher <mozilla@weilbacher.org>
*
* 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 ***** */
/*
* Generate moz_IDs_Generated.h from moz_IDs_Input.lst
*/
/*
* Read the input
*/
aIDs.0 = 0;
parse arg sIn sDummy
if (sIn = '') then
sIn = 'moz_IDs_Input.lst';
do while lines(sIn)
sLine = strip(linein(sIn));
if (sLine <> '' & left(sLine,1) <> '#' & left(sLine,1) <> ';') then
do
i = aIDs.0 + 1;
aIDs.0 = i;
parse var sLine aIDs.i.sClass aIDs.i.sDefine aIDs.i.sConst
if (aIDs.i.sDefine = '') then
do
if (left(aIDs.i.sClass, 2) == 'ns') then
aIDs.i.sDefine = 'NS_'||substr(aIDs.i.sClass, 3)||'_IID';
else
aIDs.i.sDefine = 'NS_'||aIDs.i.sClass||'_IID';
aIDs.i.sDefine = translate(aIDs.i.sDefine);
end
if (aIDs.i.sConst = '') then
do
if (left(aIDs.i.sClass, 3) == 'nsI') then
aIDs.i.sConst = 'k'||substr(aIDs.i.sClass, 4)||'IID';
else if (left(aIDs.i.sClass, 2) == 'ns') then
aIDs.i.sConst = 'k'||substr(aIDs.i.sClass, 3)||'IID';
else
aIDs.i.sConst = 'k'||aIDs.i.sClass||'IID';
end
end
end
call stream sIn, 'c', 'close';
/*
* Make output.
*/
say '/* ***** BEGIN LICENSE BLOCK *****'
say ' * Version: MPL 1.1/GPL 2.0/LGPL 2.1'
say ' *'
say ' * The contents of this file are subject to the Mozilla Public License Version'
say ' * 1.1 (the "License"); you may not use this file except in compliance with'
say ' * the License. You may obtain a copy of the License at'
say ' * http://www.mozilla.org/MPL/'
say ' *'
say ' * Software distributed under the License is distributed on an "AS IS" basis,'
say ' * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License'
say ' * for the specific language governing rights and limitations under the'
say ' * License.'
say ' *'
say ' * The Original Code is InnoTek Plugin Wrapper code.'
say ' *'
say ' * The Initial Developer of the Original Code is'
say ' * InnoTek Systemberatung GmbH.'
say ' * Portions created by the Initial Developer are Copyright (C) 2003-2005'
say ' * the Initial Developer. All Rights Reserved.'
say ' *'
say ' * Contributor(s):'
say ' * InnoTek Systemberatung GmbH / Knut St. Osmundsen'
say ' * Peter Weilbacher <mozilla@weilbacher.org>'
say ' *'
say ' * Alternatively, the contents of this file may be used under the terms of'
say ' * either the GNU General Public License Version 2 or later (the "GPL"), or'
say ' * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),'
say ' * in which case the provisions of the GPL or the LGPL are applicable instead'
say ' * of those above. If you wish to allow use of your version of this file only'
say ' * under the terms of either the GPL or the LGPL, and not to allow others to'
say ' * use your version of this file under the terms of the MPL, indicate your'
say ' * decision by deleting the provisions above and replace them with the notice'
say ' * and other provisions required by the GPL or the LGPL. If you do not delete'
say ' * the provisions above, a recipient may use your version of this file under'
say ' * the terms of any one of the MPL, the GPL or the LGPL.'
say ' *'
say ' * ***** END LICENSE BLOCK ***** */'
say ''
say '/*'
say ' * ID constants.'
say ' */'
say ''
say '/*******************************************************************************'
say '* Defined Constants And Macros *'
say '*******************************************************************************/'
say '#ifndef NP_DEF_ID'
say '#define NP_DEF_ID(_name, _iidspec) extern const nsIID _name'
say '#endif'
say ''
say ''
say '/*******************************************************************************'
say '* Global Variables *'
say '*******************************************************************************/'
say '/** @name Component and Interface IDs Constants.'
say ' * @{'
say ' */'
do i = 1 to aIDs.0
say '#ifdef '||aIDs.i.sDefine
say 'NP_DEF_ID('||aIDs.i.sConst', '||aIDs.i.sDefine||');'
say '#endif'
end
say ''
say ''
say ''
say '#ifdef NP_INCL_LOOKUP'
say '/**'
say ' * Lookup list for IIDs and CIDs to get an understandable name.'
say ' */'
say 'static struct nsIDNameLookupEntry'
say '{'
say ' const nsID * pID;'
say ' const char * pszName;'
say '} aIDNameLookup[] ='
say '{'
do i = 1 to aIDs.0
say '#ifdef '||aIDs.i.sDefine
say ' { &'||aIDs.i.sConst', "'||aIDs.i.sDefine||'" },'
say '#endif'
end
say '};'
say ''
say ''
say ''
say '/**'
say ' * Lookup list for IIDs and CIDs to get an understandable name.'
say ' */'
say 'static struct nsLookupStrIDEntry'
say '{'
say ' const nsID * pID;'
say ' const char * pszStrID;'
say '} aIDStrIDLookup[] ='
say '{'
do i = 1 to aIDs.0
say '#ifdef '||aIDs.i.sDefine||'_STR'
say ' { &'||aIDs.i.sConst', '||aIDs.i.sDefine||'_STR },'
say '#endif'
end
say '};'
say '#endif'
say ''
exit(0);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,980 @@
#idl dir
nsCDefaultURIFixup
nsCDocShell
nsCExternalHandlerService
nsCURILoader
nsCWebBrowser
nsCWebBrowserPersist
nsIAbAddressCollecter
nsIAbAutoCompleteSession
nsIAbBase
nsIAbBooleanExpression
nsIAbCard
nsIAbDirectory
nsIAbDirectoryQuery
nsIAbDirectoryQueryProxy
nsIAbDirectorySearch
nsIAbDirFactory
nsIAbDirFactoryService
nsIAbLDAPAutoCompFormatter
nsIAbLDAPReplicationData
nsIAbLDAPReplicationQuery
nsIAbLDAPReplicationService
nsIAbListener
nsIAbMDBCard
nsIAbMDBDirectory
nsIAboutModule
nsIAbUpgrader
nsIAbView
nsIAccessibilityService
nsIAccessible
nsIAccessibleAction
nsIAccessibleCaret
nsIAccessibleDocument
nsIAccessibleEditableText
nsIAccessibleEventListener
nsIAccessibleEventReceiver
nsIAccessibleHyperLink
nsIAccessibleHyperText
nsIAccessibleProvider
nsIAccessibleSelectable
nsIAccessibleTable
nsIAccessibleText
nsIAccessibleValue
nsIAccessibleWin32Object
nsIAddbookUrl
nsIAddrBookSession
nsIAddrDatabase
nsIAddrDBAnnouncer
nsIAddrDBListener
nsIAddressBook
nsIAggregatePrincipal
nsIAppShell
nsIAppShellService
nsIArray
nsIASN1Object
nsIASN1PrintableItem
nsIASN1Sequence
nsIASN1Tree
nsIAsyncInputStream
nsIAsyncOutputStream
nsIAsyncStreamCopier
nsIAtom
nsIAtomService
nsIAuthPrompt
nsIAuthPromptWrapper
nsIAutoCompleteListener
nsIAutoCompleteResults
nsIAutoCompleteSession
nsIAutoConfig
nsIBadCertListener
nsIBaseWindow
nsIBidiKeyboard
nsIBinaryInputStream
nsIBinaryOutputStream
nsIBookmarksService
nsIBoxLayoutManager
nsIBoxObject
nsIBoxPaintManager
nsIBrowserBoxObject
nsIBrowserHistory
nsIBrowserInstance
nsIBufEntropyCollector
nsIBufferedStreams
nsIByteArrayInputStream
nsIByteRangeRequest
nsICache
nsICacheEntryDescriptor
nsICacheListener
nsICacheService
nsICacheSession
nsICacheVisitor
nsICachingChannel
nsICategoryManager
nsICertificateDialogs
nsICertificatePrincipal
nsICertPickDialogs
nsICertSelect
nsICertTree
nsIChannel
nsICharsetConverterManager2
nsIChromeEventHandler
nsIChromeRegistry
nsICipherInfo
nsICiter
nsIClassicPluginFactory
nsIClassInfo
nsIClientAuthDialogs
nsIClipboard
nsIClipboardCommands
nsIClipboardHelper
nsIClipboardOwner
nsICloseAllWindows
nsICmdLineHandler
nsICmdLineService
nsICMSDecoder
nsICMSEncoder
nsICMSMessage
nsICMSMessageErrors
nsICMSSecureMessage
nsICodebasePrincipal
nsICollection
nsIComm4xProfile
nsICommandHandler
nsICommandManager
nsICommandParams
nsIComponentLoader
nsIComponentLoaderManager
nsIComponentManager
nsIComponentManagerObsolete
nsIComponentRegistrar
nsIConsoleListener
nsIConsoleMessage
nsIConsoleService
nsIContentHandler
nsIContentPolicy
nsIContentViewer
nsIContentViewerContainer
nsIContentViewerEdit
nsIContentViewerFile
nsIContextMenuListener
nsIContextMenuListener2
nsIController
nsIControllerCommand
nsIControllerCommandManager
nsIControllerContext
nsIControllers
nsICookie
nsICookieAcceptDialog
nsICookieConsent
nsICookieManager
nsICookieManager2
nsICookiePromptService
nsICookieService
nsICookieStorage
nsICopyMessageListener
nsICopyMsgStreamListener
nsICRLInfo
nsICRLManager
nsICurrentCharsetListener
nsIDataChannel
nsIDBChangeAnnouncer
nsIDBChangeListener
nsIDBFolderInfo
nsIDialogParamBlock
nsIDictionary
nsIDirectoryListing
nsIDirectoryService
nsIDirIndex
nsIDirIndexListener
nsIDNSListener
nsIDNSService
nsIDocCharset
nsIDocShell
nsIDocShellHistory
nsIDocShellLoadInfo
nsIDocShellTreeItem
nsIDocShellTreeNode
nsIDocShellTreeOwner
nsIDocumentCharsetInfo
nsIDocumentLoader
nsIDocumentLoaderFactory
nsIDocumentStateListener
nsIDOM3DocumentEvent
nsIDOM3EventTarget
nsIDOM3Node
nsIDOMAbstractView
nsIDOMAttr
nsIDOMBarProp
nsIDOMCDATASection
nsIDOMCharacterData
nsIDOMChromeWindow
nsIDOMComment
nsIDOMCounter
nsIDOMCRMFObject
nsIDOMCrypto
nsIDOMCryptoDialogs
nsIDOMCSS2Properties
nsIDOMCSSCharsetRule
nsIDOMCSSFontFaceRule
nsIDOMCSSImportRule
nsIDOMCSSMediaRule
nsIDOMCSSPageRule
nsIDOMCSSPrimitiveValue
nsIDOMCSSRule
nsIDOMCSSRuleList
nsIDOMCSSStyleDeclaration
nsIDOMCSSStyleRule
nsIDOMCSSStyleSheet
nsIDOMCSSUnknownRule
nsIDOMCSSValue
nsIDOMCSSValueList
nsIDOMCustomEvent
nsIDOMDocument
nsIDOMDocumentCSS
nsIDOMDocumentEvent
nsIDOMDocumentFragment
nsIDOMDocumentRange
nsIDOMDocumentStyle
nsIDOMDocumentTraversal
nsIDOMDocumentType
nsIDOMDocumentView
nsIDOMDocumentXBL
nsIDOMDOMException
nsIDOMDOMImplementation
nsIDOMElement
nsIDOMElementCSSInlineStyle
nsIDOMEntity
nsIDOMEntityReference
nsIDOMEvent
nsIDOMEventGroup
nsIDOMEventListener
nsIDOMEventTarget
nsIDOMHistory
nsIDOMHTMLAnchorElement
nsIDOMHTMLAppletElement
nsIDOMHTMLAreaElement
nsIDOMHTMLBaseElement
nsIDOMHTMLBaseFontElement
nsIDOMHTMLBodyElement
nsIDOMHTMLBRElement
nsIDOMHTMLButtonElement
nsIDOMHTMLCollection
nsIDOMHTMLDirectoryElement
nsIDOMHTMLDivElement
nsIDOMHTMLDListElement
nsIDOMHTMLDocument
nsIDOMHTMLElement
nsIDOMHTMLEmbedElement
nsIDOMHTMLFieldSetElement
nsIDOMHTMLFontElement
nsIDOMHTMLFormElement
nsIDOMHTMLFrameElement
nsIDOMHTMLFrameSetElement
nsIDOMHTMLHeadElement
nsIDOMHTMLHeadingElement
nsIDOMHTMLHRElement
nsIDOMHTMLHtmlElement
nsIDOMHTMLIFrameElement
nsIDOMHTMLImageElement
nsIDOMHTMLInputElement
nsIDOMHTMLIsIndexElement
nsIDOMHTMLLabelElement
nsIDOMHTMLLegendElement
nsIDOMHTMLLIElement
nsIDOMHTMLLinkElement
nsIDOMHTMLMapElement
nsIDOMHTMLMenuElement
nsIDOMHTMLMetaElement
nsIDOMHTMLModElement
nsIDOMHTMLObjectElement
nsIDOMHTMLOListElement
nsIDOMHTMLOptGroupElement
nsIDOMHTMLOptionElement
nsIDOMHTMLParagraphElement
nsIDOMHTMLParamElement
nsIDOMHTMLPreElement
nsIDOMHTMLQuoteElement
nsIDOMHTMLScriptElement
nsIDOMHTMLSelectElement
nsIDOMHTMLStyleElement
nsIDOMHTMLTableCaptionElem
nsIDOMHTMLTableCellElement
nsIDOMHTMLTableColElement
nsIDOMHTMLTableElement
nsIDOMHTMLTableRowElement
nsIDOMHTMLTableSectionElem
nsIDOMHTMLTextAreaElement
nsIDOMHTMLTitleElement
nsIDOMHTMLUListElement
nsIDOMJSWindow
nsIDOMKeyEvent
nsIDOMLinkStyle
nsIDOMLocation
nsIDOMMediaList
nsIDOMMimeType
nsIDOMMimeTypeArray
nsIDOMMouseEvent
nsIDOMMutationEvent
nsIDOMNamedNodeMap
nsIDOMNavigator
nsIDOMNode
nsIDOMNodeFilter
nsIDOMNodeIterator
nsIDOMNodeList
nsIDOMNotation
nsIDOMNSDocument
nsIDOMNSEvent
nsIDOMNSHistory
nsIDOMNSHTMLAnchorElement
nsIDOMNSHTMLAreaElement
nsIDOMNSHTMLButtonElement
nsIDOMNSHTMLDocument
nsIDOMNSHTMLElement
nsIDOMNSHTMLFormControlList
nsIDOMNSHTMLFormElement
nsIDOMNSHTMLFrameElement
nsIDOMNSHTMLImageElement
nsIDOMNSHTMLInputElement
nsIDOMNSHTMLOptionCollectn
nsIDOMNSHTMLSelectElement
nsIDOMNSHTMLTextAreaElement
nsIDOMNSLocation
nsIDOMNSRange
nsIDOMNSUIEvent
nsIDOMNSXBLFormControl
nsIDOMParser
nsIDOMPkcs11
nsIDOMPlugin
nsIDOMPluginArray
nsIDOMProcessingInstruction
nsIDOMRange
nsIDOMRangeException
nsIDOMRect
nsIDOMRGBColor
nsIDOMScreen
nsIDOMSerializer
nsIDOMStyleSheet
nsIDOMStyleSheetList
nsIDOMText
nsIDOMTreeWalker
nsIDOMUIEvent
nsIDOMViewCSS
nsIDOMWindow
nsIDOMWindowCollection
nsIDOMWindowInternal
nsIDOMXMLDocument
nsIDOMXPathEvaluator
nsIDOMXPathException
nsIDOMXPathExpression
nsIDOMXPathNamespace
nsIDOMXPathNSResolver
nsIDOMXPathResult
nsIDOMXULButtonElement
nsIDOMXULCheckboxElement
nsIDOMXULCommandDispatcher
nsIDOMXULControlElement
nsIDOMXULDescriptionElement
nsIDOMXULDocument
nsIDOMXULElement
nsIDOMXULImageElement
nsIDOMXULLabeledControlEl
nsIDOMXULLabelElement
nsIDOMXULMenuListElement
nsIDOMXULMultSelectCntrlEl
nsIDOMXULPopupElement
nsIDOMXULSelectCntrlEl
nsIDOMXULSelectCntrlItemEl
nsIDownload
nsIDownloader
nsIDownloadManager
nsIDownloadProgressListener
nsIDragDropHandler
nsIDragDropOverride
nsIDragService
nsIDragSession
nsIDragTracker
nsIEditActionListener
nsIEditingSession
nsIEditor
nsIEditorBoxObject
nsIEditorDocShell
nsIEditorIMESupport
nsIEditorLogging
nsIEditorMailSupport
nsIEditorObserver
nsIEditorSpellCheck
nsIEditorStyleSheets
nsIEmbeddingSiteWindow
nsIEmbeddingSiteWindow2
nsIEncodedChannel
nsIEncryptedSMIMEURIsSrvc
nsIEntityConverter
nsIEntropyCollector
nsIEnumerator
nsIErrorService
nsIEvaluateStringProxy
nsIEventHandler
nsIEventQueue
nsIEventQueueService
nsIException
nsIExceptionService
nsIExpatSink
nsIExternalHelperAppService
nsIExternalProtocolHandler
nsIExternalProtocolService
nsIFactory
nsIFastLoadFileControl
nsIFastLoadService
nsIFile
nsIFileChannel
nsIFilePicker
nsIFileProtocolHandler
nsIFileSpec
nsIFileStreams
nsIFileURL
nsIFileUtilities
nsIFind
nsIFindService
nsIFolder
nsIFolderListener
nsIFontCatalogService
nsIFontEnumerator
nsIFontList
nsIFontPackageHandler
nsIFontPackageProxy
nsIFontPackageService
nsIFormatConverter
nsIFreeType2
nsIFTPChannel
nsIFullScreen
nsIGenKeypairInfoDlg
nsIGlobalHistory
nsIGraphics
nsIHash
nsIHelperAppLauncherDialog
nsIHistoryEntry
nsIHTMLEditor
nsIHTMLObjectResizer
nsIHttpAuthenticator
nsIHttpChannel
nsIHttpChannelInternal
nsIHttpEventSink
nsIHTTPHeaderListener
nsIHttpHeaderVisitor
nsIHTTPIndex
nsIHttpNotify
nsIHttpProtocolHandler
nsIIconURI
nsIIDNService
nsIIFrameBoxObject
nsIImageDocument
nsIImapFlagAndUidState
nsIImapHeaderXferInfo
nsIImapIncomingServer
nsIImapMailFolderSink
nsIImapMessageSink
nsIImapMockChannel
nsIImapProtocol
nsIImapServerSink
nsIImapService
nsIImapUrl
nsIImgManager
nsIImportABDescriptor
nsIImportAddressBooks
nsIImportFieldMap
nsIImportGeneric
nsIImportMail
nsIImportMailboxDescriptor
nsIImportMimeEncode
nsIImportModule
nsIImportService
nsIImportSettings
nsIIncomingServerListener
nsIInputStream
nsIInputStreamChannel
nsIInputStreamPump
nsIInputStreamTee
nsIInterfaceInfo
nsIInterfaceInfoManager
nsIInterfaceRequestor
nsIIOService
nsIJAR
nsIJARChannel
nsIJARProtocolHandler
nsIJARURI
nsIJRILiveConnectPIPeer
nsIJRILiveConnectPlugin
nsIJSConsoleService
nsIJSContextStack
nsIJSRuntimeService
nsIKeyedStreamGenerator
nsIKeygenThread
nsILanguageAtom
nsILanguageAtomService
nsILDAPAutoCompFormatter
nsILDAPAutoCompleteSession
nsILDAPBERValue
nsILDAPConnection
nsILDAPErrors
nsILDAPMessage
nsILDAPMessageListener
nsILDAPOperation
nsILDAPPrefsService
nsILDAPServer
nsILDAPService
nsILDAPSyncQuery
nsILDAPURL
nsILineInputStream
nsIListBoxObject
nsILoadGroup
nsILocale
nsILocaleService
nsILocalFile
nsILocalMailIncomingServer
nsIMailboxService
nsIMailboxSpec
nsIMailboxUrl
nsIMarkupDocumentViewer
nsIMemory
nsIMenuBoxObject
nsIMenuRollup
nsIMessenger
nsIMessengerMigrator
nsIMessengerOSIntegration
nsIMessengerWindowService
nsIMimeEmitter
nsIMimeHeaders
nsIMIMEInfo
nsIMIMEInputStream
nsIMimeMiscStatus
nsIMIMEService
nsIMimeStreamConverter
nsIModule
nsIMsgAccount
nsIMsgAccountManager
nsIMsgAttachment
nsIMsgBiffManager
nsIMsgCompFields
nsIMsgCompose
nsIMsgComposeParams
nsIMsgComposeProgressParams
nsIMsgComposeSecure
nsIMsgComposeService
nsIMsgCompUtils
nsIMsgCopyService
nsIMsgCopyServiceListener
nsIMsgDatabase
nsIMsgDBView
nsIMsgDraft
nsIMsgFilter
nsIMsgFilterHitNotify
nsIMsgFilterList
nsIMsgFilterPlugin
nsIMsgFilterService
nsIMsgFolder
nsIMsgFolderCache
nsIMsgFolderCacheElement
nsIMsgFolderCompactor
nsIMsgGroupRecord
nsIMsgHdr
nsIMsgHeaderParser
nsIMsgHost
nsIMsgIdentity
nsIMsgImapMailFolder
nsIMsgIncomingServer
nsIMsgLocalMailFolder
nsIMsgLogonRedirector
nsIMsgMailNewsUrl
nsIMsgMailSession
nsIMsgMailView
nsIMsgMailViewList
nsIMsgMdnGenerator
nsIMsgMessageService
nsIMsgNewsFolder
nsIMsgOfflineImapOperation
nsIMsgOfflineManager
nsIMsgOfflineNewsState
nsIMsgParseMailMsgState
nsIMsgPrintEngine
nsIMsgProgress
nsIMsgProtocolInfo
nsIMsgPurgeService
nsIMsgQuote
nsIMsgRDFDataSource
nsIMsgRecipientArray
nsIMsgSearchAdapter
nsIMsgSearchNotify
nsIMsgSearchScopeTerm
nsIMsgSearchSession
nsIMsgSearchTerm
nsIMsgSearchValidityManager
nsIMsgSearchValidityTable
nsIMsgSearchValue
nsIMsgSend
nsIMsgSendLater
nsIMsgSendLaterListener
nsIMsgSendListener
nsIMsgSendReport
nsIMsgSignature
nsIMsgSMIMECompFields
nsIMsgSMIMEHeaderSink
nsIMsgStatusFeedback
nsIMsgStringService
nsIMsgThread
nsIMsgVCard
nsIMsgWindow
nsIMultiPartChannel
nsIMultiplexInputStream
nsINativeAppSupport
nsINativeComponentLoader
nsINativeScrollbar
nsINetModRegEntry
nsINetModuleMgr
nsINetNotify
nsINewsDatabase
nsINewsDownloadDialogArgs
nsINNTPArticleList
nsINntpIncomingServer
nsINNTPNewsgroupList
nsINNTPNewsgroupPost
nsINNTPProtocol
nsINntpService
nsINntpUrl
nsINoIncomingServer
nsINoneService
nsINSSCertCache
nsIObjectInputStream
nsIObjectOutputStream
nsIObserver
nsIObserverService
nsIOCSPResponder
nsIOutputStream
nsIPassword
nsIPasswordManager
nsIPasswordManagerInternal
nsIPasswordSink
nsIPermission
nsIPermissionManager
nsIPersistentProperties2
nsIPhonetic
nsIPipe
nsIPK11Token
nsIPK11TokenDB
nsIPKCS11Module
nsIPKCS11ModuleDB
nsIPKCS11Slot
nsIPKIParamBlock
nsIPlaintextEditor
nsIPlugin
nsIPluginHost
nsIPluginInputStream
nsIPluginInstance
nsIPluginInstanceOwner
nsIPluginInstancePeer
nsIPluginInstancePeer2
nsIPluginManager
nsIPluginManager2
nsIPluginStreamInfo
nsIPluginStreamListener
nsIPluginTagInfo
nsIPluginTagInfo2
nsIPluginViewer
nsIPop3IncomingServer
nsIPop3Service
nsIPop3Sink
nsIPop3URL
nsIPopupBoxObject
nsIPopupWindowManager
nsIPref
nsIPrefBranch
nsIPrefBranchInternal
nsIPrefetchService
nsIPrefLocalizedString
nsIPrefMigration
nsIPrefMigrationProgress
nsIPrefService
nsIPrincipal
nsIPrintingPrompt
nsIPrintingPromptService
nsIPrintOptions
nsIPrintProgress
nsIPrintProgressParams
nsIPrintSession
nsIPrintSettings
nsIPrintSettingsService
nsIPrintStatusFeedback
nsIProcess
nsIProfile
nsIProfileChangeStatus
nsIProfileInternal
nsIProfileStartupListener
nsIProgrammingLanguage
nsIProgressDialog
nsIProgressEventSink
nsIPrompt
nsIPromptService
nsIProperties
nsIPropertyBag
nsIProtocolHandler
nsIProtocolProxyService
nsIProxiedProtocolHandler
nsIProxy
nsIProxyAutoConfig
nsIProxyCreateInstance
nsIProxyInfo
nsIProxyObjectManager
nsIRDFCompositeDataSource
nsIRDFContainer
nsIRDFContainerUtils
nsIRDFDataSource
nsIRDFDelegateFactory
nsIRDFInMemoryDataSource
nsIRDFLiteral
nsIRDFNode
nsIRDFObserver
nsIRDFPurgeableDataSource
nsIRDFRemoteDataSource
nsIRDFResource
nsIRDFService
nsIRDFXMLParser
nsIRDFXMLSerializer
nsIRDFXMLSink
nsIRDFXMLSource
nsIReadConfig
nsIRecyclingAllocator
nsIRefreshURI
nsIRegistry
nsIRelatedLinksHandler
nsIRelativeFilePref
nsIRequest
nsIRequestObserver
nsIRequestObserverProxy
nsIResProtocolHandler
nsIResumableChannel
nsIResumableEntityID
nsIRollupListener
nsIRunnable
nsISample
nsISaveAsCharset
nsISchema
nsISchemaLoader
nsIScreen
nsIScreenManager
nsIScriptableDateFormat
nsIScriptableInputStream
nsIScriptableInterfaces
nsIScriptablePlugin
nsIScriptableRegion
nsIScriptableUConv
nsIScriptContextOwner
nsIScriptError
nsIScriptEventHandler
nsIScriptEventManager
nsIScriptGlobalObjectOwner
nsIScriptLoader
nsIScriptLoaderObserver
nsIScriptSecurityManager
nsIScrollable
nsIScrollBoxObject
nsISearchContext
nsISearchService
nsISecretDecoderRing
nsISecureBrowserUI
nsISecurityCheckedComponent
nsISecurityEventSink
nsISecurityPref
nsISecurityWarningDialogs
nsISeekableStream
nsISelectElement
nsISelection
nsISelectionController
nsISelectionDisplay
nsISelectionImageService
nsISelectionListener
nsISelectionPrivate
nsISemanticUnitScanner
nsISerializable
nsIServiceManager
nsISHContainer
nsISHEntry
nsISHistory
nsISHistoryInternal
nsISHistoryListener
nsISHTransaction
nsISidebar
nsISignatureVerifier
nsISignonViewer
nsISimpleEnumerator
nsISimpleStreamListener
nsISMimeCert
nsISMimeJSHelper
nsISmtpServer
nsISmtpService
nsISmtpUrl
nsISOAPAttachments
nsISOAPBlock
nsISOAPCall
nsISOAPCallCompletion
nsISOAPDecoder
nsISOAPEncoder
nsISOAPEncoding
nsISOAPFault
nsISOAPHeaderBlock
nsISOAPMessage
nsISOAPParameter
nsISOAPPropertyBagMutator
nsISOAPResponse
nsISOAPResponseListener
nsISOAPService
nsISOAPServiceRegistry
nsISOAPTransport
nsISOAPTransportListener
nsISocketProvider
nsISocketProviderService
nsISocketTransport
nsISocketTransportService
nsISOCKS4SocketInfo
nsISOCKS4SocketProvider
nsISOCKSSocketInfo
nsISOCKSSocketProvider
nsISound
nsISpamSettings
nsISSLSocketControl
nsISSLSocketProvider
nsISSLStatus
nsISSLStatusProvider
nsIStandardURL
nsIStorageStream
nsIStreamBufferAccess
nsIStreamConverter
nsIStreamConverterService
nsIStreamListener
nsIStreamListenerProxy
nsIStreamListenerTee
nsIStreamLoader
nsIStreamTransportService
nsIStringBundle
nsIStringBundleOverride
nsIStringService
nsIStringStream
nsISubscribableServer
nsISupports
nsISupportsArray
nsISupportsIterators
nsISupportsPrimitives
nsISyncLoadDOMService
nsITableEditor
nsITestProxy
nsITextAreaElement
nsITextScroll
nsITextServicesFilter
nsITextToSubURI
nsIThread
nsIThreadPool
nsITimeBomb
nsITimelineService
nsITimer
nsITimeRecorder
nsITimerInternal
nsITimerManager
nsITimingService
nsITokenDialogs
nsITokenPasswordDialogs
nsIToolkit
nsITooltipListener
nsITooltipTextProvider
nsITransaction
nsITransactionList
nsITransactionListener
nsITransactionManager
nsITransferable
nsITransport
nsITransportSecurityInfo
nsITreeBoxObject
nsITreeContentView
nsITreeSelection
nsITreeView
nsITXTToHTMLConv
nsITypeAheadFind
nsIUnicharStreamLoader
nsIUnicodeNormalizer
nsIUploadChannel
nsIURI
nsIURIChecker
nsIURIContentListener
nsIURIFixup
nsIURILoader
nsIURIRefObject
nsIURL
nsIUrlbarHistory
nsIURLFetcher
nsIUrlListener
nsIUrlListenerManager
nsIURLParser
nsIUserCertPicker
nsIUserInfo
nsIVariant
nsIViewSourceChannel
nsIWalletEditor
nsIWalletPreview
nsIWalletService
nsIWeakReference
nsIWebBrowser
nsIWebBrowserChrome
nsIWebBrowserChromeFocus
nsIWebBrowserFind
nsIWebBrowserFocus
nsIWebBrowserPersist
nsIWebBrowserPrint
nsIWebBrowserSetup
nsIWebNavigation
nsIWebPageDescriptor
nsIWebProgress
nsIWebProgressListener
nsIWindowCreator
nsIWindowCreator2
nsIWindowDataSource
nsIWindowlessPlugInstPeer
nsIWindowMediator
nsIWindowMediatorListener
nsIWindowWatcher
nsIWyciwygChannel
nsIX509Cert
nsIX509CertDB
nsIX509CertValidity
nsIXMLHttpRequest
nsIXmlRpcClient
nsIXmlRpcClientListener
nsIXPConnect
nsIXPCScriptable
nsIXPCScriptNotify
nsIXPCSecurityManager
nsIXPIDialogService
nsIXPINotifier
nsIXPIProgressDialog
nsIXPTLoader
nsIXRemoteClient
nsIXSLTException
nsIXSLTProcessor
nsIXSLTProcessorObsolete
nsIXULBrowserWindow
nsIXULSortService
nsIXULTemplateBuilder
nsIXULWindow
nsIZipReader
#
# oji *.h
nsIJRIPlugin
nsIJVMConsole
nsIJVMManager
nsIJVMPlugin
nsIJVMPluginInstance
nsIJVMPluginTagInfo
nsIJVMPrefsWindow
nsIJVMWindow
nsILiveConnectManager
nsISecureEnv
nsISymantecDebugger
nsISymantecDebugManager
nsIreadManager
nsjvm
nsJVMManager
nsJVMManager NS_JVMMANAGER_CID kJVMManagerCID
nsJVMPluginTagInfo
#
# liveconnect *.h
nsILiveconnect
nsISecureLiveconnect
nsISecurityContext
#
# added
nsIShutdownListener
nsIServiceManagerObsolete NS_ISERVICEMANAGER_OBSOLETE_IID
nsIJVMThreadManager
#
# private
FlashIObject7 FLASH_IOBJECT7_IID
FlashIScriptablePlugin7 FLASH_ISCRIPTABLEPLUGIN7_IID
nsIFlash5

Просмотреть файл

@ -0,0 +1,109 @@
/* ***** 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 InnoTek Plugin Wrapper code.
*
* The Initial Developer of the Original Code is
* InnoTek Systemberatung GmbH.
* Portions created by the Initial Developer are Copyright (C) 2003-2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* InnoTek Systemberatung GmbH / Knut St. Osmundsen
* Peter Weilbacher <mozilla@weilbacher.org>
*
* 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 ***** */
/*
* ipluginw main header.
*/
#ifndef __nsInnoTekPluginWrapper_h__
#define __nsInnoTekPluginWrapper_h__
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/** Valid Pointer? */
#define VALID_PTR(pv) \
( ((unsigned)(pv)) >= (unsigned)0x10000L /* 64KB */ \
&& ((unsigned)(pv)) < (unsigned)0xc0000000L /* 3GB */ \
)
/** Valid Reference? */
#define VALID_REF(ref) VALID_PTR(&(ref))
/** Debug printf */
#undef dprintf
#ifdef DEBUG
#define dprintf(a) npdprintf a
#else
#define dprintf(a) do { } while (0)
#endif
/** Debug Interrupt. */
#ifdef DEBUG
#define DebugInt3() asm("int $3")
#else
#define DebugInt3() do { } while (0)
#endif
/** Exception chain verify - debug only. */
#ifdef DEBUG
#define VERIFY_EXCEPTION_CHAIN() npVerifyExcptChain()
#else
#define VERIFY_EXCEPTION_CHAIN() do { } while (0)
#endif
/*******************************************************************************
* Functions *
*******************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
int npdprintf(const char *pszFormat, ...);
void _Optlink ReleaseInt3(unsigned uEAX, unsigned uEDX, unsigned uECX);
#ifndef INCL_DEBUGONLY
void npXPCOMInitSems();
nsresult npXPCOMGenericGetFactory(nsIServiceManagerObsolete *aServMgr, REFNSIID aClass, const char *aClassName,
const char *aContractID, PRLibrary * aLibrary, nsIPlugin **aResult);
nsresult npXPCOMGenericMaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut);
#endif
#ifdef __cplusplus
}
nsresult downCreateWrapper(void **ppvResult, const void *pvVFT, nsresult rc);
nsresult downCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc);
extern "C" {
nsresult upCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc);
const char * getIIDCIDName(REFNSIID aIID);
const nsID * getIIDCIDFromName(const char *pszStrID);
#endif
#ifdef __cplusplus
}
#endif
#endif

Просмотреть файл

@ -0,0 +1,363 @@
/* ***** 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 InnoTek Plugin Wrapper code.
*
* The Initial Developer of the Original Code is
* InnoTek Systemberatung GmbH.
* Portions created by the Initial Developer are Copyright (C) 2003-2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* InnoTek Systemberatung GmbH / Knut St. Osmundsen
* Peter Weilbacher <mozilla@weilbacher.org>
*
* 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 ***** */
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/** define this to make a completely freestanding module (i.e. no XPCOM imports).
* This is handy when making new builds for existing browsers since this
* doesn't require to have the .libs for the browser in question.
*
* - bird 2004-11-02: This must be enabled to support 1.7 / 1.8+!
*/
#ifndef _NO_XPCOMDLL_
# ifdef IPLUGINW_OUTOFTREE
# define _NO_XPCOMDLL_ 1
# endif
#endif
/** define this to have minimal dependencies on XPCOM. */
#ifndef _MINIMAL_XPCOMDLL_
# ifdef _NO_XPCOMDLL_
# define _MINIMAL_XPCOMDLL_ 1
# endif
#endif
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef _NO_XPCOMDLL_
#define INCL_BASE
#include <os2.h>
#endif
#ifdef DEBUG
#include <stdio.h>
#endif
#include "nsCOMPtr.h"
#include "nsIPlugin.h"
#include "nsIGenericFactory.h"
#include "nsILegacyPluginWrapperOS2.h"
#include "nsInnoTekPluginWrapper.h"
/*******************************************************************************
* Global Variables *
*******************************************************************************/
static NS_DEFINE_CID(kPluginCID, NS_PLUGIN_CID);
static NS_DEFINE_CID(kSupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_CID(kLegacyPluginWrapperIID, NS_ILEGACYPLUGINWRAPPEROS2_IID);
/**
* Implements a plugin wrapper factory.
*/
class nsInnoTekPluginWrapper : public nsILegacyPluginWrapperOS2
{
#ifdef _MINIMAL_XPCOMDLL_
public:
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);
protected:
nsAutoRefCnt mRefCnt;
#else
NS_DECL_ISUPPORTS
#endif
public:
nsInnoTekPluginWrapper();
static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult);
/**
* PR_FindSymbol(,"NSGetFactory") + NSGetFactory().
*/
/* void getFactory (in nsIServiceManagerObsolete aServMgr, in REFNSIID aClass, in string aClassName, in string aContractID, in PRLibraryPtr aLibrary, out nsIPlugin aResult); */
NS_IMETHOD GetFactory(nsIServiceManagerObsolete *aServMgr, REFNSIID aClass, const char *aClassName, const char *aContractID, PRLibrary * aLibrary, nsIPlugin **aResult);
/**
* Create a wrapper for the given interface if it's a legacy interface.
* @returns NS_OK on success.
* @returns NS_ERROR_INTERFACE if aIID isn't supported. aOut is nsnull.
* @returns NS_ERROR_FAILURE on other error. aOut undefined.
* @param aIID Interface Identifier of aIn and aOut.
* @param aIn Interface of type aIID which may be a legacy interface
* requiring a wrapper.
* @param aOut The native interface.
* If aIn is a legacy interface, this will be a wrappre.
* If aIn is not a legacy interface, this is aIn.
*/
/* void maybeWrap (in REFNSIID aIID, in nsISupports aIn, out nsISupports aOut); */
NS_IMETHOD MaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut);
};
#ifdef _MINIMAL_XPCOMDLL_
NS_IMETHODIMP_(nsrefcnt) nsInnoTekPluginWrapper::AddRef(void)
{
return ++mRefCnt;
}
NS_IMETHODIMP_(nsrefcnt) nsInnoTekPluginWrapper::Release(void)
{
--mRefCnt;
if (mRefCnt == 0)
{
mRefCnt = 1; /* stabilize */
delete this;
return 0;
}
return mRefCnt;
}
NS_IMETHODIMP nsInnoTekPluginWrapper::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
if (aIID.Equals(kLegacyPluginWrapperIID))
{
*aInstancePtr = static_cast< nsILegacyPluginWrapperOS2 * > (this);
AddRef();
return NS_OK;
}
if (aIID.Equals(kSupportsIID))
{
*aInstancePtr = static_cast< nsISupports * > (this);
AddRef();
return NS_OK;
}
*aInstancePtr = nsnull;
return NS_ERROR_NO_INTERFACE;
}
#else
NS_IMPL_ISUPPORTS1(nsInnoTekPluginWrapper, nsILegacyPluginWrapperOS2)
#endif
/** Factory Constructor Object - do nothing. */
nsInnoTekPluginWrapper::nsInnoTekPluginWrapper()
{
/* Create semaphores at a safe time */
npXPCOMInitSems();
}
/**
* Create the factory.
* @returns NS_OK on success, with aResult containing the requested interface.
* @returns NS_ERROR_* on failure, aResult is nsnull.
*/
nsresult nsInnoTekPluginWrapper::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
*aResult = nsnull;
#ifndef _MINIMAL_XPCOMDLL_
NS_PRECONDITION(aOuter == nsnull, "no aggregation");
#endif
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
#ifdef _MINIMAL_XPCOMDLL_
nsILegacyPluginWrapperOS2 *
#else
nsCOMPtr<nsILegacyPluginWrapperOS2>
#endif
factory = new nsInnoTekPluginWrapper();
if (!factory)
return NS_ERROR_OUT_OF_MEMORY;
return factory->QueryInterface(aIID, aResult);
}
/**
* This is where we create the initial wrapper.
*/
NS_IMETHODIMP nsInnoTekPluginWrapper::GetFactory(nsIServiceManagerObsolete *aServMgr,
REFNSIID aClass,
const char *aClassName,
const char *aContractID,
PRLibrary * aLibrary,
nsIPlugin **aResult)
{
nsresult rc;
dprintf(("nsInnoTekPluginWrapper::CreatePlugin: enter"));
/*
* Do NSGetFactory.
*/
rc = npXPCOMGenericGetFactory(aServMgr, aClass, aClassName, aContractID, aLibrary, aResult);
dprintf(("nsInnoTekPluginWrapper::CreatePlugin: npXPCOMGenericGetFactory -> rc=%d and *aResult=%x",
rc, *aResult));
return rc;
}
/**
* Create a wrapper for the given interface if it's a legacy interface.
* @returns NS_OK on success.
* @returns NS_ERROR_NO_INTERFACE if aIID isn't supported. aOut is nsnull.
* @returns NS_ERROR_FAILURE on other error. aOut undefined.
* @param aIID Interface Identifier of aIn and aOut.
* @param aIn Interface of type aIID which may be a legacy interface
* requiring a wrapper.
* @param aOut The native interface.
* If aIn is a legacy interface, this will be a wrappre.
* If aIn is not a legacy interface, this is aIn.
* @remark Typically used for the flash plugin.
*/
NS_IMETHODIMP nsInnoTekPluginWrapper::MaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut)
{
return npXPCOMGenericMaybeWrap(aIID, aIn, aOut);
}
/** Component Info */
static const nsModuleComponentInfo gComponentInfo[] =
{
{
"InnoTek Legacy XPCOM Plugin Wrapper",
NS_LEGACY_PLUGIN_WRAPPER_CID,
NS_LEGACY_PLUGIN_WRAPPER_CONTRACTID,
nsInnoTekPluginWrapper::Create
}
};
/** NSGetModule(); */
NS_IMPL_NSGETMODULE(nsInnoTekPluginWrapperModule, gComponentInfo)
#ifdef _NO_XPCOMDLL_
/**
* Find the start of the filename.
*
* @returns pointer to start of filename.
* @param pszPath Path to examin.
*/
static char *GetBasename(char *pszPath)
{
char *pszName;
char *psz;
pszName = strrchr(pszPath, '\\');
psz = strrchr(pszName ? pszName : pszPath, '/');
if (psz)
pszName = psz;
if (!pszName)
pszName = strchr(pszPath, ':');
if (pszName)
pszName++;
else
pszName = pszPath;
return pszName;
}
nsresult NS_NewGenericModule2(nsModuleInfo *info, nsIModule* *result)
{
HMODULE hmod;
nsresult rc = NS_ERROR_UNEXPECTED;
APIRET rc2;
/*
* Because of the LIBPATHSTRICT feature we have to specific the full path
* of the DLL to make sure we get the right handle.
* (We're of course making assumptions about the executable and the XPCOM.DLL
* begin at the same location.)
*/
char szXPCOM[CCHMAXPATH];
char * pszName;
PPIB ppib;
PTIB ptib;
DosGetInfoBlocks(&ptib, &ppib);
pszName = GetBasename(strcpy(szXPCOM, ppib->pib_pchcmd));
strcpy(pszName, "XPCOM.DLL");
rc2 = DosLoadModule(NULL, 0, (PCSZ)szXPCOM, &hmod);
if (!rc2)
{
NS_COM nsresult (* pfnNS_NewGenericModule2)(nsModuleInfo *info, nsIModule* *result);
/* demangled name: NS_NewGenericModule2(nsModuleInfo*, nsIModule**) */
rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule",
(PFN*)&pfnNS_NewGenericModule2);
if (rc2)
/* demangled name: NS_NewGenericModule2(const nsModuleInfo*, nsIModule**) */
rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2PK12nsModuleInfoPP9nsIModule",
(PFN*)&pfnNS_NewGenericModule2);
if (rc2)
{
/* The mozilla guys have splitt up XPCOM.DLL in 1.8 just to make life difficult. :-) */
DosFreeModule(hmod);
strcpy(pszName, "XPCOMCOR.DLL");
rc2 = DosLoadModule(NULL, 0, (PCSZ)szXPCOM, &hmod);
if (!rc2)
{
rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule",
(PFN*)&pfnNS_NewGenericModule2);
if (rc2)
/* demangled name: NS_NewGenericModule2(const nsModuleInfo*, nsIModule**) */
rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2PK12nsModuleInfoPP9nsIModule",
(PFN*)&pfnNS_NewGenericModule2);
}
}
if (!rc2)
rc = pfnNS_NewGenericModule2(info, result);
#ifdef DEBUG
else
fprintf(stderr, "ipluginw: DosQueryProcAddr -> %ld\n", rc2);
#endif
DosFreeModule(hmod);
}
#ifdef DEBUG
else
fprintf(stderr, "ipluginw: DosLoadModule -> %ld\n", rc2);
if (rc)
fprintf(stderr, "ipluginw: NS_NewGenericModule2 -> %#x\n", rc);
#endif
return rc;
}
#endif

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше