Open main menu

CDOT Wiki β

Changes

User:Rueen

3,058 bytes added, 17:28, 15 October 2007
Projects/Assignments
== Projects/Assignments ==
*[http://zenit.senecac.on.ca/wiki/index.php/Localization_-_en-CA en-CA Localization]
 
'''Modifying Firefox Lab'''
<pre>
Index: tabbrowser.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/tabbrowser.xml,v
retrieving revision 1.243
diff -u -8 -p -r1.243 tabbrowser.xml
--- tabbrowser.xml 18 Sep 2007 00:59:41 -0000 1.243
+++ tabbrowser.xml 15 Oct 2007 21:26:23 -0000
@@ -1073,32 +1073,41 @@
<parameter name="aURI"/>
<parameter name="aReferrerURI"/>
<parameter name="aCharset"/>
<parameter name="aPostData"/>
<parameter name="aLoadInBackground"/>
<parameter name="aAllowThirdPartyFixup"/>
<body>
<![CDATA[
+
+
+
+
+
+
var bgLoad = (aLoadInBackground != null) ? aLoadInBackground :
this.mPrefs.getBoolPref("browser.tabs.loadInBackground");
var owner = bgLoad ? null : this.selectedTab;
var tab = this.addTab(aURI, aReferrerURI, aCharset, aPostData, owner,
aAllowThirdPartyFixup);
// Set newly selected tab after quick timeout, otherwise hideous focus problems
// can occur when "browser.tabs.loadInBackground" is false and presshell is not ready
if (!bgLoad) {
function selectNewForegroundTab(browser, tab) {
browser.selectedTab = tab;
}
setTimeout(selectNewForegroundTab, 0, getBrowser(), tab);
}
if (!bgLoad)
this.selectedTab = tab;
+
+ var position = currentTabIndex + 1;
+
return tab;
]]>
</body>
</method>
<method name="loadTabs">
<parameter name="aURIs"/>
<parameter name="aLoadInBackground"/>
@@ -1173,19 +1182,24 @@
t.maxWidth = this.mTabContainer.mTabMaxWidth;
t.minWidth = this.mTabContainer.mTabMinWidth;
t.width = 0;
t.setAttribute("flex", "100");
t.setAttribute("validate", "never");
t.setAttribute("onerror", "this.parentNode.parentNode.parentNode.parentNode.addToMissedIconCache(this.getAttribute('image')); this.removeAttribute('image');");
t.className = "tabbrowser-tab";
- this.mTabContainer.appendChild(t);
-
- if (document.defaultView
+
+
+ var currentTabIndex = this.mTabContainer.selectedIndex;
+ this.mTabContainer.insertBefore(t, this.mTabContainer.childNodes.item(currentTabIndex + 1));
+
+
+
+ if (document.defaultView
.getComputedStyle(this.mTabContainer, "")
.direction == "rtl") {
/* In RTL UI, the tab is visually added to the left side of the
* tabstrip. This means the tabstip has to be scrolled back in
* order to make sure the same set of tabs is visible before and
* after the new tab is added */
this.mTabContainer.mTabstrip.scrollBoxObject
 
</pre>
== Other ==
1
edit