merge to tip

This commit is contained in:
Doug Turner 2008-10-30 11:35:27 -07:00
commit 7d07e48c7e
72 changed files with 826 additions and 1395 deletions

View File

@ -462,14 +462,12 @@ var PlacesCommandHook = {
bookmarkLink: function PCH_bookmarkLink(aParent, aURL, aTitle) {
var linkURI = makeURI(aURL);
var itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
if (itemId == -1) {
StarUI.beginBatch();
var txn = PlacesUIUtils.ptm.createItem(linkURI, aParent, -1, aTitle);
PlacesUIUtils.ptm.doTransaction(txn);
itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
if (itemId == -1)
PlacesUIUtils.showMinimalAddBookmarkUI(linkURI, aTitle);
else {
PlacesUIUtils.showItemProperties(itemId,
PlacesUtils.bookmarks.TYPE_BOOKMARK);
}
StarUI.showEditBookmarkPopup(itemId, getBrowser(), "overlap");
},
/**

File diff suppressed because it is too large Load Diff

View File

@ -23,6 +23,7 @@
- Joe Hughes <jhughes@google.com>
- Asaf Romano <mano@mozilla.com>
- Ehsan Akhgari <ehsan.akhgari@gmail.com>
- Marco Bonardo <mak77@bonardo.net>
-
- 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
@ -39,24 +40,22 @@
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://browser/skin/places/bookmarkProperties.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/places.css"?>
<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
<?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
<?xul-overlay href="chrome://browser/content/places/editBookmarkOverlay.xul"?>
<!DOCTYPE dialog [
<!ENTITY % propertiesDTD SYSTEM "chrome://browser/locale/places/bookmarkProperties.dtd">
%propertiesDTD;
<!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
%placesDTD;
<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
%editBookmarkOverlayDTD;
]>
<dialog id="bookmarkproperties"
buttons="accept, cancel"
buttonlabelextra2="&bookmarks.newFolderButton.label;"
buttonaccesskeyextra2="&bookmarks.newFolderButton.accesskey;"
ondialogaccept="BookmarkPropertiesPanel.onDialogAccept();"
ondialogextra2="BookmarkPropertiesPanel.newFolder();"
ondialogcancel="BookmarkPropertiesPanel.onDialogCancel();"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="BookmarkPropertiesPanel.onDialogLoad();"
onunload="BookmarkPropertiesPanel.onDialogUnload();"
@ -68,103 +67,11 @@
src="chrome://browser/locale/places/bookmarkProperties.properties"/>
</stringbundleset>
<script type="application/x-javascript"
<script type="application/javascript"
src="chrome://browser/content/places/editBookmarkOverlay.js"/>
<script type="application/javascript"
src="chrome://browser/content/places/bookmarkProperties.js"/>
<grid id="placesInfoGrid">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows id="placesInfoRows">
<row id="titleRow" align="center">
<label value="&bookmarks.name.label;" accesskey="&bookmarks.name.accesskey;"
control="namePicker"/>
<menulist id="namePicker"
editable="true"
droppable="false"
oninput="BookmarkPropertiesPanel.onNamePickerInput();">
<menupopup>
<menuitem id="userEnteredName"/>
<menuitem disabled="true">
<menuseparator flex="1"/>
<label value="&bookmarks.liveTitlesSeparator.label;"/>
</menuitem>
</menupopup>
</menulist>
</row>
<row id="locationRow" align="center">
<label value="&bookmarks.location.label;" accesskey="&bookmarks.location.accesskey;"
control="editURLBar"/>
<textbox id="editURLBar" size="10"
onchange="BookmarkPropertiesPanel.validateChanges();"
oninput="BookmarkPropertiesPanel.validateChanges();"/>
</row>
<row id="livemarkFeedLocationRow" align="center">
<label value="&bookmarks.feed_location.label;" accesskey="&bookmarks.feed_location.accesskey;"
control="feedLocationTextfield"/>
<textbox id="feedLocationTextfield"
onchange="BookmarkPropertiesPanel.validateChanges();"
oninput="BookmarkPropertiesPanel.validateChanges();"/>
</row>
<row id="livemarkSiteLocationRow" align="center">
<label value="&bookmarks.site_location.label;" accesskey="&bookmarks.site_location.accesskey;"
control="feedSiteLocationTextfield"/>
<textbox id="feedSiteLocationTextfield"
onchange="BookmarkPropertiesPanel.validateChanges();"
oninput="BookmarkPropertiesPanel.validateChanges();"/>
</row>
<row id="keywordRow" align="center">
<label value="&bookmarks.keyword.label;" accesskey="&bookmarks.keyword.accesskey;"
control="keywordTextfield"/>
<textbox id="keywordTextfield"/>
</row>
<row id="descriptionRow">
<label value="&bookmarks.description.label;" accesskey="&bookmarks.description.accesskey;"
control="descriptionTextfield"/>
<textbox id="descriptionTextfield" multiline="true"/>
</row>
<row id="folderRow" align="center">
<label value="&bookmarks.createIn.label;" accesskey="&bookmarks.createIn.accesskey;"
control="folderMenuList"/>
<menulist id="folderMenuList"
class="folder-icon"
oncommand="BookmarkPropertiesPanel.onMenuListFolderSelect();">
<menupopup>
<!-- Static item for special folders -->
<menuitem id="bookmarksRootItem"
class="menuitem-iconic folder-icon"/>
<menuitem id="toolbarFolderItem"
class="menuitem-iconic folder-icon"/>
<menuseparator id="foldersSeparator" hidden="true"/>
</menupopup>
</menulist>
<button id="expander"
class="down"
tooltiptext="&bookmarks.expanderDown.tooltip;"
tooltiptextdown="&bookmarks.expanderDown.tooltip;"
tooltiptextup="&bookmarks.expanderUp.tooltip;"
oncommand="BookmarkPropertiesPanel.toggleTreeVisibility();"/>
</row>
<checkbox id="loadInSidebarCheckbox"
label="&bookmarks.loadInSidebar.label;"
accesskey="&bookmarks.loadInSidebar.accesskey;"/>
</rows>
</grid>
<vbox id="editBookmarkPanelContent"/>
<separator class="thin"/>
<tree id="folderTree"
class="placesTree"
collapsed="true"
flex="1"
type="places"
height="150"
persist="height"
onselect="BookmarkPropertiesPanel.onFolderTreeSelect();"
hidecolumnpicker="true">
<treecols>
<treecol id="title" flex="1" primary="true" hideheader="true"/>
</treecols>
<treechildren id="placesListChildren" view="placesList" flex="1"/>
</tree>
</dialog>

View File

@ -335,6 +335,10 @@ var gEditItemOverlay = {
var defaultItem = this._getFolderMenuItem(aSelectedFolder);
this._folderMenuList.selectedItem = defaultItem;
// Set a selectedIndex attribute to show special icons
this._folderMenuList.setAttribute("selectedIndex",
this._folderMenuList.selectedIndex);
// Hide the folders-separator if no folder is annotated as recently-used
this._element("foldersSeparator").hidden = (menupopup.childNodes.length <= 6);
this._folderMenuList.disabled = this._readOnly;
@ -798,6 +802,9 @@ var gEditItemOverlay = {
},
onFolderMenuListCommand: function EIO_onFolderMenuListCommand(aEvent) {
// Set a selectedIndex attribute to show special icons
this._folderMenuList.setAttribute("selectedIndex",
this._folderMenuList.selectedIndex);
if (aEvent.target.id == "editBMPanel_chooseFolderMenuItem") {
// reset the selection back to where it was and expand the tree
// (this menu-item is hidden when the tree is already visible

View File

@ -35,12 +35,9 @@
#
# ***** END LICENSE BLOCK *****
<!-- XXXmano: temporary also use moveBookmarks for the "New Folder" button -->
<!DOCTYPE overlay [
<!ENTITY % editBookmarkOverlayDTD SYSTEM "chrome://browser/locale/places/editBookmarkOverlay.dtd">
%editBookmarkOverlayDTD;
<!ENTITY % moveBookmarksDTD SYSTEM "chrome://browser/locale/places/moveBookmarks.dtd">
%moveBookmarksDTD;
]>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmarkOverlay.css"?>
@ -121,15 +118,15 @@
observes="paneElementsBroadcaster">
<menupopup>
<!-- Static item for special folders -->
<menuitem id="editBMPanel_unfiledRootItem"
<menuitem id="editBMPanel_toolbarFolderItem"
class="menuitem-iconic folder-icon"/>
<menuitem id="editBMPanel_bmRootItem"
class="menuitem-iconic folder-icon"/>
<menuitem id="editBMPanel_toolbarFolderItem"
<menuitem id="editBMPanel_unfiledRootItem"
class="menuitem-iconic folder-icon"/>
<menuseparator id="editBMPanel_chooseFolderSeparator"/>
<menuitem id="editBMPanel_chooseFolderMenuItem"
label="&editBookmarkOverlay.choose.label;"
label="&editBookmarkOverlay.choose.label;"
class="menuitem-iconic folder-icon"/>
<menuseparator id="editBMPanel_foldersSeparator" hidden="true"/>
</menupopup>
@ -159,9 +156,9 @@
</tree>
<hbox id="editBMPanel_newFolderBox" collapsed="true">
<button label="&newFolderButton.label;"
<button label="&editBookmarkOverlay.newFolderButton.label;"
id="editBMPanel_newFolderButton"
accesskey="&newFolderButton.accesskey;"
accesskey="&editBookmarkOverlay.newFolderButton.accesskey;"
oncommand="gEditItemOverlay.newFolder();"/>
<spacer flex="1"/>
</hbox>

View File

@ -460,7 +460,7 @@ var PlacesUIUtils = {
if (aDefaultInsertionPoint) {
info.defaultInsertionPoint = aDefaultInsertionPoint;
if (!aShowPicker)
info.hiddenRows = ["folder picker"];
info.hiddenRows = ["folderPicker"];
}
if (aLoadInSidebar)
@ -496,7 +496,7 @@ var PlacesUIUtils = {
var info = {
action: "add",
type: "bookmark",
hiddenRows: ["location", "description", "loadInSidebar"]
hiddenRows: ["description"]
};
if (aURI)
info.uri = aURI;
@ -511,14 +511,18 @@ var PlacesUIUtils = {
if (aDefaultInsertionPoint) {
info.defaultInsertionPoint = aDefaultInsertionPoint;
if (!aShowPicker)
info.hiddenRows.push("folder picker");
info.hiddenRows.push("folderPicker");
}
if (aLoadInSidebar)
info.loadBookmarkInSidebar = true;
else
info.hiddenRows = info.hiddenRows.concat(["location", "loadInSidebar"]);
if (typeof(aKeyword) == "string") {
info.keyword = aKeyword;
// hide the Tags field if we are adding a keyword
info.hiddenRows.push("tags");
if (typeof(aPostData) == "string")
info.postData = aPostData;
if (typeof(aCharSet) == "string")
@ -578,7 +582,7 @@ var PlacesUIUtils = {
if (aDefaultInsertionPoint) {
info.defaultInsertionPoint = aDefaultInsertionPoint;
if (!aShowPicker)
info.hiddenRows = ["folder picker"];
info.hiddenRows = ["folderPicker"];
}
return this._showBookmarkDialog(info);
},
@ -598,7 +602,7 @@ var PlacesUIUtils = {
var info = {
action: "add",
type: "livemark",
hiddenRows: ["feedURI", "siteURI", "description"]
hiddenRows: ["feedLocation", "siteLocation", "description"]
};
if (aFeedURI)
@ -616,7 +620,7 @@ var PlacesUIUtils = {
if (aDefaultInsertionPoint) {
info.defaultInsertionPoint = aDefaultInsertionPoint;
if (!aShowPicker)
info.hiddenRows.push("folder picker");
info.hiddenRows.push("folderPicker");
}
this._showBookmarkDialog(info, true);
},
@ -689,7 +693,7 @@ var PlacesUIUtils = {
if (aDefaultInsertionPoint) {
info.defaultInsertionPoint = aDefaultInsertionPoint;
if (!aShowPicker)
info.hiddenRows.push("folder picker");
info.hiddenRows.push("folderPicker");
}
return this._showBookmarkDialog(info);
},
@ -704,11 +708,7 @@ var PlacesUIUtils = {
* [optional] if true, the dialog is opened by its alternative
* chrome: uri.
*
* Note: In minimal UI mode, we open the dialog non-modal on any system but
* Mac OS X.
* @return true if any transaction has been performed, false otherwise.
* Note: the return value of this method is not reliable in minimal UI mode
* since the dialog may not be opened modally.
*/
_showBookmarkDialog: function PU__showBookmarkDialog(aInfo, aMinimalUI) {
var dialogURL = aMinimalUI ?
@ -717,11 +717,7 @@ var PlacesUIUtils = {
var features;
if (aMinimalUI)
#ifdef XP_MACOSX
features = "centerscreen,chrome,dialog,resizable,modal";
#else
features = "centerscreen,chrome,dialog,resizable,dependent";
#endif
else
features = "centerscreen,chrome,modal,resizable=no";
window.openDialog(dialogURL, "", features, aInfo);

View File

@ -1,21 +0,0 @@
<!ENTITY bookmarks.name.label "Name:">
<!ENTITY bookmarks.name.accesskey "N">
<!ENTITY bookmarks.location.label "Location:">
<!ENTITY bookmarks.location.accesskey "L">
<!ENTITY bookmarks.keyword.label "Keyword:">
<!ENTITY bookmarks.keyword.accesskey "K">
<!ENTITY bookmarks.description.label "Description:">
<!ENTITY bookmarks.description.accesskey "D">
<!ENTITY bookmarks.liveTitlesSeparator.label "Live Titles">
<!ENTITY bookmarks.createIn.label "Create in:">
<!ENTITY bookmarks.createIn.accesskey "C">
<!ENTITY bookmarks.feed_location.label "Feed Location:">
<!ENTITY bookmarks.feed_location.accesskey "F">
<!ENTITY bookmarks.site_location.label "Site Location:">
<!ENTITY bookmarks.site_location.accesskey "S">
<!ENTITY bookmarks.loadInSidebar.label "Load this bookmark in the sidebar">
<!ENTITY bookmarks.loadInSidebar.accesskey "o">
<!ENTITY bookmarks.expanderDown.tooltip "Show all the bookmarks folders">
<!ENTITY bookmarks.expanderUp.tooltip "Hide">
<!ENTITY bookmarks.newFolderButton.label "New Folder">
<!ENTITY bookmarks.newFolderButton.accesskey "e">

View File

@ -1,10 +1,12 @@
dialogAcceptLabelAddItem=Add
dialogAcceptLabelSaveItem=Save
dialogAcceptLabelAddLivemark=Subscribe
dialogAcceptLabelAddMulti=Add Bookmarks
dialogAcceptLabelEdit=Save Changes
dialogTitleAddBookmark=Add Bookmark
dialogTitleAddLivemark=Add Live Bookmark
dialogTitleAddFolder=Add Folder
dialogTitleAddMulti=Bookmark All Tabs
dialogAcceptLabelEdit=Save
dialogTitleAddBookmark=New Bookmark
dialogTitleAddLivemark=Subscribe to Live Bookmark
dialogTitleAddFolder=New Folder
dialogTitleAddMulti=New Bookmarks
dialogTitleEdit=Properties for "%S"
bookmarkAllTabsDefault=[Folder Name]

View File

@ -21,3 +21,5 @@
<!ENTITY editBookmarkOverlay.loadInSidebar.label "Load this bookmark in the sidebar">
<!ENTITY editBookmarkOverlay.loadInSidebar.accesskey "h">
<!ENTITY editBookmarkOverlay.choose.label "Choose…">
<!ENTITY editBookmarkOverlay.newFolderButton.label "New Folder">
<!ENTITY editBookmarkOverlay.newFolderButton.accesskey "N">

View File

@ -31,7 +31,6 @@
locale/browser/places/places.dtd (%chrome/browser/places/places.dtd)
locale/browser/places/places.properties (%chrome/browser/places/places.properties)
locale/browser/places/editBookmarkOverlay.dtd (%chrome/browser/places/editBookmarkOverlay.dtd)
locale/browser/places/bookmarkProperties.dtd (%chrome/browser/places/bookmarkProperties.dtd)
locale/browser/places/bookmarkProperties.properties (%chrome/browser/places/bookmarkProperties.properties)
locale/browser/preferences/selectBookmark.dtd (%chrome/browser/preferences/selectBookmark.dtd)
locale/browser/places/moveBookmarks.dtd (%chrome/browser/places/moveBookmarks.dtd)

View File

@ -139,19 +139,6 @@ menuitem.bookmark-item {
-moz-padding-start: 0px;
}
/* Bookmark panel dropdown menu items */
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
}
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
}
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png") !important;
}
/* Bookmark drag and drop styles */
.bookmark-item[dragover-into="true"] {
background: Highlight !important;

View File

@ -35,7 +35,6 @@ classic.jar:
skin/classic/browser/feeds/audioFeedIcon.png (feeds/audioFeedIcon.png)
skin/classic/browser/feeds/audioFeedIcon16.png (feeds/audioFeedIcon16.png)
skin/classic/browser/feeds/subscribe.css (feeds/subscribe.css)
* skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
skin/classic/browser/places/bookmarksMenu.png (places/bookmarksMenu.png)
skin/classic/browser/places/bookmarksToolbar.png (places/bookmarksToolbar.png)
skin/classic/browser/places/calendar.png (places/calendar.png)

View File

@ -1,106 +0,0 @@
%if 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 Firefox.
*
* 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):
* Myk Melez <myk@mozilla.org>
* Simon Bünzli <zeniko@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
%endif
/**** folder menulist ****/
.folder-icon > .menulist-label-box > .menulist-icon {
width: 16px;
height: 16px;
}
.folder-icon > .menu-iconic-left {
display: -moz-box;
}
.folder-icon {
list-style-image: url("moz-icon://stock/gtk-directory?size=menu") !important;
}
/**** expander ****/
#expander {
min-width: 0;
}
.up {
list-style-image: url("chrome://global/skin/arrow/arrow-up.gif");
}
.up:hover {
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
}
.down {
list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}
.down:hover {
list-style-image: url("chrome://global/skin/arrow/arrow-dn-hov.gif");
}
/**** name picker ****/
/* Make the microsummary picker look like a regular textbox instead of
* an editable menulist when no microsummaries are available.
*/
menulist#namePicker[droppable="false"] {
/* These rules come from the textbox element in textbox.css. */
/* Normal editable menulists set this to "none". */
-moz-appearance: textfield;
cursor: text;
border: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
background-color: -moz-Field;
color: -moz-FieldText;
}
menulist#namePicker[droppable="false"] > .menulist-editable-box {
/* Normal editable menulists set this to "menulist-textfield". */
-moz-appearance: none;
padding: 2px 2px 3px 4px;
}
/* Hide the drop marker and the popup when no microsummaries are available. */
menulist#namePicker[droppable="false"] > .menulist-dropmarker,
menulist#namePicker[droppable="false"] > menupopup {
display: none;
}

