mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Merged with mozilla-central: 00186bbb7459
This commit is contained in:
commit
6e925ce155
@ -745,6 +745,9 @@ nsAccUtils::GetHeaderCellsFor(nsIAccessibleTable *aTable,
|
||||
nsCOMPtr<nsIAccessibleTableCell> tableCellAcc =
|
||||
do_QueryInterface(cell);
|
||||
|
||||
// GetCellAt should always return an nsIAccessibleTableCell (XXX Bug 587529)
|
||||
NS_ENSURE_STATE(tableCellAcc);
|
||||
|
||||
PRInt32 origIdx = 1;
|
||||
if (moveToLeft)
|
||||
rv = tableCellAcc->GetColumnIndex(&origIdx);
|
||||
|
@ -73,10 +73,13 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsIWebNavigation.h"
|
||||
#include "nsFocusManager.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIXULDocument.h"
|
||||
#endif
|
||||
|
||||
namespace dom = mozilla::dom;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static member initialization
|
||||
|
||||
@ -895,7 +898,8 @@ NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsDocAccessible)
|
||||
|
||||
void
|
||||
nsDocAccessible::AttributeWillChange(nsIDocument *aDocument,
|
||||
nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
// XXX TODO: bugs 381599 467143 472142 472143
|
||||
@ -905,15 +909,16 @@ nsDocAccessible::AttributeWillChange(nsIDocument *aDocument,
|
||||
}
|
||||
|
||||
void
|
||||
nsDocAccessible::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
nsDocAccessible::AttributeChanged(nsIDocument *aDocument,
|
||||
dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
AttributeChangedImpl(aContent, aNameSpaceID, aAttribute);
|
||||
AttributeChangedImpl(aElement, aNameSpaceID, aAttribute);
|
||||
|
||||
// If it was the focused node, cache the new state
|
||||
if (aContent == gLastFocusedNode) {
|
||||
nsAccessible *focusedAccessible = GetAccService()->GetAccessible(aContent);
|
||||
if (aElement == gLastFocusedNode) {
|
||||
nsAccessible *focusedAccessible = GetAccService()->GetAccessible(aElement);
|
||||
if (focusedAccessible)
|
||||
gLastFocusedAccessiblesState = nsAccUtils::State(focusedAccessible);
|
||||
}
|
||||
|
@ -136,5 +136,12 @@
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.5</string>
|
||||
<key>LSMinimumSystemVersionByArchitecture</key>
|
||||
<dict>
|
||||
<key>i386</key>
|
||||
<string>10.5.0</string>
|
||||
<key>x86_64</key>
|
||||
<string>10.6.0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1115,6 +1115,9 @@
|
||||
|
||||
<toolbarpalette id="BrowserToolbarPalette">
|
||||
|
||||
# Update primaryToolbarButtons in browser/themes/browserShared.inc when adding
|
||||
# or removing default items with the toolbarbutton-1 class.
|
||||
|
||||
<toolbarbutton id="print-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&printButton.label;" command="cmd_print"
|
||||
tooltiptext="&printButton.tooltip;"/>
|
||||
|
@ -184,6 +184,7 @@
|
||||
this.moveTabTo(aTab, this._numPinnedTabs);
|
||||
aTab.setAttribute("pinned", "true");
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
this.tabContainer.adjustTabstrip();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
@ -198,6 +199,7 @@
|
||||
aTab.removeAttribute("pinned");
|
||||
aTab.style.MozMarginStart = "";
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
this.tabContainer.adjustTabstrip();
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
* Steven Garrity <steven@silverorange.com>
|
||||
* Henrik Skupin <mozilla@hskupin.info>
|
||||
* Johnathan Nightingale <johnath@mozilla.com>
|
||||
* Ehsan Akhgari <ehsan.akhgari@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
|
||||
@ -48,11 +49,17 @@
|
||||
|
||||
#technicalContent > h2, #expertContent > h2 {
|
||||
cursor: pointer;
|
||||
padding-left: 20px;
|
||||
-moz-padding-start: 20px;
|
||||
position: relative;
|
||||
left: -20px;
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent > h2,
|
||||
body[dir="rtl"] #expertContent > h2 {
|
||||
left: auto;
|
||||
right: -20px;
|
||||
}
|
||||
|
||||
div[collapsed] > p,
|
||||
div[collapsed] > div {
|
||||
display: none;
|
||||
|
@ -122,6 +122,13 @@
|
||||
toggle('technicalContent');
|
||||
toggle('expertContent');
|
||||
}
|
||||
|
||||
// if this is a Strict-Transport-Security host and the cert
|
||||
// is bad, don't allow overrides (STS Spec section 7.3).
|
||||
if (getCSSClass() == "badStsCert") {
|
||||
var ec = document.getElementById('expertContent');
|
||||
document.getElementById('errorLongContent').removeChild(ec);
|
||||
}
|
||||
|
||||
var tech = document.getElementById("technicalContentText");
|
||||
if (tech)
|
||||
|
@ -143,6 +143,14 @@ function restoreSession() {
|
||||
}, true);
|
||||
}
|
||||
|
||||
function startNewSession() {
|
||||
var prefBranch = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||
if (prefBranch.getIntPref("browser.startup.page") == 0)
|
||||
getBrowserWindow().gBrowser.loadURI("about:blank");
|
||||
else
|
||||
getBrowserWindow().BrowserHome();
|
||||
}
|
||||
|
||||
function onListClick(aEvent) {
|
||||
// don't react to right-clicks
|
||||
if (aEvent.button == 2)
|
||||
|
@ -103,9 +103,21 @@
|
||||
|
||||
<!-- Buttons -->
|
||||
<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="buttons">
|
||||
#ifdef XP_UNIX
|
||||
<button id="errorCancel" label="&restorepage.cancelButton;"
|
||||
accesskey="&restorepage.cancel.access;"
|
||||
oncommand="startNewSession();"/>
|
||||
<button id="errorTryAgain" label="&restorepage.tryagainButton;"
|
||||
accesskey="&restorepage.restore.access;"
|
||||
oncommand="restoreSession();"/>
|
||||
#else
|
||||
<button id="errorTryAgain" label="&restorepage.tryagainButton;"
|
||||
accesskey="&restorepage.restore.access;"
|
||||
oncommand="restoreSession();"/>
|
||||
<button id="errorCancel" label="&restorepage.cancelButton;"
|
||||
accesskey="&restorepage.cancel.access;"
|
||||
oncommand="startNewSession();"/>
|
||||
#endif
|
||||
</hbox>
|
||||
<!-- holds the session data for when the tab is closed -->
|
||||
<input type="text" id="sessionData" style="display: none;"/>
|
||||
|
@ -1,3 +1,3 @@
|
||||
browser.jar:
|
||||
content/browser/aboutSessionRestore.xhtml (content/aboutSessionRestore.xhtml)
|
||||
* content/browser/aboutSessionRestore.xhtml (content/aboutSessionRestore.xhtml)
|
||||
* content/browser/aboutSessionRestore.js (content/aboutSessionRestore.js)
|
||||
|
@ -99,6 +99,7 @@ _BROWSER_TEST_FILES = \
|
||||
browser_476161_sample.html \
|
||||
browser_477657.js \
|
||||
browser_480148.js \
|
||||
browser_480893.js \
|
||||
browser_483330.js \
|
||||
browser_485482.js \
|
||||
browser_485482_sample.html \
|
||||
|
@ -0,0 +1,90 @@
|
||||
/* ***** 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 sessionstore test code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Kohler <michaelkohler@live.com>.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2009
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
function test() {
|
||||
/** Test for Bug 480893 **/
|
||||
|
||||
waitForExplicitFinish();
|
||||
|
||||
// Test that starting a new session loads a blank page if Firefox is
|
||||
// configured to display a blank page at startup (browser.startup.page = 0)
|
||||
gPrefService.setIntPref("browser.startup.page", 0);
|
||||
let tab = gBrowser.addTab("about:sessionrestore");
|
||||
gBrowser.selectedTab = tab;
|
||||
let browser = tab.linkedBrowser;
|
||||
browser.addEventListener("load", function(aEvent) {
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
let doc = browser.contentDocument;
|
||||
|
||||
// click on the "Start New Session" button after about:sessionrestore is loaded
|
||||
doc.getElementById("errorCancel").click();
|
||||
browser.addEventListener("load", function(aEvent) {
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
let doc = browser.contentDocument;
|
||||
|
||||
is(doc.URL, "about:blank", "loaded page is about:blank");
|
||||
|
||||
// Test that starting a new session loads the homepage (set to http://mochi.test:8888)
|
||||
// if Firefox is configured to display a homepage at startup (browser.startup.page = 1)
|
||||
let homepage = "http://mochi.test:8888/";
|
||||
gPrefService.setCharPref("browser.startup.homepage", homepage);
|
||||
gPrefService.setIntPref("browser.startup.page", 1);
|
||||
gBrowser.loadURI("about:sessionrestore");
|
||||
browser.addEventListener("load", function(aEvent) {
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
let doc = browser.contentDocument;
|
||||
|
||||
// click on the "Start New Session" button after about:sessionrestore is loaded
|
||||
doc.getElementById("errorCancel").click();
|
||||
browser.addEventListener("load", function(aEvent) {
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
let doc = browser.contentDocument;
|
||||
|
||||
is(doc.URL, homepage, "loaded page is the homepage");
|
||||
|
||||
// close tab, restore default values and finish the test
|
||||
gBrowser.removeTab(tab);
|
||||
// we need this if-statement because if there is no user set value,
|
||||
// clearUserPref throws a uncatched exception and finish is not called
|
||||
if (gPrefService.prefHasUserValue("browser.startup.page"))
|
||||
gPrefService.clearUserPref("browser.startup.page");
|
||||
gPrefService.clearUserPref("browser.startup.homepage");
|
||||
finish();
|
||||
}, true);
|
||||
}, true);
|
||||
}, true);
|
||||
}, true);
|
||||
}
|
@ -672,6 +672,7 @@ xpicleanup@BIN_SUFFIX@
|
||||
modules/PluginProvider.jsm
|
||||
modules/PluralForm.jsm
|
||||
modules/PopupNotifications.jsm
|
||||
modules/PropertyPanel.jsm
|
||||
modules/Services.jsm
|
||||
modules/services-sync/auth.js
|
||||
modules/services-sync/base_records/collection.js
|
||||
@ -736,6 +737,9 @@ xpicleanup@BIN_SUFFIX@
|
||||
res/fonts/mathfontSTIXNonUnicode.properties
|
||||
res/fonts/mathfontSTIXSize1.properties
|
||||
res/fonts/mathfontSTIXSizeOneSym.properties
|
||||
#ifdef XP_WIN
|
||||
res/fonts/mathfontSymbol.properties
|
||||
#endif
|
||||
res/fonts/mathfontUnicode.properties
|
||||
res/grabber.gif
|
||||
res/html/folder.png
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
<!ENTITY restorepage.tryagainButton "Restore">
|
||||
<!ENTITY restorepage.restore.access "R">
|
||||
<!ENTITY restorepage.cancelButton "Start New Session">
|
||||
<!ENTITY restorepage.cancel.access "S">
|
||||
|
||||
<!ENTITY restorepage.restoreHeader "Restore">
|
||||
<!ENTITY restorepage.listHeader "Windows and Tabs">
|
||||
|
3
browser/themes/browserShared.inc
Normal file
3
browser/themes/browserShared.inc
Normal file
@ -0,0 +1,3 @@
|
||||
%filter substitution
|
||||
|
||||
%define primaryToolbarButtons #back-button, #forward-button, #reload-button, #stop-button, #home-button, #print-button, #downloads-button, #history-button, #bookmarks-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #cut-button, #copy-button, #paste-button, #fullscreen-button
|
@ -23,6 +23,7 @@
|
||||
* Steven Garrity <steven@silverorange.com>
|
||||
* Henrik Skupin <mozilla@hskupin.info>
|
||||
* Johnathan Nightingale <johnath@mozilla.com>
|
||||
* Ehsan Akhgari <ehsan.akhgari@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
|
||||
@ -89,7 +90,17 @@ body[dir="rtl"] #errorPageContainer {
|
||||
background : url("chrome://browser/skin/section_expanded.png") left 0 no-repeat;
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent > h2,
|
||||
body[dir="rtl"] #expertContent > h2 {
|
||||
background-position: right 0;
|
||||
}
|
||||
|
||||
#technicalContent[collapsed] > h2,
|
||||
#expertContent[collapsed] > h2{
|
||||
background-image: url("chrome://browser/skin/section_collapsed.png");
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent[collapsed] > h2,
|
||||
body[dir="rtl"] #expertContent[collapsed] > h2 {
|
||||
background-image: url("chrome://browser/skin/section_collapsed-rtl.png");
|
||||
}
|
||||
|
@ -48,6 +48,8 @@
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../../browserShared.inc
|
||||
|
||||
#menubar-items {
|
||||
-moz-box-orient: vertical; /* for flex hack */
|
||||
}
|
||||
@ -481,22 +483,23 @@ menuitem:not([type]) {
|
||||
}
|
||||
|
||||
/* Primary toolbar buttons */
|
||||
.toolbarbutton-1 {
|
||||
.toolbarbutton-1:not([type="menu-button"]) {
|
||||
-moz-box-orient: vertical;
|
||||
min-width: 0;
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-icon {
|
||||
-moz-margin-end: 0px;
|
||||
-moz-margin-end: 0;
|
||||
}
|
||||
|
||||
toolbar[mode="full"] .toolbarbutton-1,
|
||||
toolbar[mode="full"] .toolbarbutton-menubutton-button {
|
||||
toolbar[mode="full"] .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1, .toolbarbutton-menubutton-button {
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -629,7 +632,7 @@ toolbar[mode="full"] .toolbarbutton-menubutton-button {
|
||||
}
|
||||
|
||||
/* 16px primary toolbar buttons */
|
||||
toolbar[iconsize="small"] .toolbarbutton-1 {
|
||||
toolbar[iconsize="small"] .toolbarbutton-1:not([type="menu-button"]) {
|
||||
-moz-box-orient: vertical;
|
||||
min-width: 0;
|
||||
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
|
||||
|
@ -28,6 +28,7 @@ browser.jar:
|
||||
skin/classic/browser/Privacy-48.png
|
||||
skin/classic/browser/searchbar.css (searchbar.css)
|
||||
skin/classic/browser/section_collapsed.png
|
||||
skin/classic/browser/section_collapsed-rtl.png
|
||||
skin/classic/browser/section_expanded.png
|
||||
skin/classic/browser/Secure.png
|
||||
skin/classic/browser/Security-broken.png
|
||||
|
BIN
browser/themes/gnomestripe/browser/section_collapsed-rtl.png
Normal file
BIN
browser/themes/gnomestripe/browser/section_collapsed-rtl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 791 B |
@ -23,6 +23,7 @@
|
||||
* Steven Garrity <steven@silverorange.com>
|
||||
* Henrik Skupin <mozilla@hskupin.info>
|
||||
* Johnathan Nightingale <johnath@mozilla.com>
|
||||
* Ehsan Akhgari <ehsan.akhgari@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
|
||||
@ -89,7 +90,17 @@ body[dir="rtl"] #errorPageContainer {
|
||||
background : url("chrome://browser/skin/section_expanded.png") left 0 no-repeat;
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent > h2,
|
||||
body[dir="rtl"] #expertContent > h2 {
|
||||
background-position: right 0;
|
||||
}
|
||||
|
||||
#technicalContent[collapsed] > h2,
|
||||
#expertContent[collapsed] > h2{
|
||||
background-image: url("chrome://browser/skin/section_collapsed.png");
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent[collapsed] > h2,
|
||||
body[dir="rtl"] #expertContent[collapsed] > h2 {
|
||||
background-image: url("chrome://browser/skin/section_collapsed-rtl.png");
|
||||
}
|
||||
|
@ -290,11 +290,10 @@ toolbarbutton.bookmark-item > menupopup {
|
||||
|
||||
/* ----- PRIMARY TOOLBAR BUTTONS ----- */
|
||||
|
||||
.toolbarbutton-1,
|
||||
#restore-button,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
|
||||
margin: 0;
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
#restore-button {
|
||||
-moz-box-orient: vertical;
|
||||
padding: 0 3px;
|
||||
height: 22px;
|
||||
@ -305,10 +304,21 @@ toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
|
||||
background-origin: border-box;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1,
|
||||
#restore-button {
|
||||
margin: 0 4px;
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) #restore-button,
|
||||
toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
padding: 0;
|
||||
height: auto;
|
||||
border: none;
|
||||
@ -317,80 +327,69 @@ toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"] > .toolbarbutton-m
|
||||
}
|
||||
|
||||
.toolbarbutton-1:not([type="menu-button"]),
|
||||
#restore-button,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
#restore-button {
|
||||
min-width: 28px;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([type="menu-button"]),
|
||||
toolbar:not([mode="icons"]) #restore-button,
|
||||
toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button {
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar:not([mode="icons"]) #restore-button {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-icon,
|
||||
#restore-button > .toolbarbutton-icon,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
#restore-button > .toolbarbutton-icon {
|
||||
padding: 0;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1[disabled="true"] > .toolbarbutton-icon,
|
||||
#restore-button[disabled="true"] > .toolbarbutton-icon,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon {
|
||||
.toolbarbutton-1[type="menu-button"] > .toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon,
|
||||
#restore-button[disabled="true"] > .toolbarbutton-icon {
|
||||
opacity: .4;
|
||||
}
|
||||
|
||||
.toolbarbutton-1,
|
||||
#restore-button,
|
||||
toolbarbutton[type="menu-button"] {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1,
|
||||
#restore-button {
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
list-style-image: url(chrome://browser/skin/toolbarbutton-dropmarker.png);
|
||||
width: 14px;
|
||||
padding-top: 2px;
|
||||
-moz-border-start: none !important;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker {
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
width: auto;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
-moz-border-radius-topleft: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
}
|
||||
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
}
|
||||
|
||||
toolbar:not([mode="icons"]) toolbarbutton[type="menu-button"]:not([open="true"]) > .toolbarbutton-menubutton-dropmarker {
|
||||
toolbar:not([mode="icons"]) .toolbarbutton-1:not([open="true"]) > .toolbarbutton-menubutton-dropmarker {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 > .toolbarbutton-text,
|
||||
toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button > .toolbarbutton-text {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
|
||||
margin: 2px 0 0;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):active:hover,
|
||||
toolbar[mode="icons"] #restore-button:not([disabled="true"]):active:hover,
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"])[open="true"],
|
||||
toolbar[mode="icons"] toolbarbutton[type="menu-button"]:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover,
|
||||
toolbar[mode="icons"] toolbarbutton[type="menu-button"][open="true"] > .toolbarbutton-menubutton-dropmarker {
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([disabled="true"]) > .toolbarbutton-menubutton-button:active:hover,
|
||||
toolbar[mode="icons"] .toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar[mode="icons"] #restore-button:not([disabled="true"]):active:hover {
|
||||
background: @toolbarbuttonPressedBackgroundColor@;
|
||||
text-shadow: @loweredShadow@;
|
||||
-moz-box-shadow: @toolbarbuttonPressedInnerShadow@, @loweredShadow@;
|
||||
@ -407,9 +406,9 @@ toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):-moz-window-inactive,
|
||||
toolbar[mode="icons"] #restore-button:-moz-window-inactive,
|
||||
toolbar[mode="icons"] toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-button:-moz-window-inactive,
|
||||
toolbar[mode="icons"] toolbarbutton[type="menu-button"] > .toolbarbutton-menubutton-dropmarker:-moz-window-inactive {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-window-inactive,
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-window-inactive,
|
||||
toolbar[mode="icons"] #restore-button:-moz-window-inactive {
|
||||
border-color: @toolbarbuttonInactiveBorderColor@;
|
||||
background-image: @toolbarbuttonInactiveBackgroundImage@;
|
||||
}
|
||||
@ -419,8 +418,7 @@ toolbar[mode="icons"] .toolbarbutton-1:not([type="menu-button"]):not(#fullscreen
|
||||
-moz-box-shadow: inset rgba(0, 0, 0, 0.5) 0 3px 5px, @loweredShadow@;
|
||||
}
|
||||
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > menupopup,
|
||||
toolbar[mode="icons"] toolbarbutton[type="menu-button"] > menupopup {
|
||||
toolbar[mode="icons"] .toolbarbutton-1 > menupopup {
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ browser.jar:
|
||||
skin/classic/browser/Search.png
|
||||
skin/classic/browser/Search-addengines.png
|
||||
skin/classic/browser/section_collapsed.png
|
||||
skin/classic/browser/section_collapsed-rtl.png
|
||||
skin/classic/browser/section_expanded.png
|
||||
skin/classic/browser/Secure-Glyph-White.png
|
||||
skin/classic/browser/Secure-statusbar.png
|
||||
|
BIN
browser/themes/pinstripe/browser/section_collapsed-rtl.png
Normal file
BIN
browser/themes/pinstripe/browser/section_collapsed-rtl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 791 B |
@ -1,3 +1,4 @@
|
||||
%include ../../../../toolkit/themes/pinstripe/global/shared.inc
|
||||
%include ../../browserShared.inc
|
||||
|
||||
%define hudButton -moz-appearance: none; background: url("chrome://browser/skin/hud-style-button-middle-background.png") repeat-x #464646 center center; border: 3px solid; -moz-border-top-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-right-colors: rgba(53,53,53,1) rgba(53,53,53,1) rgba(162,162,162,1); -moz-border-bottom-colors: rgba(128,128,128,0.35) rgba(0,0,0,0.5) rgba(255,255,255,0.15); -moz-border-left-colors: rgba(0,0,0,0.35) rgba(26,26,26,0.5) rgba(255,255,255,0.4); -moz-border-radius: 20px; color: #fff;
|
||||
|
@ -23,6 +23,7 @@
|
||||
* Steven Garrity <steven@silverorange.com>
|
||||
* Henrik Skupin <mozilla@hskupin.info>
|
||||
* Johnathan Nightingale <johnath@mozilla.com>
|
||||
* Ehsan Akhgari <ehsan.akhgari@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
|
||||
@ -89,7 +90,17 @@ body[dir="rtl"] #errorPageContainer {
|
||||
background : url("chrome://browser/skin/section_expanded.png") left center no-repeat;
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent > h2,
|
||||
body[dir="rtl"] #expertContent > h2 {
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
#technicalContent[collapsed] > h2,
|
||||
#expertContent[collapsed] > h2{
|
||||
background-image: url("chrome://browser/skin/section_collapsed.png");
|
||||
}
|
||||
|
||||
body[dir="rtl"] #technicalContent[collapsed] > h2,
|
||||
body[dir="rtl"] #expertContent[collapsed] > h2 {
|
||||
background-image: url("chrome://browser/skin/section_collapsed-rtl.png");
|
||||
}
|
||||
|
@ -46,6 +46,7 @@
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
@namespace html url("http://www.w3.org/1999/xhtml");
|
||||
|
||||
%include ../../browserShared.inc
|
||||
%filter substitution
|
||||
%define toolbarHighlight rgba(255,255,255,.5)
|
||||
%define navbarTextboxCustomBorder border-color: rgba(0,0,0,.25) rgba(0,0,0,.32) rgba(0,0,0,.37);
|
||||
@ -407,8 +408,8 @@ menuitem.bookmark-item {
|
||||
|
||||
/* ::::: primary toolbar buttons ::::: */
|
||||
|
||||
.toolbarbutton-menubutton-button,
|
||||
.toolbarbutton-menubutton-dropmarker,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
.toolbarbutton-1 {
|
||||
-moz-appearance: none;
|
||||
padding: 1px 5px;
|
||||
@ -426,19 +427,19 @@ menuitem.bookmark-item {
|
||||
text-shadow: 0 0 3px white;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-dropmarker,
|
||||
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-menubutton-button,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1 {
|
||||
padding-left: 3px;
|
||||
padding-right: 3px;
|
||||
}
|
||||
|
||||
.toolbarbutton-1 {
|
||||
.toolbarbutton-1:not([type="menu-button"]) {
|
||||
-moz-box-orient: vertical;
|
||||
list-style-image: url("chrome://browser/skin/Toolbar.png");
|
||||
}
|
||||
|
||||
toolbarbutton[type="menu-button"] {
|
||||
.toolbarbutton-1[type="menu-button"] {
|
||||
-moz-appearance: none;
|
||||
padding: 0;
|
||||
background: none !important;
|
||||
@ -446,47 +447,43 @@ toolbarbutton[type="menu-button"] {
|
||||
-moz-box-shadow: none !important;
|
||||
}
|
||||
|
||||
.toolbarbutton-1,
|
||||
toolbarbutton[type="menu-button"] {
|
||||
.toolbarbutton-1 {
|
||||
margin: 1px 3px;
|
||||
}
|
||||
|
||||
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1,
|
||||
toolbar[iconsize="small"][mode="icons"] toolbarbutton[type="menu-button"] {
|
||||
toolbar[iconsize="small"][mode="icons"] .toolbarbutton-1 {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-dropmarker {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
-moz-border-start-style: none;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
||||
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(ltr),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(rtl) {
|
||||
-moz-border-radius-topright: 0;
|
||||
-moz-border-radius-bottomright: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
.toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:-moz-locale-dir(rtl),
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr) {
|
||||
-moz-border-radius-topleft: 0;
|
||||
-moz-border-radius-bottomleft: 0;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button[disabled="true"],
|
||||
.toolbarbutton-menubutton-dropmarker[disabled="true"],
|
||||
.toolbarbutton-1[disabled="true"] {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button[disabled="true"] > .toolbarbutton-icon,
|
||||
.toolbarbutton-1[disabled="true"] > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.toolbarbutton-1[disabled="true"] > .toolbarbutton-icon {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
|
||||
toolbarbutton[type="menu-button"]:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||
.toolbarbutton-1:not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):not(:active):hover,
|
||||
.toolbarbutton-1:not([open="true"]):not(:active):hover > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||
.toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):not([checked="true"]):not([open="true"]):not(:active):hover {
|
||||
background-color: hsla(190,60%,70%,.5);
|
||||
border-color: hsla(190,50%,65%,.8) hsla(190,50%,50%,.8) hsla(190,50%,40%,.8);
|
||||
-moz-box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset,
|
||||
@ -498,11 +495,11 @@ toolbarbutton[type="menu-button"]:not([open="true"]):not(:active):hover > .toolb
|
||||
-moz-box-shadow .3s ease-in;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
|
||||
toolbarbutton[type="menu-button"]:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||
toolbarbutton[type="menu-button"][open="true"] > .toolbarbutton-menubutton-dropmarker,
|
||||
.toolbarbutton-1:not([disabled="true"]):hover:active,
|
||||
.toolbarbutton-1[checked="true"],
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button:not([disabled="true"]):hover:active,
|
||||
.toolbarbutton-1:hover:active > .toolbarbutton-menubutton-dropmarker:not([disabled="true"]),
|
||||
.toolbarbutton-1[open="true"] > .toolbarbutton-menubutton-dropmarker,
|
||||
.toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):hover:active,
|
||||
.toolbarbutton-1:not([type="menu-button"])[checked="true"],
|
||||
.toolbarbutton-1[open="true"] {
|
||||
background-color: transparent;
|
||||
border-color: rgba(0,0,0,.65) rgba(0,0,0,.55) rgba(0,0,0,.5);
|
||||
@ -517,14 +514,14 @@ toolbarbutton[type="menu-button"][open="true"] > .toolbarbutton-menubutton-dropm
|
||||
-moz-transition: background-color .4s;
|
||||
}
|
||||
|
||||
.toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
.toolbarbutton-1 > .toolbarbutton-icon {
|
||||
-moz-margin-end: 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
toolbar[iconsize="small"] .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
toolbar[iconsize="small"] .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-icon,
|
||||
toolbar[iconsize="small"] .toolbarbutton-1 > .toolbarbutton-icon {
|
||||
margin: 1px;
|
||||
width: 16px;
|
||||
@ -534,24 +531,23 @@ toolbar[iconsize="small"] .toolbarbutton-1 > .toolbarbutton-icon {
|
||||
/* Default icons have a built-in glow, so they are 18*18px even in small mode,
|
||||
except for the large back icon, which is why the code below uses 'auto' rather
|
||||
than 18px. This will pick the correct size based on the image region. */
|
||||
:-moz-any(
|
||||
#back-button, #forward-button, #reload-button, #stop-button,
|
||||
#home-button, #print-button, #downloads-button, #history-button,
|
||||
#bookmarks-button, #bookmarks-menu-button, #new-tab-button,
|
||||
#new-window-button, #cut-button, #copy-button, #paste-button,
|
||||
#fullscreen-button) > .toolbarbutton-icon {
|
||||
:-moz-any(@primaryToolbarButtons@) > .toolbarbutton-icon {
|
||||
margin: 0 !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
toolbar[mode="full"] .toolbarbutton-1,
|
||||
toolbar[mode="full"] .toolbarbutton-menubutton-button {
|
||||
toolbar[mode="full"] .toolbarbutton-1 > .toolbarbutton-menubutton-button {
|
||||
min-width: 57px;
|
||||
}
|
||||
|
||||
#TabsToolbar > .toolbarbutton-1,
|
||||
#TabsToolbar > .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
#TabsToolbar > .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
#TabsToolbar > toolbarpaletteitem > .toolbarbutton-1,
|
||||
#TabsToolbar > toolbarpaletteitem > .toolbarbutton-1 > .toolbarbutton-menubutton-button,
|
||||
#TabsToolbar > toolbarpaletteitem > .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
#TabsToolbar > #bookmarks-menu-button-container > #bookmarks-menu-button {
|
||||
-moz-appearance: toolbarbutton;
|
||||
margin: 0;
|
||||
@ -563,6 +559,11 @@ toolbar[mode="full"] .toolbarbutton-menubutton-button {
|
||||
-moz-box-shadow: none !important;
|
||||
}
|
||||
|
||||
#TabsToolbar > .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker,
|
||||
#TabsToolbar > toolbarpaletteitem > .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
|
||||
-moz-appearance: none;
|
||||
}
|
||||
|
||||
/* unified back/forward button */
|
||||
|
||||
#back-button {
|
||||
|
@ -40,6 +40,7 @@ browser.jar:
|
||||
* skin/classic/browser/searchbar.css (searchbar.css)
|
||||
skin/classic/browser/Search-addengines.png
|
||||
skin/classic/browser/section_collapsed.png
|
||||
skin/classic/browser/section_collapsed-rtl.png
|
||||
skin/classic/browser/section_expanded.png
|
||||
skin/classic/browser/setDesktopBackground.css
|
||||
skin/classic/browser/menu-back.png (menu-back.png)
|
||||
@ -154,6 +155,7 @@ browser.jar:
|
||||
* skin/classic/aero/browser/searchbar.css (searchbar.css)
|
||||
skin/classic/aero/browser/Search-addengines.png
|
||||
skin/classic/aero/browser/section_collapsed.png
|
||||
skin/classic/aero/browser/section_collapsed-rtl.png
|
||||
skin/classic/aero/browser/section_expanded.png
|
||||
skin/classic/aero/browser/setDesktopBackground.css
|
||||
skin/classic/aero/browser/menu-back.png (menu-back-aero.png)
|
||||
|
BIN
browser/themes/winstripe/browser/section_collapsed-rtl.png
Normal file
BIN
browser/themes/winstripe/browser/section_collapsed-rtl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 791 B |
@ -6898,9 +6898,7 @@ if test $MOZ_PLATFORM_MAEMO; then
|
||||
if test -z "$_LIB_FOUND"; then
|
||||
AC_MSG_ERROR([libcontentaction is required when build for Maemo])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$MOZ_PLATFORM_MAEMO" -gt 5; then
|
||||
|
||||
MOZ_THUMB2=1
|
||||
PKG_CHECK_MODULES(MOZ_MEEGOTOUCH, meegotouchcore)
|
||||
MOZ_ENABLE_MEEGOTOUCH=1
|
||||
|
@ -20,6 +20,7 @@
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ms2ger <ms2ger@gmail.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"),
|
||||
@ -34,8 +35,9 @@
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#ifndef nsIMutationObserver_h___
|
||||
#define nsIMutationObserver_h___
|
||||
|
||||
#ifndef nsIMutationObserver_h
|
||||
#define nsIMutationObserver_h
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
@ -44,6 +46,12 @@ class nsIContent;
|
||||
class nsIDocument;
|
||||
class nsINode;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class Element;
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#define NS_IMUTATION_OBSERVER_IID \
|
||||
{ 0x85eea794, 0xed8e, 0x4e1b, \
|
||||
{ 0xa1, 0x28, 0xd0, 0x93, 0x00, 0xae, 0x51, 0xaa } }
|
||||
@ -172,7 +180,7 @@ public:
|
||||
* the stack.
|
||||
*/
|
||||
virtual void AttributeWillChange(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
mozilla::dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType) = 0;
|
||||
@ -181,7 +189,7 @@ public:
|
||||
* Notification that an attribute of an element has changed.
|
||||
*
|
||||
* @param aDocument The owner-document of aContent. Can be null.
|
||||
* @param aContent The element whose attribute changed
|
||||
* @param aElement The element whose attribute changed
|
||||
* @param aNameSpaceID The namespace id of the changed attribute
|
||||
* @param aAttribute The name of the changed attribute
|
||||
* @param aModType Whether or not the attribute was added, changed, or
|
||||
@ -195,7 +203,7 @@ public:
|
||||
* the stack.
|
||||
*/
|
||||
virtual void AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
mozilla::dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType) = 0;
|
||||
@ -326,14 +334,14 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID)
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTEWILLCHANGE \
|
||||
virtual void AttributeWillChange(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
PRInt32 aModType);
|
||||
|
||||
#define NS_DECL_NSIMUTATIONOBSERVER_ATTRIBUTECHANGED \
|
||||
virtual void AttributeChanged(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
PRInt32 aModType);
|
||||
@ -395,7 +403,7 @@ _class::CharacterDataChanged(nsIDocument* aDocument, \
|
||||
} \
|
||||
void \
|
||||
_class::AttributeWillChange(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
PRInt32 aModType) \
|
||||
@ -403,7 +411,7 @@ _class::AttributeWillChange(nsIDocument* aDocument, \
|
||||
} \
|
||||
void \
|
||||
_class::AttributeChanged(nsIDocument* aDocument, \
|
||||
nsIContent* aContent, \
|
||||
mozilla::dom::Element* aElement, \
|
||||
PRInt32 aNameSpaceID, \
|
||||
nsIAtom* aAttribute, \
|
||||
PRInt32 aModType) \
|
||||
@ -437,4 +445,4 @@ _class::ParentChainChanged(nsIContent *aContent) \
|
||||
}
|
||||
|
||||
|
||||
#endif /* nsIMutationObserver_h___ */
|
||||
#endif /* nsIMutationObserver_h */
|
||||
|
@ -605,39 +605,38 @@ nsContentList::GetNamedItem(const nsAString& aName, nsWrapperCache **aCache,
|
||||
}
|
||||
|
||||
void
|
||||
nsContentList::AttributeChanged(nsIDocument *aDocument, nsIContent* aContent,
|
||||
nsContentList::AttributeChanged(nsIDocument *aDocument, Element* aElement,
|
||||
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
NS_PRECONDITION(aContent, "Must have a content node to work with");
|
||||
NS_PRECONDITION(aContent->IsElement(), "Should be an element");
|
||||
NS_PRECONDITION(aElement, "Must have a content node to work with");
|
||||
|
||||
if (!mFunc || !mFuncMayDependOnAttr || mState == LIST_DIRTY ||
|
||||
!MayContainRelevantNodes(aContent->GetNodeParent()) ||
|
||||
!nsContentUtils::IsInSameAnonymousTree(mRootNode, aContent)) {
|
||||
!MayContainRelevantNodes(aElement->GetNodeParent()) ||
|
||||
!nsContentUtils::IsInSameAnonymousTree(mRootNode, aElement)) {
|
||||
// Either we're already dirty or this notification doesn't affect
|
||||
// whether we might match aContent.
|
||||
// whether we might match aElement.
|
||||
return;
|
||||
}
|
||||
|
||||
if (Match(aContent->AsElement())) {
|
||||
if (mElements.IndexOf(aContent) == -1) {
|
||||
// We match aContent now, and it's not in our list already. Just dirty
|
||||
if (Match(aElement)) {
|
||||
if (mElements.IndexOf(aElement) == -1) {
|
||||
// We match aElement now, and it's not in our list already. Just dirty
|
||||
// ourselves; this is simpler than trying to figure out where to insert
|
||||
// aContent.
|
||||
// aElement.
|
||||
SetDirty();
|
||||
}
|
||||
} else {
|
||||
// We no longer match aContent. Remove it from our list. If it's
|
||||
// We no longer match aElement. Remove it from our list. If it's
|
||||
// already not there, this is a no-op (though a potentially
|
||||
// expensive one). Either way, no change of mState is required
|
||||
// here.
|
||||
mElements.RemoveObject(aContent);
|
||||
mElements.RemoveObject(aElement);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsContentList::ContentAppended(nsIDocument *aDocument, nsIContent* aContainer,
|
||||
nsContentList::ContentAppended(nsIDocument* aDocument, nsIContent* aContainer,
|
||||
nsIContent* aFirstNewContent,
|
||||
PRInt32 aNewIndexInContainer)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include "nsDOMAttribute.h"
|
||||
#include "nsGenericElement.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsContentCreatorFunctions.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsDOMError.h"
|
||||
@ -60,6 +60,8 @@
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsMutationEvent.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
PRBool nsDOMAttribute::sInitialized;
|
||||
|
||||
@ -746,13 +748,13 @@ nsDOMAttribute::EnsureChildState()
|
||||
|
||||
void
|
||||
nsDOMAttribute::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
nsIContent* content = GetContentInternal();
|
||||
if (aContent != content) {
|
||||
if (aElement != content) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -105,26 +105,26 @@ nsNodeUtils::CharacterDataChanged(nsIContent* aContent,
|
||||
}
|
||||
|
||||
void
|
||||
nsNodeUtils::AttributeWillChange(nsIContent* aContent,
|
||||
nsNodeUtils::AttributeWillChange(Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
nsIDocument* doc = aContent->GetOwnerDoc();
|
||||
IMPL_MUTATION_NOTIFICATION(AttributeWillChange, aContent,
|
||||
(doc, aContent, aNameSpaceID, aAttribute,
|
||||
nsIDocument* doc = aElement->GetOwnerDoc();
|
||||
IMPL_MUTATION_NOTIFICATION(AttributeWillChange, aElement,
|
||||
(doc, aElement, aNameSpaceID, aAttribute,
|
||||
aModType));
|
||||
}
|
||||
|
||||
void
|
||||
nsNodeUtils::AttributeChanged(nsIContent* aContent,
|
||||
nsNodeUtils::AttributeChanged(Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
nsIDocument* doc = aContent->GetOwnerDoc();
|
||||
IMPL_MUTATION_NOTIFICATION(AttributeChanged, aContent,
|
||||
(doc, aContent, aNameSpaceID, aAttribute,
|
||||
nsIDocument* doc = aElement->GetOwnerDoc();
|
||||
IMPL_MUTATION_NOTIFICATION(AttributeChanged, aElement,
|
||||
(doc, aElement, aNameSpaceID, aAttribute,
|
||||
aModType));
|
||||
}
|
||||
|
||||
|
@ -72,26 +72,26 @@ public:
|
||||
|
||||
/**
|
||||
* Send AttributeWillChange notifications to nsIMutationObservers.
|
||||
* @param aContent Node whose data will change
|
||||
* @param aElement Element whose data will change
|
||||
* @param aNameSpaceID Namespace of changing attribute
|
||||
* @param aAttribute Local-name of changing attribute
|
||||
* @param aModType Type of change (add/change/removal)
|
||||
* @see nsIMutationObserver::AttributeWillChange
|
||||
*/
|
||||
static void AttributeWillChange(nsIContent* aContent,
|
||||
static void AttributeWillChange(mozilla::dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
||||
/**
|
||||
* Send AttributeChanged notifications to nsIMutationObservers.
|
||||
* @param aContent Node whose data changed
|
||||
* @param aElement Element whose data changed
|
||||
* @param aNameSpaceID Namespace of changed attribute
|
||||
* @param aAttribute Local-name of changed attribute
|
||||
* @param aModType Type of change (add/change/removal)
|
||||
* @see nsIMutationObserver::AttributeChanged
|
||||
*/
|
||||
static void AttributeChanged(nsIContent* aContent,
|
||||
static void AttributeChanged(mozilla::dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType);
|
||||
|
@ -37,7 +37,7 @@
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsScriptElement.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
@ -47,6 +47,8 @@
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsGkAtoms.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScriptElement::ScriptAvailable(nsresult aResult,
|
||||
nsIScriptElement *aElement,
|
||||
@ -118,7 +120,7 @@ nsScriptElement::CharacterDataChanged(nsIDocument *aDocument,
|
||||
|
||||
void
|
||||
nsScriptElement::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
@ -460,12 +460,12 @@ nsSyncLoadService::PushSyncStreamToListener(nsIInputStream* aIn,
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIInputStream> bufferedStream;
|
||||
if (!NS_InputStreamIsBuffered(aIn)) {
|
||||
PRInt32 chunkSize;
|
||||
PRInt64 chunkSize;
|
||||
rv = aChannel->GetContentLength(&chunkSize);
|
||||
if (NS_FAILED(rv)) {
|
||||
chunkSize = 4096;
|
||||
}
|
||||
chunkSize = NS_MIN(PRInt32(PR_UINT16_MAX), chunkSize);
|
||||
chunkSize = NS_MIN(PRInt64(PR_UINT16_MAX), chunkSize);
|
||||
|
||||
rv = NS_NewBufferedInputStream(getter_AddRefs(bufferedStream), aIn,
|
||||
chunkSize);
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
/**
|
||||
* class used to implement attr() generated content
|
||||
@ -337,13 +338,13 @@ nsAttributeTextNode::UnbindFromTree(PRBool aDeep, PRBool aNullParent)
|
||||
|
||||
void
|
||||
nsAttributeTextNode::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (aNameSpaceID == mNameSpaceID && aAttribute == mAttrName &&
|
||||
aContent == mGrandparent) {
|
||||
aElement == mGrandparent) {
|
||||
// Since UpdateText notifies, do it when it's safe to run script. Note
|
||||
// that if we get unbound while the event is up that's ok -- we'll just
|
||||
// have no grandparent when it fires, and will do nothing.
|
||||
|
@ -2407,8 +2407,8 @@ NOT_IMPLEMENTED_IF_FUNC_1(GetContentType, nsACString &value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(SetContentType, const nsACString &value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(GetContentCharset, nsACString &value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(SetContentCharset, const nsACString &value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(GetContentLength, PRInt32 *value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(SetContentLength, PRInt32 value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(GetContentLength, PRInt64 *value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(SetContentLength, PRInt64 value)
|
||||
NOT_IMPLEMENTED_IF_FUNC_1(Open, nsIInputStream **_retval)
|
||||
NOT_IMPLEMENTED_IF_FUNC_2(AsyncOpen, nsIStreamListener *listener,
|
||||
nsISupports *context)
|
||||
|
@ -49,6 +49,8 @@
|
||||
#include "nsINodeInfo.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
PRBool nsXMLEventsListener::InitXMLEventsListener(nsIDocument * aDocument,
|
||||
nsXMLEventsManager * aManager,
|
||||
nsIContent * aContent)
|
||||
@ -334,7 +336,7 @@ nsXMLEventsManager::EndLoad(nsIDocument* aDocument)
|
||||
|
||||
void
|
||||
nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
@ -348,23 +350,23 @@ nsXMLEventsManager::AttributeChanged(nsIDocument* aDocument,
|
||||
aAttribute == nsGkAtoms::observer ||
|
||||
aAttribute == nsGkAtoms::phase ||
|
||||
aAttribute == nsGkAtoms::propagate)) {
|
||||
RemoveListener(aContent);
|
||||
AddXMLEventsContent(aContent);
|
||||
nsXMLEventsListener::InitXMLEventsListener(aDocument, this, aContent);
|
||||
RemoveListener(aElement);
|
||||
AddXMLEventsContent(aElement);
|
||||
nsXMLEventsListener::InitXMLEventsListener(aDocument, this, aElement);
|
||||
}
|
||||
else {
|
||||
if (aContent->NodeInfo()->Equals(nsGkAtoms::listener,
|
||||
if (aElement->NodeInfo()->Equals(nsGkAtoms::listener,
|
||||
kNameSpaceID_XMLEvents)) {
|
||||
RemoveListener(aContent);
|
||||
AddXMLEventsContent(aContent);
|
||||
nsXMLEventsListener::InitXMLEventsListener(aDocument, this, aContent);
|
||||
RemoveListener(aElement);
|
||||
AddXMLEventsContent(aElement);
|
||||
nsXMLEventsListener::InitXMLEventsListener(aDocument, this, aElement);
|
||||
}
|
||||
else if (aContent->GetIDAttributeName() == aAttribute) {
|
||||
else if (aElement->GetIDAttributeName() == aAttribute) {
|
||||
if (aModType == nsIDOMMutationEvent::REMOVAL)
|
||||
mListeners.Enumerate(EnumAndSetIncomplete, aContent);
|
||||
mListeners.Enumerate(EnumAndSetIncomplete, aElement);
|
||||
else if (aModType == nsIDOMMutationEvent::MODIFICATION) {
|
||||
//Remove possible listener
|
||||
mListeners.Enumerate(EnumAndSetIncomplete, aContent);
|
||||
mListeners.Enumerate(EnumAndSetIncomplete, aElement);
|
||||
//Add new listeners
|
||||
AddListeners(aDocument);
|
||||
}
|
||||
|
@ -14,6 +14,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/chrome-harness.js"></script>
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=415498">Mozilla Bug 415498</a>
|
||||
|
||||
@ -23,9 +25,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
||||
<script class="testbody" type="application/javascript"><![CDATA[
|
||||
|
||||
/** Test for Bug 415498 **/
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
if (Cc === undefined) {
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
}
|
||||
var Cr = Components.results;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
@ -72,7 +76,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
||||
}, false);
|
||||
|
||||
// 1) This document uses addEventListener to register a method throwing an exception
|
||||
browser.loadURI("chrome://mochikit/content/chrome/content/events/test/bug415498-doc1.html");
|
||||
var chromeDir = getRootDirectory(window.location.href);
|
||||
browser.loadURI(chromeDir + "bug415498-doc1.html");
|
||||
yield;
|
||||
|
||||
ok(verifyErrorReceived("NS_ERROR_DOM_HIERARCHY_REQUEST_ERR"),
|
||||
@ -80,7 +85,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=415498
|
||||
gMessages = [];
|
||||
|
||||
// 2) This document sets window.onload to register a method throwing an exception
|
||||
browser.loadURI("chrome://mochikit/content/chrome/content/events/test/bug415498-doc2.html");
|
||||
var chromeDir = getRootDirectory(window.location.href);
|
||||
browser.loadURI(chromeDir + "bug415498-doc2.html");
|
||||
yield;
|
||||
|
||||
ok(verifyErrorReceived("NS_ERROR_DOM_HIERARCHY_REQUEST_ERR"),
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Tests for the dragstart event</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Tests for the draggable property on HTML elements</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<body>
|
||||
<p id="display"></p>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Tests for the dragstart event</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
|
@ -5,7 +5,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417760
|
||||
-->
|
||||
<head>
|
||||
<title>cannot focus() img with tabindex="-1"</title>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<style type="text/css">
|
||||
img {
|
||||
border: 5px solid white;
|
||||
@ -16,8 +16,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417760
|
||||
</style>
|
||||
|
||||
|
||||
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function checkFocus(aExpected, aTabIndex)
|
||||
|
@ -265,13 +265,13 @@ nsWyciwygChannel::SetContentCharset(const nsACString &aContentCharset)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWyciwygChannel::GetContentLength(PRInt32 *aContentLength)
|
||||
nsWyciwygChannel::GetContentLength(PRInt64 *aContentLength)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWyciwygChannel::SetContentLength(PRInt32 aContentLength)
|
||||
nsWyciwygChannel::SetContentLength(PRInt64 aContentLength)
|
||||
{
|
||||
mContentLength = aContentLength;
|
||||
|
||||
@ -506,10 +506,9 @@ nsWyciwygChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctx,
|
||||
|
||||
rv = mListener->OnDataAvailable(this, mListenerContext, input, offset, count);
|
||||
|
||||
// XXX handle 64-bit stuff for real
|
||||
if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND))
|
||||
mProgressSink->OnProgress(this, nsnull, PRUint64(offset + count),
|
||||
PRUint64(mContentLength));
|
||||
mContentLength);
|
||||
|
||||
return rv; // let the pump cancel on failure
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ protected:
|
||||
PRPackedBool mNeedToWriteCharset;
|
||||
PRInt32 mCharsetSource;
|
||||
nsCString mCharset;
|
||||
PRInt32 mContentLength;
|
||||
PRInt64 mContentLength;
|
||||
PRUint32 mLoadFlags;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
|
@ -240,7 +240,7 @@ nsMediaChannelStream::OnStartRequest(nsIRequest* aRequest)
|
||||
responseStatus == HTTP_PARTIAL_RESPONSE_CODE)) {
|
||||
// We weren't seeking and got a valid response status,
|
||||
// set the length of the content.
|
||||
PRInt32 cl = -1;
|
||||
PRInt64 cl = -1;
|
||||
hc->GetContentLength(&cl);
|
||||
if (cl >= 0) {
|
||||
mCacheStream.NotifyDataLength(cl);
|
||||
|
@ -41,6 +41,8 @@
|
||||
#include "nsSVGPathElement.h"
|
||||
#include "nsSVGAnimateMotionElement.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsSVGElement::StringInfo nsSVGMpathElement::sStringInfo[1] =
|
||||
{
|
||||
{ &nsGkAtoms::href, kNameSpaceID_XLink },
|
||||
@ -196,10 +198,10 @@ nsSVGMpathElement::GetStringInfo()
|
||||
// nsIMutationObserver methods
|
||||
|
||||
void
|
||||
nsSVGMpathElement::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIContent *aContent,
|
||||
nsSVGMpathElement::AttributeChanged(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom *aAttribute,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (aNameSpaceID == kNameSpaceID_None) {
|
||||
|
@ -42,6 +42,9 @@
|
||||
#include "nsIDOMSVGSymbolElement.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// implementation
|
||||
@ -194,13 +197,13 @@ nsSVGUseElement::CharacterDataChanged(nsIDocument *aDocument,
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGUseElement::AttributeChanged(nsIDocument *aDocument,
|
||||
nsIContent *aContent,
|
||||
nsSVGUseElement::AttributeChanged(nsIDocument* aDocument,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom *aAttribute,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (nsContentUtils::IsInSameAnonymousTree(this, aContent)) {
|
||||
if (nsContentUtils::IsInSameAnonymousTree(this, aElement)) {
|
||||
TriggerReclone();
|
||||
}
|
||||
}
|
||||
|
@ -51,10 +51,12 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsBindingManager.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsXMLPrettyPrinter,
|
||||
nsIDocumentObserver,
|
||||
nsIMutationObserver)
|
||||
@ -235,12 +237,12 @@ nsXMLPrettyPrinter::EndUpdate(nsIDocument* aDocument, nsUpdateType aUpdateType)
|
||||
|
||||
void
|
||||
nsXMLPrettyPrinter::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
MaybeUnhook(aContent);
|
||||
MaybeUnhook(aElement);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "txExprResult.h"
|
||||
#include "txNodeSet.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIAttribute.h"
|
||||
#include "nsIDOMClassInfo.h"
|
||||
#include "nsIDOMNode.h"
|
||||
@ -49,6 +49,8 @@
|
||||
#include "txXPathTreeWalker.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
nsXPathResult::nsXPathResult() : mDocument(nsnull),
|
||||
mCurrentPos(0),
|
||||
mResultType(ANY_TYPE),
|
||||
@ -248,12 +250,12 @@ nsXPathResult::CharacterDataChanged(nsIDocument* aDocument,
|
||||
|
||||
void
|
||||
nsXPathResult::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
Invalidate(aContent);
|
||||
Invalidate(aElement);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "nsContentCID.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIDocument.h"
|
||||
@ -68,6 +68,8 @@
|
||||
#include "nsIErrorService.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
static NS_DEFINE_CID(kXMLDocumentCID, NS_XMLDOCUMENT_CID);
|
||||
|
||||
/**
|
||||
@ -1228,7 +1230,7 @@ txMozillaXSLTProcessor::CharacterDataChanged(nsIDocument* aDocument,
|
||||
|
||||
void
|
||||
txMozillaXSLTProcessor::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
@ -8,7 +8,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body style="height: 100%" onload="setTimeout(onBodyLoad, 0);">
|
||||
<iframe id="test" src="chrome://mochikit/content/chrome/content/xul/content/test/398289-resource.xul" width="100%" height="100%">
|
||||
<iframe id="test" src="398289-resource.xul" width="100%" height="100%">
|
||||
</iframe>
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
@ -976,25 +976,25 @@ nsXULDocument::ExecuteOnBroadcastHandlerFor(nsIContent* aBroadcaster,
|
||||
|
||||
void
|
||||
nsXULDocument::AttributeWillChange(nsIDocument* aDocument,
|
||||
nsIContent* aContent, PRInt32 aNameSpaceID,
|
||||
Element* aElement, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aContent, "Null content!");
|
||||
NS_ABORT_IF_FALSE(aElement, "Null content!");
|
||||
NS_PRECONDITION(aAttribute, "Must have an attribute that's changing!");
|
||||
|
||||
// XXXbz check aNameSpaceID, dammit!
|
||||
// See if we need to update our ref map.
|
||||
if (aAttribute == nsGkAtoms::ref ||
|
||||
(aAttribute == nsGkAtoms::id && !aContent->GetIDAttributeName())) {
|
||||
(aAttribute == nsGkAtoms::id && !aElement->GetIDAttributeName())) {
|
||||
// Might not need this, but be safe for now.
|
||||
nsCOMPtr<nsIMutationObserver> kungFuDeathGrip(this);
|
||||
RemoveElementFromRefMap(aContent->AsElement());
|
||||
RemoveElementFromRefMap(aElement);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsXULDocument::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aElementContent, PRInt32 aNameSpaceID,
|
||||
Element* aElement, PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute, PRInt32 aModType)
|
||||
{
|
||||
NS_ASSERTION(aDocument == this, "unexpected doc");
|
||||
@ -1002,9 +1002,6 @@ nsXULDocument::AttributeChanged(nsIDocument* aDocument,
|
||||
// Might not need this, but be safe for now.
|
||||
nsCOMPtr<nsIMutationObserver> kungFuDeathGrip(this);
|
||||
|
||||
// XXXbz once we change AttributeChanged to take Element, we can nix this line
|
||||
Element* aElement = aElementContent->AsElement();
|
||||
|
||||
// XXXbz check aNameSpaceID, dammit!
|
||||
// See if we need to update our ref map.
|
||||
if (aAttribute == nsGkAtoms::ref ||
|
||||
|
@ -71,6 +71,8 @@
|
||||
#include "pldhash.h"
|
||||
#include "rdf.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
// Return values for EnsureElementHasGenericChild()
|
||||
@ -1557,7 +1559,7 @@ nsXULContentBuilder::GetResultForContent(nsIDOMElement* aElement,
|
||||
|
||||
void
|
||||
nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
@ -1567,14 +1569,14 @@ nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
// Handle "open" and "close" cases. We do this handling before
|
||||
// we've notified the observer, so that content is already created
|
||||
// for the frame system to walk.
|
||||
if ((aContent->GetNameSpaceID() == kNameSpaceID_XUL) &&
|
||||
(aAttribute == nsGkAtoms::open)) {
|
||||
if (aElement->GetNameSpaceID() == kNameSpaceID_XUL &&
|
||||
aAttribute == nsGkAtoms::open) {
|
||||
// We're on a XUL tag, and an ``open'' attribute changed.
|
||||
if (aContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::open,
|
||||
if (aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::open,
|
||||
nsGkAtoms::_true, eCaseMatters))
|
||||
OpenContainer(aContent);
|
||||
OpenContainer(aElement);
|
||||
else
|
||||
CloseContainer(aContent);
|
||||
CloseContainer(aElement);
|
||||
}
|
||||
|
||||
if ((aNameSpaceID == kNameSpaceID_XUL) &&
|
||||
@ -1585,7 +1587,7 @@ nsXULContentBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
mSortState.initialized = PR_FALSE;
|
||||
|
||||
// Pass along to the generic template builder.
|
||||
nsXULTemplateBuilder::AttributeChanged(aDocument, aContent, aNameSpaceID,
|
||||
nsXULTemplateBuilder::AttributeChanged(aDocument, aElement, aNameSpaceID,
|
||||
aAttribute, aModType);
|
||||
}
|
||||
|
||||
|
@ -108,6 +108,8 @@
|
||||
#include "nsXULTemplateQueryProcessorXML.h"
|
||||
#include "nsXULTemplateQueryProcessorStorage.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
|
||||
@ -1115,12 +1117,12 @@ nsXULTemplateBuilder::Observe(nsISupports* aSubject,
|
||||
|
||||
void
|
||||
nsXULTemplateBuilder::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
{
|
||||
if (aContent == mRoot && aNameSpaceID == kNameSpaceID_None) {
|
||||
if (aElement == mRoot && aNameSpaceID == kNameSpaceID_None) {
|
||||
// Check for a change to the 'ref' attribute on an atom, in which
|
||||
// case we may need to nuke and rebuild the entire content model
|
||||
// beneath the element.
|
||||
|
@ -435,3 +435,37 @@ function compareConsoleMessages()
|
||||
is(messages[m].message, expectedConsoleMessages.shift(), "logged message " + (m + 1));
|
||||
}
|
||||
}
|
||||
|
||||
function copyToProfile(filename)
|
||||
{
|
||||
if (Cc === undefined) {
|
||||
var Cc = Components.classes;
|
||||
var Ci = Components.interfaces;
|
||||
}
|
||||
|
||||
var loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
.getService(Ci.mozIJSSubScriptLoader);
|
||||
loader.loadSubScript("chrome://mochikit/content/chrome-harness.js");
|
||||
|
||||
var file = Cc["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Ci.nsIProperties)
|
||||
.get("ProfD", Ci.nsIFile);
|
||||
file.append(filename);
|
||||
|
||||
var parentURI = getResolvedURI(getRootDirectory(window.location.href));
|
||||
if (parentURI.JARFile) {
|
||||
parentURI = extractJarToTmp(parentURI);
|
||||
} else {
|
||||
var fileHandler = Cc["@mozilla.org/network/protocol;1?name=file"].
|
||||
getService(Ci.nsIFileProtocolHandler);
|
||||
parentURI = fileHandler.getFileFromURLSpec(parentURI.spec);
|
||||
}
|
||||
|
||||
parentURI = parentURI.QueryInterface(Ci.nsILocalFile);
|
||||
parentURI.append(filename);
|
||||
try {
|
||||
var retVal = parentURI.copyToFollowingLinks(file.parent, filename);
|
||||
} catch (ex) {
|
||||
//ignore this error as the file could exist already
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ Components.classes["@mozilla.org/consoleservice;1"]
|
||||
.getService(Components.interfaces.nsIConsoleService)
|
||||
.reset();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
expectedConsoleMessages.push("Error parsing template: the given named parameter is unknown in the SQL query");
|
||||
|
||||
var changes = [];
|
||||
@ -42,7 +43,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ? ORDER BY name
|
||||
|
@ -35,6 +35,8 @@ Components.classes["@mozilla.org/consoleservice;1"]
|
||||
.getService(Components.interfaces.nsIConsoleService)
|
||||
.reset();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
expectedConsoleMessages.push("Error parsing template: the type of a query parameter is wrong");
|
||||
|
||||
var changes = [];
|
||||
@ -42,7 +44,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ? ORDER BY name
|
||||
|
@ -35,6 +35,8 @@ Components.classes["@mozilla.org/consoleservice;1"]
|
||||
.getService(Components.interfaces.nsIConsoleService)
|
||||
.reset();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
expectedConsoleMessages.push("Error parsing template: a query parameter cannot be bound to the SQL query");
|
||||
|
||||
var changes = [];
|
||||
@ -42,7 +44,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = :spec ORDER BY name
|
||||
|
@ -34,6 +34,8 @@ Components.classes["@mozilla.org/consoleservice;1"]
|
||||
.getService(Components.interfaces.nsIConsoleService)
|
||||
.reset();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
expectedConsoleMessages.push("Error parsing template: syntax error in the SQL query");
|
||||
|
||||
|
||||
@ -43,7 +45,7 @@ var changes = [];
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" rows="8"
|
||||
datasources="animals.sqlite" ref="." querytype="storage">
|
||||
datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animalssssssss WHERE species_id = 2 ORDER BY
|
||||
|
@ -22,6 +22,7 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
function test_storage_template()
|
||||
{
|
||||
@ -67,7 +68,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = :spec ORDER BY name
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage simple listbox";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -41,7 +43,7 @@ var changes = [];
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" rows="8"
|
||||
datasources="animals.sqlite" ref="." querytype="storage">
|
||||
datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = 2 ORDER BY name
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage listbox with multiqueries";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -48,7 +50,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<queryset>
|
||||
<query>SELECT * FROM animals WHERE species_id = 5 ORDER BY name</query>
|
||||
|
@ -20,6 +20,8 @@
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
|
||||
@ -79,7 +81,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root1"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ? ORDER BY name
|
||||
@ -93,7 +95,7 @@ var changes = [];
|
||||
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root2"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ? ORDER BY name
|
||||
@ -107,7 +109,7 @@ var changes = [];
|
||||
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root3"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = :spec AND name like ? ORDER BY name
|
||||
@ -121,7 +123,7 @@ var changes = [];
|
||||
</listbox>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root4"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ?3 AND name like ?1 ORDER BY name
|
||||
@ -135,7 +137,7 @@ var changes = [];
|
||||
</listbox>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root5"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ?3 AND name like :pattern ORDER BY name
|
||||
@ -149,7 +151,7 @@ var changes = [];
|
||||
</listbox>
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root6"
|
||||
flex="1" datasources="animals.sqlite" ref="." querytype="storage">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = ? ORDER BY name
|
||||
|
@ -20,7 +20,9 @@
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage listbox with rule";
|
||||
var queryType = "storage";
|
||||
@ -42,7 +44,7 @@ var changes = [];
|
||||
|
||||
<listbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" rows="8"
|
||||
datasources="animals.sqlite" ref="." querytype="storage">
|
||||
datasources="profile:animals.sqlite" ref="." querytype="storage">
|
||||
<template>
|
||||
<query>
|
||||
SELECT * FROM animals WHERE species_id = 5 ORDER BY name
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
<script>
|
||||
<![CDATA[
|
||||
copyToProfile('animals.sqlite');
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var testid ="storage simple";
|
||||
@ -40,7 +41,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
datasources="animals.sqlite" querytype="storage" ref=".">
|
||||
datasources="profile:animals.sqlite" querytype="storage" ref=".">
|
||||
<template>
|
||||
<query>SELECT * FROM animals WHERE species_id = 2 ORDER BY name</query>
|
||||
<action>
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage sort integer asc";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -57,7 +59,7 @@ var changes = [];
|
||||
<column flex="1"/>
|
||||
<column flex="3"/>
|
||||
</columns>
|
||||
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
|
||||
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
|
||||
sort="?id" sortDirection="ascending">
|
||||
<template>
|
||||
<query>SELECT id, name FROM animals</query>
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage sort integer desc";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -57,7 +59,7 @@ var changes = [];
|
||||
<column flex="1"/>
|
||||
<column flex="3"/>
|
||||
</columns>
|
||||
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
|
||||
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
|
||||
sort="?id" sortDirection="descending">
|
||||
<template>
|
||||
<query>SELECT id, name FROM animals</query>
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage sort string asc";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -57,7 +59,7 @@ var changes = [];
|
||||
<column flex="1"/>
|
||||
<column flex="3"/>
|
||||
</columns>
|
||||
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
|
||||
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
|
||||
sort="?name" sortDirection="ascending">
|
||||
<template>
|
||||
<query>SELECT id, name FROM animals</query>
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage sort string desc";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = false;
|
||||
@ -57,7 +59,7 @@ var changes = [];
|
||||
<column flex="1"/>
|
||||
<column flex="3"/>
|
||||
</columns>
|
||||
<rows id="root" datasources="animals.sqlite" querytype="storage" ref="."
|
||||
<rows id="root" datasources="profile:animals.sqlite" querytype="storage" ref="."
|
||||
sort="?name" sortDirection="descending">
|
||||
<template>
|
||||
<query>SELECT id, name FROM animals</query>
|
||||
|
@ -22,6 +22,8 @@
|
||||
<![CDATA[
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
copyToProfile('animals.sqlite');
|
||||
|
||||
var testid ="storage tree";
|
||||
var queryType = "storage";
|
||||
var isTreeBuilder = true;
|
||||
@ -93,7 +95,7 @@ var changes = [];
|
||||
</script>
|
||||
|
||||
<tree xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="root"
|
||||
flex="1" datasources="animals.sqlite" ref="*" querytype="storage" flags="dont-build-content">
|
||||
flex="1" datasources="profile:animals.sqlite" ref="*" querytype="storage" flags="dont-build-content">
|
||||
<treecols>
|
||||
<treecol id="species" primary="true" label="Species" flex="2"/>
|
||||
<treecol id="name" label="Common name" flex="2"/>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<tree flex="20" id="t" ref="urn:data:row" datasources="rdf:null" seltype="single">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" ?>
|
||||
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
|
||||
<?xml-stylesheet href="/tests/SimpleTest/test.css" type="text/css"?>
|
||||
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
@ -161,6 +161,7 @@
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
#include "nsIWebBrowserChrome2.h"
|
||||
#include "nsITabChild.h"
|
||||
#include "nsIStrictTransportSecurityService.h"
|
||||
|
||||
// Editor-related
|
||||
#include "nsIEditingSession.h"
|
||||
@ -3781,13 +3782,27 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI *aURI,
|
||||
if (!messageStr.IsEmpty()) {
|
||||
if (errorClass == nsINSSErrorsService::ERROR_CLASS_BAD_CERT) {
|
||||
error.AssignLiteral("nssBadCert");
|
||||
|
||||
// if this is a Strict-Transport-Security host and the cert
|
||||
// is bad, don't allow overrides (STS Spec section 7.3).
|
||||
nsCOMPtr<nsIStrictTransportSecurityService> stss =
|
||||
do_GetService(NS_STSSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PRBool isStsHost = PR_FALSE;
|
||||
rv = stss->IsStsURI(aURI, &isStsHost);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (isStsHost)
|
||||
cssClass.AssignLiteral("badStsCert");
|
||||
|
||||
PRBool expert = PR_FALSE;
|
||||
mPrefs->GetBoolPref("browser.xul.error_pages.expert_bad_cert",
|
||||
&expert);
|
||||
if (expert) {
|
||||
cssClass.AssignLiteral("expertBadCert");
|
||||
}
|
||||
|
||||
|
||||
// See if an alternate cert error page is registered
|
||||
nsXPIDLCString alternateErrorPage;
|
||||
mPrefs->GetCharPref("security.alternate_certificate_error_page",
|
||||
@ -9408,6 +9423,7 @@ nsDocShell::AddState(nsIVariant *aData, const nsAString& aTitle,
|
||||
// a. cloned data as the state object,
|
||||
// b. if the third argument was present, the absolute URL found in
|
||||
// step 2
|
||||
// Also clear the new history entry's POST data (see bug 580069).
|
||||
// 5. If aReplace is false (i.e. we're doing a pushState instead of a
|
||||
// replaceState), notify bfcache that we've navigated to a new page.
|
||||
// 6. If the third argument is present, set the document's current address
|
||||
@ -9570,8 +9586,10 @@ nsDocShell::AddState(nsIVariant *aData, const nsAString& aTitle,
|
||||
newSHEntry->SetURI(newURI);
|
||||
}
|
||||
|
||||
// Step 4: Modify new/original session history entry
|
||||
// Step 4: Modify new/original session history entry and clear its POST
|
||||
// data, if there is any.
|
||||
newSHEntry->SetStateData(dataStr);
|
||||
newSHEntry->SetPostData(nsnull);
|
||||
|
||||
// Step 5: If aReplace is false, indicating that we're doing a pushState
|
||||
// rather than a replaceState, notify bfcache that we've added a page to
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
/* -*- Mode: C++; tab-width: 4; 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
|
||||
@ -57,6 +56,8 @@
|
||||
#include "nsDocShellEditorData.h"
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
namespace dom = mozilla::dom;
|
||||
|
||||
// Hardcode this to time out unused content viewers after 30 minutes
|
||||
#define CONTENT_VIEWER_TIMEOUT_SECONDS 30*60
|
||||
|
||||
@ -814,7 +815,7 @@ nsSHEntry::CharacterDataChanged(nsIDocument* aDocument,
|
||||
|
||||
void
|
||||
nsSHEntry::AttributeWillChange(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
dom::Element* aContent,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
@ -823,7 +824,7 @@ nsSHEntry::AttributeWillChange(nsIDocument* aDocument,
|
||||
|
||||
void
|
||||
nsSHEntry::AttributeChanged(nsIDocument* aDocument,
|
||||
nsIContent* aContent,
|
||||
dom::Element* aElement,
|
||||
PRInt32 aNameSpaceID,
|
||||
nsIAtom* aAttribute,
|
||||
PRInt32 aModType)
|
||||
|
@ -87,6 +87,9 @@ _TEST_FILES = \
|
||||
bug529119-window.html \
|
||||
test_bug540462.html \
|
||||
file_bug540462.html \
|
||||
test_bug580069.html \
|
||||
file_bug580069_1.html \
|
||||
file_bug580069_2.sjs \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
|
||||
|
@ -22,7 +22,7 @@ if (!window.location.href.match("posted=1")) {
|
||||
form.action = window.location.href + "?posted=1";
|
||||
form.submit();
|
||||
} else {
|
||||
window.opener.finishTest();
|
||||
window.location.href = "http://mochi.test:8888/tests/docshell/test/bug94514-postpage.html";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -9,7 +9,7 @@
|
||||
title="bug 303267 test">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
src="docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script type="application/javascript"
|
||||
src=
|
||||
"chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
"docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
@ -9,7 +9,7 @@
|
||||
title="bug {BUGNUMBER} test">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/chrome/docshell/test/chrome/docshell_helpers.js">
|
||||
src="docshell_helpers.js">
|
||||
</script>
|
||||
|
||||
<script type="application/javascript"><![CDATA[
|
||||
|
8
docshell/test/file_bug580069_1.html
Normal file
8
docshell/test/file_bug580069_1.html
Normal file
@ -0,0 +1,8 @@
|
||||
<html>
|
||||
<body onload='parent.page1Load();'>
|
||||
file_bug580069_1.html
|
||||
|
||||
<form id='form' action='file_bug580069_2.sjs' method='POST'></form>
|
||||
|
||||
</body>
|
||||
</html>
|
5
docshell/test/file_bug580069_2.sjs
Normal file
5
docshell/test/file_bug580069_2.sjs
Normal file
@ -0,0 +1,5 @@
|
||||
function handleRequest(request, response)
|
||||
{
|
||||
response.setHeader("Content-Type", "text/html", false);
|
||||
response.write('<html><body onload=\'parent.page2Load("' + request.method + '")\'>file_bug580069_2.sjs</body></html>');
|
||||
}
|
@ -2,9 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test bug 529119</title>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Test bug 529119</title>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
<script type="text/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
|
61
docshell/test/test_bug580069.html
Normal file
61
docshell/test/test_bug580069.html
Normal file
@ -0,0 +1,61 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=580069
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 580069</title>
|
||||
<script type="application/javascript" src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=580069">Mozilla Bug 580069</a>
|
||||
|
||||
<iframe id='iframe' src='file_bug580069_1.html'></iframe>
|
||||
|
||||
<script type="application/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var iframe = document.getElementById('iframe');
|
||||
var iframeCw = iframe.contentWindow;
|
||||
|
||||
// Called when file_bug580069_1.html loads.
|
||||
function page1Load() {
|
||||
// This should cause us to load file 2.
|
||||
dump('page1Load\n');
|
||||
iframeCw.document.getElementById('form').submit();
|
||||
}
|
||||
|
||||
// Called when file_bug580069_2.html loads.
|
||||
var page2Loads = 0;
|
||||
function page2Load(method) {
|
||||
|
||||
dump("iframe's location is: " + iframeCw.location + ", method is " + method + "\n");
|
||||
|
||||
if (page2Loads == 0) {
|
||||
is(method, "POST", "Method for first load should be POST.");
|
||||
iframeCw.history.replaceState('', '', '?replaced');
|
||||
|
||||
// This refresh shouldn't pop up the "are you sure you want to refresh a page
|
||||
// with POST data?" dialog. If it does, this test will hang and fail, and
|
||||
// we'll see 'Refreshing iframe...' at the end of the test log.
|
||||
dump('Refreshing iframe...\n');
|
||||
iframeCw.location.reload();
|
||||
}
|
||||
else if (page2Loads == 1) {
|
||||
is(method, "GET", "Method for second load should be GET.");
|
||||
is(iframeCw.location.search, "?replaced", "Wrong search on iframe after refresh.");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
else {
|
||||
ok(false, "page2Load should only be called twice.");
|
||||
}
|
||||
|
||||
page2Loads++;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -44,6 +44,24 @@ SimpleTest.ok(!gh.isVisited(startPage),
|
||||
SimpleTest.ok(!gh.isVisited(postedPage),
|
||||
"Posted page does not start in global history.");
|
||||
|
||||
// Because adding visits is async, we will not be notified imemdiately.
|
||||
var os = Cc["@mozilla.org/observer-service;1"].
|
||||
getService(Ci.nsIObserverService);
|
||||
var visitObserver = {
|
||||
_visitCount: 0,
|
||||
observe: function(aSubject, aTopic, aData)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
if (!startPage.equals(aSubject.QueryInterface(Ci.nsIURI)) ||
|
||||
++this._visitCount < 2) {
|
||||
return;
|
||||
}
|
||||
os.removeObserver(this, aTopic);
|
||||
finishTest();
|
||||
},
|
||||
};
|
||||
os.addObserver(visitObserver, "uri-visit-saved", false);
|
||||
|
||||
var w = window.open(startURI, "", "width=10,height=10");
|
||||
|
||||
function finishTest()
|
||||
|
@ -988,6 +988,9 @@ TabChild::RecvActivateFrameEvent(const nsString& aType, const bool& capture)
|
||||
bool
|
||||
TabChild::RecvLoadRemoteScript(const nsString& aURL)
|
||||
{
|
||||
if (!mCx && !InitTabChildGlobal())
|
||||
return false;
|
||||
|
||||
LoadFrameScriptInternal(aURL);
|
||||
return true;
|
||||
}
|
||||
@ -1061,6 +1064,9 @@ TabChild::DeallocPRenderFrame(PRenderFrameChild* aFrame)
|
||||
bool
|
||||
TabChild::InitTabChildGlobal()
|
||||
{
|
||||
if (mCx && mTabChildGlobal)
|
||||
return true;
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window = do_GetInterface(mWebNav);
|
||||
NS_ENSURE_TRUE(window, false);
|
||||
nsCOMPtr<nsIDOMEventTarget> chromeHandler =
|
||||
|
@ -1012,13 +1012,13 @@ nsJSChannel::SetContentCharset(const nsACString &aContentCharset)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSChannel::GetContentLength(PRInt32 *aContentLength)
|
||||
nsJSChannel::GetContentLength(PRInt64 *aContentLength)
|
||||
{
|
||||
return mStreamChannel->GetContentLength(aContentLength);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsJSChannel::SetContentLength(PRInt32 aContentLength)
|
||||
nsJSChannel::SetContentLength(PRInt64 aContentLength)
|
||||
{
|
||||
return mStreamChannel->SetContentLength(aContentLength);
|
||||
}
|
||||
|
@ -4,13 +4,13 @@
|
||||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
src="/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
src="/tests/SimpleTest/WindowSnapshot.js"></script>
|
||||
|
||||
<html:style xmlns:html="http://www.w3.org/1999/xhtml" type="text/css">
|
||||
* { outline: none; }
|
||||
|
@ -7,13 +7,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
||||
<title>postMessage chrome tests</title>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="chrome://mochikit/content/chrome-harness.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!--
|
||||
This test runs at the following URL:
|
||||
chrome://mochikit/content/chrome/dom/tests/mochitest/whatwg/test_postMessage_chrome.html
|
||||
-->
|
||||
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage">Mozilla Bug 387706</a>
|
||||
<p id="display"></p>
|
||||
@ -70,8 +67,10 @@ function messageReceiver(evt)
|
||||
|
||||
function checkSelf(evt)
|
||||
{
|
||||
var prepath = getChromePrePath(window.location.href);
|
||||
|
||||
is(evt.isTrusted, true, "should have sent a trusted event");
|
||||
is(evt.origin, "chrome://mochikit", "wrong origin for chrome: URL");
|
||||
is(evt.origin, prepath, "wrong origin for chrome: URL");
|
||||
is(evt.source, null, "chrome posters get a null source, for security");
|
||||
|
||||
window.frames.contentDomain.postMessage("post-to-content",
|
||||
|
@ -2,11 +2,11 @@
|
||||
<head>
|
||||
<title>Test for contenteditable focus</title>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="display">
|
||||
|
@ -2,13 +2,13 @@
|
||||
<head>
|
||||
<title>Test for text input event handling on contenteditable editor</title>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="display">
|
||||
|
@ -2,13 +2,13 @@
|
||||
<head>
|
||||
<title>Test for key event handler of HTML editor</title>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
src="/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="display">
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user