Difference between revisions of "User:Pcallaghan"

From CDOT Wiki
Jump to: navigation, search
m (added link to fsoss paper)
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Peter Callaghan =
+
== Contributions to other projects ==
 +
<ul>
 +
<li>Corrected the location of diffutils in the cygwin listing on MDCs [http://developer.mozilla.org/en/docs/Windows_build_prerequisites_using_cygwin Windows build prerequisites using cygwin]</li>
 +
<li>Tested two computers for Canvas3d</li>
 +
<li>Provided python advice to the [[Automated localization build tool]] team.</li>
 +
<li>Tested and offered advice for several iterations of the [[Radio Button Bookmarks Extension]]</li>
 +
</ul>
  
== Email ==
+
== FSOSS paper ==
pcallagh@learn.senecac.on.ca
+
[[Open content at fsoss07]]
 +
 
 +
==Thunderbird Bug Lab==
 +
Stops thunderbird from reporting everything that has '@' and at least one '.' in it as a mailto link.  For example S@Y...5PM should not be considered an email.  The answer is to simply ignore anything with more than one consecutive '.' in it.  See [http://landfill.bugzilla.org/bugzilla-3.0-branch/show_bug.cgi?id=6024 landfill bug #6024]
 +
 
 +
<pre>
 +
? objdir-tbird-debug
 +
? pcallagh.diff
 +
? security/nss/cmd/shlibsign/NONE
 +
? security/nss/cmd/shlibsign/mangle/NONE
 +
? security/nss/lib/ckfw/builtins/NONE
 +
? security/nss/lib/ckfw/capi/NONE
 +
? security/nss/lib/freebl/NONE
 +
? security/nss/lib/nss/NONE
 +
? security/nss/lib/smime/NONE
 +
? security/nss/lib/softoken/NONE
 +
? security/nss/lib/softoken/legacydb/NONE
 +
? security/nss/lib/ssl/NONE
 +
Index: netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
 +
===================================================================
 +
RCS file: /cvsroot/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp,v
 +
retrieving revision 1.85
 +
diff -u -8 -p -r1.85 mozTXTToHTMLConv.cpp
 +
--- netwerk/streamconv/converters/mozTXTToHTMLConv.cpp 11 Mar 2007 00:17:00 -0000 1.85
 +
+++ netwerk/streamconv/converters/mozTXTToHTMLConv.cpp 5 Nov 2007 23:41:21 -0000
 +
@@ -181,17 +181,17 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL
 +
  if (pos >= aInLength)
 +
    return;
 +
 +
  if (aInString[pos] == '@')
 +
  {
 +
    // only pre-pend a mailto url if the string contains a .domain in it..
 +
    //i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
 +
    nsDependentString inString(aInString, aInLength);
 +
-    if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
 +
+    if (inString.FindChar('.', pos) != kNotFound && inString.Find("..") == kNotFound) // if we have a '.' after the @ sign, but no '..' anywhwere
 +
    {
 +
      aOutString.AssignLiteral("mailto:");
 +
      aOutString += aInString;
 +
    }
 +
  }
 +
  else if (aInString[pos] == '.')
 +
  {
 +
    if (ItMatchesDelimited(aInString, aInLength,
 +
</pre>
 +
 
 +
And of course, the chain of comments involved:
 +
<pre>
 +
Description:    Opened: 2007-11-08 08:49
 +
 
 +
Thunderbird makes many things with a . and an @ (for example s@Y...5pm) into a
 +
mailto link.
 +
 
 +
------- Comment #1 From pcallaghan 2007-11-08 09:10:49 -------
 +
 
 +
Created an attachment (id=799) [details]
 +
stops anything with .. in it from being a mailto link
 +
 
 +
------- Comment #2 From Lukas Blakk 2007-11-08 10:11:22 -------
 +
 
 +
(From update of attachment 799 [details])
 +
great patch, one line wonder.
 +
</pre>
  
== About me ==
+
==Tabs Lab==
* Graduated CPA in April 2006
+
opens new tabs adjacent to the current tab, rather than at the end all the current tabs.
* Transferred to BSD in Sept 2006
+
Still has problems with closing tabs.  Sometimes they close, sometimes they don't.
* Currently enrolled in DPS909
+
I thought it had something to do with line 1234.
 +
<pre>
 +
? tabslab.diff
 +
Index: content/tabbrowser.xml
 +
===================================================================
 +
RCS file: /cvsroot/mozilla/browser/base/content/tabbrowser.xml,v
 +
retrieving revision 1.243
 +
diff -u -8 -p -r1.243 tabbrowser.xml
 +
--- content/tabbrowser.xml 18 Sep 2007 00:59:41 -0000 1.243
 +
+++ content/tabbrowser.xml 7 Nov 2007 17:42:50 -0000
 +
@@ -1088,17 +1088,17 @@
 +
            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,18 +1173,18 @@
 +
            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);
 +
-
 +
+            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 */
 +
 +
@@ -1234,17 +1234,17 @@
 +
            b.addEventListener("DOMTitleChanged", this.onTitleChanged, true);
 +
 +
            if (this.mStrip.collapsed)
 +
              this.setStripVisibilityTo(true);
 +
 +
            this.mPrefs.setBoolPref("browser.tabs.forceHide", false);
 +
 +
            // wire up a progress listener for the new browser object.
 +
-            var position = this.mTabContainer.childNodes.length-1;
 +
+            var position = currentTabIndex + 1;
 +
            var tabListener = this.mTabProgressListener(t, b, blank);
 +
            const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
 +
                                      .createInstance(Components.interfaces.nsIWebProgress);
 +
            filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
 +
            b.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
 +
            this.mTabListeners[position] = tabListener;
 +
            this.mTabFilters[position] = filter;
 +
  
== FSOSS paper ==
+
</pre>
[[Open content at fsoss07]]
+
 
 +
== Extension Lab ==
 +
[http://zenit.senecac.on.ca/wiki/imgs/Addtabbeside-Callaghan.xpi extension lab]
 +
 
 +
== XPCOM Lab ==
 +
[http://zenit.senecac.on.ca/wiki/imgs/Firstxpcom-callaghan.zip xpcom lab]

Latest revision as of 12:53, 4 December 2008

Contributions to other projects

FSOSS paper

Open content at fsoss07

Thunderbird Bug Lab

Stops thunderbird from reporting everything that has '@' and at least one '.' in it as a mailto link. For example S@Y...5PM should not be considered an email. The answer is to simply ignore anything with more than one consecutive '.' in it. See landfill bug #6024

? objdir-tbird-debug
? pcallagh.diff
? security/nss/cmd/shlibsign/NONE
? security/nss/cmd/shlibsign/mangle/NONE
? security/nss/lib/ckfw/builtins/NONE
? security/nss/lib/ckfw/capi/NONE
? security/nss/lib/freebl/NONE
? security/nss/lib/nss/NONE
? security/nss/lib/smime/NONE
? security/nss/lib/softoken/NONE
? security/nss/lib/softoken/legacydb/NONE
? security/nss/lib/ssl/NONE
Index: netwerk/streamconv/converters/mozTXTToHTMLConv.cpp
===================================================================
RCS file: /cvsroot/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp,v
retrieving revision 1.85
diff -u -8 -p -r1.85 mozTXTToHTMLConv.cpp
--- netwerk/streamconv/converters/mozTXTToHTMLConv.cpp	11 Mar 2007 00:17:00 -0000	1.85
+++ netwerk/streamconv/converters/mozTXTToHTMLConv.cpp	5 Nov 2007 23:41:21 -0000
@@ -181,17 +181,17 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL
   if (pos >= aInLength)
     return;
 
   if (aInString[pos] == '@')
   {
     // only pre-pend a mailto url if the string contains a .domain in it..
     //i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
     nsDependentString inString(aInString, aInLength);
-    if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
+    if (inString.FindChar('.', pos) != kNotFound && inString.Find("..") == kNotFound) // if we have a '.' after the @ sign, but no '..' anywhwere
     {
       aOutString.AssignLiteral("mailto:");
       aOutString += aInString;
     }
   }
   else if (aInString[pos] == '.')
   {
     if (ItMatchesDelimited(aInString, aInLength,

And of course, the chain of comments involved:

 Description:    	 Opened: 2007-11-08 08:49

Thunderbird makes many things with a . and an @ (for example s@Y...5pm) into a
mailto link.

------- Comment #1 From pcallaghan 2007-11-08 09:10:49 -------

Created an attachment (id=799) [details]
stops anything with .. in it from being a mailto link

------- Comment #2 From Lukas Blakk 2007-11-08 10:11:22 -------

(From update of attachment 799 [details])
great patch, one line wonder.

Tabs Lab

opens new tabs adjacent to the current tab, rather than at the end all the current tabs. Still has problems with closing tabs. Sometimes they close, sometimes they don't. I thought it had something to do with line 1234.

? tabslab.diff
Index: content/tabbrowser.xml
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/tabbrowser.xml,v
retrieving revision 1.243
diff -u -8 -p -r1.243 tabbrowser.xml
--- content/tabbrowser.xml	18 Sep 2007 00:59:41 -0000	1.243
+++ content/tabbrowser.xml	7 Nov 2007 17:42:50 -0000
@@ -1088,17 +1088,17 @@
             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,18 +1173,18 @@
             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);
-
+            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 */
 
@@ -1234,17 +1234,17 @@
             b.addEventListener("DOMTitleChanged", this.onTitleChanged, true);
 
             if (this.mStrip.collapsed)
               this.setStripVisibilityTo(true);
 
             this.mPrefs.setBoolPref("browser.tabs.forceHide", false);
 
             // wire up a progress listener for the new browser object.
-            var position = this.mTabContainer.childNodes.length-1;
+            var position = currentTabIndex + 1;
             var tabListener = this.mTabProgressListener(t, b, blank);
             const filter = Components.classes["@mozilla.org/appshell/component/browser-status-filter;1"]
                                      .createInstance(Components.interfaces.nsIWebProgress);
             filter.addProgressListener(tabListener, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
             b.webProgress.addProgressListener(filter, Components.interfaces.nsIWebProgress.NOTIFY_ALL);
             this.mTabListeners[position] = tabListener;
             this.mTabFilters[position] = filter;
 

Extension Lab

extension lab

XPCOM Lab

xpcom lab