View File

@ -56,6 +56,8 @@
.expander-up,
.expander-down {
min-width: 0;
padding: 2px 0;
-moz-padding-start: 2px;
}
.expander-up {
@ -74,6 +76,11 @@
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
}
#editBMPanel_tagsSelector[collapsed="true"],
#editBMPanel_folderTree[collapsed="true"] {
display: none;
}
/**** name picker ****/
/* Make the microsummary picker look like a regular textbox instead of
@ -107,3 +114,20 @@
#editBMPanel_namePicker[droppable="false"] > menupopup {
display: none;
}
/* Bookmark panel dropdown menu items */
#editBMPanel_folderMenuList[selectedIndex="0"],
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
}
#editBMPanel_folderMenuList[selectedIndex="1"],
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
}
#editBMPanel_folderMenuList[selectedIndex="2"],
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png") !important;
}

View File

@ -300,20 +300,6 @@ toolbarpaletteitem[place="toolbar"] .places-toolbar-items {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png");
}
/* ----- BOOKMARK PANEL DROPDOWN MENU ITEMS ----- */
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
}
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
}
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unfiledBookmarks.png") !important;
}
/* ----- PRIMARY TOOLBAR BUTTONS ----- */
.toolbarbutton-1,

View File

@ -86,7 +86,6 @@ classic.jar:
skin/classic/browser/places/folderDropArrow.png (places/folderDropArrow.png)
skin/classic/browser/places/livemarkFolder.png (places/livemarkFolder.png)
skin/classic/browser/places/back-forward.png (places/back-forward.png)
skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
skin/classic/browser/places/editBookmarkOverlay.css (places/editBookmarkOverlay.css)
skin/classic/browser/places/menubutton-start.png (places/menubutton-start.png)
skin/classic/browser/places/menubutton-start-rtl.png (places/menubutton-start-rtl.png)

