Merge cedar with mozilla-central

This commit is contained in:
Boris Zbarsky 2011-05-06 20:39:36 -04:00
commit ae3f14f1ba
169 changed files with 2015 additions and 4133 deletions

View File

@ -264,7 +264,7 @@ nsresult nsRootAccessible::AddEventListeners()
* const* e_end = docEvents + NS_ARRAY_LENGTH(docEvents);
e < e_end; ++e) {
nsresult rv = nstarget->AddEventListener(NS_ConvertASCIItoUTF16(*e),
this, PR_TRUE, PR_TRUE, 1);
this, PR_TRUE, PR_TRUE, 2);
NS_ENSURE_SUCCESS(rv, rv);
}
}

View File

@ -178,7 +178,8 @@ endif
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32 delayimp)
LDFLAGS += -delayload:xul.dll -delayload:xpcom.dll -delayload:plc4.dll -delayload:nspr4.dll -delayload:mozalloc.dll
endif
ifeq ($(OS_ARCH),WINNT)

View File

@ -56,6 +56,7 @@
#ifdef XP_WIN
// we want to use the DLL blocklist if possible
#define XRE_WANT_DLL_BLOCKLIST
#define XRE_PRELOAD_XUL
// we want a wmain entry point
#include "nsWindowsWMain.cpp"
#endif

View File