View File

@ -1,140 +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 Firefox.
*
* 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):
* Myk Melez <myk@mozilla.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 ***** */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml");
/**** folder menulist ****/
.folder-icon > .menulist-label-box > .menulist-icon,
.folder-icon > .menu-iconic-left > .menu-iconic-icon {
width: 16px;
height: 16px;
}
.folder-icon > .menu-iconic-left {
display: -moz-box;
}
.folder-icon {
list-style-image: url("chrome://global/skin/tree/folder.png") !important;
}
.menulist-icon {
margin: 0px !important;
}
/**** folder tree ****/
#folderTree {
margin: 6px 0;
}
/**** expander ****/
#expander {
-moz-appearance: none;
margin-left: 8px;
padding: 0;
min-width: 0;
}
.up {
list-style-image: url("chrome://browser/skin/places/expander-open.png") !important;
}
.down {
list-style-image: url("chrome://browser/skin/places/expander-closed.png") !important;
}
.down:hover:active {
list-style-image: url("chrome://browser/skin/places/expander-closed-active.png") !important;
}
.up:hover:active {
list-style-image: url("chrome://browser/skin/places/expander-open-active.png") !important;
}
/**** name picker ****/
/* Make the microsummary picker look like a regular textbox instead of
* an editable menulist when no microsummaries are available.
*/
menulist#namePicker[droppable="false"] {
-moz-appearance: none;
margin: 0px;
border: none;
padding: 0px;
height: auto !important;
}
menulist#namePicker[droppable="false"] > .menulist-dropmarker {
display: none;
}
menulist#namePicker[droppable="false"] > .menulist-editable-box {
/* These rules are duplicates of the rules for the textbox element
* in textbox.css and should track changes in that file.
*/
-moz-appearance: textfield;
cursor: text;
margin: 2px 4px;
border: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
padding: 2px 2px 3px 4px;
background-color: -moz-Field;
color: -moz-FieldText;
}
menulist#namePicker[droppable="false"] > .menulist-editable-box > html|*.textbox-input {
margin: 0px !important;
border: none !important;
padding: 0px !important;
background-color: inherit;
color: inherit;
font: inherit;
}
/* Hide the drop marker and the popup. */
menulist#namePicker[droppable="false"] > .menulist-dropmarker {
display: none;
}
menulist#namePicker[droppable="false"] > menupopup {
display: none;
}

View File

@ -152,3 +152,21 @@
#editBMPanel_namePicker[droppable="false"] > menupopup {
display: none;
}
/* ----- BOOKMARK PANEL DROPDOWN MENU ITEMS ----- */
#editBMPanel_folderMenuList[selectedIndex="0"],
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
}
#editBMPanel_folderMenuList[selectedIndex="1"],
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
}
#editBMPanel_folderMenuList[selectedIndex="2"],
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unfiledBookmarks.png") !important;
}

View File

@ -205,23 +205,6 @@ menuitem.bookmark-item {
-moz-image-region: rect(16px, 32px, 32px, 16px);
}
/* ::::: bookmark panel dropdown icons ::::: */
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
-moz-image-region: auto !important;
}
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
-moz-image-region: auto !important;
}
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png") !important;
-moz-image-region: auto !important;
}
/* ::::: primary toolbar buttons ::::: */
.toolbarbutton-1 {

View File

@ -69,7 +69,6 @@ classic.jar:
skin/classic/browser/places/organize.png (places/organize.png)
skin/classic/browser/places/view.png (places/view.png)
skin/classic/browser/places/searching_16.png (places/searching_16.png)
skin/classic/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/mail.png (preferences/mail.png)
@ -159,7 +158,6 @@ classic.jar:
skin/classic/aero/browser/places/view.png (places/view-aero.png)
skin/classic/aero/browser/places/searching_16.png (places/searching_16-aero.png)
skin/classic/aero/browser/places/organize.png (places/organize-aero.png)
skin/classic/aero/browser/places/bookmarkProperties.css (places/bookmarkProperties.css)
skin/classic/aero/browser/preferences/alwaysAsk.png (preferences/alwaysAsk-aero.png)
skin/classic/aero/browser/preferences/application.png (preferences/application-aero.png)
skin/classic/aero/browser/preferences/mail.png (preferences/mail-aero.png)

View File

@ -1,106 +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 Firefox.
*
* 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):
* Myk Melez <myk@mozilla.org>
* Simon Bünzli <zeniko@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**** folder menulist ****/
.folder-icon > .menulist-label-box > .menulist-icon {
width: 16px;
height: 16px;
}
.folder-icon > .menu-iconic-left {
display: -moz-box;
}
.folder-icon {
list-style-image: url("chrome://global/skin/icons/folder-item.png") !important;
-moz-image-region: rect(0px, 32px, 16px, 16px) !important;
}
/**** expander ****/
#expander {
min-width: 0;
}
.up {
list-style-image: url("chrome://global/skin/arrow/arrow-up.gif");
}
.up:hover {
list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
}
.down {
list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
}
.down:hover {
list-style-image: url("chrome://global/skin/arrow/arrow-dn-hov.gif");
}
/**** name picker ****/
/* Make the microsummary picker look like a regular textbox instead of
* an editable menulist when no microsummaries are available.
*/
menulist#namePicker[droppable="false"] {
/* These rules come from the textbox element in textbox.css. */
/* Normal editable menulists set this to "none". */
-moz-appearance: textfield;
cursor: text;
border: 2px solid;
-moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
-moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
-moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
background-color: -moz-Field;
color: -moz-FieldText;
}
menulist#namePicker[droppable="false"] > .menulist-editable-box {
/* Normal editable menulists set this to "menulist-textfield". */
-moz-appearance: none;
padding: 2px 2px 3px 4px;
}
/* Hide the drop marker and the popup when no microsummaries are available. */
menulist#namePicker[droppable="false"] > .menulist-dropmarker,
menulist#namePicker[droppable="false"] > menupopup {
display: none;
}

View File

@ -56,6 +56,7 @@
.expander-up,
.expander-down {
min-width: 0;
margin: 0;
}
.expander-up > hbox,
@ -71,6 +72,11 @@
list-style-image: url("chrome://global/skin/icons/expand.png");
}
#editBMPanel_tagsSelector[collapsed="true"],
#editBMPanel_folderTree[collapsed="true"] {
display: none;
}
/**** name picker ****/
/* Make the microsummary picker look like a regular textbox instead of
@ -105,3 +111,24 @@
#editBMPanel_namePicker[droppable="false"] > menupopup {
display: none;
}
/* ::::: bookmark panel dropdown icons ::::: */
#editBMPanel_folderMenuList[selectedIndex="0"],
#editBMPanel_toolbarFolderItem {
list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.png") !important;
-moz-image-region: auto !important;
}
#editBMPanel_folderMenuList[selectedIndex="1"],
#editBMPanel_bmRootItem {
list-style-image: url("chrome://browser/skin/places/bookmarksMenu.png") !important;
-moz-image-region: auto !important;
}
#editBMPanel_folderMenuList[selectedIndex="2"],
#editBMPanel_unfiledRootItem {
list-style-image: url("chrome://browser/skin/places/unsortedBookmarks.png") !important;
-moz-image-region: auto !important;
}

View File

@ -241,6 +241,7 @@
#infoBoxExpanderLabel {
margin: 0;
padding: 5px 0;
-moz-padding-start: 2px;
}
#organizerScopeBar {

View File