@ -44,9 +44,7 @@ let TabView = {
_browserKeyHandlerInitialized: false,
_isFrameLoading: false,
_initFrameCallbacks: [],
_lastSessionGroupName: null,
VISIBILITY_IDENTIFIER: "tabview-visibility",
LAST_SESSION_GROUP_NAME_IDENTIFIER: "tabview-last-session-group-name",
// ----------
get windowTitle() {
@ -100,10 +98,6 @@ let TabView = {
};
gBrowser.tabContainer.addEventListener(
"TabShow", this._tabShowEventListener, true);
// grab the last used group title
this._lastSessionGroupName = sessionstore.getWindowValue(window,
this.LAST_SESSION_GROUP_NAME_IDENTIFIER);
}
}
},
@ -222,28 +216,18 @@ let TabView = {
},
getActiveGroupName: function TabView_getActiveGroupName() {
if (!this._window)
return this._lastSessionGroupName;
// We get the active group this way, instead of querying
// GroupItems.getActiveGroupItem() because the tabSelect event
// will not have happened by the time the browser tries to
// update the title.
let groupItem = null;
let activeTab = window.gBrowser.selectedTab;
let activeTabItem = activeTab._tabViewTabItem;
if (activeTab.pinned) {
// It's an app tab, so it won't have a .tabItem. However, its .parent
// will already be set as the active group.
groupItem = this._window.GroupItems.getActiveGroupItem();
} else if (activeTabItem) {
groupItem = activeTabItem.parent;
if (activeTab._tabViewTabItem && activeTab._tabViewTabItem.parent){
let groupName = activeTab._tabViewTabItem.parent.getTitle();
if (groupName)
return groupName;
}
// groupItem may still be null, if the active tab is an orphan.
return groupItem ? groupItem.getTitle() : "";
},
return null;
},
// ----------
updateContextMenu: function(tab, popup) {

View File

@ -85,6 +85,19 @@ function Drag(item, event, isFauxDrag) {
this.safeWindowBounds = Items.getSafeWindowBounds();
Trenches.activateOthersTrenches(this.el);
if (!isFauxDrag) {
// When a tab drag starts, make it the focused tab.
if (this.item.isAGroupItem) {
var tab = UI.getActiveTab();
if (!tab || tab.parent != this.item) {
if (this.item._children.length)
UI.setActive(this.item._children[0]);
}
} else if (this.item.isATabItem) {
UI.setActive(this.item);
}
}
};
Drag.prototype = {

View File

@ -1014,7 +1014,8 @@ GroupItem.prototype = Utils.extend(new Item(), new Subscribable(), {
if (typeof item.setResizable == 'function')
item.setResizable(false, options.immediately);
if (item == UI.getActiveTab() || !this._activeTab)
// if it is visually active, set it as the active tab.
if (iQ(item.container).hasClass("focus"))
this.setActiveTab(item);
// if it matches the selected tab or no active tab and the browser

View File

@ -151,9 +151,10 @@ Item.prototype = {
this.dragOptions = {
cancelClass: 'close stackExpander',
start: function(e, ui) {
UI.setActive(this);
if (this.isAGroupItem)
if (this.isAGroupItem) {
UI.setActive(this);
this._unfreezeItemSize();
}
// if we start dragging a tab within a group, start with dropSpace on.
else if (this.parent != null)
this.parent._dropSpaceActive = true;
@ -200,7 +201,8 @@ Item.prototype = {
minWidth: 90,
minHeight: 90,
start: function(e,ui) {
UI.setActive(this);
if (this.isAGroupItem)
UI.setActive(this);
resize.info = new Drag(this, e);
},
resize: function(e,ui) {

View File

@ -218,39 +218,43 @@ TabMatcher.prototype = {
// ---------
// Function: _getTabsForOtherWindows
// Returns an array of <TabItem>s and <xul:tabs>s representing tabs
// from all windows but the current window. <TabItem>s will be returned
// for windows in which Panorama has been activated at least once, while
// <xul:tab>s will be returned for windows in which Panorama has never
// been activated.
_getTabsForOtherWindows: function TabMatcher__getTabsForOtherWindows() {
var enumerator = Services.wm.getEnumerator("navigator:browser");
var allTabs = [];
// Returns an array of <TabItem>s and <xul:tabs>s representing that
// tabs from all windows but the currently focused window. <TabItem>s
// will be returned for windows in which Panorama has been activated at
// least once, while <xul:tab>s will be return for windows in which
// Panorama has never been activated.
_getTabsForOtherWindows: function TabMatcher__getTabsForOtherWindows(){
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var enumerator = wm.getEnumerator("navigator:browser");
var currentWindow = wm.getMostRecentWindow("navigator:browser");
var allTabs = [];
while (enumerator.hasMoreElements()) {
var win = enumerator.getNext();
// This function gets tabs from other windows, not from the current window
if (win != gWindow) {
// This function gets tabs from other windows: not the one you currently
// have focused.
if (win != currentWindow) {
// If TabView is around iterate over all tabs, else get the currently
// shown tabs...
let tvWindow = win.TabView.getContentWindow();
if (tvWindow)
allTabs = allTabs.concat(tvWindow.TabItems.getItems());
allTabs = allTabs.concat( tvWindow.TabItems.getItems() );
else
// win.gBrowser.tabs isn't a proper array, so we can't use concat
for (let i = 0; i < win.gBrowser.tabs.length; i++)
allTabs.push(win.gBrowser.tabs[i]);
}
for (var i=0; i<win.gBrowser.tabs.length; i++) allTabs.push( win.gBrowser.tabs[i] );
}
}
return allTabs;
return allTabs;
},
// ----------
// Function: matchedTabsFromOtherWindows
// Returns an array of <TabItem>s and <xul:tab>s that match the search term
// from all windows but the current window. <TabItem>s will be returned for
// windows in which Panorama has been activated at least once, while
// <xul:tab>s will be returned for windows in which Panorama has never
// from all windows but the currently focused window. <TabItem>s will be
// returned for windows in which Panorama has been activated at least once,
// while <xul:tab>s will be return for windows in which Panorama has never
// been activated.
// (new TabMatcher("app")).matchedTabsFromOtherWindows();
matchedTabsFromOtherWindows: function TabMatcher_matchedTabsFromOtherWindows(){

View File

@ -381,15 +381,6 @@ let Storage = {
win, win.TabView.VISIBILITY_IDENTIFIER, data);
},
// ----------
// Function: saveActiveGroupName
// Saves the active group's name for the given window.
saveActiveGroupName: function Storage_saveActiveGroupName(win) {
let groupName = win.TabView.getActiveGroupName();
this._sessionStore.setWindowValue(
win, win.TabView.LAST_SESSION_GROUP_NAME_IDENTIFIER, groupName);
},
// ----------
// Function: saveData
// Generic routine for saving data to a window.

View File

@ -258,7 +258,6 @@ let UI = {
function domWinClosedObserver(subject, topic, data) {
if (topic == "domwindowclosed" && subject == gWindow) {
self.isDOMWindowClosing = true;
Storage.saveActiveGroupName(gWindow);
if (self.isTabViewVisible())
GroupItems.removeHiddenGroups();
TabItems.saveAll(true);

View File

@ -59,7 +59,6 @@ _BROWSER_FILES = \
browser_tabview_bug590606.js \
browser_tabview_bug591706.js \
browser_tabview_bug594958.js \
browser_tabview_bug595020.js \
browser_tabview_bug595191.js \
browser_tabview_bug595436.js \
browser_tabview_bug595518.js \
@ -135,7 +134,6 @@ _BROWSER_FILES = \
browser_tabview_bug648882.js \
browser_tabview_bug649006.js \
browser_tabview_bug649307.js \
browser_tabview_bug649319.js \
browser_tabview_bug651311.js \
browser_tabview_dragdrop.js \
browser_tabview_exit_button.js \

View File

@ -1,66 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
let ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
let stateStartup = {windows:[
{tabs:[{entries:[{url:"about:home"}]}], extData:{"tabview-last-session-group-name":"title"}}
]};
function test() {
let assertWindowTitle = function (win, title) {
let browser = win.gBrowser.tabs[0].linkedBrowser;
let winTitle = win.gBrowser.getWindowTitleForBrowser(browser);
is(winTitle.indexOf(title), 0, "title starts with '" + title + "'");
};
let testGroupNameChange = function (win) {
showTabView(function () {
let cw = win.TabView.getContentWindow();
let groupItem = cw.GroupItems.groupItems[0];
groupItem.setTitle("new-title");
hideTabView(function () {
assertWindowTitle(win, "new-title");
waitForFocus(finish);
}, win);
}, win);
};
waitForExplicitFinish();
newWindowWithState(stateStartup, function (win) {
registerCleanupFunction(function () win.close());
assertWindowTitle(win, "title");
testGroupNameChange(win);
});
}
function newWindowWithState(state, callback) {
let opts = "chrome,all,dialog=no,height=800,width=800";
let win = window.openDialog(getBrowserURL(), "_blank", opts);
whenWindowLoaded(win, function () {
ss.setWindowState(win, JSON.stringify(state), true);
});
whenWindowStateReady(win, function () {
win.close();
win = ss.undoCloseWindow(0);
whenWindowLoaded(win, function () callback(win));
});
}
function whenWindowLoaded(win, callback) {
win.addEventListener("load", function onLoad() {
win.removeEventListener("load", onLoad, false);
executeSoon(callback);
}, false);
}
function whenWindowStateReady(win, callback) {
win.addEventListener("SSWindowStateReady", function onReady() {
win.removeEventListener("SSWindowStateReady", onReady, false);
executeSoon(callback);
}, false);
}

View File

@ -2,51 +2,63 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
let win, contentWindow, originalTab, newTab1, newTab2;
waitForExplicitFinish();
let originalTab = gBrowser.visibleTabs[0];
let newTab1 = gBrowser.addTab("about:blank", { skipAnimation: true });
let newTab2 = gBrowser.addTab("about:blank", { skipAnimation: true });
gBrowser.pinTab(newTab1);
let contentWindow;
let partOne = function() {
window.removeEventListener("tabviewshown", partOne, false);
contentWindow = document.getElementById("tab-view").contentWindow;
is(contentWindow.GroupItems.groupItems.length, 1, "There is only one group item");
let partOne = function () {
let groupItem = contentWindow.GroupItems.groupItems[0];
let tabItems = groupItem.getChildren();
is(tabItems.length, 2, "There are two tab items in that group item");
is(tabItems[0].tab, originalTab, "The first tab item is linked to the first tab");
is(tabItems[1].tab, newTab2, "The second tab item is linked to the second tab");
hideTabView(partTwo, win);
window.addEventListener("tabviewhidden", partTwo, false);
TabView.toggle();
};
let partTwo = function () {
win.gBrowser.unpinTab(newTab1);
showTabView(partThree, win);
let partTwo = function() {
window.removeEventListener("tabviewhidden", partTwo, false);
gBrowser.unpinTab(newTab1);
window.addEventListener("tabviewshown", partThree, false);
TabView.toggle();
};
let partThree = function () {
let partThree = function() {
window.removeEventListener("tabviewshown", partThree, false);
let tabItems = contentWindow.GroupItems.groupItems[0].getChildren();
is(tabItems.length, 3, "There are three tab items in that group item");
is(tabItems[0].tab, win.gBrowser.tabs[0], "The first tab item is linked to the first tab");
is(tabItems[1].tab, win.gBrowser.tabs[1], "The second tab item is linked to the second tab");
is(tabItems[2].tab, win.gBrowser.tabs[2], "The third tab item is linked to the third tab");
is(tabItems[0].tab, gBrowser.visibleTabs[0], "The first tab item is linked to the first tab");
is(tabItems[1].tab, gBrowser.visibleTabs[1], "The second tab item is linked to the second tab");
is(tabItems[2].tab, gBrowser.visibleTabs[2], "The third tab item is linked to the third tab");
window.addEventListener("tabviewhidden", endGame, false);
TabView.toggle();
};
let endGame = function() {
window.removeEventListener("tabviewhidden", endGame, false);
gBrowser.removeTab(newTab1);
gBrowser.removeTab(newTab2);
finish();
};
let onLoad = function (tvwin) {
win = tvwin;
registerCleanupFunction(function () win.close());
for (let i = 0; i < 2; i++)
win.gBrowser.loadOneTab("about:blank", {inBackground: true});
[originalTab, newTab1, newTab2] = win.gBrowser.tabs;
win.gBrowser.pinTab(newTab1);
};
let onShow = function () {
contentWindow = win.TabView.getContentWindow();
is(contentWindow.GroupItems.groupItems.length, 1, "There is only one group item");
partOne();
};
waitForExplicitFinish();
newWindowWithTabView(onShow, onLoad);
window.addEventListener("tabviewshown", partOne, false);
TabView.toggle();
}

View File

@ -1,88 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
newWindowWithTabView(function (win) {
registerCleanupFunction(function () win.close());
waitForFocus(function () testScenarios(win));
});
}
function testScenarios(win) {
let simulateDragDrop = function (target) {
EventUtils.synthesizeMouseAtCenter(target, {type: "mousedown"}, cw);
EventUtils.synthesizeMouse(target, 40, 20, {type: "mousemove"}, cw);
EventUtils.synthesizeMouse(target, 80, 20, {type: "mouseup"}, cw);
}
let dragOutOfGroup = function (target) {
EventUtils.synthesizeMouseAtCenter(target, {type: "mousedown"}, cw);
EventUtils.synthesizeMouse(target, 600, 5, {type: "mousemove"}, cw);
EventUtils.synthesizeMouse(target, 600, 5, {type: "mouseup"}, cw);
}
let dragIntoGroup = function (target) {
EventUtils.synthesizeMouseAtCenter(target, {type: "mousedown"}, cw);
EventUtils.synthesizeMouse(target, -200, 5, {type: "mousemove"}, cw);
EventUtils.synthesizeMouse(target, -200, 5, {type: "mouseup"}, cw);
}
let assertActiveOrphan = function (tabItem) {
ok(!cw.GroupItems.getActiveGroupItem(), "no groupItem is active");
is(cw.UI.getActiveTab(), tabItem, "orphan tab is active");
is(cw.UI.getActiveOrphanTab(), tabItem, "orphan tab is active");
}
let cw = win.TabView.getContentWindow();
let groupItem = cw.GroupItems.groupItems[0];
let groupItem2 = createGroupItemWithBlankTabs(win, 400, 300, 20, 4);
// move group
cw.UI.setActive(groupItem);
simulateDragDrop(groupItem2.container);
is(cw.GroupItems.getActiveGroupItem(), groupItem2, "second groupItem is active");
is(cw.UI.getActiveTab(), groupItem2.getChild(0), "second groupItem's first tab is active");
// resize group
cw.UI.setActive(groupItem);
let tabItem = groupItem2.getChild(2);
groupItem2.setActiveTab(tabItem);
simulateDragDrop(groupItem2.$resizer[0]);
is(cw.GroupItems.getActiveGroupItem(), groupItem2, "second groupItem is active");
is(cw.UI.getActiveTab(), tabItem, "second groupItem's third tab is active");
// create orphan
tabItem = groupItem2.getChild(0);
dragOutOfGroup(tabItem.container);
// move orphan
cw.UI.setActive(groupItem2);
simulateDragDrop(tabItem.container);
assertActiveOrphan(tabItem);
// resize orphan
cw.UI.setActive(groupItem2);
let $resizer = cw.iQ('.iq-resizable-handle', tabItem.container);
simulateDragDrop($resizer[0]);
assertActiveOrphan(tabItem);
// drag back into group
dragIntoGroup(tabItem.container);
cw.UI.setActive(groupItem);
cw.UI.setActive(groupItem2);
is(cw.UI.getActiveTab(), tabItem, "the dropped tab is active");
// hide + unhide groupItem
hideGroupItem(groupItem2, function () {
is(cw.GroupItems.getActiveGroupItem(), groupItem, "first groupItem is active");
unhideGroupItem(groupItem2, function () {
is(cw.GroupItems.getActiveGroupItem(), groupItem2, "second groupItem is active");
is(cw.UI.getActiveTab(), tabItem, "the dropped tab is active");
finish();
});
});
}

View File

@ -310,7 +310,6 @@ gtk/gtkprintjob.h
gtk/gtkprintunixdialog.h
HIToolbox/HIToolbox.h
hlink.h
htiface.h
ia64/sys/inline.h
Icons.h
iconv.h

View File

@ -4479,7 +4479,7 @@ MOZ_ARG_WITH_BOOL(system-nspr,
_USE_SYSTEM_NSPR=1 )
if test -n "$_USE_SYSTEM_NSPR"; then
AM_PATH_NSPR(4.8.7, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
AM_PATH_NSPR(4.8.8, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
fi
if test -n "$MOZ_NATIVE_NSPR"; then
@ -4553,7 +4553,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
_USE_SYSTEM_NSS=1 )
if test -n "$_USE_SYSTEM_NSS"; then
AM_PATH_NSS(3.12.9, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
AM_PATH_NSS(3.12.10, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
fi
if test -n "$MOZ_NATIVE_NSS"; then

View File

@ -2016,7 +2016,7 @@ nsDOMEventRTTearoff::AddEventListener(const nsAString& aType,
nsIDOMEventListener *aListener,
PRBool useCapture)
{
return AddEventListener(aType, aListener, useCapture, PR_FALSE, 0);
return AddEventListener(aType, aListener, useCapture, PR_FALSE, 1);
}
NS_IMETHODIMP

View File

@ -1748,7 +1748,6 @@ GK_ATOM(pageBreakFrame, "PageBreakFrame")
GK_ATOM(pageContentFrame, "PageContentFrame")
GK_ATOM(placeholderFrame, "PlaceholderFrame")
GK_ATOM(popupSetFrame, "PopupSetFrame")
GK_ATOM(positionedInlineFrame, "PositionedInlineFrame")
GK_ATOM(canvasFrame, "CanvasFrame")
GK_ATOM(rootFrame, "RootFrame")
GK_ATOM(scrollFrame, "ScrollFrame")

View File

@ -87,7 +87,7 @@ public:
{
// By default add listeners only for trusted events!
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, PR_FALSE, 1);
aUseCapture, PR_FALSE, 2);
}
NS_IMETHOD AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,

View File

@ -2960,6 +2960,7 @@ nsWebSocket::Initialize(nsISupports* aOwner,
return NS_ERROR_DOM_SYNTAX_ERR;
}
JS::Anchor<JSString *> deleteProtector(jsstr);
size_t length;
const jschar *chars = JS_GetStringCharsAndLength(aContext, jsstr, &length);
if (!chars) {
@ -2967,6 +2968,7 @@ nsWebSocket::Initialize(nsISupports* aOwner,
}
urlParam.Assign(chars, length);
deleteProtector.clear();
if (aArgc == 2) {
jsstr = JS_ValueToString(aContext, aArgv[1]);
@ -2974,6 +2976,7 @@ nsWebSocket::Initialize(nsISupports* aOwner,
return NS_ERROR_DOM_SYNTAX_ERR;
}
deleteProtector.set(jsstr);
chars = JS_GetStringCharsAndLength(aContext, jsstr, &length);
if (!chars) {
return NS_ERROR_OUT_OF_MEMORY;

View File

@ -352,13 +352,11 @@ WebGLContext::SetContextOptions(nsIPropertyBag *aOptions)
NS_IMETHODIMP
WebGLContext::SetDimensions(PRInt32 width, PRInt32 height)
{
ScopedGfxFeatureReporter reporter("WebGL");
if (mCanvasElement) {
HTMLCanvasElement()->InvalidateCanvas();
}
if (mWidth == width && mHeight == height)
if (gl && mWidth == width && mHeight == height)
return NS_OK;
// If we already have a gl context, then we just need to resize
@ -373,6 +371,8 @@ WebGLContext::SetDimensions(PRInt32 width, PRInt32 height)
return NS_OK;
}
ScopedGfxFeatureReporter reporter("WebGL");
// We're going to create an entirely new context. If our
// generation is not 0 right now (that is, if this isn't the first
// context we're creating), we may have to dispatch a context lost

View File

@ -1309,7 +1309,8 @@ public:
void DetachShaders() {
for (PRUint32 i = 0; i < mAttachedShaders.Length(); ++i) {
mAttachedShaders[i]->DecrementAttachCount();
if (mAttachedShaders[i])
mAttachedShaders[i]->DecrementAttachCount();
}
mAttachedShaders.Clear();
}
@ -1320,7 +1321,7 @@ public:
PRBool HasDeletePending() { return mDeletePending; }
WebGLuint GLName() { return mName; }
const nsTArray<WebGLShader*>& AttachedShaders() const { return mAttachedShaders; }
const nsTArray<nsRefPtr<WebGLShader> >& AttachedShaders() const { return mAttachedShaders; }
PRBool LinkStatus() { return mLinkStatus; }
PRUint32 Generation() const { return mGeneration.value(); }
void SetLinkStatus(PRBool val) { mLinkStatus = val; }
@ -1349,7 +1350,7 @@ public:
PRBool HasAttachedShaderOfType(GLenum shaderType) {
for (PRUint32 i = 0; i < mAttachedShaders.Length(); ++i) {
if (mAttachedShaders[i]->ShaderType() == shaderType) {
if (mAttachedShaders[i] && mAttachedShaders[i]->ShaderType() == shaderType) {
return PR_TRUE;
}
}
@ -1392,7 +1393,7 @@ protected:
PRPackedBool mDeletePending;
PRPackedBool mLinkStatus;
// attached shaders of the program object
nsTArray<WebGLShader*> mAttachedShaders;
nsTArray<nsRefPtr<WebGLShader> > mAttachedShaders;
CheckedUint32 mGeneration;
// post-link data

View File

@ -60,9 +60,6 @@ EXPORTS = \
ifeq ($(OS_ARCH)$(MOZ_ENABLE_LIBXUL),WINNT)
EXTRA_DSO_LIBS = gkgfx
endif
ifeq ($(OS_ARCH),WINCE)
EXTRA_DSO_LIBS = gkgfx
endif
CPPSRCS = \

View File

@ -2619,7 +2619,7 @@ nsDOMClassInfo::Init()
DOM_CLASSINFO_MAP_BEGIN(HashChangeEvent, nsIDOMHashChangeEvent)
DOM_CLASSINFO_MAP_ENTRY(nsIDOMHashChangeEvent)
DOM_CLASSINFO_DOCUMENT_MAP_ENTRIES
DOM_CLASSINFO_EVENT_MAP_ENTRIES
DOM_CLASSINFO_MAP_END
if (nsDOMTouchEvent::PrefEnabled()) {

View File

@ -117,7 +117,7 @@ public:
{
// By default add listeners only for trusted events!
return nsDOMEventTargetHelper::AddEventListener(aType, aListener,
aUseCapture, PR_FALSE, 1);
aUseCapture, PR_FALSE, 2);
}
NS_IMETHOD AddEventListener(const nsAString& aType,
nsIDOMEventListener* aListener,

View File

@ -54,6 +54,7 @@ _TEST_FILES = \
test_bug628069_2.html \
file_bug628069.html \
test_bug631440.html \
test_bug653364.html \
test_consoleAPI.html \
test_domWindowUtils.html \
test_domWindowUtils_scrollXY.html \

View File

@ -41,6 +41,7 @@ function childLoad() {
function childHashchange(e) {
is(e.oldURL, gOrigURL, 'event.oldURL');
is(e.newURL, gOrigURL + '#hash', 'event.newURL');
is(e.isTrusted, true, 'Hashchange event should be trusted.');
popup.close();
SimpleTest.finish();
}

View File

@ -27,6 +27,7 @@ document.addEventListener("hashChange", function(e) {
gotHashChange = 1;
is(e.oldURL, "oldURL");
is(e.newURL, "newURL");
is(e.isTrusted, false, "Hashchange event shouldn't be trusted.");
}, true);
let hc = document.createEvent("HashChangeEvent");

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=653364
-->
<head>
<title>Test for Bug 653364</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=653364">Mozilla Bug 653364</a>
<p id="display"></p>
<div id="content">
<iframe id="frame" style="height:100px; width:100px; border:0"></iframe>
<div id="status" style="display: none"></div>
</div>
<pre id="test">
<script type="application/javascript;version=1.7">
/** Test for Bug 653364 **/
gotPopState = 0;
document.addEventListener("popState", function(e) {
gotPopState = 1;
is(e.state.foo, 'bar', "PopState event should have state we set.");
is(e.isTrusted, false, "PopState event shouldn't be trusted.");
}, true);
let ps = document.createEvent("PopStateEvent");
ps.initPopStateEvent("popState", true, false, {'foo': 'bar'});
document.documentElement.dispatchEvent(ps);
is(gotPopState, 1, 'Document received PopState event.');
</script>
</body>
</html>

View File

@ -274,6 +274,7 @@ function runTest() {
statusMsg("Awake after going back to page 1.");
popstateExpected("Going back to page 1 should trigger a popstate.");
is(gLastPopStateEvent.isTrusted, true, 'Popstate event should be trusted.');
is(JSON.stringify(gLastPopStateEvent.state), JSON.stringify(testObj1),
"Wrong state object popped after going back to page 1.");
ok(gLastPopStateEvent.state === iframeCw.history.state,

View File

@ -465,6 +465,16 @@ abstract public class GeckoApp
unpackFile(zip, buf, entry, entry.getName());
}
}
// copy any hyphenation dictionaries file into a hyphenation/ directory
Enumeration<? extends ZipEntry> hyphenEntries = zip.entries();
while (hyphenEntries.hasMoreElements()) {
ZipEntry entry = hyphenEntries.nextElement();
if (entry.getName().startsWith("hyphenation/")) {
Log.i("GeckoAppJava", "installing hyphenation : " + entry.getName());
unpackFile(zip, buf, entry, entry.getName());
}
}
}
void removeFiles() throws IOException {

View File

@ -45,7 +45,7 @@ include $(DEPTH)/config/autoconf.mk
DIRS = webBrowser build
ifneq (,$(filter $(OS_ARCH),WINNT WINCE))
ifeq ($(OS_ARCH),WINNT)
ifndef MOZ_NO_ACTIVEX_SUPPORT
TOOL_DIRS += activex/src
endif

View File

@ -60,7 +60,6 @@ public:
BOOL
CDefaultControlSiteSecurityPolicy::ClassImplementsCategory(const CLSID &clsid, const CATID &catid, BOOL &bClassExists)
{
#ifndef WINCE
bClassExists = FALSE;
// Test if there is a CLSID entry. If there isn't then obviously
@ -117,7 +116,6 @@ CDefaultControlSiteSecurityPolicy::ClassImplementsCategory(const CLSID &clsid, c
return TRUE;
}
}
#endif
return FALSE;
}
@ -1276,9 +1274,7 @@ HRESULT STDMETHODCALLTYPE CControlSite::TransformCoords(/* [out][in] */ POINTL _
}
HDC hdc = ::GetDC(m_hWndParent);
#ifndef WINCE
::SetMapMode(hdc, MM_HIMETRIC);
#endif
POINT rgptConvert[2];
rgptConvert[0].x = 0;
rgptConvert[0].y = 0;
@ -1287,9 +1283,7 @@ HRESULT STDMETHODCALLTYPE CControlSite::TransformCoords(/* [out][in] */ POINTL _
{
rgptConvert[1].x = pPtlHimetric->x;
rgptConvert[1].y = pPtlHimetric->y;
#ifndef WINCE
::LPtoDP(hdc, rgptConvert, 2);
#endif
if (dwFlags & XFORMCOORDS_SIZE)
{
pPtfContainer->x = (float)(rgptConvert[1].x - rgptConvert[0].x);
@ -1309,9 +1303,7 @@ HRESULT STDMETHODCALLTYPE CControlSite::TransformCoords(/* [out][in] */ POINTL _
{
rgptConvert[1].x = (int)(pPtfContainer->x);
rgptConvert[1].y = (int)(pPtfContainer->y);
#ifndef WINCE
::DPtoLP(hdc, rgptConvert, 2);
#endif
if (dwFlags & XFORMCOORDS_SIZE)
{
pPtlHimetric->x = rgptConvert[1].x - rgptConvert[0].x;

View File

@ -89,30 +89,6 @@
#pragma conform(forScope, push, atlhack, off)
#endif
#ifdef WINCE
/* atlbase.h on WINCE has a bug, in that it tries to use
* GetProcAddress with a wide string, when that is explicitly not
* supported. So we use C++ to overload that here, and implement
* something that works.
*/
#include <windows.h>
static FARPROC GetProcAddressA(HMODULE hMod, wchar_t *procName) {
FARPROC ret = NULL;
int len = wcslen(procName);
char *s = new char[len + 1];
for (int i = 0; i < len; i++) {
s[i] = (char) procName[i];
}
s[len-1] = 0;
ret = ::GetProcAddress(hMod, s);
delete [] s;
return ret;
}
#endif
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override

View File

@ -560,26 +560,7 @@ CreateControl(const CLSID &clsid, PluginInstanceData *pData, PropertyList &pl, L
PRBool hostSafeControlsOnly;
PRBool downloadControlsIfMissing;
#if defined(MOZ_ACTIVEX_PLUGIN_XPCONNECT) && defined(XPC_IDISPATCH_SUPPORT)
#ifdef MOZ_FLASH_ACTIVEX_PATCH
GUID flashGUID;
::CLSIDFromString(_T("{D27CDB6E-AE6D-11CF-96B8-444553540000}"), &flashGUID);
// HACK: Allow anything but downloading for the wrapped Flash control.
PRUint32 hostingFlags;
if (clsid == flashGUID)
{
hostingFlags = (nsIActiveXSecurityPolicy::HOSTING_FLAGS_HOST_SAFE_OBJECTS |
nsIActiveXSecurityPolicy::HOSTING_FLAGS_SCRIPT_SAFE_OBJECTS |
nsIActiveXSecurityPolicy::HOSTING_FLAGS_SCRIPT_ALL_OBJECTS |
nsIActiveXSecurityPolicy::HOSTING_FLAGS_HOST_ALL_OBJECTS);
}
else
{
hostingFlags = MozAxPlugin::PrefGetHostingFlags();
}
#else
PRUint32 hostingFlags = MozAxPlugin::PrefGetHostingFlags();
#endif
if (hostingFlags & nsIActiveXSecurityPolicy::HOSTING_FLAGS_HOST_SAFE_OBJECTS &&
!(hostingFlags & nsIActiveXSecurityPolicy::HOSTING_FLAGS_HOST_ALL_OBJECTS))
{

View File

@ -48,16 +48,7 @@ include $(DEPTH)/config/autoconf.mk
MODULE = npmozax
LIBRARY_NAME = npmozax
ifdef WINCE
MOZ_FLASH_ACTIVEX_PATCH = 1
endif
ifdef MOZ_FLASH_ACTIVEX_PATCH
RESFILE = MozActiveX-flash.res
else
RESFILE = MozActiveX.res
endif
DEFFILE = npmozax.def
GRE_MODULE = 1
@ -132,21 +123,6 @@ ifdef MOZ_ACTIVEX_PLUGIN_XPCONNECT
LOCAL_INCLUDES += -I$(XPIDL_GEN_DIR)
endif
ifdef WINCE
OS_LIBS += \
coredll.lib \
ole32.lib \
oleaut32.lib \
uuid.lib \
ceshell.lib \
corelibc.lib \
atls.lib \
atlce400.lib \
urlmon.lib \
libcmt.lib \
comsuppw.lib \
$(NULL)
else
OS_LIBS += \
comdlg32.lib \
ole32.lib \
@ -154,7 +130,6 @@ OS_LIBS += \
uuid.lib \
shell32.lib \
$(NULL)
endif
ifdef MOZ_ACTIVEX_PLUGIN_LIVECONNECT
DEFINES += -DMOZ_ACTIVEX_PLUGIN_LIVECONNECT -DXPCOM_GLUE
@ -168,10 +143,6 @@ ifdef XPC_IDISPATCH_SUPPORT
DEFINES += -DXPC_IDISPATCH_SUPPORT
endif
ifdef MOZ_FLASH_ACTIVEX_PATCH
DEFINES += -DMOZ_FLASH_ACTIVEX_PATCH
endif
EXTRA_DSO_LDOPTS = \
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \

View File

@ -1,130 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#if OSARCH != WINCE
#include "winresrc.h"
#else
#include <dlgs.h>
#include <winbase.h>
#include <commctrl.h>
#endif
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,4
PRODUCTVERSION 1,0,0,4
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "Shockwave Flash 9.0 r83\0"
VALUE "FileExtents", "*.ocx|*.ocx|*.swf|*.flv\0"
VALUE "FileOpenName", "ActiveX (*.ocx)|ActiveX (*.ocx)|Adobe Flash Movie (*.swf)|Adobe Flash Video (*.flv)\0"
VALUE "FileVersion", "9, 0, 83, 0\0"
VALUE "InternalName", "NPMOZAX\0"
VALUE "LegalCopyright", "Copyright 1999, 2009\0"
VALUE "LegalTrademarks", "\0"
VALUE "MIMEType", "application/x-oleobject|application/oleobject|application/x-shockwave-flash|application/x-shockwave-flash\0"
VALUE "OriginalFilename", "NPMOZAX.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Shockwave Flash\0"
VALUE "ProductVersion", "9, 0, 83, 0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // !_MAC
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.K.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.K.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -65,30 +65,6 @@
#pragma conform(forScope, push, atlhack, off)
#endif
#ifdef WINCE
/* atlbase.h on WINCE has a bug, in that it tries to use
* GetProcAddress with a wide string, when that is explicitly not
* supported. So we use C++ to overload that here, and implement
* something that works.
*/
#include <windows.h>
static FARPROC GetProcAddressA(HMODULE hMod, wchar_t *procName) {
FARPROC ret = NULL;
int len = wcslen(procName);
char *s = new char[len + 1];
for (int i = 0; i < len; i++) {
s[i] = (char) procName[i];
}
s[len-1] = 0;
ret = ::GetProcAddress(hMod, s);
delete [] s;
return ret;
}
#endif
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module

View File

@ -57,13 +57,6 @@
//
// Neither Visual C++ 6.0 or 7.0 ship with this interface.
//
#ifdef WINCE
#define USE_HTIFACE
#endif
#ifdef USE_HTIFACE
#include <htiface.h>
#endif
#ifndef __ITargetFrame_INTERFACE_DEFINED__
// No ITargetFrame so make a binary compatible one
MIDL_INTERFACE("d5f78c80-5252-11cf-90fa-00AA0042106e")
@ -943,27 +936,7 @@ public:
mData(NULL),
mUseTarget(NULL)
{
#ifdef MOZ_FLASH_ACTIVEX_PATCH
// HACK+TODO:
//
// AddRef()ing here causes leaking the MozAxPlugin's
// PrefObserver() because IEDocument() itself leaks.
// CControlSite::Attach() adds references to this object that
// aren't countered; most likely in the
// DoVerb(OLEIVERB_INPLACEACTIVATE) call. Maybe it results in a
// circular reference but the rest of the problem happens inside
// ATL and COM, so good luck with that.
//
// Sadly, I have no time to debug the original problem
// throughoutly but leaking pref observers visibly causes XUL to
// crash upon exit. XUL tries to release the stale pref observer
// after npmozax.dll has long since been unloaded. Note that a
// callback to IEDocument after unloading npmozax.dll would also
// crash but that doesn't seem to happen after tearing down the
// plugin instance itself. -Simo
#else
MozAxPlugin::AddRef();
#endif
}
HRESULT Init(PluginInstanceData *pData)
@ -1033,11 +1006,7 @@ public:
{
mWindow->Release();
}
#ifdef MOZ_FLASH_ACTIVEX_PATCH
// HACK+TODO: See IEDocument::IEDocument()
#else
MozAxPlugin::Release();
#endif
}
BEGIN_COM_MAP(IEDocument)

View File

@ -124,11 +124,6 @@ nsScriptablePeer::QueryInterface(const nsIID & aIID, void **aInstancePtr)
return (*aInstancePtr) ? NS_OK : NS_NOINTERFACE;
}
#ifdef WINCE
typedef _com_ptr_t<_com_IIID<IUnknown, &__uuidof(IUnknown)> > IUnknownPtr;
typedef _com_ptr_t<_com_IIID<IDispatch, &__uuidof(IDispatch)> > IDispatchPtr;
#endif
HRESULT
nsScriptablePeer::GetIDispatch(IDispatch **pdisp)
{
@ -996,21 +991,6 @@ CLSID MozAxPlugin::GetCLSIDForType(const char *mimeType)
return CLSID_NULL;
}
#ifdef MOZ_FLASH_ACTIVEX_PATCH
// If the Flash activex control doesn't advertise the supported
// mimetypes correctly, we map Shockwave Flash manually to the
// appropriate CLSID of the ActiveX control here.
if (!strcmp(mimeType, "application/x-shockwave-flash"))
{
GUID guidValue;
// The Flash CLSID
::CLSIDFromString(_T("{D27CDB6E-AE6D-11CF-96B8-444553540000}"), &guidValue);
return guidValue;
}
#endif
// Read the registry to see if there is a CLSID for an object to be associated with
// this MIME type.
USES_CONVERSION;

View File

@ -49,11 +49,9 @@ DIRS = windowwatcher appstartup find webbrowserpersist commandhandler
ifdef MOZ_XUL
ifdef NS_PRINTING
ifndef WINCE
DIRS += printingui
endif
endif
endif
DIRS += build

View File

@ -62,13 +62,11 @@ SHARED_LIBRARY_LIBS = \
ifdef MOZ_XUL
ifdef NS_PRINTING
ifndef WINCE
SHARED_LIBRARY_LIBS += \
../printingui/src/$(LIB_PREFIX)printingui_s.$(LIB_SUFFIX) \
$(NULL)
endif
endif
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../windowwatcher/src \
@ -88,10 +86,8 @@ endif
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/win
ifneq ($(OS_ARCH), WINCE)
OS_LIBS += $(call EXPAND_LIBNAME,winspool comdlg32)
endif
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
LOCAL_INCLUDES += -I$(srcdir)/../printingui/src/mac

View File

@ -51,10 +51,8 @@
#include "nsEmbedCID.h"
#ifdef NS_PRINTING
#ifndef WINCE
#include "nsPrintingPromptService.h"
#endif
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowWatcher, Init)
@ -71,20 +69,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseCommandController)
#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDialogParamBlock)
#ifdef NS_PRINTING
#ifndef WINCE
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPrintingPromptService, Init)
#endif
#endif
#endif
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_DIALOGPARAMBLOCK_CID);
#ifdef NS_PRINTING
#ifndef WINCE
NS_DEFINE_NAMED_CID(NS_PRINTINGPROMPTSERVICE_CID);
#endif
#endif
#endif
NS_DEFINE_NAMED_CID(NS_WINDOWWATCHER_CID);
NS_DEFINE_NAMED_CID(NS_FIND_CID);
NS_DEFINE_NAMED_CID(NS_WEB_BROWSER_FIND_CID);
@ -100,10 +94,8 @@ static const mozilla::Module::CIDEntry kEmbeddingCIDs[] = {
#ifdef MOZ_XUL
{ &kNS_DIALOGPARAMBLOCK_CID, false, NULL, nsDialogParamBlockConstructor },
#ifdef NS_PRINTING
#ifndef WINCE
{ &kNS_PRINTINGPROMPTSERVICE_CID, false, NULL, nsPrintingPromptServiceConstructor },
#endif
#endif
#endif
{ &kNS_WINDOWWATCHER_CID, false, NULL, nsWindowWatcherConstructor },
{ &kNS_FIND_CID, false, NULL, nsFindConstructor },
@ -122,10 +114,8 @@ static const mozilla::Module::ContractIDEntry kEmbeddingContracts[] = {
#ifdef MOZ_XUL
{ NS_DIALOGPARAMBLOCK_CONTRACTID, &kNS_DIALOGPARAMBLOCK_CID },
#ifdef NS_PRINTING
#ifndef WINCE
{ NS_PRINTINGPROMPTSERVICE_CONTRACTID, &kNS_PRINTINGPROMPTSERVICE_CID },
#endif
#endif
#endif
{ NS_WINDOWWATCHER_CONTRACTID, &kNS_WINDOWWATCHER_CID },
{ NS_FIND_CONTRACTID, &kNS_FIND_CID },

View File

@ -310,7 +310,6 @@ gtk/gtkprintjob.h
gtk/gtkprintunixdialog.h
HIToolbox/HIToolbox.h
hlink.h
htiface.h
ia64/sys/inline.h
Icons.h
iconv.h

View File

@ -1022,6 +1022,10 @@ nsFrameConstructorState::PushAbsoluteContainingBlock(nsIFrame* aNewAbsoluteConta
*/
mFixedPosIsAbsPos = (aNewAbsoluteContainingBlock &&
aNewAbsoluteContainingBlock->GetStyleDisplay()->HasTransform());
if (aNewAbsoluteContainingBlock) {
aNewAbsoluteContainingBlock->MarkAsAbsoluteContainingBlock();
}
}
void
@ -1217,7 +1221,14 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
nsresult rv = NS_OK;
if (childList.IsEmpty() &&
(containingBlock->GetStateBits() & NS_FRAME_FIRST_REFLOW)) {
rv = containingBlock->SetInitialChildList(aChildListName, aFrameItems);
// If we're injecting absolutely positioned frames, inject them on the
// absolute containing block
if (aChildListName == containingBlock->GetAbsoluteListName()) {
rv = containingBlock->GetAbsoluteContainingBlock()->
SetInitialChildList(containingBlock, aChildListName, aFrameItems);
} else {
rv = containingBlock->SetInitialChildList(aChildListName, aFrameItems);
}
} else {
// Note that whether the frame construction context is doing an append or
// not is not helpful here, since it could be appending to some frame in
@ -1235,7 +1246,7 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
if (!lastChild ||
nsLayoutUtils::CompareTreePosition(lastChild, firstNewFrame, containingBlock) < 0) {
// no lastChild, or lastChild comes before the new children, so just append
rv = containingBlock->AppendFrames(aChildListName, aFrameItems);
rv = mFrameManager->AppendFrames(containingBlock, aChildListName, aFrameItems);
} else {
// try the other children
nsIFrame* insertionPoint = nsnull;
@ -1250,8 +1261,8 @@ nsFrameConstructorState::ProcessFrameInsertions(nsAbsoluteItems& aFrameItems,
}
insertionPoint = f;
}
rv = containingBlock->InsertFrames(aChildListName, insertionPoint,
aFrameItems);
rv = mFrameManager->InsertFrames(containingBlock, aChildListName,
insertionPoint, aFrameItems);
}
}
@ -2558,6 +2569,8 @@ nsCSSFrameConstructor::ConstructRootFrame(nsIFrame** aNewFrame)
// The viewport is the containing block for 'fixed' elements
mFixedContainingBlock = viewportFrame;
// Make it an absolute container for fixed-pos elements
mFixedContainingBlock->MarkAsAbsoluteContainingBlock();
*aNewFrame = viewportFrame;
return NS_OK;
@ -2842,6 +2855,8 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
pageContentFrame->Init(nsnull, aPageFrame, prevPageContentFrame);
SetInitialSingleChild(aPageFrame, pageContentFrame);
mFixedContainingBlock = pageContentFrame;
// Make it an absolute container for fixed-pos elements
mFixedContainingBlock->MarkAsAbsoluteContainingBlock();
nsRefPtr<nsStyleContext> canvasPseudoStyle;
canvasPseudoStyle = styleSet->ResolveAnonymousBoxStyle(nsCSSAnonBoxes::canvas,
@ -5538,7 +5553,7 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame)
#ifdef MOZ_XUL
nsGkAtoms::XULLabelFrame == frameType ||
#endif
nsGkAtoms::positionedInlineFrame == frameType) {
(nsGkAtoms::inlineFrame == frameType && wrappedFrame->IsAbsoluteContainer())) {
containingBlock = wrappedFrame;
} else if (nsGkAtoms::fieldSetFrame == frameType) {
// If the positioned frame is a fieldset, use the area frame inside it.
@ -8502,13 +8517,6 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
if (newFrame) {
newFrame->Init(content, aParentFrame, aFrame);
}
} else if (nsGkAtoms::positionedInlineFrame == frameType) {
newFrame = NS_NewPositionedInlineFrame(shell, styleContext);
if (newFrame) {
newFrame->Init(content, aParentFrame, aFrame);
}
} else if (nsGkAtoms::pageFrame == frameType) {
nsIFrame* canvasFrame;
@ -10743,11 +10751,7 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
NS_STYLE_DISPLAY_INLINE == aDisplay->mDisplay &&
(NS_STYLE_POSITION_RELATIVE == aDisplay->mPosition ||
aDisplay->HasTransform());
if (positioned) {
newFrame = NS_NewPositionedInlineFrame(mPresShell, styleContext);
} else {
newFrame = NS_NewInlineFrame(mPresShell, styleContext);
}
newFrame = NS_NewInlineFrame(mPresShell, styleContext);
// Initialize the frame
InitAndRestoreFrame(aState, content, aParentFrame, nsnull, newFrame);
@ -10756,7 +10760,7 @@ nsCSSFrameConstructor::ConstructInline(nsFrameConstructorState& aState,
// because the object's destructor is significant
// this is part of the fix for bug 42372
if (positioned) {
if (positioned) {
// Relatively positioned frames becomes a container for child
// frames that are positioned
aState.PushAbsoluteContainingBlock(newFrame, absoluteSaveState);
@ -10855,17 +10859,15 @@ nsCSSFrameConstructor::CreateIBSiblings(nsFrameConstructorState& aState,
// Now grab the initial inlines in aChildItems and put them into an inline
// frame
nsIFrame* inlineFrame;
if (aIsPositioned) {
inlineFrame = NS_NewPositionedInlineFrame(mPresShell, styleContext);
}
else {
inlineFrame = NS_NewInlineFrame(mPresShell, styleContext);
}
nsIFrame* inlineFrame = NS_NewInlineFrame(mPresShell, styleContext);
InitAndRestoreFrame(aState, content, parentFrame, nsnull, inlineFrame,
PR_FALSE);
if (aIsPositioned) {
inlineFrame->MarkAsAbsoluteContainingBlock();
}
if (aChildItems.NotEmpty()) {
nsFrameList::FrameLinkEnumerator firstBlock(aChildItems);
FindFirstBlock(firstBlock);

View File

@ -2543,8 +2543,7 @@ PrepareBackgroundLayer(nsPresContext* aPresContext,
nsIAtom* frameType = aForFrame->GetType();
nsIFrame* geometryFrame = aForFrame;
if (frameType == nsGkAtoms::inlineFrame ||
frameType == nsGkAtoms::positionedInlineFrame) {
if (frameType == nsGkAtoms::inlineFrame) {
// XXXjwalden Strictly speaking this is not quite faithful to how
// background-break is supposed to interact with background-origin values,
// but it's a non-trivial amount of work to make it fully conformant, and

View File

@ -93,6 +93,7 @@
#include "imgIRequest.h"
#include "nsTransitionManager.h"
#include "RestyleTracker.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsFrameManager.h"
@ -472,6 +473,19 @@ nsFrameManager::ClearAllUndisplayedContentIn(nsIContent* aParentContent)
}
//----------------------------------------------------------------------
nsresult
nsFrameManager::AppendFrames(nsIFrame* aParentFrame,
nsIAtom* aListName,
nsFrameList& aFrameList)
{
if (aParentFrame->IsAbsoluteContainer() &&
aListName == aParentFrame->GetAbsoluteListName()) {
return aParentFrame->GetAbsoluteContainingBlock()->
AppendFrames(aParentFrame, aListName, aFrameList);
} else {
return aParentFrame->AppendFrames(aListName, aFrameList);
}
}
nsresult
nsFrameManager::InsertFrames(nsIFrame* aParentFrame,
@ -484,7 +498,13 @@ nsFrameManager::InsertFrames(nsIFrame* aParentFrame,
&& !IS_TRUE_OVERFLOW_CONTAINER(aPrevFrame),
"aPrevFrame must be the last continuation in its chain!");
return aParentFrame->InsertFrames(aListName, aPrevFrame, aFrameList);
if (aParentFrame->IsAbsoluteContainer() &&
aListName == aParentFrame->GetAbsoluteListName()) {
return aParentFrame->GetAbsoluteContainingBlock()->
InsertFrames(aParentFrame, aListName, aPrevFrame, aFrameList);
} else {
return aParentFrame->InsertFrames(aListName, aPrevFrame, aFrameList);
}
}
nsresult
@ -509,7 +529,15 @@ nsFrameManager::RemoveFrame(nsIAtom* aListName,
NS_ASSERTION(!(aOldFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW &&
GetPlaceholderFrameFor(aOldFrame)),
"Must call RemoveFrame on placeholder for out-of-flows.");
nsresult rv = aOldFrame->GetParent()->RemoveFrame(aListName, aOldFrame);
nsresult rv = NS_OK;
nsIFrame* parentFrame = aOldFrame->GetParent();
if (parentFrame->IsAbsoluteContainer() &&
aListName == parentFrame->GetAbsoluteListName()) {
parentFrame->GetAbsoluteContainingBlock()->
RemoveFrame(parentFrame, aListName, aOldFrame);
} else {
rv = parentFrame->RemoveFrame(aListName, aOldFrame);
}
mIsDestroyingFrames = wasDestroyingFrames;

View File

@ -122,10 +122,7 @@ public:
// Functions for manipulating the frame model
NS_HIDDEN_(nsresult) AppendFrames(nsIFrame* aParentFrame,
nsIAtom* aListName,
nsFrameList& aFrameList)
{
return aParentFrame->AppendFrames(aListName, aFrameList);
}
nsFrameList& aFrameList);
NS_HIDDEN_(nsresult) InsertFrames(nsIFrame* aParentFrame,
nsIAtom* aListName,

View File

@ -173,7 +173,6 @@ The entries in the reflow log can be controlled on a frame level. For instance
<tr><td>obj</td><td>object</td></tr>
<tr><td>page</td><td>page</td></tr>
<tr><td>place</td><td>placeholder</td></tr>
<tr><td>posInline</td><td>positionedInline</td></tr>
<tr><td>canvas</td><td>canvas</td></tr>
<tr><td>root</td><td>root</td></tr>
<tr><td>scroll</td><td>scroll</td></tr>

View File

@ -427,7 +427,7 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat
PRBool constrainHeight = (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE)
&& aConstrainHeight
// Don't split if told not to (e.g. for fixed frames)
&& (aDelegatingFrame->GetType() != nsGkAtoms::positionedInlineFrame)
&& (aDelegatingFrame->GetType() != nsGkAtoms::inlineFrame)
//XXX we don't handle splitting frames for inline absolute containing blocks yet
&& (aKidFrame->GetRect().y <= aReflowState.availableHeight);
// Don't split things below the fold. (Ideally we shouldn't *have*

View File

@ -305,7 +305,7 @@ nsBlockFrame::~nsBlockFrame()
void
nsBlockFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mAbsoluteContainer.DestroyFrames(this, aDestructRoot);
DestroyAbsoluteFrames(aDestructRoot);
// Outside bullets are not in our child-list so check for them here
// and delete them when present.
if (mBullet && HaveOutsideBullet()) {
@ -582,10 +582,7 @@ nsBlockFrame::GetCaretBaseline() const
nsFrameList
nsBlockFrame::GetChildList(nsIAtom* aListName) const
{
if (nsGkAtoms::absoluteList == aListName) {
return mAbsoluteContainer.GetChildList();
}
else if (nsnull == aListName) {
if (nsnull == aListName) {
return mFrames;
}
else if (aListName == nsGkAtoms::overflowList) {
@ -617,8 +614,7 @@ nsBlockFrame::GetChildList(nsIAtom* aListName) const
#define NS_BLOCK_FRAME_OVERFLOW_OOF_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 0)
#define NS_BLOCK_FRAME_FLOAT_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 1)
#define NS_BLOCK_FRAME_BULLET_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 2)
#define NS_BLOCK_FRAME_ABSOLUTE_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 3)
#define NS_BLOCK_FRAME_PUSHED_FLOATS_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 4)
#define NS_BLOCK_FRAME_PUSHED_FLOATS_LIST_INDEX (NS_CONTAINER_LIST_COUNT_INCL_OC + 3)
// If adding/removing lists, don't forget to update the count in nsBlockFrame.h
nsIAtom*
@ -634,8 +630,6 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex) const
return nsGkAtoms::bulletList;
case NS_BLOCK_FRAME_OVERFLOW_OOF_LIST_INDEX:
return nsGkAtoms::overflowOutOfFlowList;
case NS_BLOCK_FRAME_ABSOLUTE_LIST_INDEX:
return nsGkAtoms::absoluteList;
case NS_BLOCK_FRAME_PUSHED_FLOATS_LIST_INDEX:
return nsGkAtoms::pushedFloatsList;
default:
@ -1173,7 +1167,8 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
// resetting the size. Because of this, we must not reflow our abs-pos children
// in that situation --- what we think is our "new size"
// will not be our real new size. This also happens to be more efficient.
if (mAbsoluteContainer.HasAbsoluteFrames()) {
if (HasAbsolutelyPositionedChildren()) {
nsAbsoluteContainingBlock* absoluteContainer = GetAbsoluteContainingBlock();
PRBool haveInterrupt = aPresContext->HasPendingInterrupt();
if (reflowState->WillReflowAgainForClearance() ||
haveInterrupt) {
@ -1184,9 +1179,9 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
// better than that, because we don't really know what our size will be,
// and it might in fact not change on the followup reflow!
if (haveInterrupt && (GetStateBits() & NS_FRAME_IS_DIRTY)) {
mAbsoluteContainer.MarkAllFramesDirty();
absoluteContainer->MarkAllFramesDirty();
} else {
mAbsoluteContainer.MarkSizeDependentFramesDirty();
absoluteContainer->MarkSizeDependentFramesDirty();
}
} else {
nsSize containingBlockSize =
@ -1210,12 +1205,12 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
!(isRoot && NS_UNCONSTRAINEDSIZE == reflowState->ComputedHeight()) &&
aMetrics.height != oldSize.height;
rv = mAbsoluteContainer.Reflow(this, aPresContext, *reflowState,
state.mReflowStatus,
containingBlockSize.width,
containingBlockSize.height, PR_TRUE,
cbWidthChanged, cbHeightChanged,
&aMetrics.mOverflowAreas);
absoluteContainer->Reflow(this, aPresContext, *reflowState,
state.mReflowStatus,
containingBlockSize.width,
containingBlockSize.height, PR_TRUE,
cbWidthChanged, cbHeightChanged,
&aMetrics.mOverflowAreas);
//XXXfr Why isn't this rv (and others in this file) checked/returned?
}
@ -4710,10 +4705,7 @@ nsBlockFrame::AppendFrames(nsIAtom* aListName,
return NS_OK;
}
if (aListName) {
if (nsGkAtoms::absoluteList == aListName) {
return mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
}
else if (nsGkAtoms::floatList == aListName) {
if (nsGkAtoms::floatList == aListName) {
mFloats.AppendFrames(nsnull, aFrameList);
return NS_OK;
}
@ -4758,11 +4750,7 @@ nsBlockFrame::InsertFrames(nsIAtom* aListName,
"inserting after sibling frame with different parent");
if (aListName) {
if (nsGkAtoms::absoluteList == aListName) {
return mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame,
aFrameList);
}
else if (nsGkAtoms::floatList == aListName) {
if (nsGkAtoms::floatList == aListName) {
mFloats.InsertFrames(this, aPrevFrame, aFrameList);
return NS_OK;
}
@ -5023,10 +5011,6 @@ nsBlockFrame::RemoveFrame(nsIAtom* aListName,
MarkSameFloatManagerLinesDirty(this);
}
}
else if (nsGkAtoms::absoluteList == aListName) {
mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
return NS_OK;
}
else if (nsGkAtoms::floatList == aListName) {
// Make sure to mark affected lines dirty for the float frame
// we are removing; this way is a bit messy, but so is the rest of the code.
@ -5069,9 +5053,9 @@ nsBlockFrame::DoRemoveOutOfFlowFrame(nsIFrame* aFrame)
const nsStyleDisplay* display = aFrame->GetStyleDisplay();
if (display->IsAbsolutelyPositioned()) {
// This also deletes the next-in-flows
block->mAbsoluteContainer.RemoveFrame(block,
nsGkAtoms::absoluteList,
aFrame);
block->GetAbsoluteContainingBlock()->RemoveFrame(block,
nsGkAtoms::absoluteList,
aFrame);
}
else {
// First remove aFrame's next-in-flows
@ -6256,8 +6240,6 @@ nsBlockFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
aBuilder->MarkFramesForDisplayList(this, mFloats, aDirtyRect);
aBuilder->MarkFramesForDisplayList(this, mAbsoluteContainer.GetChildList(),
aDirtyRect);
// Don't use the line cursor if we might have a descendant placeholder ...
// it might skip lines that contain placeholders but don't themselves
@ -6512,10 +6494,7 @@ nsBlockFrame::SetInitialChildList(nsIAtom* aListName,
{
nsresult rv = NS_OK;
if (nsGkAtoms::absoluteList == aListName) {
mAbsoluteContainer.SetInitialChildList(this, aListName, aChildList);
}
else if (nsGkAtoms::floatList == aListName) {
if (nsGkAtoms::floatList == aListName) {
mFloats.SetFrames(aChildList);
}
else {

View File

@ -84,7 +84,7 @@ class nsIntervalSet;
* Child list name indices
* @see #GetAdditionalChildListName()
*/
#define NS_BLOCK_LIST_COUNT (NS_CONTAINER_LIST_COUNT_INCL_OC + 5)
#define NS_BLOCK_LIST_COUNT (NS_CONTAINER_LIST_COUNT_INCL_OC + 4)
/**
* Some invariants:
@ -341,7 +341,6 @@ protected:
: nsHTMLContainerFrame(aContext)
, mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
, mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
, mAbsoluteContainer(nsGkAtoms::absoluteList)
{
#ifdef DEBUG
InitDebugFlags();
@ -776,10 +775,6 @@ protected:
friend class nsBlockReflowState;
friend class nsBlockInFlowLineIterator;
private:
nsAbsoluteContainingBlock mAbsoluteContainer;
#ifdef DEBUG
public:
static PRBool gLamePaintMetrics;

View File

@ -52,7 +52,6 @@
#include "nsIPresShell.h"
#include "nsIScrollPositionListener.h"
#include "nsDisplayList.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsCSSFrameConstructor.h"
#include "nsFrameManager.h"
@ -65,8 +64,6 @@
//#define DEBUG_CANVAS_FOCUS
#endif
#define CANVAS_ABS_POS_CHILD_LIST NS_CONTAINER_LIST_COUNT_INCL_OC
nsIFrame*
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
@ -83,8 +80,7 @@ NS_QUERYFRAME_TAIL_INHERITING(nsHTMLContainerFrame)
void
nsCanvasFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mAbsoluteContainer.DestroyFrames(this, aDestructRoot);
DestroyAbsoluteFrames(aDestructRoot);
nsIScrollableFrame* sf =
PresContext()->GetPresShell()->GetRootScrollFrameAsScrollable();
if (sf) {
@ -126,9 +122,6 @@ NS_IMETHODIMP
nsCanvasFrame::SetInitialChildList(nsIAtom* aListName,
nsFrameList& aChildList)
{
if (nsGkAtoms::absoluteList == aListName)
return mAbsoluteContainer.SetInitialChildList(this, aListName, aChildList);
NS_ASSERTION(aListName || aChildList.IsEmpty() || aChildList.OnlyChild(),
"Primary child list can have at most one frame in it");
return nsHTMLContainerFrame::SetInitialChildList(aListName, aChildList);
@ -138,9 +131,6 @@ NS_IMETHODIMP
nsCanvasFrame::AppendFrames(nsIAtom* aListName,
nsFrameList& aFrameList)
{
if (nsGkAtoms::absoluteList == aListName)
return mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
NS_ASSERTION(!aListName, "unexpected child list name");
NS_PRECONDITION(mFrames.IsEmpty(), "already have a child frame");
if (aListName) {
@ -173,9 +163,6 @@ nsCanvasFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList)
{
if (nsGkAtoms::absoluteList == aListName)
return mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame, aFrameList);
// Because we only support a single child frame inserting is the same
// as appending
NS_PRECONDITION(!aPrevFrame, "unexpected previous sibling frame");
@ -189,11 +176,6 @@ NS_IMETHODIMP
nsCanvasFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
if (nsGkAtoms::absoluteList == aListName) {
mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
return NS_OK;
}
NS_ASSERTION(!aListName, "unexpected child list name");
if (aListName) {
// We only support the unnamed principal child list
@ -218,24 +200,6 @@ nsCanvasFrame::RemoveFrame(nsIAtom* aListName,
return NS_OK;
}
nsIAtom*
nsCanvasFrame::GetAdditionalChildListName(PRInt32 aIndex) const
{
if (CANVAS_ABS_POS_CHILD_LIST == aIndex)
return nsGkAtoms::absoluteList;
return nsHTMLContainerFrame::GetAdditionalChildListName(aIndex);
}
nsFrameList
nsCanvasFrame::GetChildList(nsIAtom* aListName) const
{
if (nsGkAtoms::absoluteList == aListName)
return mAbsoluteContainer.GetChildList();
return nsHTMLContainerFrame::GetChildList(aListName);
}
nsRect nsCanvasFrame::CanvasArea() const
{
// Not clear which overflow rect we want here, but it probably doesn't
@ -314,9 +278,6 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayOverflowContainers(aBuilder, aDirtyRect, aLists);
}
aBuilder->MarkFramesForDisplayList(this, mAbsoluteContainer.GetChildList(),
aDirtyRect);
// Force a background to be shown. We may have a background propagated to us,
// in which case GetStyleBackground wouldn't have the right background
// and the code in nsFrame::DisplayBorderBackgroundOutline might not give us
@ -553,15 +514,6 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
aDesiredSize.mOverflowAreas.UnionWith(
kidDesiredSize.mOverflowAreas + kidPt);
if (mAbsoluteContainer.HasAbsoluteFrames()) {
PRBool widthChanged = aDesiredSize.width != mRect.width;
PRBool heightChanged = aDesiredSize.height != mRect.height;
mAbsoluteContainer.Reflow(this, aPresContext, aReflowState, aStatus,
aDesiredSize.width, aDesiredSize.height,
PR_TRUE, widthChanged, heightChanged,
&aDesiredSize.mOverflowAreas);
}
// Handle invalidating fixed-attachment backgrounds propagated to the
// canvas when the canvas size (and therefore the background positioning
// area's size) changes. Such backgrounds are not invalidated in the
@ -602,7 +554,7 @@ nsCanvasFrame::Reflow(nsPresContext* aPresContext,
aStatus);
}
FinishAndStoreOverflow(&aDesiredSize);
FinishReflowWithAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, aStatus);
NS_FRAME_TRACE_REFLOW_OUT("nsCanvasFrame::Reflow", aStatus);
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);

View File

@ -42,7 +42,6 @@
#include "nsHTMLContainerFrame.h"
#include "nsIScrollPositionListener.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsDisplayList.h"
#include "nsGkAtoms.h"
@ -64,8 +63,7 @@ public:
nsCanvasFrame(nsStyleContext* aContext)
: nsHTMLContainerFrame(aContext),
mDoPaintFocus(PR_FALSE),
mAddedScrollPositionListener(PR_FALSE),
mAbsoluteContainer(nsGkAtoms::absoluteList) {}
mAddedScrollPositionListener(PR_FALSE) {}
NS_DECL_QUERYFRAME_TARGET(nsCanvasFrame)
NS_DECL_QUERYFRAME
@ -84,9 +82,6 @@ public:
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
virtual nsFrameList GetChildList(nsIAtom* aListName) const;
virtual nscoord GetMinWidth(nsRenderingContext *aRenderingContext);
virtual nscoord GetPrefWidth(nsRenderingContext *aRenderingContext);
NS_IMETHOD Reflow(nsPresContext* aPresContext,
@ -152,7 +147,6 @@ protected:
// Data members
PRPackedBool mDoPaintFocus;
PRPackedBool mAddedScrollPositionListener;
nsAbsoluteContainingBlock mAbsoluteContainer;
};
/**

View File

@ -319,12 +319,12 @@ nsContainerFrame::GetChildList(nsIAtom* aListName) const
return list ? *list : nsFrameList::EmptyList();
}
return nsFrameList::EmptyList();
return nsSplittableFrame::GetChildList(aListName);
}
#define NS_CONTAINER_FRAME_OVERFLOW_LIST_INDEX 0
#define NS_CONTAINER_FRAME_OVERFLOW_CONTAINERS_LIST_INDEX 1
#define NS_CONTAINER_FRAME_EXCESS_OVERFLOW_CONTAINERS_LIST_INDEX 2
#define NS_CONTAINER_FRAME_OVERFLOW_LIST_INDEX 1
#define NS_CONTAINER_FRAME_OVERFLOW_CONTAINERS_LIST_INDEX 2
#define NS_CONTAINER_FRAME_EXCESS_OVERFLOW_CONTAINERS_LIST_INDEX 3
// If adding/removing lists, don't forget to update count in .h file
@ -339,7 +339,7 @@ nsContainerFrame::GetAdditionalChildListName(PRInt32 aIndex) const
else if (NS_CONTAINER_FRAME_EXCESS_OVERFLOW_CONTAINERS_LIST_INDEX == aIndex)
return nsGkAtoms::excessOverflowContainersList;
}
return nsnull;
return nsSplittableFrame::GetAdditionalChildListName(aIndex);
}
/////////////////////////////////////////////////////////////////////////////

View File

@ -50,9 +50,7 @@
* Child list name indices
* @see #GetAdditionalChildListName()
*/
#define NS_CONTAINER_LIST_COUNT_SANS_OC 1
// for frames that don't use overflow containers
#define NS_CONTAINER_LIST_COUNT_INCL_OC 3
#define NS_CONTAINER_LIST_COUNT_INCL_OC 4
// for frames that support overflow containers
// Option flags for ReflowChild() and FinishReflowChild()

View File

@ -128,6 +128,7 @@
#include "gfxContext.h"
#include "CSSCalc.h"
#include "nsAbsoluteContainingBlock.h"
using namespace mozilla;
using namespace mozilla::layers;
@ -258,6 +259,34 @@ nsFrame::RootFrameList(nsPresContext* aPresContext, FILE* out, PRInt32 aIndent)
}
#endif
static void
DestroyAbsoluteContainingBlock(void* aPropertyValue)
{
delete static_cast<nsAbsoluteContainingBlock*>(aPropertyValue);
}
NS_DECLARE_FRAME_PROPERTY(AbsoluteContainingBlockProperty, DestroyAbsoluteContainingBlock)
PRBool
nsIFrame::HasAbsolutelyPositionedChildren() const {
return IsAbsoluteContainer() && GetAbsoluteContainingBlock()->HasAbsoluteFrames();
}
nsAbsoluteContainingBlock*
nsIFrame::GetAbsoluteContainingBlock() const {
NS_ASSERTION(IsAbsoluteContainer(), "The frame is not marked as an abspos container correctly");
nsAbsoluteContainingBlock* absCB = static_cast<nsAbsoluteContainingBlock*>
(Properties().Get(AbsoluteContainingBlockProperty()));
NS_ASSERTION(absCB, "The frame is marked as an abspos container but doesn't have the property");
return absCB;
}
void
nsIFrame::MarkAsAbsoluteContainingBlock() {
AddStateBits(NS_FRAME_HAS_ABSPOS_CHILDREN);
Properties().Set(AbsoluteContainingBlockProperty(), new nsAbsoluteContainingBlock(GetAbsoluteListName()));
}
void
NS_MergeReflowStatusInto(nsReflowStatus* aPrimary, nsReflowStatus aSecondary)
{
@ -930,13 +959,23 @@ nsIAtom*
nsFrame::GetAdditionalChildListName(PRInt32 aIndex) const
{
NS_PRECONDITION(aIndex >= 0, "invalid index number");
// An index of 0 should always be an absolute list, we should ignore anything
// else if child frame types have ignored them.
if (aIndex == 0) {
return GetAbsoluteListName();
}
return nsnull;
}
nsFrameList
nsFrame::GetChildList(nsIAtom* aListName) const
{
return nsFrameList::EmptyList();
if (IsAbsoluteContainer() &&
aListName == GetAbsoluteListName()) {
return GetAbsoluteContainingBlock()->GetChildList();
} else {
return nsFrameList::EmptyList();
}
}
static nsIFrame*
@ -1458,6 +1497,9 @@ nsIFrame::BuildDisplayListForStackingContext(nsDisplayListBuilder* aBuilder,
}
#endif
// Mark the display list items for absolutely positioned children
MarkAbsoluteFramesForDisplayList(aBuilder, aDirtyRect);
nsDisplayListCollection set;
nsresult rv;
{
@ -1592,7 +1634,7 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
if (aChild->GetStateBits() & NS_FRAME_TOO_DEEP_IN_FRAME_TREE)
return NS_OK;
const nsStyleDisplay* disp = aChild->GetStyleDisplay();
// PR_TRUE if this is a real or pseudo stacking context
PRBool pseudoStackingContext =
@ -1638,9 +1680,15 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
dirty.SetEmpty();
}
pseudoStackingContext = PR_TRUE;
} else if (aBuilder->GetSelectedFramesOnly() &&
aChild->IsLeaf() &&
!(aChild->GetStateBits() & NS_FRAME_SELECTED_CONTENT)) {
}
// Mark the display list items for absolutely positioned children
aChild->MarkAbsoluteFramesForDisplayList(aBuilder, dirty);
if (childType != nsGkAtoms::placeholderFrame &&
aBuilder->GetSelectedFramesOnly() &&
aChild->IsLeaf() &&
!(aChild->GetStateBits() & NS_FRAME_SELECTED_CONTENT)) {
return NS_OK;
}
@ -1805,6 +1853,15 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
return NS_OK;
}
void
nsIFrame::MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect)
{
if (IsAbsoluteContainer()) {
aBuilder->MarkFramesForDisplayList(this, GetAbsoluteContainingBlock()->GetChildList(), aDirtyRect);
}
}
void
nsIFrame::WrapReplacedContentForBorderRadius(nsDisplayListBuilder* aBuilder,
nsDisplayList* aFromList,
@ -3555,6 +3612,7 @@ nsFrame::DidReflow(nsPresContext* aPresContext,
{
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
("nsFrame::DidReflow: aStatus=%d", aStatus));
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
mState &= ~(NS_FRAME_IN_REFLOW | NS_FRAME_FIRST_REFLOW | NS_FRAME_IS_DIRTY |
NS_FRAME_HAS_DIRTY_CHILDREN);
@ -3575,6 +3633,55 @@ nsFrame::DidReflow(nsPresContext* aPresContext,
return NS_OK;
}
void
nsFrame::FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, aStatus);
FinishAndStoreOverflow(&aDesiredSize);
}
void
nsFrame::DestroyAbsoluteFrames(nsIFrame* aDestructRoot)
{
if (IsAbsoluteContainer()) {
GetAbsoluteContainingBlock()->DestroyFrames(this, aDestructRoot);
}
}
void
nsFrame::ReflowAbsoluteFrames(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
if (HasAbsolutelyPositionedChildren()) {
nsAbsoluteContainingBlock* absoluteContainer = GetAbsoluteContainingBlock();
// Let the absolutely positioned container reflow any absolutely positioned
// child frames that need to be reflowed
// The containing block for the abs pos kids is formed by our padding edge.
nsMargin computedBorder =
aReflowState.mComputedBorderPadding - aReflowState.mComputedPadding;
nscoord containingBlockWidth =
aDesiredSize.width - computedBorder.LeftRight();
nscoord containingBlockHeight =
aDesiredSize.height - computedBorder.TopBottom();
nsContainerFrame* container = do_QueryFrame(this);
NS_ASSERTION(container, "Abs-pos children only supported on container frames for now");
absoluteContainer->Reflow(container, aPresContext, aReflowState, aStatus,
containingBlockWidth, containingBlockHeight,
PR_TRUE, PR_TRUE, PR_TRUE, // XXX could be optimized
&aDesiredSize.mOverflowAreas);
}
}
/* virtual */ PRBool
nsFrame::CanContinueTextRun() const
{
@ -6160,8 +6267,7 @@ inline PRBool
IsInlineFrame(nsIFrame *aFrame)
{
nsIAtom *type = aFrame->GetType();
return type == nsGkAtoms::inlineFrame ||
type == nsGkAtoms::positionedInlineFrame;
return type == nsGkAtoms::inlineFrame;
}
void
@ -7876,7 +7982,6 @@ void DR_State::InitFrameTypeTable()
AddFrameTypeInfo(nsGkAtoms::objectFrame, "obj", "object");
AddFrameTypeInfo(nsGkAtoms::pageFrame, "page", "page");
AddFrameTypeInfo(nsGkAtoms::placeholderFrame, "place", "placeholder");
AddFrameTypeInfo(nsGkAtoms::positionedInlineFrame, "posInline", "positionedInline");
AddFrameTypeInfo(nsGkAtoms::canvasFrame, "canvas", "canvas");
AddFrameTypeInfo(nsGkAtoms::rootFrame, "root", "root");
AddFrameTypeInfo(nsGkAtoms::scrollFrame, "scroll", "scroll");

View File

@ -328,6 +328,15 @@ public:
NS_IMETHOD DidReflow(nsPresContext* aPresContext,
const nsHTMLReflowState* aReflowState,
nsDidReflowStatus aStatus);
void ReflowAbsoluteFrames(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
void FinishReflowWithAbsoluteFrames(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
void DestroyAbsoluteFrames(nsIFrame* aDestructRoot);
virtual PRBool CanContinueTextRun() const;
// Selection Methods

View File

@ -139,8 +139,6 @@ NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
nsIFrame*
NS_NewTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);

View File

@ -1575,7 +1575,7 @@ nsHTMLReflowState::ComputeContainingBlockRectangle(nsPresContext* aPres
if (NS_FRAME_GET_TYPE(aContainingBlockRS->mFrameType) == NS_CSS_FRAME_TYPE_INLINE) {
// Base our size on the actual size of the frame. In cases when this is
// completely bogus (eg initial reflow), this code shouldn't even be
// called, since the code in nsPositionedInlineFrame::Reflow will pass in
// called, since the code in nsInlineFrame::Reflow will pass in
// the containing block dimensions to our constructor.
// XXXbz we should be taking the in-flows into account too, but
// that's very hard.

View File

@ -103,6 +103,7 @@ class gfxSkipChars;
class gfxSkipCharsIterator;
class gfxContext;
class nsLineList_iterator;
class nsAbsoluteContainingBlock;
struct nsPeekOffsetStruct;
struct nsPoint;
@ -285,6 +286,9 @@ typedef PRUint64 nsFrameState;
// bit; we could free up this bit with a little extra complexity.
#define NS_FRAME_UPDATE_LAYER_TREE NS_FRAME_STATE_BIT(36)
// Frame can accept absolutely positioned children.
#define NS_FRAME_HAS_ABSPOS_CHILDREN NS_FRAME_STATE_BIT(37)
// The lower 20 bits and upper 32 bits of the frame state are reserved
// by this API.
#define NS_FRAME_RESERVED ~NS_FRAME_IMPL_RESERVED
@ -584,6 +588,8 @@ public:
* name means the unnamed principal child list
* @param aChildList list of child frames. Each of the frames has its
* NS_FRAME_IS_DIRTY bit set. Must not be empty.
* This method cannot handle the child list returned by
* GetAbsoluteListName().
* @return NS_ERROR_INVALID_ARG if there is no child list with the specified
* name,
* NS_ERROR_UNEXPECTED if the frame is an atomic frame or if the
@ -2699,7 +2705,17 @@ NS_PTR_TO_INT32(frame->Properties().Get(nsIFrame::EmbeddingLevelProperty()))
}
}
}
/**
* Accessors for the absolute containing block.
*/
PRBool IsAbsoluteContainer() const { return !!(mState & NS_FRAME_HAS_ABSPOS_CHILDREN); }
PRBool HasAbsolutelyPositionedChildren() const;
nsAbsoluteContainingBlock* GetAbsoluteContainingBlock() const;
virtual void MarkAsAbsoluteContainingBlock();
// Child frame types override this function to select their own child list name
virtual nsIAtom* GetAbsoluteListName() const { return nsGkAtoms::absoluteList; }
protected:
// Members
nsRect mRect;
@ -2710,6 +2726,8 @@ private:
nsIFrame* mNextSibling; // doubly-linked list of frames
nsIFrame* mPrevSibling; // Do not touch outside SetNextSibling!
void MarkAbsoluteFramesForDisplayList(nsDisplayListBuilder* aBuilder, const nsRect& aDirtyRect);
static void DestroyPaintedPresShellList(void* propertyValue) {
nsTArray<nsWeakPtr>* list = static_cast<nsTArray<nsWeakPtr>*>(propertyValue);
list->Clear();

View File

@ -47,7 +47,6 @@
#include "nsIPresShell.h"
#include "nsPresContext.h"
#include "nsRenderingContext.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsCSSAnonBoxes.h"
#include "nsAutoPtr.h"
#include "nsFrameManager.h"
@ -414,7 +413,9 @@ nsInlineFrame::Reflow(nsPresContext* aPresContext,
}
rv = ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
ReflowAbsoluteFrames(aPresContext, aMetrics, aReflowState, aStatus);
// Note: the line layout code will properly compute our
// overflow-rect state for us.
@ -922,6 +923,13 @@ nsInlineFrame::GetBaseline() const
return NS_MIN(mRect.height, ascent + GetUsedBorderAndPadding().top);
}
void
nsInlineFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
DestroyAbsoluteFrames(aDestructRoot);
nsInlineFrameSuper::DestroyFrom(aDestructRoot);
}
#ifdef ACCESSIBILITY
already_AddRefed<nsAccessible>
nsInlineFrame::CreateAccessible()
@ -1101,6 +1109,8 @@ nsFirstLineFrame::Reflow(nsPresContext* aPresContext,
rv = ReflowFrames(aPresContext, aReflowState, irs, aMetrics, aStatus);
aReflowState.mLineLayout->SetInFirstLine(PR_FALSE);
ReflowAbsoluteFrames(aPresContext, aMetrics, aReflowState, aStatus);
// Note: the line layout code will properly compute our overflow state for us
return rv;
@ -1121,162 +1131,3 @@ nsFirstLineFrame::PullOverflowsFromPrevInFlow()
}
}
//////////////////////////////////////////////////////////////////////
nsIFrame*
NS_NewPositionedInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
{
return new (aPresShell) nsPositionedInlineFrame(aContext);
}
NS_IMPL_FRAMEARENA_HELPERS(nsPositionedInlineFrame)
void
nsPositionedInlineFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mAbsoluteContainer.DestroyFrames(this, aDestructRoot);
nsInlineFrame::DestroyFrom(aDestructRoot);
}
NS_IMETHODIMP
nsPositionedInlineFrame::SetInitialChildList(nsIAtom* aListName,
nsFrameList& aChildList)
{
nsresult rv;
if (nsGkAtoms::absoluteList == aListName) {
rv = mAbsoluteContainer.SetInitialChildList(this, aListName, aChildList);
} else {
rv = nsInlineFrame::SetInitialChildList(aListName, aChildList);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::AppendFrames(nsIAtom* aListName,
nsFrameList& aFrameList)
{
nsresult rv;
if (nsGkAtoms::absoluteList == aListName) {
rv = mAbsoluteContainer.AppendFrames(this, aListName, aFrameList);
} else {
rv = nsInlineFrame::AppendFrames(aListName, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList)
{
nsresult rv;
if (nsGkAtoms::absoluteList == aListName) {
rv = mAbsoluteContainer.InsertFrames(this, aListName, aPrevFrame,
aFrameList);
} else {
rv = nsInlineFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv;
if (nsGkAtoms::absoluteList == aListName) {
mAbsoluteContainer.RemoveFrame(this, aListName, aOldFrame);
rv = NS_OK;
} else {
rv = nsInlineFrame::RemoveFrame(aListName, aOldFrame);
}
return rv;
}
NS_IMETHODIMP
nsPositionedInlineFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
aBuilder->MarkFramesForDisplayList(this, mAbsoluteContainer.GetChildList(),
aDirtyRect);
return nsHTMLContainerFrame::BuildDisplayList(aBuilder, aDirtyRect, aLists);
}
nsIAtom*
nsPositionedInlineFrame::GetAdditionalChildListName(PRInt32 aIndex) const
{
if (0 == aIndex) {
return nsGkAtoms::absoluteList;
}
return nsnull;
}
nsFrameList
nsPositionedInlineFrame::GetChildList(nsIAtom* aListName) const
{
if (nsGkAtoms::absoluteList == aListName)
return mAbsoluteContainer.GetChildList();
return nsInlineFrame::GetChildList(aListName);
}
nsIAtom*
nsPositionedInlineFrame::GetType() const
{
return nsGkAtoms::positionedInlineFrame;
}
NS_IMETHODIMP
nsPositionedInlineFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
nsresult rv = NS_OK;
// Don't bother optimizing for fast incremental reflow of absolute
// children of an inline
// Let the inline frame do its reflow first
rv = nsInlineFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
// Let the absolutely positioned container reflow any absolutely positioned
// child frames that need to be reflowed
// We want to do this under either of two conditions:
// 1. If we didn't do the incremental reflow above.
// 2. If our size changed.
// Even though it's the padding edge that's the containing block, we
// can use our rect (the border edge) since if the border style
// changed, the reflow would have been targeted at us so we'd satisfy
// condition 1.
if (NS_SUCCEEDED(rv) &&
mAbsoluteContainer.HasAbsoluteFrames()) {
// The containing block for the abs pos kids is formed by our padding edge.
nsMargin computedBorder =
aReflowState.mComputedBorderPadding - aReflowState.mComputedPadding;
nscoord containingBlockWidth =
aDesiredSize.width - computedBorder.LeftRight();
nscoord containingBlockHeight =
aDesiredSize.height - computedBorder.TopBottom();
// Factor the absolutely positioned child bounds into the overflow area
// Don't include this frame's bounds, nor its inline descendants' bounds,
// and don't store the overflow property.
// That will all be done by nsLineLayout::RelativePositionFrames.
rv = mAbsoluteContainer.Reflow(this, aPresContext, aReflowState, aStatus,
containingBlockWidth, containingBlockHeight,
PR_TRUE, PR_TRUE, PR_TRUE, // XXX could be optimized
&aDesiredSize.mOverflowAreas);
}
return rv;
}

View File

@ -41,7 +41,6 @@
#define nsInlineFrame_h___
#include "nsHTMLContainerFrame.h"
#include "nsAbsoluteContainingBlock.h"
#include "nsLineLayout.h"
class nsAnonymousBlockFrame;
@ -97,6 +96,8 @@ public:
virtual PRBool IsEmpty();
virtual PRBool IsSelfEmpty();
virtual void DestroyFrom(nsIFrame* aDestructRoot);
virtual PRBool PeekOffsetCharacter(PRBool aForward, PRInt32* aOffset,
PRBool aRespectClusters = PR_TRUE);
@ -227,53 +228,4 @@ protected:
PRBool* aIsComplete);
};
//----------------------------------------------------------------------
// Derived class created for relatively positioned inline-level elements
// that acts as a containing block for child absolutely positioned
// elements
class nsPositionedInlineFrame : public nsInlineFrame
{
public:
NS_DECL_FRAMEARENA_HELPERS
nsPositionedInlineFrame(nsStyleContext* aContext)
: nsInlineFrame(aContext)
, mAbsoluteContainer(nsGkAtoms::absoluteList)
{}
virtual ~nsPositionedInlineFrame() { } // useful for debugging
virtual void DestroyFrom(nsIFrame* aDestructRoot);
NS_IMETHOD SetInitialChildList(nsIAtom* aListName,
nsFrameList& aChildList);
NS_IMETHOD AppendFrames(nsIAtom* aListName,
nsFrameList& aFrameList);
NS_IMETHOD InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList);
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
virtual nsFrameList GetChildList(nsIAtom* aListName) const;
NS_IMETHOD Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual nsIAtom* GetType() const;
protected:
nsAbsoluteContainingBlock mAbsoluteContainer;
};
#endif /* nsInlineFrame_h___ */

View File

@ -662,8 +662,7 @@ IsPercentageAware(const nsIFrame* aFrame)
}
// Some of these things don't apply to non-replaced inline frames
// (that is, fType == nsGkAtoms::inlineFrame || fType ==
// nsGkAtoms::positionedInlineFrame), but we won't bother making
// (that is, fType == nsGkAtoms::inlineFrame), but we won't bother making
// things unnecessarily complicated, since they'll probably be set
// quite rarely.

View File

@ -137,13 +137,10 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext,
NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) ||
!frame->GetNextInFlow(), "bad child flow list");
}
// Reflow our fixed frames
// Reflow our fixed frames
nsReflowStatus fixedStatus = NS_FRAME_COMPLETE;
mFixedContainer.Reflow(this, aPresContext, aReflowState, fixedStatus,
aReflowState.availableWidth,
aReflowState.availableHeight,
PR_FALSE, PR_TRUE, PR_TRUE, // XXX could be optimized
nsnull /* ignore overflow */);
ReflowAbsoluteFrames(aPresContext, aDesiredSize, aReflowState, fixedStatus);
NS_ASSERTION(NS_FRAME_IS_COMPLETE(fixedStatus), "fixed frames can be truncated, but not incomplete");
// Return our desired size

View File

@ -185,7 +185,6 @@ public:
nsPageFrame_id,
nsPlaceholderFrame_id,
nsPopupSetFrame_id,
nsPositionedInlineFrame_id,
nsProgressMeterFrame_id,
nsResizerFrame_id,
nsRootBoxFrame_id,

View File

@ -47,6 +47,7 @@
#include "nsIScrollableFrame.h"
#include "nsDisplayList.h"
#include "FrameLayerBuilder.h"
#include "nsAbsoluteContainingBlock.h"
using namespace mozilla;
@ -69,7 +70,7 @@ ViewportFrame::Init(nsIContent* aContent,
void
ViewportFrame::DestroyFrom(nsIFrame* aDestructRoot)
{
mFixedContainer.DestroyFrames(this, aDestructRoot);
DestroyAbsoluteFrames(aDestructRoot);
nsContainerFrame::DestroyFrom(aDestructRoot);
}
@ -77,20 +78,11 @@ NS_IMETHODIMP
ViewportFrame::SetInitialChildList(nsIAtom* aListName,
nsFrameList& aChildList)
{
nsresult rv = NS_OK;
// See which child list to add the frames to
#ifdef NS_DEBUG
nsFrame::VerifyDirtyBitSet(aChildList);
#endif
if (nsGkAtoms::fixedList == aListName) {
rv = mFixedContainer.SetInitialChildList(this, aListName, aChildList);
}
else {
rv = nsContainerFrame::SetInitialChildList(aListName, aChildList);
}
return rv;
return nsContainerFrame::SetInitialChildList(aListName, aChildList);
}
NS_IMETHODIMP
@ -98,13 +90,6 @@ ViewportFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// We don't need any special painting or event handling. We just need to
// mark our visible out-of-flow frames (i.e., the fixed position frames) so
// that display list construction is guaranteed to recurse into their
// ancestors.
aBuilder->MarkFramesForDisplayList(this, mFixedContainer.GetChildList(),
aDirtyRect);
nsIFrame* kid = mFrames.FirstChild();
if (!kid)
return NS_OK;
@ -119,18 +104,9 @@ NS_IMETHODIMP
ViewportFrame::AppendFrames(nsIAtom* aListName,
nsFrameList& aFrameList)
{
nsresult rv = NS_OK;
if (nsGkAtoms::fixedList == aListName) {
rv = mFixedContainer.AppendFrames(this, aListName, aFrameList);
}
else {
NS_ASSERTION(!aListName, "unexpected child list");
NS_ASSERTION(GetChildList(nsnull).IsEmpty(), "Shouldn't have any kids!");
rv = nsContainerFrame::AppendFrames(aListName, aFrameList);
}
return rv;
NS_ASSERTION(!aListName, "unexpected child list");
NS_ASSERTION(GetChildList(nsnull).IsEmpty(), "Shouldn't have any kids!");
return nsContainerFrame::AppendFrames(aListName, aFrameList);
}
NS_IMETHODIMP
@ -138,57 +114,17 @@ ViewportFrame::InsertFrames(nsIAtom* aListName,
nsIFrame* aPrevFrame,
nsFrameList& aFrameList)
{
nsresult rv = NS_OK;
if (nsGkAtoms::fixedList == aListName) {
rv = mFixedContainer.InsertFrames(this, aListName, aPrevFrame, aFrameList);
}
else {
NS_ASSERTION(!aListName, "unexpected child list");
NS_ASSERTION(GetChildList(nsnull).IsEmpty(), "Shouldn't have any kids!");
rv = nsContainerFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
}
return rv;
NS_ASSERTION(!aListName, "unexpected child list");
NS_ASSERTION(GetChildList(nsnull).IsEmpty(), "Shouldn't have any kids!");
return nsContainerFrame::InsertFrames(aListName, aPrevFrame, aFrameList);
}
NS_IMETHODIMP
ViewportFrame::RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame)
{
nsresult rv = NS_OK;
if (nsGkAtoms::fixedList == aListName) {
mFixedContainer.RemoveFrame(this, aListName, aOldFrame);
rv = NS_OK;
}
else {
NS_ASSERTION(!aListName, "unexpected child list");
rv = nsContainerFrame::RemoveFrame(aListName, aOldFrame);
}
return rv;
}
nsIAtom*
ViewportFrame::GetAdditionalChildListName(PRInt32 aIndex) const
{
NS_PRECONDITION(aIndex >= 0, "illegal index");
if (0 == aIndex) {
return nsGkAtoms::fixedList;
}
return nsnull;
}
nsFrameList
ViewportFrame::GetChildList(nsIAtom* aListName) const
{
if (nsGkAtoms::fixedList == aListName)
return mFixedContainer.GetChildList();
return nsContainerFrame::GetChildList(aListName);
NS_ASSERTION(!aListName, "unexpected child list");
return nsContainerFrame::RemoveFrame(aListName, aOldFrame);
}
/* virtual */ nscoord
@ -200,8 +136,6 @@ ViewportFrame::GetMinWidth(nsRenderingContext *aRenderingContext)
result = 0;
else
result = mFrames.FirstChild()->GetMinWidth(aRenderingContext);
// XXXldb Deal with mFixedContainer (matters for SizeToContent)!
return result;
}
@ -215,8 +149,6 @@ ViewportFrame::GetPrefWidth(nsRenderingContext *aRenderingContext)
result = 0;
else
result = mFrames.FirstChild()->GetPrefWidth(aRenderingContext);
// XXXldb Deal with mFixedContainer (matters for SizeToContent)!
return result;
}
@ -314,20 +246,24 @@ ViewportFrame::Reflow(nsPresContext* aPresContext,
// to reflect the available space for the fixed items
nsHTMLReflowState reflowState(aReflowState);
nsPoint offset = AdjustReflowStateForScrollbars(&reflowState);
#ifdef DEBUG
NS_ASSERTION(mFixedContainer.GetChildList().IsEmpty() ||
(offset.x == 0 && offset.y == 0),
"We don't handle correct positioning of fixed frames with "
"scrollbars in odd positions");
if (IsAbsoluteContainer()) {
NS_ASSERTION(GetAbsoluteContainingBlock()->GetChildList().IsEmpty() ||
(offset.x == 0 && offset.y == 0),
"We don't handle correct positioning of fixed frames with "
"scrollbars in odd positions");
}
#endif
// Just reflow all the fixed-pos frames.
rv = mFixedContainer.Reflow(this, aPresContext, reflowState, aStatus,
reflowState.ComputedWidth(),
reflowState.ComputedHeight(),
PR_FALSE, PR_TRUE, PR_TRUE, // XXX could be optimized
nsnull /* ignore overflow */);
if (IsAbsoluteContainer()) {
// Just reflow all the fixed-pos frames.
rv = GetAbsoluteContainingBlock()->Reflow(this, aPresContext, reflowState, aStatus,
reflowState.ComputedWidth(),
reflowState.ComputedHeight(),
PR_FALSE, PR_TRUE, PR_TRUE, // XXX could be optimized
nsnull /* ignore overflow */);
}
// If we were dirty then do a repaint
if (GetStateBits() & NS_FRAME_IS_DIRTY) {

View File

@ -45,15 +45,13 @@
#include "nsContainerFrame.h"
#include "nsGkAtoms.h"
#include "nsAbsoluteContainingBlock.h"
class nsPresContext;
/**
* ViewportFrame is the parent of a single child - the doc root frame or a scroll frame
* containing the doc root frame. ViewportFrame stores this child in its primary child
* list. It stores fixed positioned items in a secondary child list and its mFixedContainer
* delegate handles them.
* list.
*/
class ViewportFrame : public nsContainerFrame {
public:
@ -63,7 +61,6 @@ public:
ViewportFrame(nsStyleContext* aContext)
: nsContainerFrame(aContext)
, mFixedContainer(nsGkAtoms::fixedList)
{}
virtual ~ViewportFrame() { } // useful for debugging
@ -86,10 +83,6 @@ public:
NS_IMETHOD RemoveFrame(nsIAtom* aListName,
nsIFrame* aOldFrame);
virtual nsIAtom* GetAdditionalChildListName(PRInt32 aIndex) const;
virtual nsFrameList GetChildList(nsIAtom* aListName) const;
NS_IMETHOD BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists);
@ -118,13 +111,11 @@ public:
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
protected:
nsPoint AdjustReflowStateForScrollbars(nsHTMLReflowState* aReflowState) const;
private:
virtual nsIAtom* GetAbsoluteListName() const { return nsGkAtoms::fixedList; }
protected:
// position: fixed content is really content which is absolutely positioned with
// respect to the viewport.
nsAbsoluteContainingBlock mFixedContainer;
nsPoint AdjustReflowStateForScrollbars(nsHTMLReflowState* aReflowState) const;
};

View File

@ -222,7 +222,7 @@ public:
// mIsCancelled is set to true when a sheet load is stopped by
// Stop() or StopLoadingSheet() (which was removed in Bug 556446).
// SheetLoadData::OnStreamComplete() checks this to avoid parsing
// SheetLoadData::OnStreamComplete() checks this to avoid parsing
// sheets that have been cancelled and such.
PRPackedBool mIsCancelled : 1;
@ -498,7 +498,7 @@ CollectNonAlternates(URIAndPrincipalHashKey *aKey,
{
NS_PRECONDITION(aData, "Must have a data");
NS_PRECONDITION(aClosure, "Must have an array");
// Note that we don't want to affect what the selected style set is,
// so use PR_TRUE for aHasAlternateRel.
if (aData->mLoader->IsAlternate(aData->mTitle, PR_TRUE)) {
@ -521,10 +521,10 @@ Loader::SetPreferredSheet(const nsAString& aTitle)
doc->GetPreferredStyleSheetSet(currentPreferred);
}
NS_ASSERTION(currentPreferred.Equals(aTitle),
"Unexpected argument to SetPreferredSheet");
"Unexpected argument to SetPreferredSheet");
}
#endif
mPreferredSheet = aTitle;
// start any pending alternates that aren't alternates anymore
@ -613,7 +613,7 @@ static nsresult GetCharsetFromData(const unsigned char* aStyleSheetData,
if (aStyleSheetData[pos] == '"') {
break;
}
// casting to avoid ambiguities
charset.Append(char(aStyleSheetData[pos]));
pos += step;
@ -709,14 +709,14 @@ SheetLoadData::OnDetermineCharset(nsIUnicharStreamLoader* aLoader,
}
#endif
}
if (aCharset.IsEmpty() && mLoader->mDocument) {
// no useful data on charset. Try the document charset.
aCharset = mLoader->mDocument->GetDocumentCharacterSet();
#ifdef PR_LOGGING
LOG((" Set from document: %s", PromiseFlatCString(aCharset).get()));
#endif
}
}
if (aCharset.IsEmpty()) {
NS_WARNING("Unable to determine charset for sheet, using ISO-8859-1!");
@ -761,14 +761,14 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader,
// this data and a likely crash.
return NS_OK;
}
if (!mLoader->mDocument && !mIsNonDocumentSheet) {
// Sorry, we don't care about this load anymore
LOG_WARN((" No document and not non-document sheet; dropping load"));
mLoader->SheetComplete(this, NS_BINDING_ABORTED);
return NS_OK;
}
if (NS_FAILED(aStatus)) {
LOG_WARN((" Load failed: status 0x%x", aStatus));
mLoader->SheetComplete(this, aStatus);
@ -782,7 +782,7 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader,
mLoader->SheetComplete(this, result);
return NS_OK;
}
nsCOMPtr<nsIURI> originalURI;
channel->GetOriginalURI(getter_AddRefs(originalURI));
@ -813,14 +813,14 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader,
mLoader->SheetComplete(this, result);
return NS_OK;
}
mSheet->SetPrincipal(principal);
#ifdef MOZ_TIMELINE
NS_TIMELINE_OUTDENT();
NS_TIMELINE_MARK_CHANNEL("SheetLoadData::OnStreamComplete(%s)", channel);
#endif // MOZ_TIMELINE
// If it's an HTTP channel, we want to make sure this is not an
// error document we got.
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
@ -926,7 +926,7 @@ Loader::IsAlternate(const nsAString& aTitle, PRBool aHasAlternateRel)
if (aTitle.IsEmpty()) {
return PR_FALSE;
}
if (!aHasAlternateRel && mDocument && mPreferredSheet.IsEmpty()) {
// There's no preferred set yet, and we now have a sheet with a title.
// Make that be the preferred set.
@ -940,7 +940,7 @@ Loader::IsAlternate(const nsAString& aTitle, PRBool aHasAlternateRel)
/**
* CheckLoadAllowed will return success if the load is allowed,
* failure otherwise.
* failure otherwise.
*
* @param aSourcePrincipal the principal of the node or document or parent
* sheet loading the sheet
@ -956,7 +956,7 @@ Loader::CheckLoadAllowed(nsIPrincipal* aSourcePrincipal,
LOG(("css::Loader::CheckLoadAllowed"));
nsresult rv;
if (aSourcePrincipal) {
// Check with the security manager
nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager();
@ -1015,11 +1015,11 @@ Loader::CreateSheet(nsIURI* aURI,
(mLoadingDatas.IsInitialized() || mLoadingDatas.Init()) &&
(mPendingDatas.IsInitialized() || mPendingDatas.Init()),
NS_ERROR_OUT_OF_MEMORY);
nsresult rv = NS_OK;
*aSheet = nsnull;
aSheetState = eSheetStateUnknown;
if (aURI) {
aSheetState = eSheetComplete;
nsRefPtr<nsCSSStyleSheet> sheet;
@ -1040,11 +1040,11 @@ Loader::CreateSheet(nsIURI* aURI,
if (!sheet) {
// Then our per-document complete sheets.
URIAndPrincipalHashKey key(aURI, aLoaderPrincipal);
mCompleteSheets.Get(&key, getter_AddRefs(sheet));
LOG((" From completed: %p", sheet.get()));
}
if (sheet) {
// This sheet came from the XUL cache or our per-document hashtable; it
// better be a complete sheet.
@ -1139,7 +1139,7 @@ Loader::CreateSheet(nsIURI* aURI,
NS_ASSERTION(*aSheet, "We should have a sheet by now!");
NS_ASSERTION(aSheetState != eSheetStateUnknown, "Have to set a state!");
LOG((" State: %s", gStateStrings[aSheetState]));
return NS_OK;
}
@ -1184,7 +1184,7 @@ Loader::PrepareSheet(nsCSSStyleSheet* aSheet,
if (aIsAlternate) {
*aIsAlternate = alternate;
}
return NS_OK;
return NS_OK;
}
/**
@ -1231,7 +1231,7 @@ Loader::InsertSheetInDoc(nsCSSStyleSheet* aSheet,
domSheet->GetOwnerNode(getter_AddRefs(sheetOwner));
if (sheetOwner && !aLinkingContent) {
// Keep moving; all sheets with a sheetOwner come after all
// sheets without a linkingNode
// sheets without a linkingNode
continue;
}
@ -1254,7 +1254,7 @@ Loader::InsertSheetInDoc(nsCSSStyleSheet* aSheet,
}
++insertionPoint; // adjust the index to the spot we want to insert in
// XXX <meta> elements do not implement nsIStyleSheetLinkingElement;
// need to fix this for them to be ordered correctly.
nsCOMPtr<nsIStyleSheetLinkingElement>
@ -1293,7 +1293,7 @@ Loader::InsertChildSheet(nsCSSStyleSheet* aSheet,
// child sheets should always start out enabled, even if they got
// cloned off of top-level sheets which were disabled
aSheet->SetEnabled(PR_TRUE);
aParentSheet->AppendStyleSheet(aSheet);
aParentRule->SetSheet(aSheet); // This sets the ownerRule on the sheet
@ -1331,8 +1331,8 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
#endif
LOG_URI(" Load from: '%s'", aLoadData->mURI);
nsresult rv = NS_OK;
nsresult rv = NS_OK;
if (!mDocument && !aLoadData->mIsNonDocumentSheet) {
// No point starting the load; just release all the data and such.
@ -1360,7 +1360,7 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
}
NS_ASSERTION(channel, "NS_OpenURI lied?");
// Get the principal for this sheet
nsCOMPtr<nsIPrincipal> principal;
if (aLoadData->mUseSystemPrincipal) {
@ -1379,9 +1379,9 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
aLoadData->mSheet->SetPrincipal(principal);
nsCOMPtr<nsIConverterInputStream> converterStream =
nsCOMPtr<nsIConverterInputStream> converterStream =
do_CreateInstance("@mozilla.org/intl/converter-input-stream;1", &rv);
if (NS_FAILED(rv)) {
LOG_ERROR((" Failed to create converter stream"));
SheetComplete(aLoadData, rv);
@ -1397,7 +1397,7 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
8192,
nsIConverterInputStream::
DEFAULT_REPLACEMENT_CHARACTER);
if (NS_FAILED(rv)) {
LOG_ERROR((" Failed to initialize converter stream"));
SheetComplete(aLoadData, rv);
@ -1421,7 +1421,7 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
mPendingDatas.Get(&key, &existingData);
NS_ASSERTION(existingData, "CreateSheet lied about the state");
}
if (existingData) {
LOG((" Glomming on to existing load"));
SheetLoadData* data = existingData;
@ -1473,13 +1473,13 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
NS_TIMELINE_MARK_URI("Loading style sheet: %s", aLoadData->mURI);
NS_TIMELINE_INDENT();
#endif
nsCOMPtr<nsIChannel> channel;
rv = NS_NewChannel(getter_AddRefs(channel),
aLoadData->mURI, nsnull, loadGroup, nsnull,
nsIChannel::LOAD_NORMAL | nsIChannel::LOAD_CLASSIFY_URI,
channelPolicy);
if (NS_FAILED(rv)) {
#ifdef DEBUG
mSyncCallback = PR_FALSE;
@ -1543,9 +1543,9 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState)
SheetComplete(aLoadData, NS_ERROR_OUT_OF_MEMORY);
return NS_ERROR_OUT_OF_MEMORY;
}
aLoadData->mIsLoading = PR_TRUE;
return NS_OK;
}
@ -1629,7 +1629,7 @@ Loader::SheetComplete(SheetLoadData* aLoadData, nsresult aStatus)
mDatasToNotifyOn += count;
for (PRUint32 i = 0; i < count; ++i) {
--mDatasToNotifyOn;
SheetLoadData* data = datasToNotify[i];
NS_ASSERTION(data && data->mMustNotify, "How did this data get here?");
if (data->mObserver) {
@ -1684,7 +1684,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
aLoadData->mIsLoading = PR_FALSE;
}
}
// Go through and deal with the whole linked list.
SheetLoadData* data = aLoadData;
while (data) {
@ -1714,7 +1714,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
!mParsingDatas.Contains(data->mParentData)) {
DoSheetComplete(data->mParentData, aStatus, aDatasToNotify);
}
data = data->mNext;
}
@ -1745,7 +1745,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus,
nsresult
Loader::LoadInlineStyle(nsIContent* aElement,
nsIUnicharInputStream* aStream,
nsIUnicharInputStream* aStream,
PRUint32 aLineNumber,
const nsAString& aTitle,
const nsAString& aMedia,
@ -1768,7 +1768,6 @@ Loader::LoadInlineStyle(nsIContent* aElement,
nsCOMPtr<nsIStyleSheetLinkingElement> owningElement(do_QueryInterface(aElement));
NS_ASSERTION(owningElement, "Element is not a style linking element!");
// Since we're not planning to load a URI, no need to hand a principal to the
// load data or to CreateSheet().
@ -1783,12 +1782,12 @@ Loader::LoadInlineStyle(nsIContent* aElement,
rv = PrepareSheet(sheet, aTitle, aMedia, nsnull, PR_FALSE,
aIsAlternate);
NS_ENSURE_SUCCESS(rv, rv);
LOG((" Sheet is alternate: %d", *aIsAlternate));
rv = InsertSheetInDoc(sheet, aElement, mDocument);
NS_ENSURE_SUCCESS(rv, rv);
SheetLoadData* data = new SheetLoadData(this, aTitle, nsnull, sheet,
owningElement, *aIsAlternate,
aObserver, nsnull);
@ -1812,11 +1811,11 @@ Loader::LoadInlineStyle(nsIContent* aElement,
data->mMustNotify = PR_TRUE;
}
return rv;
}
}
nsresult
Loader::LoadStyleLink(nsIContent* aElement,
nsIURI* aURL,
nsIURI* aURL,
const nsAString& aTitle,
const nsAString& aMedia,
PRBool aHasAlternateRel,
@ -1836,7 +1835,7 @@ Loader::LoadStyleLink(nsIContent* aElement,
LOG_WARN((" Not enabled"));
return NS_ERROR_NOT_AVAILABLE;
}
NS_ENSURE_TRUE(mDocument, NS_ERROR_NOT_INITIALIZED);
nsIPrincipal* principal =
@ -1850,7 +1849,7 @@ Loader::LoadStyleLink(nsIContent* aElement,
if (NS_FAILED(rv)) return rv;
LOG((" Passed load check"));
StyleSheetState state;
nsRefPtr<nsCSSStyleSheet> sheet;
rv = CreateSheet(aURL, aElement, principal, PR_FALSE, state,
@ -1862,7 +1861,7 @@ Loader::LoadStyleLink(nsIContent* aElement,
NS_ENSURE_SUCCESS(rv, rv);
LOG((" Sheet is alternate: %d", *aIsAlternate));
rv = InsertSheetInDoc(sheet, aElement, mDocument);
NS_ENSURE_SUCCESS(rv, rv);
@ -1913,7 +1912,7 @@ Loader::LoadStyleLink(nsIContent* aElement,
nsresult
Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
nsIURI* aURL,
nsIURI* aURL,
nsMediaList* aMedia,
ImportRule* aParentRule)
{
@ -1925,7 +1924,7 @@ Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
LOG_WARN((" Not enabled"));
return NS_ERROR_NOT_AVAILABLE;
}
LOG_URI(" Child uri: '%s'", aURL);
nsCOMPtr<nsIDOMNode> owningNode;
@ -1956,7 +1955,7 @@ Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
if (NS_FAILED(rv)) return rv;
LOG((" Passed load check"));
SheetLoadData* parentData = nsnull;
nsCOMPtr<nsICSSLoaderObserver> observer;
@ -1998,10 +1997,10 @@ Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
const nsSubstring& empty = EmptyString();
rv = PrepareSheet(sheet, empty, empty, aMedia);
NS_ENSURE_SUCCESS(rv, rv);
rv = InsertChildSheet(sheet, aParentSheet, aParentRule);
NS_ENSURE_SUCCESS(rv, rv);
if (state == eSheetComplete) {
LOG((" Sheet already complete"));
// We're completely done. No need to notify, even, since the
@ -2010,7 +2009,6 @@ Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
return NS_OK;
}
SheetLoadData* data = new SheetLoadData(this, aURL, sheet, parentData,
observer, principal);
@ -2030,7 +2028,7 @@ Loader::LoadChildSheet(nsCSSStyleSheet* aParentSheet,
if (!syncLoad) {
data->mMustNotify = PR_TRUE;
}
return rv;
return rv;
}
nsresult
@ -2071,7 +2069,7 @@ Loader::LoadSheet(nsIURI* aURL,
}
nsresult
Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
PRBool aAllowUnsafeRules,
PRBool aUseSystemPrincipal,
nsIPrincipal* aOriginPrincipal,
@ -2086,11 +2084,11 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
NS_ASSERTION(mParsingDatas.Length() == 0, "We're in the middle of a parse?");
LOG_URI(" Non-document sheet uri: '%s'", aURL);
if (aSheet) {
*aSheet = nsnull;
}
if (!mEnabled) {
LOG_WARN((" Not enabled"));
return NS_ERROR_NOT_AVAILABLE;
@ -2104,7 +2102,7 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
StyleSheetState state;
nsRefPtr<nsCSSStyleSheet> sheet;
PRBool syncLoad = (aObserver == nsnull);
rv = CreateSheet(aURL, nsnull, aOriginPrincipal, syncLoad, state,
getter_AddRefs(sheet));
NS_ENSURE_SUCCESS(rv, rv);
@ -2112,7 +2110,7 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
const nsSubstring& empty = EmptyString();
rv = PrepareSheet(sheet, empty, empty, nsnull);
NS_ENSURE_SUCCESS(rv, rv);
if (state == eSheetComplete) {
LOG((" Sheet already complete"));
if (aObserver) {
@ -2133,7 +2131,7 @@ Loader::InternalLoadNonDocumentSheet(nsIURI* aURL,
sheet->SetComplete();
return NS_ERROR_OUT_OF_MEMORY;
}
NS_ADDREF(data);
rv = LoadSheet(data, state);
NS_ENSURE_SUCCESS(rv, rv);
@ -2220,7 +2218,7 @@ StopLoadingSheetCallback(URIAndPrincipalHashKey* aKey,
aData->mIsLoading = PR_FALSE; // we will handle the removal right here
aData->mIsCancelled = PR_TRUE;
static_cast<Loader::LoadDataArray*>(aClosure)->AppendElement(aData);
return PL_DHASH_REMOVE;
@ -2234,7 +2232,7 @@ Loader::Stop()
PRUint32 loadingCount =
mLoadingDatas.IsInitialized() ? mLoadingDatas.Count() : 0;
LoadDataArray arr(pendingCount + loadingCount + mPostedEvents.Length());
if (pendingCount) {
mPendingDatas.Enumerate(StopLoadingSheetCallback, &arr);
}

View File

@ -315,7 +315,7 @@ public:
/**
* nsresult Loader::StopLoadingSheet(nsIURI* aURL), which notifies the
* nsICSSLoaderObserver with NS_BINDING_ABORTED, was removed in Bug 556446.
* nsICSSLoaderObserver with NS_BINDING_ABORTED, was removed in Bug 556446.
* It can be found in revision 2c44a32052ad.
*/

View File

@ -87,6 +87,7 @@ public:
nsTArray<float> &aRotate)=0;
NS_IMETHOD_(PRUint16) GetTextAnchor()=0;
NS_IMETHOD_(PRBool) IsAbsolutelyPositioned()=0;
NS_IMETHOD_(PRBool) IsTextEmpty() const=0;
NS_IMETHOD_(void) SetTrimLeadingWhitespace(PRBool aTrimLeadingWhitespace)=0;
NS_IMETHOD_(void) SetTrimTrailingWhitespace(PRBool aTrimTrailingWhitespace)=0;
NS_IMETHOD_(PRBool) EndsWithWhitespace() const=0;

View File

@ -692,7 +692,7 @@ nsSVGGlyphFrame::GetCharacterPositions(nsTArray<CharacterPosition>* aCharacterPo
float aMetricsScale)
{
PRUint32 strLength = mTextRun->GetLength();
NS_ASSERTION(strLength > 0, "no text");
NS_ABORT_IF_FALSE(strLength > 0, "no text");
const gfxFloat radPerDeg = M_PI / 180.0;
@ -1419,7 +1419,11 @@ nsSVGGlyphFrame::GetCharNumAtPosition(nsIDOMSVGPoint *point)
NS_IMETHODIMP_(nsISVGGlyphFragmentLeaf *)
nsSVGGlyphFrame::GetFirstGlyphFragment()
{
return this;
nsISVGGlyphFragmentLeaf *leaf = this;
while (leaf && leaf->IsTextEmpty()) {
leaf = leaf->GetNextGlyphFragment();
}
return leaf;
}
NS_IMETHODIMP_(nsISVGGlyphFragmentLeaf *)
@ -1444,6 +1448,8 @@ NS_IMETHODIMP_(PRBool)
nsSVGGlyphFrame::EndsWithWhitespace() const
{
const nsTextFragment* text = mContent->GetText();
NS_ABORT_IF_FALSE(text->GetLength() > 0, "text expected");
return NS_IsAsciiWhitespace(text->CharAt(text->GetLength() - 1));
}

View File

@ -162,6 +162,9 @@ public:
nsTArray<float> &aRotate);
NS_IMETHOD_(PRUint16) GetTextAnchor();
NS_IMETHOD_(PRBool) IsAbsolutelyPositioned();
NS_IMETHOD_(PRBool) IsTextEmpty() const {
return mContent->GetText()->GetLength() == 0;
}
NS_IMETHOD_(void) SetTrimLeadingWhitespace(PRBool aTrimLeadingWhitespace) {
mTrimLeadingWhitespace = aTrimLeadingWhitespace;
}

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg">
<text id="a">a</text>
<script>
document.getElementById("a").firstChild.nodeValue = "";
</script>
</svg>

After

Width:  |  Height:  |  Size: 155 B

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg">
<text id="a">a</text>
<script>
document.getElementById("a").appendChild(document.createTextNode(""));
</script>
</svg>

After

Width:  |  Height:  |  Size: 170 B

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg">
<script>
var a = document.createElementNS("http://www.w3.org/2000/svg", "text");
a.appendChild(document.createTextNode(""));
document.documentElement.appendChild(a);
a.getNumberOfChars();
document.documentElement.removeChild(a);
</script>
</svg>

After

Width:  |  Height:  |  Size: 311 B

View File

@ -106,3 +106,6 @@ load 614367-1.svg
load 620034-1.html
load 621598-1.svg
load 648819-1.html
load 655025-1.svg
load 655025-2.svg
load 655025-3.svg

View File

@ -1086,7 +1086,7 @@ nsTableFrame::GetAdditionalChildListName(PRInt32 aIndex) const
if (aIndex == NS_TABLE_FRAME_OVERFLOW_LIST_INDEX) {
return nsGkAtoms::overflowList;
}
return nsnull;
return nsHTMLContainerFrame::GetAdditionalChildListName(aIndex);
}
nsRect

View File

@ -227,7 +227,7 @@ nsTableOuterFrame::GetChildList(nsIAtom* aListName) const
if (!aListName) {
return mFrames;
}
return nsFrameList::EmptyList();
return nsHTMLContainerFrame::GetChildList(aListName);
}
nsIAtom*
@ -236,7 +236,7 @@ nsTableOuterFrame::GetAdditionalChildListName(PRInt32 aIndex) const
if (aIndex == NS_TABLE_FRAME_CAPTION_LIST_INDEX) {
return nsGkAtoms::captionList;
}
return nsnull;
return nsHTMLContainerFrame::GetAdditionalChildListName(aIndex);
}
NS_IMETHODIMP

View File

@ -400,7 +400,7 @@ nsMenuFrame::GetAdditionalChildListName(PRInt32 aIndex) const
if (NS_MENU_POPUP_LIST_INDEX == aIndex) {
return nsGkAtoms::popupList;
}
return nsnull;
return nsBoxFrame::GetAdditionalChildListName(aIndex);
}
void

View File

@ -0,0 +1,49 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Mozilla Corporation.
# Portions created by the Initial Developer are Copyright (C) 2009
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Justin Dolske <dolske@mozilla.com> (original author)
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = \
content \
locales \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,3 @@
mobile/app/android/drawable/alertaddons.png
mobile/app/android/drawable/alertdownloads.png
mobile/branding/nightly/content/splash.png

View File

@ -0,0 +1,3 @@
MOZ_APP_DISPLAYNAME=Aurora
ANDROID_PACKAGE_NAME=org.mozilla.fennec_aurora
MOZ_UPDATER=1

View File

@ -0,0 +1,25 @@
# Branding Makefile
# - jars chrome artwork
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
LINUX_BRANDING_FILES = \
fennec_26x26.png \
fennec_40x40.png \
fennec_48x48.png \
fennec_72x72.png \
fennec_scalable.png \
fennec_maemo_icon26.txt \
$(NULL)
export::
$(NSINSTALL) -D $(DIST)/branding
cp $(addprefix $(srcdir)/, $(LINUX_BRANDING_FILES)) $(DIST)/branding/
$(NSINSTALL) -D $(DIST)/install

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,74 @@
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0
d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADFxJREFUeNrsWWtwVOUZfs45
e89es5v7bQMh3DGBtpJWIRQvaEWg0FFbOyX9oR3bjtDRTjuditjpj05narWt
o84oYB11nCLRVqtUIYQKImiWS7gFyIaETbLJ3u97ds/p+3274WLFUsQZmeGb
fHPO7jn7ned53+e9fCeCqqq4moeIq3xcI3CNwDUCV/kQrtRCTauedCslJatV
c8lCu1HTbnXZYauxI+0LIBZKYiSSCguZjEc6M/S6zjvU2XvsGe8VIZAa/2iN
VqvxaGzXdV0m8Ha5vm6dzWltn99cjmkVZtiNWlgtGpTatQiGZURjOX7v0ZEo
Pug5Dp+nF8LQaKcukln7eYjkIvvdwuHdr4Us1hK7qcQEm8PaSd+/TrOTCIU/
68czp95vT9yyeJ1ita65bpILK+ZUXnDdbtPCbtXwc/94FslUHqCiKaSTOH70
FDo3b0NmcBQaWVh/vG/To5cKmA7Ls5nsskQ82ZJMpCAc6H51uySJ7UpegaQR
4apwodTlYOAZmfVExPsp4FsSbfM25OvqW2bWO7F0duV/CbPUqoWDSLDzsUAW
sQR5QVHI5QmINEcGfNj45KtQZRmSoPUYJPMi8kb4IsBX0+HBeCzREhwLgsBD
FEWIktSlMZoMHrOlpN1WaoOcIUsRq0HvkN3msK222iyr6cd/LBIJT4DP1jm3
i8jYlZAfM75ag6FomoAKF0SV1ipCyRbOh5MZhJmM8nmIiQSERAyCKKBxcjV8
/hD0dktLdeus7eT7C0gUga/LpDPuQe8ZxCIxkLEZcPImmEd3iAR406hvFEcO
HIVvcJgvXOeuhV6vQy6XZ+usodlDi7Uz2VQtadmQy6fsamAMZXIMoTMj8PnG
kM1nYLECcTKCoFWQQQ7BVBahdBaBeBb+SBqCToWxzIhAOIbhQT+XVDoYha2x
Go45DS2u66dsLwJvodlDpxsIk/vAvkNgls+TAfKkFH5U+HkXt9eH72wKMdkq
5OI8gTZbzahtqGExcYEr3+o+7XlhQGn5+NnXYJ3WiOm3tUEZiSAlA7MXTIPe
pOMGYPMCj6gTU+XzePdBRA6fxMixAYz6xmFwWDDj+9+CxqjDTZp41w9XTm/J
yTn7kUPHERwPcatLTDKixGUukQdESQzPW3yvg0eZLMuddHG1wpkpCAXCGCfG
1bWVmDJ9MuSszDV3+4L6lpKTcfwhuBiW+gqIOtK4RQen2YQMWSSbykCgh4GR
4AQEzuNsx6uoUGlWzpuCOK2fOXYazhmNcDQ3QGsx4t5ZFtw2ta6dwGPv7h4k
i1rnQy3YALnCCa3JYhScgCiITxD41Qw8c5FSPA70D3EiM2Y1I53OwO60Y+Fk
M7C0Cc/sC5GlRWhcNgh6LcKJNLMKJ8C+v8ALYMDZQeEEVDKUY/5MTHFXQUfk
8wT4vlYrFrhNiJK8PtrjAemea52BtlN88qClNdmRGTQcim66oJDtevP5Hld5
aYuJFnSVORGLxZEiUIHxIA/scspO2WwWTdMmcRd2nYziqV1+iFoNJJqiVuIP
FCVa8iyBcwqCUvDE4ff2QKIPjW1zoeZyBD6PB64vw8JJZg7s/a49XOPVNZWo
qClHqdMB5pExfwABMiYLZFrHs2DZfa1nPcAGMX6CIn0D9wBZykkkyiucmN06
g18PBcMUSCH09hzBjOumoX2yFSeGo/j7wbFz4DXSWesLZ2UEeHuOIUYPd9aU
ITLgRS6ZhBwLo6Z1NpbOdJ0Fv49kM2mKG/WNtfx3zHgf79mPcQLPvMusz7MQ
KeZTW4mtr/ypn+TjVs6Tkt6gRzPFwcSi46MBRCJRTG5u5J9//rIHB4eiEDRM
PlIRvFgAz/8E+A6fQKD/NMknz1Opmpcp4I24fXk7Hu+Yz9dhub2EvM9GJBTF
Ic9hCuAwByxMBHGBhPeWu37aOIFZOp/Ad+5YPECHuxXSqUIPU/IqqOrhzGkf
zWE4qL8xECF2PUsWMxGI2XU2vLm7D6lkCvlMBvkszXQaueKUaSq5LMIDRCBL
5zRVusdi1OCFR1ZCzxIBDV3xGA5G4Bsa4QmkoakeVIt4So9QbBSt3fHi5reP
XrSZe33D77eTyNqZzmsaqlFVUwFXuZNbiMnIRgvGogmyUgTuyfUwlhjRfXAI
v3hux1nrs+Cd8MBEFKTo/pHeXtK8zL2w+dmf4evzmnlcCMI5GIoqIC1LvHIH
/GMY9p5CMhri1qfRtazj4UXn49V8kgAB7TAY9T0y5eG+Iydx9FAf5V4JZUSi
uq6K0qcFBqOBNJvFqT4vps6aggWzanHL7Cr8Y9excyn0EwQysSiy8QivAw/d
fyfa5k4Ba1/S5CHWh6VzRiSyOqSyInRSGmaTCkO5DjqUo78viXQqHU6lMh2X
1E6/8pffLBcFYQvRhr2igfRqRonNiWQsBK2koqbKClHJUJCFQK0IVe4aHi+P
PrsVU+rLMLWhCs3ualjoGhs9fT4MDY/hva07YDUb8NjD3+MByaTirKyFoq9G
lncaOejFFDKySnbIIzA6gtCwl7JhFOFAZMVdP/515yXvB17+82OrKZ1tYHrX
6o0wWUthLydJ1TfBbHNQA5ZHzH8Kgyd60UQBzaq3qhQD31xBUtLx1VXKaCyQ
c3KSYiRGX+S41EJB6muMVbBXToLM0inNNHWqw94TCPrPkGwCSJPHCvlf7Ljn
J49s/DSc0sUIbH5ru+fOm26wU9mZL0gaWJ2VpHcr9UcyZ603WWAprUZZbROi
oSB0GoXn6xyv5iztSzx4WXVPxceQToQIpMxlw4xirZoDc2kVJhJGkpq8oN/H
a0g2TV5IsRlnilt774Prn74YTumz+u/OrTvfWXrzjQO5bGZ5ZHyEgPr591Zn
BcWFltcLjVYPq8OBVGSYg2cNoJyhTCPoCHCGYiVFlgzzFkUpTlaNzWXUotC9
GcpyskyTMti47zR8pw4jHgkgHhpjAunoeOi3T38WRul/bSLe+NdOj5zTRqbN
mrWkup6qsEYDrU5fmESCVdl0yEvpMsHBs2YwR1qW0yztiWT9EK+sBfBkbVXl
xBWV2gTJyL/nWibLcw/Rx2ROQjCj++MDD/3qd1dkT1xdcaM7nenrX0j9y5JF
bWhongmT2QpnRTVMUpy0HS5Io1j8WGpUi50nI3h+YyeKhV6JpUWjww3B4EIs
HMTpvkMYPHUcb76zA90f9kKn1TYO+we9V2xTX2Kq2JJXs8uN1LjdfEMrftSx
HDX11Ryckit0sSq3dMHCBQIoEii+AhEKbYZYJMDbYr0VR3r78NeXOvHuzo+Q
IklpNeLGWDzYcSm4pEve/UPcQw9es3JpO1bcsQAGIkJ5mUArvEtkWYRvNBiZ
847KWfkUtM/IFdthJGJJkliEUqsejlIr9nqOIZ5IwmTQrUimEuErSiCvZMPl
rjKhdbq73UobjxCVfNYdhkNxJBJZrn8N9UMF8IWN0UTg5ouZRy2es9+MjATR
f7IfoyNjGBn2UwvCLC/hSN/p9aHIWOcX9l7IaHBsLykxtn/71jbMnzuV+qMK
6llm4YP3d6LnyHGsWtJG/ZKuGAfnPYie1ENV/b3ufbhn1QqqHVNxaG93YafX
tQ879vRSRsp0xeKBRV/omzmqlisSyZTnpTe6MXBmDAIVptpJzSirKMfenl48
9+q7iMYSlBpzxSnz4+HjXrz29h6MUGvsqqiC2WKBiVqSrf/ej7e7Pew+T4XL
uuILf7WYpUae9L6Iik9ngjbtIpWsvJzG3Ou/gVu/+TXSdQQfHzhWKGoEnh0F
Ct5/vruLWgsJq1bcijlfaaO2JEg9kBHD/iBJK9dZVmpedMLbH/5/8Vz2q8Vt
f3tqDbXUD1Kj57bYXZjdtoTiIoh4eIy2npXw7HyDKmqa31vbNBPlddOon/Gh
sq4JmXgAvXu38WD2B8Jho1bTuvK+X17WGzrN5RIwW0o2UsD+gGldkRPY370Z
NmcVgW2hSl2FsupJ8B47wO+tmzwTrqp6pMJDGDq6GwmqtCW0l2CjRqvxUAds
v1wcl01Ao9W4yfprJz7TlrBdTkeWUePXwj5bHC7KTDkezAw8J01NYDw45DGY
DF1k/Qhd81Jr7qZNC3tl6PlSvO4mUMtphkaH+tUXn1inbnn+cZWNdDLRP9C7
s/1L//8Bqswshy9iKZTVBkOJhYqZ7PGf3NnaMPPGri89gSIJz8hg/3pWxBLx
GHZt27q2fvaSMK62cffd391Cc80X+h+aa//ovkbgGoFrBK4R+DzjPwIMAJH8
nEzLJzdlAAAAAElFTkSuQmCC

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@ -0,0 +1,6 @@
chrome.jar:
% content branding %content/branding/
content/branding/about.png (about.png)
content/branding/logoWordmark.png (logoWordmark.png)
content/branding/logo.png (logo.png)
content/branding/favicon32.png (favicon32.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,47 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Mozilla Browser code.
#
# The Initial Developer of the Original Code is
# Benjamin Smedberg <benjamin@smedbergs.us>
# Portions created by the Initial Developer are Copyright (C) 2004
# 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 *****
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = mobile/branding/nightly/locales
include $(DEPTH)/config/autoconf.mk
DEFINES += -DAB_CD=$(AB_CD)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,4 @@
<!ENTITY brandShortName "Aurora">
<!ENTITY brandFullName "Mozilla Aurora">
<!ENTITY vendorShortName "Mozilla">
<!ENTITY logoTrademark "">

View File

@ -0,0 +1,2 @@
brandShortName=Aurora
brandFullName=Mozilla Aurora

View File

@ -0,0 +1,7 @@
#filter substitution
@AB_CD@.jar:
% locale branding @AB_CD@ %locale/branding/
# Nightly branding only exists in en-US
locale/branding/brand.dtd (en-US/brand.dtd)
* locale/branding/brand.properties (en-US/brand.properties)

Some files were not shown because too many files have changed in this diff Show More