@ -365,6 +365,11 @@ LOOP_OVER_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
# we only use this for the makefiles target and other stuff that doesn't matter
LOOP_OVER_PARALLEL_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
LOOP_OVER_STATIC_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
@ -373,6 +378,13 @@ LOOP_OVER_TOOL_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
ifdef PARALLEL_DIRS
# create a bunch of fake targets for order-only processing
PARALLEL_DIRS_export = $(addsuffix _export,$(PARALLEL_DIRS))
PARALLEL_DIRS_libs = $(addsuffix _libs,$(PARALLEL_DIRS))
PARALLEL_DIRS_tools = $(addsuffix _tools,$(PARALLEL_DIRS))
endif
#
# Now we can differentiate between objects used to build a library, and
# objects used to build an executable in the same directory.
@ -582,6 +594,8 @@ endif
# SUBMAKEFILES: List of Makefiles for next level down.
# This is used to update or create the Makefiles before invoking them.
SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS))
PARALLEL_SUBMAKEFILES += $(addsuffix /Makefile, $(PARALLEL_DIRS))
SUBMAKEFILES += $(PARALLEL_SUBMAKEFILES)
# The root makefile doesn't want to do a plain export/libs, because
# of the tiers and because of libxul. Suppress the default rules in favor
@ -677,15 +691,30 @@ endif
# Target to only regenerate makefiles
makefiles: $(SUBMAKEFILES)
ifneq (,$(DIRS)$(TOOL_DIRS))
ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DIRS))
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
endif
ifdef PARALLEL_DIRS
export:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_export)
$(PARALLEL_DIRS_export):: %_export:
+$(MAKE) -C $* export
endif
export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),$(PUBLIC)) $(if $(SDK_HEADERS)$(SDK_XPIDLSRCS),$(SDK_PUBLIC)) $(if $(XPIDLSRCS),$(IDL_DIR)) $(if $(SDK_XPIDLSRCS),$(SDK_IDL_DIR))
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
ifdef PARALLEL_DIRS
tools:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_tools)
$(PARALLEL_DIRS_tools):: %_tools:
+$(MAKE) -C $* tools
endif
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
+$(LOOP_OVER_DIRS)
ifdef TOOL_DIRS
@ -718,6 +747,13 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
##############################################
ifdef PARALLEL_DIRS
libs:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_libs)
$(PARALLEL_DIRS_libs):: %_libs:
+$(MAKE) -C $* libs
endif
libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)
ifndef NO_DIST_INSTALL
ifdef LIBRARY
@ -825,11 +861,13 @@ run_viewer: $(FINAL_TARGET)/viewer
clean clobber realclean clobber_all:: $(SUBMAKEFILES)
-rm -f $(ALL_TRASH)
-rm -rf $(ALL_TRASH_DIRS)
+-$(LOOP_OVER_PARALLEL_DIRS)
+-$(LOOP_OVER_DIRS)
+-$(LOOP_OVER_STATIC_DIRS)
+-$(LOOP_OVER_TOOL_DIRS)
distclean:: $(SUBMAKEFILES)
+-$(LOOP_OVER_PARALLEL_DIRS)
+-$(LOOP_OVER_DIRS)
+-$(LOOP_OVER_STATIC_DIRS)
+-$(LOOP_OVER_TOOL_DIRS)
@ -1605,6 +1643,7 @@ export-idl:: $(XPIDLSRCS) $(SDK_XPIDLSRCS) $(IDL_DIR)
$(INSTALL) $(IFLAGS1) $^
endif
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -1751,6 +1790,7 @@ JAR_MANIFEST := $(srcdir)/jar.mn
chrome::
$(MAKE) realchrome
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -1977,11 +2017,13 @@ depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MDDEPFILES)
else
depend:: $(SUBMAKEFILES)
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
dependclean:: $(SUBMAKEFILES)
rm -f $(MDDEPFILES)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -2083,6 +2125,7 @@ tags: TAGS
TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
echo-variable-%:
@ -2106,6 +2149,7 @@ ifdef _REPORT_ALL_DIRS
else
@$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
echo-depth-path:
@ -2135,6 +2179,7 @@ ifneq (,$(filter $(PROGRAM) $(HOST_PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $
@echo "DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
@echo --------------------------------------------------------------------------------
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
showbuild:
@ -2196,6 +2241,7 @@ zipmakes:
ifneq (,$(filter $(PROGRAM) $(SIMPLE_PROGRAMS) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))
zip $(DEPTH)/makefiles $(subst $(topsrcdir),$(MOZ_SRC)/mozilla,$(srcdir)/Makefile.in)
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
documentation:
@ -2203,5 +2249,6 @@ documentation:
$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
check:: $(SUBMAKEFILES) $(MAKE_DIRS)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)

View File

@ -43,27 +43,27 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = content
DIRS = base canvas html xml xul xbl xslt
PARALLEL_DIRS = base canvas html xml xul xbl xslt
ifdef MOZ_MEDIA
DIRS += \
PARALLEL_DIRS += \
media \
$(NULL)
endif
ifdef MOZ_SVG
DIRS += svg
PARALLEL_DIRS += svg
endif
ifdef MOZ_XTF
DIRS += xtf
PARALLEL_DIRS += xtf
endif
ifdef MOZ_MATHML
DIRS += mathml
PARALLEL_DIRS += mathml
endif
DIRS += events
PARALLEL_DIRS += events
ifdef ENABLE_TESTS
TOOL_DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
TOOL_DIRS += test

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -4362,7 +4362,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent,
nsresult rv;
nsCOMPtr<nsIFrameTraversal> trav(do_CreateInstance(kFrameTraversalCID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
// --- Get frame to start with ---
if (!aStartFrame) {
@ -4381,7 +4381,7 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent,
);
NS_ENSURE_SUCCESS(rv, rv);
if (!forward) {
rv = frameTraversal->Last();
frameTraversal->Last();
}
}
else {
@ -4397,15 +4397,16 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent,
!aStartContent->IsNodeOfType(nsINode::eHTML)) {
// Need to do special check in case we're in an imagemap which has multiple
// content per frame, so don't skip over the starting frame.
rv = forward ? frameTraversal->Next() : frameTraversal->Prev();
if (forward)
frameTraversal->Next();
else
frameTraversal->Prev();
}
}
// -- Walk frames to find something tabbable matching mCurrentTabIndex --
while (NS_SUCCEEDED(rv)) {
nsISupports* currentItem;
frameTraversal->CurrentItem(&currentItem);
*aResultFrame = (nsIFrame*)currentItem;
while (1) {
*aResultFrame = frameTraversal->CurrentItem();
if (!*aResultFrame) {
break;
}
@ -4437,7 +4438,10 @@ nsEventStateManager::GetNextTabbableContent(nsIContent* aRootContent,
return NS_OK;
}
}
rv = forward ? frameTraversal->Next() : frameTraversal->Prev();
if (forward)
frameTraversal->Next();
else
frameTraversal->Prev();
}
// -- Reached end or beginning of document --
@ -5544,7 +5548,7 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
if (nodeValue.Length() == *aStartOffset && !isFormControl &&
startContent != mDocument->GetRootContent()) {
// Yes, indeed we were at the end of the last node
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
nsCOMPtr<nsIFrameTraversal> trav(do_CreateInstance(kFrameTraversalCID,
&rv));
@ -5566,9 +5570,8 @@ nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent,
// Continue getting the next frame until the primary content for the frame
// we are on changes - we don't want to be stuck in the same place
frameTraversal->Next();
nsISupports* currentItem;
frameTraversal->CurrentItem(&currentItem);
if (nsnull == (newCaretFrame = static_cast<nsIFrame*>(currentItem))) {
newCaretFrame = frameTraversal->CurrentItem();
if (nsnull == newCaretFrame) {
break;
}
newCaretContent = newCaretFrame->GetContent();

View File

@ -42,6 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content document
PARALLEL_DIRS = content document
include $(topsrcdir)/config/rules.mk

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -41,7 +41,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
PARALLEL_DIRS = \
public \
src \
$(NULL)

View File

@ -42,6 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = document content
PARALLEL_DIRS = document content
include $(topsrcdir)/config/rules.mk

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = src
PARALLEL_DIRS = src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src builtin
PARALLEL_DIRS = public src builtin
ifdef ENABLE_TESTS
DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = content document
PARALLEL_DIRS = content document
include $(topsrcdir)/config/rules.mk

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public resources src
PARALLEL_DIRS = public resources src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += tests/buster \

View File

@ -42,10 +42,10 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = base xml xpath xslt
PARALLEL_DIRS = base xml xpath xslt
ifdef MOZ_XSLT_STANDALONE
DIRS += main
PARALLEL_DIRS += main
endif
include $(topsrcdir)/config/rules.mk

View File

@ -42,7 +42,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -46,10 +46,10 @@ include $(DEPTH)/config/autoconf.mk
# interfaces and implementations.
# Likewise for content, because of nsXULAtoms.
DIRS = document content
PARALLEL_DIRS = document content
ifdef MOZ_XUL
DIRS += templates
PARALLEL_DIRS += templates
endif
include $(topsrcdir)/config/rules.mk

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xul
DIRS = src test
PARALLEL_DIRS = src test
include $(topsrcdir)/config/rules.mk

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xuldoc
DIRS = public src
PARALLEL_DIRS = public src
ifdef ENABLE_TESTS
DIRS += test

View File

@ -43,7 +43,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = xultmpl
DIRS = public src
PARALLEL_DIRS = public src
include $(topsrcdir)/config/rules.mk

View File

@ -365,6 +365,11 @@ LOOP_OVER_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
# we only use this for the makefiles target and other stuff that doesn't matter
LOOP_OVER_PARALLEL_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(PARALLEL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
LOOP_OVER_STATIC_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(STATIC_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
@ -373,6 +378,13 @@ LOOP_OVER_TOOL_DIRS = \
@$(EXIT_ON_ERROR) \
$(foreach dir,$(TOOL_DIRS),$(UPDATE_TITLE) $(MAKE) -C $(dir) $@; ) true
ifdef PARALLEL_DIRS
# create a bunch of fake targets for order-only processing
PARALLEL_DIRS_export = $(addsuffix _export,$(PARALLEL_DIRS))
PARALLEL_DIRS_libs = $(addsuffix _libs,$(PARALLEL_DIRS))
PARALLEL_DIRS_tools = $(addsuffix _tools,$(PARALLEL_DIRS))
endif
#
# Now we can differentiate between objects used to build a library, and
# objects used to build an executable in the same directory.
@ -582,6 +594,8 @@ endif
# SUBMAKEFILES: List of Makefiles for next level down.
# This is used to update or create the Makefiles before invoking them.
SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS))
PARALLEL_SUBMAKEFILES += $(addsuffix /Makefile, $(PARALLEL_DIRS))
SUBMAKEFILES += $(PARALLEL_SUBMAKEFILES)
# The root makefile doesn't want to do a plain export/libs, because
# of the tiers and because of libxul. Suppress the default rules in favor
@ -677,15 +691,30 @@ endif
# Target to only regenerate makefiles
makefiles: $(SUBMAKEFILES)
ifneq (,$(DIRS)$(TOOL_DIRS))
ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DIRS))
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
endif
ifdef PARALLEL_DIRS
export:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_export)
$(PARALLEL_DIRS_export):: %_export:
+$(MAKE) -C $* export
endif
export:: $(SUBMAKEFILES) $(MAKE_DIRS) $(if $(EXPORTS)$(XPIDLSRCS)$(SDK_HEADERS)$(SDK_XPIDLSRCS),$(PUBLIC)) $(if $(SDK_HEADERS)$(SDK_XPIDLSRCS),$(SDK_PUBLIC)) $(if $(XPIDLSRCS),$(IDL_DIR)) $(if $(SDK_XPIDLSRCS),$(SDK_IDL_DIR))
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
ifdef PARALLEL_DIRS
tools:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_tools)
$(PARALLEL_DIRS_tools):: %_tools:
+$(MAKE) -C $* tools
endif
tools:: $(SUBMAKEFILES) $(MAKE_DIRS)
+$(LOOP_OVER_DIRS)
ifdef TOOL_DIRS
@ -718,6 +747,13 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX), $(HOST_LIBS))
DSO_LDOPTS_DEPS = $(EXTRA_DSO_LIBS) $(filter %.$(LIB_SUFFIX), $(EXTRA_DSO_LDOPTS))
##############################################
ifdef PARALLEL_DIRS
libs:: $(PARALLEL_SUBMAKEFILES) | $(PARALLEL_DIRS_libs)
$(PARALLEL_DIRS_libs):: %_libs:
+$(MAKE) -C $* libs
endif
libs:: $(SUBMAKEFILES) $(MAKE_DIRS) $(HOST_LIBRARY) $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(HOST_PROGRAM) $(PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(SIMPLE_PROGRAMS) $(JAVA_LIBRARY)
ifndef NO_DIST_INSTALL
ifdef LIBRARY
@ -825,11 +861,13 @@ run_viewer: $(FINAL_TARGET)/viewer
clean clobber realclean clobber_all:: $(SUBMAKEFILES)
-rm -f $(ALL_TRASH)
-rm -rf $(ALL_TRASH_DIRS)
+-$(LOOP_OVER_PARALLEL_DIRS)
+-$(LOOP_OVER_DIRS)
+-$(LOOP_OVER_STATIC_DIRS)
+-$(LOOP_OVER_TOOL_DIRS)
distclean:: $(SUBMAKEFILES)
+-$(LOOP_OVER_PARALLEL_DIRS)
+-$(LOOP_OVER_DIRS)
+-$(LOOP_OVER_STATIC_DIRS)
+-$(LOOP_OVER_TOOL_DIRS)
@ -1605,6 +1643,7 @@ export-idl:: $(XPIDLSRCS) $(SDK_XPIDLSRCS) $(IDL_DIR)
$(INSTALL) $(IFLAGS1) $^
endif
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -1751,6 +1790,7 @@ JAR_MANIFEST := $(srcdir)/jar.mn
chrome::
$(MAKE) realchrome
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -1977,11 +2017,13 @@ depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MDDEPFILES)
else
depend:: $(SUBMAKEFILES)
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
dependclean:: $(SUBMAKEFILES)
rm -f $(MDDEPFILES)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)
@ -2083,6 +2125,7 @@ tags: TAGS
TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
echo-variable-%:
@ -2106,6 +2149,7 @@ ifdef _REPORT_ALL_DIRS
else
@$(if $(REQUIRES),echo $(subst $(topsrcdir)/,,$(srcdir)): $(MODULE): $(REQUIRES))
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
echo-depth-path:
@ -2135,6 +2179,7 @@ ifneq (,$(filter $(PROGRAM) $(HOST_PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_LIBRARY) $
@echo "DEPENDENT_LIBS = $(DEPENDENT_LIBS)"
@echo --------------------------------------------------------------------------------
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
showbuild:
@ -2196,6 +2241,7 @@ zipmakes:
ifneq (,$(filter $(PROGRAM) $(SIMPLE_PROGRAMS) $(LIBRARY) $(SHARED_LIBRARY),$(TARGETS)))
zip $(DEPTH)/makefiles $(subst $(topsrcdir),$(MOZ_SRC)/mozilla,$(srcdir)/Makefile.in)
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
documentation:
@ -2203,5 +2249,6 @@ documentation:
$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
check:: $(SUBMAKEFILES) $(MAKE_DIRS)
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_DIRS)
+$(LOOP_OVER_TOOL_DIRS)

View File

@ -42,22 +42,18 @@
#include "nsPlaceholderFrame.h"
class nsFrameIterator: public nsIBidirectionalEnumerator
class nsFrameIterator : public nsIFrameEnumerator
{
public:
NS_DECL_ISUPPORTS
NS_IMETHOD First();
virtual void First();
virtual void Next();
virtual nsIFrame* CurrentItem();
virtual PRBool IsDone();
NS_IMETHOD Last();
NS_IMETHOD Next();
NS_IMETHOD Prev();
NS_IMETHOD CurrentItem(nsISupports **aItem);
NS_IMETHOD IsDone();//what does this mean??off edge? yes
virtual void Last();
virtual void Prev();
nsFrameIterator(nsPresContext* aPresContext, nsIFrame *aStart,
nsIteratorType aType, PRBool aLockScroll, PRBool aFollowOOFs);
@ -165,7 +161,7 @@ nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult)
}
nsresult
NS_NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
NS_NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
nsIteratorType aType,
@ -175,7 +171,7 @@ NS_NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
{
if (!aEnumerator || !aStart)
return NS_ERROR_NULL_POINTER;
nsFrameIterator *trav;
nsCOMPtr<nsIFrameEnumerator> trav;
if (aVisual) {
trav = new nsVisualIterator(aPresContext, aStart, aType,
aLockInScrollView, aFollowOOFs);
@ -185,7 +181,7 @@ NS_NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
}
if (!trav)
return NS_ERROR_OUT_OF_MEMORY;
*aEnumerator = static_cast<nsIBidirectionalEnumerator*>(trav);
*aEnumerator = trav;
NS_ADDREF(trav);
return NS_OK;
}
@ -202,7 +198,7 @@ nsFrameTraversal::~nsFrameTraversal()
NS_IMPL_ISUPPORTS1(nsFrameTraversal,nsIFrameTraversal)
NS_IMETHODIMP
nsFrameTraversal::NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
nsFrameTraversal::NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,
@ -217,7 +213,7 @@ NS_IMETHODIMP
// nsFrameIterator implementation
NS_IMPL_ISUPPORTS2(nsFrameIterator, nsIEnumerator, nsIBidirectionalEnumerator)
NS_IMPL_ISUPPORTS1(nsFrameIterator, nsIFrameEnumerator)
nsFrameIterator::nsFrameIterator(nsPresContext* aPresContext, nsIFrame *aStart,
nsIteratorType aType, PRBool aLockInScrollView,
@ -237,34 +233,27 @@ nsFrameIterator::nsFrameIterator(nsPresContext* aPresContext, nsIFrame *aStart,
NS_IMETHODIMP
nsFrameIterator::CurrentItem(nsISupports **aItem)
nsIFrame*
nsFrameIterator::CurrentItem()
{
if (!aItem)
return NS_ERROR_NULL_POINTER;
*aItem = mCurrent;
if (mOffEdge)
return NS_ENUMERATOR_FALSE;
return NS_OK;
return nsnull;
return mCurrent;
}
NS_IMETHODIMP
nsFrameIterator::IsDone()//what does this mean??off edge? yes
PRBool
nsFrameIterator::IsDone()
{
if (mOffEdge != 0)
return NS_OK;
return NS_ENUMERATOR_FALSE;
return mOffEdge != 0;
}
NS_IMETHODIMP
void
nsFrameIterator::First()
{
mCurrent = mStart;
return NS_OK;
}
static PRBool
@ -275,7 +264,7 @@ IsRootFrame(nsIFrame* aFrame)
(atom == nsGkAtoms::rootFrame);
}
NS_IMETHODIMP
void
nsFrameIterator::Last()
{
nsIFrame* result;
@ -294,10 +283,9 @@ nsFrameIterator::Last()
setCurrent(parent);
if (!parent)
setOffEdge(1);
return NS_OK;
}
NS_IMETHODIMP
void
nsFrameIterator::Next()
{
// recursive-oid method to get next frame
@ -351,10 +339,9 @@ nsFrameIterator::Next()
setOffEdge(1);
setLast(parent);
}
return NS_OK;
}
NS_IMETHODIMP
void
nsFrameIterator::Prev()
{
// recursive-oid method to get prev frame
@ -407,7 +394,6 @@ nsFrameIterator::Prev()
setOffEdge(-1);
setLast(parent);
}
return NS_OK;
}
nsIFrame*

View File

@ -37,11 +37,10 @@
#ifndef NSFRAMETRAVERSAL_H
#define NSFRAMETRAVERSAL_H
#include "nsIEnumerator.h"
#include "nsIFrame.h"
#include "nsIFrameTraversal.h"
nsresult NS_NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
nsresult NS_NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
nsIteratorType aType,
@ -59,7 +58,7 @@ public:
NS_DECL_ISUPPORTS
NS_IMETHOD NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,

View File

@ -38,9 +38,28 @@
#define NSIFRAMETRAVERSAL_H
#include "nsISupports.h"
#include "nsIEnumerator.h"
#include "nsIFrame.h"
#define NS_IFRAMEENUMERATOR_IID \
{ 0x7c633f5d, 0x91eb, 0x494e, \
{ 0xa1, 0x40, 0x17, 0x46, 0x17, 0x4c, 0x23, 0xd3 } }
class nsIFrameEnumerator : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFRAMEENUMERATOR_IID)
virtual void First() = 0;
virtual void Next() = 0;
virtual nsIFrame* CurrentItem() = 0;
virtual PRBool IsDone() = 0;
virtual void Last() = 0;
virtual void Prev() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIFrameEnumerator, NS_IFRAMEENUMERATOR_IID)
enum nsIteratorType {
eLeaf,
ePreOrder,
@ -71,7 +90,7 @@ public:
* the real frame. Going back up will go on past the placeholder,
* so the placeholders are logically part of the frame tree.
*/
NS_IMETHOD NewFrameTraversal(nsIBidirectionalEnumerator **aEnumerator,
NS_IMETHOD NewFrameTraversal(nsIFrameEnumerator **aEnumerator,
nsPresContext* aPresContext,
nsIFrame *aStart,
PRInt32 aType,

View File

@ -4629,7 +4629,7 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
}
//resultFrame is not a block frame
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
result = NS_NewFrameTraversal(getter_AddRefs(frameTraversal),
aPresContext, resultFrame,
ePostOrder,
@ -4639,7 +4639,6 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
);
if (NS_FAILED(result))
return result;
nsISupports *isupports = nsnull;
nsIFrame *storeOldResultFrame = resultFrame;
while ( !found ){
nsPoint point;
@ -4717,14 +4716,10 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
if (aPos->mDirection == eDirNext && (resultFrame == nearStoppingFrame))
break;
//always try previous on THAT line if that fails go the other way
result = frameTraversal->Prev();
if (NS_FAILED(result))
break;
result = frameTraversal->CurrentItem(&isupports);
if (NS_FAILED(result) || !isupports)
return result;
//we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules
resultFrame = (nsIFrame *)isupports;
frameTraversal->Prev();
resultFrame = frameTraversal->CurrentItem();
if (!resultFrame)
return NS_ERROR_FAILURE;
}
if (!found){
@ -4766,14 +4761,11 @@ nsFrame::GetNextPrevLineFromeBlockFrame(nsPresContext* aPresContext,
if (aPos->mDirection == eDirNext && (resultFrame == farStoppingFrame))
break;
//previous didnt work now we try "next"
result = frameTraversal->Next();
if (NS_FAILED(result))
frameTraversal->Next();
nsIFrame *tempFrame = frameTraversal->CurrentItem();
if (!tempFrame)
break;
result = frameTraversal->CurrentItem(&isupports);
if (NS_FAILED(result) || !isupports)
break;
//we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules
resultFrame = (nsIFrame *)isupports;
resultFrame = tempFrame;
}
aPos->mResultFrame = resultFrame;
}
@ -5460,7 +5452,7 @@ nsIFrame::GetFrameFromDirection(nsDirection aDirection, PRBool aVisual,
return NS_ERROR_FAILURE; //we are done. cannot jump lines
}
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
result = NS_NewFrameTraversal(getter_AddRefs(frameTraversal),
presContext, traversedFrame,
eLeaf,
@ -5472,21 +5464,13 @@ nsIFrame::GetFrameFromDirection(nsDirection aDirection, PRBool aVisual,
return result;
if (aDirection == eDirNext)
result = frameTraversal->Next();
frameTraversal->Next();
else
result = frameTraversal->Prev();
if (NS_FAILED(result))
return result;
frameTraversal->Prev();
nsISupports *isupports = nsnull;
result = frameTraversal->CurrentItem(&isupports);
if (NS_FAILED(result))
return result;
if (!isupports)
return NS_ERROR_NULL_POINTER;
//we must CAST here to an nsIFrame. nsIFrame doesn't really follow the rules
//for speed reasons
traversedFrame = (nsIFrame *)isupports;
traversedFrame = frameTraversal->CurrentItem();
if (!traversedFrame)
return NS_ERROR_FAILURE;
traversedFrame->IsSelectable(&selectable, nsnull);
} // while (!selectable)

View File

@ -162,6 +162,7 @@ protected:
nsHTMLFramesetBorderFrame(nsStyleContext* aContext, PRInt32 aWidth, PRBool aVertical, PRBool aVisible);
virtual ~nsHTMLFramesetBorderFrame();
virtual nscoord GetIntrinsicWidth();
virtual nscoord GetIntrinsicHeight();
PRInt32 mWidth;
PRPackedBool mVertical;
@ -198,6 +199,7 @@ protected:
nsHTMLFramesetBlankFrame(nsStyleContext* aContext) : nsLeafFrame(aContext) {}
virtual ~nsHTMLFramesetBlankFrame();
virtual nscoord GetIntrinsicWidth();
virtual nscoord GetIntrinsicHeight();
friend class nsHTMLFramesetFrame;
friend class nsHTMLFrameset;
@ -1628,6 +1630,12 @@ nscoord nsHTMLFramesetBorderFrame::GetIntrinsicWidth()
return 0;
}
nscoord nsHTMLFramesetBorderFrame::GetIntrinsicHeight()
{
// No intrinsic height
return 0;
}
void nsHTMLFramesetBorderFrame::SetVisibility(PRBool aVisibility)
{
mVisibility = aVisibility;
@ -1839,6 +1847,12 @@ nscoord nsHTMLFramesetBlankFrame::GetIntrinsicWidth()
return 0;
}
nscoord nsHTMLFramesetBlankFrame::GetIntrinsicHeight()
{
// No intrinsic height
return 0;
}
NS_IMETHODIMP
nsHTMLFramesetBlankFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,

View File

@ -393,7 +393,24 @@ public:
NPDrawingModel GetDrawingModel();
WindowRef FixUpPluginWindow(PRInt32 inPaintState);
void GUItoMacEvent(const nsGUIEvent& anEvent, EventRecord* origEvent, EventRecord& aMacEvent);
void SetCGContextChanged(PRBool aState) { mCGContextChanged = aState; }
// Set a flag that (if true) indicates the plugin port info has changed and
// SetWindow() needs to be called.
void SetPluginPortChanged(PRBool aState) { mPluginPortChanged = aState; }
// Return a pointer to the internal nsPluginPort structure that's used to
// store a copy of plugin port info and to detect when it's been changed.
nsPluginPort* GetPluginPortCopy() { return &mPluginPortCopy; }
// Set plugin port info in the plugin (in the 'window' member of the
// nsPluginWindow structure passed to the plugin by SetWindow()) and set a
// flag (mPluginPortChanged) to indicate whether or not this info has
// changed, and SetWindow() needs to be called again.
nsPluginPort* SetPluginPortAndDetectChange();
// Flag when we've set up a Thebes (and CoreGraphics) context in
// nsObjectFrame::PaintPlugin(). We need to know this in
// FixUpPluginWindow() (i.e. we need to know when FixUpPluginWindow() has
// been called from nsObjectFrame::PaintPlugin() when we're using the
// CoreGraphics drawing model).
void BeginCGPaint();
void EndCGPaint();
#endif
void SetOwner(nsObjectFrame *aOwner)
@ -454,13 +471,18 @@ private:
nsCOMPtr<nsITimer> mPluginTimer;
nsCOMPtr<nsIPluginHost> mPluginHost;
#ifdef XP_MACOSX
nsPluginPort mPluginPortCopy;
PRInt32 mInCGPaintLevel;
#endif
// Initially, the event loop nesting level we were created on, it's updated
// if we detect the appshell is on a lower level as long as we're not stopped.
// We delay DoStopPlugin() until the appshell reaches this level or lower.
PRUint32 mLastEventloopNestingLevel;
PRPackedBool mContentFocused;
PRPackedBool mWidgetVisible; // used on Mac to store our widget's visible state
PRPackedBool mCGContextChanged;
PRPackedBool mPluginPortChanged;
// If true, destroy the widget on destruction. Used when plugin stop
// is being delayed to a safer point in time.
@ -1353,30 +1375,47 @@ nsObjectFrame::PaintPlugin(nsIRenderingContext& aRenderingContext,
return;
}
// If gfxQuartzNativeDrawing hands out a CGContext other than the last
// one we passed to the plugin, we need to pass the new one to the
// plugin via SetWindow. This will happen in nsPluginInstanceOwner::
// FixUpPluginWindow(), called from nsPluginInstanceOwner::Paint().
nsPluginPort* pluginPort = mInstanceOwner->GetPluginPort();
nsCOMPtr<nsIPluginInstance> inst;
GetPluginInstance(*getter_AddRefs(inst));
if (!inst) {
NS_WARNING("null plugin instance during PaintPlugin");
nativeDrawing.EndNativeDrawing();
return;
}
nsPluginWindow* window;
mInstanceOwner->GetWindow(window);
if (!window) {
NS_WARNING("null plugin window during PaintPlugin");
nativeDrawing.EndNativeDrawing();
return;
}
nsPluginPort* pluginPortCopy = mInstanceOwner->GetPluginPortCopy();
if (!pluginPortCopy) {
NS_WARNING("null plugin port copy during PaintPlugin");
nativeDrawing.EndNativeDrawing();
return;
}
if (!mInstanceOwner->SetPluginPortAndDetectChange()) {
NS_WARNING("null plugin port during PaintPlugin");
nativeDrawing.EndNativeDrawing();
return;
}
// If gfxQuartzNativeDrawing hands out a CGContext different from the
// one set by SetPluginPortAndDetectChange(), we need to pass it to the
// plugin via SetWindow(). This will happen in nsPluginInstanceOwner::
// FixUpPluginWindow(), called from nsPluginInstanceOwner::Paint().
// (If SetPluginPortAndDetectChange() made any changes itself, this has
// already been detected in that method, and will likewise result in a
// call to SetWindow() from FixUpPluginWindow().)
if (window->window->cgPort.context != cgContext) {
pluginPort->cgPort.context = cgContext;
window->window = pluginPort;
mInstanceOwner->SetCGContextChanged(PR_TRUE);
window->window->cgPort.context = cgContext;
pluginPortCopy->cgPort.context = cgContext;
mInstanceOwner->SetPluginPortChanged(PR_TRUE);
}
mInstanceOwner->BeginCGPaint();
mInstanceOwner->Paint(aDirtyRect);
mInstanceOwner->EndCGPaint();
nativeDrawing.EndNativeDrawing();
} else {
@ -2198,9 +2237,13 @@ nsPluginInstanceOwner::nsPluginInstanceOwner()
mOwner = nsnull;
mTagText = nsnull;
#ifdef XP_MACOSX
memset(&mPluginPortCopy, 0, sizeof(nsPluginPort));
mInCGPaintLevel = 0;
#endif
mContentFocused = PR_FALSE;
mWidgetVisible = PR_TRUE;
mCGContextChanged = PR_FALSE;
mPluginPortChanged = PR_FALSE;
mNumCachedAttrs = 0;
mNumCachedParams = 0;
mCachedAttrParamNames = nsnull;
@ -3251,6 +3294,60 @@ void nsPluginInstanceOwner::GUItoMacEvent(const nsGUIEvent& anEvent, EventRecord
}
}
// Currently (on OS X in Cocoa widgets) any changes made as a result of
// calling GetPluginPort() are immediately reflected in the nsPluginWindow
// structure that has been passed to the plugin via SetWindow(). This is
// because calls to nsChildView::GetNativeData(NS_NATIVE_PLUGIN_PORT_CG)
// always return a pointer to the same internal (private) object, but may
// make changes inside that object. All calls to GetPluginPort() made while
// the plugin is active (i.e. excluding those made at our initialization)
// need to take this into account. The easiest way to do so is to replace
// them with calls to SetPluginPortAndDetectChange(). This method keeps track
// of when calls to GetPluginPort() result in changes, and sets a flag to make
// sure SetWindow() gets called the next time through FixUpPluginWindow(), so
// that the plugin is notified of these changes.
nsPluginPort* nsPluginInstanceOwner::SetPluginPortAndDetectChange()
{
if (!mPluginWindow)
return nsnull;
nsPluginPort* pluginPort = GetPluginPort();
if (!pluginPort)
return nsnull;
mPluginWindow->window = pluginPort;
NPDrawingModel drawingModel = GetDrawingModel();
#ifndef NP_NO_QUICKDRAW
if (drawingModel == NPDrawingModelQuickDraw) {
if (mPluginWindow->window->qdPort.port != mPluginPortCopy.qdPort.port) {
mPluginPortCopy.qdPort.port = mPluginWindow->window->qdPort.port;
mPluginPortChanged = PR_TRUE;
}
} else if (drawingModel == NPDrawingModelCoreGraphics)
#endif
{
if ((mPluginWindow->window->cgPort.context != mPluginPortCopy.cgPort.context) ||
(mPluginWindow->window->cgPort.window != mPluginPortCopy.cgPort.window)) {
mPluginPortCopy.cgPort.context = mPluginWindow->window->cgPort.context;
mPluginPortCopy.cgPort.window = mPluginWindow->window->cgPort.window;
mPluginPortChanged = PR_TRUE;
}
}
return mPluginWindow->window;
}
void nsPluginInstanceOwner::BeginCGPaint()
{
++mInCGPaintLevel;
}
void nsPluginInstanceOwner::EndCGPaint()
{
--mInCGPaintLevel;
NS_ASSERTION(mInCGPaintLevel >= 0, "Mismatched call to nsPluginInstanceOwner::EndCGPlugin()!");
}
#endif
nsresult nsPluginInstanceOwner::ScrollPositionWillChange(nsIScrollableView* aScrollable, nscoord aX, nscoord aY)
@ -4574,13 +4671,20 @@ WindowRef nsPluginInstanceOwner::FixUpPluginWindow(PRInt32 inPaintState)
if (!mWidget || !mPluginWindow || !mInstance || !mOwner)
return nsnull;
nsPluginPort* pluginPort = GetPluginPort();
NPDrawingModel drawingModel = GetDrawingModel();
// If we've already set up a CGContext in nsObjectFrame::PaintPlugin(), we
// don't want calls to SetPluginPortAndDetectChange() to step on our work.
nsPluginPort* pluginPort = nsnull;
if (mInCGPaintLevel > 0) {
pluginPort = mPluginWindow->window;
} else {
pluginPort = SetPluginPortAndDetectChange();
}
if (!pluginPort)
return nsnull;
NPDrawingModel drawingModel = GetDrawingModel();
// first, check our view for CSS visibility style
PRBool isVisible =
mOwner->GetView()->GetVisibility() == nsViewVisibility_kShow;
@ -4656,7 +4760,7 @@ WindowRef nsPluginInstanceOwner::FixUpPluginWindow(PRInt32 inPaintState)
mPluginWindow->clipRect.bottom != oldClipRect.bottom)
{
mInstance->SetWindow(mPluginWindow);
mCGContextChanged = PR_FALSE;
mPluginPortChanged = PR_FALSE;
// if the clipRect is of size 0, make the null timer fire less often
CancelTimer();
if (mPluginWindow->clipRect.left == mPluginWindow->clipRect.right ||
@ -4666,9 +4770,9 @@ WindowRef nsPluginInstanceOwner::FixUpPluginWindow(PRInt32 inPaintState)
else {
StartTimer(NORMAL_PLUGIN_DELAY);
}
} else if (mCGContextChanged) {
} else if (mPluginPortChanged) {
mInstance->SetWindow(mPluginWindow);
mCGContextChanged = PR_FALSE;
mPluginPortChanged = PR_FALSE;
}
#ifndef NP_NO_QUICKDRAW

View File

@ -1583,7 +1583,7 @@ nsFrameSelection::GetFrameFromLevel(nsIFrame *aFrameIn,
PRUint8 foundLevel = 0;
nsIFrame *foundFrame = aFrameIn;
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
nsresult result;
nsCOMPtr<nsIFrameTraversal> trav(do_CreateInstance(kFrameTraversalCID,&result));
if (NS_FAILED(result))
@ -1598,25 +1598,17 @@ nsFrameSelection::GetFrameFromLevel(nsIFrame *aFrameIn,
);
if (NS_FAILED(result))
return result;
nsISupports *isupports = nsnull;
do {
*aFrameOut = foundFrame;
if (aDirection == eDirNext)
result = frameTraversal->Next();
frameTraversal->Next();
else
result = frameTraversal->Prev();
frameTraversal->Prev();
if (NS_FAILED(result))
return result;
result = frameTraversal->CurrentItem(&isupports);
if (NS_FAILED(result))
return result;
if (!isupports)
return NS_ERROR_NULL_POINTER;
//we must CAST here to an nsIFrame. nsIFrame doesn't really follow the rules
//for speed reasons
foundFrame = (nsIFrame *)isupports;
foundFrame = frameTraversal->CurrentItem();
if (!foundFrame)
return NS_ERROR_FAILURE;
foundLevel = NS_GET_EMBEDDING_LEVEL(foundFrame);
} while (foundLevel > aBidiLevel);

View File

@ -294,7 +294,6 @@ nsMathMLmfracFrame::Place(nsIRenderingContext& aRenderingContext,
frameDen = frameNum->GetNextSibling();
if (!frameNum || !frameDen || frameDen->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(frameNum, sizeNum, bmNum);

View File

@ -268,7 +268,6 @@ nsMathMLmmultiscriptsFrame::Place(nsIRenderingContext& aRenderingContext,
if (mprescriptsFrame) {
// duplicate <mprescripts/> found
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}
mprescriptsFrame = childFrame;
@ -377,7 +376,6 @@ nsMathMLmmultiscriptsFrame::Place(nsIRenderingContext& aRenderingContext,
// note: width=0 if all sup-sub pairs match correctly
if ((0 != width) || !baseFrame || !subScriptFrame || !supScriptFrame) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}

View File

@ -270,7 +270,6 @@ nsMathMLmoverFrame::Place(nsIRenderingContext& aRenderingContext,
overFrame = baseFrame->GetNextSibling();
if (!baseFrame || !overFrame || overFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);

View File

@ -246,10 +246,11 @@ nsMathMLmrootFrame::Reflow(nsPresContext* aPresContext,
}
if (2 != count) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
rv = ReflowError(renderingContext, aDesiredSize);
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
// Call DidReflow() for the child frames we successfully did reflow.
DidReflowChildren(mFrames.FirstChild(), childFrame);
return rv;
}

View File

@ -136,9 +136,7 @@ nsMathMLmsubFrame::PlaceSubScript (nsPresContext* aPresContext,
subScriptFrame = baseFrame->GetNextSibling();
if (!baseFrame || !subScriptFrame || subScriptFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return static_cast<nsMathMLContainerFrame*>(aFrame)->ReflowError(aRenderingContext,
aDesiredSize);
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
GetReflowAndBoundingMetricsFor(subScriptFrame, subScriptSize, bmSubScript);

View File

@ -159,10 +159,7 @@ nsMathMLmsubsupFrame::PlaceSubSupScript(nsPresContext* aPresContext,
if (!baseFrame || !subScriptFrame || !supScriptFrame ||
supScriptFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return static_cast<nsMathMLContainerFrame*>
(aFrame)->ReflowError(aRenderingContext,
aDesiredSize);
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
GetReflowAndBoundingMetricsFor(subScriptFrame, subScriptSize, bmSubScript);

View File

@ -137,9 +137,7 @@ nsMathMLmsupFrame::PlaceSuperScript(nsPresContext* aPresContext,
supScriptFrame = baseFrame->GetNextSibling();
if (!baseFrame || !supScriptFrame || supScriptFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return static_cast<nsMathMLContainerFrame*>(aFrame)->ReflowError(aRenderingContext,
aDesiredSize);
return aFrame->ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);
GetReflowAndBoundingMetricsFor(supScriptFrame, supScriptSize, bmSupScript);

View File

@ -267,7 +267,6 @@ nsMathMLmunderFrame::Place(nsIRenderingContext& aRenderingContext,
underFrame = baseFrame->GetNextSibling();
if (!baseFrame || !underFrame || underFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);

View File

@ -307,7 +307,6 @@ nsMathMLmunderoverFrame::Place(nsIRenderingContext& aRenderingContext,
overFrame = underFrame->GetNextSibling();
if (!baseFrame || !underFrame || !overFrame || overFrame->GetNextSibling()) {
// report an error, encourage people to get their markups in order
NS_WARNING("invalid markup");
return ReflowError(aRenderingContext, aDesiredSize);
}
GetReflowAndBoundingMetricsFor(baseFrame, baseSize, bmBase);

View File

@ -0,0 +1,5 @@
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
<mathml:mroot>
<frameset/>
</mathml:mroot>
</html>

View File

@ -37,5 +37,6 @@ load 405187-1.xhtml
load 405271-1.xml
load 412237-1.xml
load 413063-1.xhtml
load 416907-1.xhtml
load 420420-1.xhtml
load 443089-1.xhtml

View File

@ -44,6 +44,38 @@
title="Browser chrome tests">
<script src="chrome://mochikit/content/tests/SimpleTest/MozillaFileLogger.js"/>
<script src="chrome://mochikit/content/tests/SimpleTest/quit.js"/>
<style xmlns="http://www.w3.org/1999/xhtml"><![CDATA[
#results {
margin: 5px;
background-color: window;
-moz-user-select: text;
}
#summary {
border: 2px solid black;
}
#summary.success {
background-color: green;
}
#summary.failure {
background-color: red;
}
.failed {
color: red;
font-weight: bold;
}
.testHeader {
margin-top: 1em;
}
p {
margin: 0.1em;
}
]]></style>
<script type="application/javascript;version=1.7"><![CDATA[
var gConfig;
function TestStart() {
@ -127,6 +159,15 @@
return this.tests.map(function (t) {
return t.result + " | " + path + " | " + t.msg;
}).join("\n");
},
get htmlLog() {
var path = this.path;
return this.tests.map(function (t) {
var result = "<p class=\"result ";
result += t.pass ? "passed" : "failed";
result += "\">" + t.result + " | " + path + " | " + t.msg + "</p>";
return result;
}).join("\n");
}
};
@ -178,6 +219,24 @@
Tester.start();
}
function getHTMLLogFromTests(aTests) {
var log = "";
function sum(a, b){ return a + b; }
var passCount = aTests.map(function (f) f.passCount).reduce(sum);
var failCount = aTests.map(function (f) f.failCount).reduce(sum);
var todoCount = aTests.map(function (f) f.todoCount).reduce(sum);
log += "<div id=\"summary\" class=\"";
log += failCount == 0 ? "success" : "failure";
log += "\">\n<p>Passed: " + passCount + "</p>\n" +
"<p>Failed: " + failCount + "</p>\n" +
"<p>Todo: " + todoCount + "</p>\n</div>\n<div id=\"log\">\n";
return log + aTests.map(function (f) {
return "<p class=\"testHeader\">" + f.path + "</p>\n" + f.htmlLog;
}).join("\n") + "</div>";
}
function getLogFromTests(aTests) {
if (!aTests.length)
return "TEST-PASS | | No tests to run";
@ -222,11 +281,13 @@
}
// UI
document.getElementById("results").value = output;
document.getElementById("results").innerHTML = getHTMLLogFromTests(aTests);
setStatus("Done.");
}
]]></script>
<button id="runTestsButton" onclick="runAllTests();" label="Run All Tests"/>
<label id="status"/>
<textbox flex="1" multiline="true" id="results"/>
<scrollbox flex="1" style="overflow: auto" align="stretch">
<div id="results" xmlns="http://www.w3.org/1999/xhtml"/>
</scrollbox>
</window>

View File

@ -136,6 +136,16 @@ function testScope(aTests) {
self.todo(a != b, name, "Didn't expect " + a + ", but got it");
};
this.executeSoon = function test_executeSoon(func) {
let tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
tm.mainThread.dispatch({
run: function() {
func();
}
}, Ci.nsIThread.DISPATCH_NORMAL);
};
this.waitForExplicitFinish = function test_WFEF() {
self.done = false;
};

View File

@ -201,6 +201,21 @@ SimpleTest.waitForExplicitFinish = function () {
SimpleTest._stopOnLoad = false;
};
/**
* Executes a function shortly after the call, but lets the caller continue
* working (or finish).
*/
SimpleTest.executeSoon = function(aFunc) {
var tm = Components.classes["@mozilla.org/thread-manager;1"]
.getService(Components.interfaces.nsIThreadManager);
tm.mainThread.dispatch({
run: function() {
aFunc();
}
}, Components.interfaces.nsIThread.DISPATCH_NORMAL);
}
/**
* Talks to the TestRunner if being ran on a iframe and the parent has a
* TestRunner object.

View File

@ -1175,7 +1175,7 @@ nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
// We know that the target range isn't usable because it's not in the
// view port. Move range forward to first visible point,
// this speeds us up a lot in long documents
nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
nsCOMPtr<nsIFrameEnumerator> frameTraversal;
nsCOMPtr<nsIFrameTraversal> trav(do_CreateInstance(kFrameTraversalCID));
if (trav)
trav->NewFrameTraversal(getter_AddRefs(frameTraversal),
@ -1191,9 +1191,7 @@ nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
while (rectVisibility == nsRectVisibility_kAboveViewport || rectVisibility == nsRectVisibility_kZeroAreaRect) {
frameTraversal->Next();
nsISupports* currentItem;
frameTraversal->CurrentItem(&currentItem);
frame = static_cast<nsIFrame*>(currentItem);
frame = frameTraversal->CurrentItem();
if (!frame)
return PR_FALSE;

View File

@ -99,7 +99,7 @@ bug413093obs.prototype = {
ww.unregisterNotification(this);
// Let the UI finish doing whatever it needs to do
executeSoon(function() {
SimpleTest.executeSoon(function() {
setPref(false);
let dmui = Cc["@mozilla.org/download-manager-ui;1"].

View File

@ -92,7 +92,7 @@ let windowObserver = {
return;
// Let the dialog initialize
executeSoon(function() {
SimpleTest.executeSoon(function() {
checkWindow(win);
testIndex++;
if (!tests[testIndex]) {

View File

@ -44,22 +44,6 @@ const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;
/**
* Executes a function shortly after the call, but lets the caller continue
* working (or finish).
*/
function executeSoon(aFunc)
{
let tm = Cc["@mozilla.org/thread-manager;1"].getService(Ci.nsIThreadManager);
tm.mainThread.dispatch({
run: function()
{
aFunc();
}
}, Ci.nsIThread.DISPATCH_NORMAL);
}
/**
* Adds a live download to the download manager.
*

View File

@ -156,11 +156,13 @@ __asm__ (
"leal 0(,%eax,8),%edx\n\t"
"movl %esp, %ecx\n\t"
"subl %edx, %ecx\n\t"
/* Since there may be 64-bit data, it occurs to me that aligning this
space might be a performance gain. However, I don't think the rest
of mozilla worries about such things. In any event, do it here.
"andl $0xfffffff8, %ecx\n\t"
/* Align to maximum x86 data size: 128 bits == 16 bytes == XMM register size.
* This is to avoid protection faults where SSE+ alignment of stack pointer
* is assumed and required, e.g. by GCC4's -ftree-vectorize option.
*/
"andl $0xfffffff0, %ecx\n\t" /* drop(?) stack ptr to 128-bit align */
"subl $8, %ecx\n\t" /* lower again; push/call below will re-align */
"movl %ecx, %esp\n\t" /* make stack space */
"movl 0x14(%ebp), %edx\n\t"
"call " SYMBOL_UNDERSCORE "invoke_copy_to_stack\n\t"