Difference between revisions of "User:Minooz/OSD600/FF"

From CDOT Wiki
Jump to: navigation, search
(Firefox Bug)
(Firefox Build)
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
='''Tasks for Firefox'''=
='''FIREFOX'''=
+
==Firefox Build==
==My works on firefox stuff==
 
===Firefox Build===
 
 
For building firefox I followed the instructions on [http://annasob.wordpress.com/category/build/ annasob's blog]on how to build firefox on different platforms, also looked at build instructions and prerequisites @[https://developer.mozilla.org/En/Developer_Guide/Build_Instructions Mozilla Developing Center(MDC)].
 
For building firefox I followed the instructions on [http://annasob.wordpress.com/category/build/ annasob's blog]on how to build firefox on different platforms, also looked at build instructions and prerequisites @[https://developer.mozilla.org/En/Developer_Guide/Build_Instructions Mozilla Developing Center(MDC)].
 
I didn't figure out why it was so slow though on both Vista and Win 7.
 
I didn't figure out why it was so slow though on both Vista and Win 7.
 
 
First, I tried to build firefox on Vista:
 
First, I tried to build firefox on Vista:
: Intel(R) Processor D CPU 2.17 GHz  
+
:Intel(R) Processor D CPU 2.17 GHz - 2GB DDR2 memory - Windows Vista 32bit - Visual Studio 2010  
: 2GB DDR2 memory  
 
: Windows Vista 32bit
 
: Visual Studio 2010  
 
 
 
 
and this was my .mozconfig:
 
and this was my .mozconfig:
 
:<code>. $topsrcdir/browser/config/mozconfig</code>
 
:<code>. $topsrcdir/browser/config/mozconfig</code>
Line 17: Line 10:
 
:<code>mk_add_options MOZ_MAKE_FLAGS="-j2"</code>
 
:<code>mk_add_options MOZ_MAKE_FLAGS="-j2"</code>
 
:<code>mk_add_options MOZ_CO_PROJECT=browser</code>
 
:<code>mk_add_options MOZ_CO_PROJECT=browser</code>
 
 
:<code>ac_add_options --enable-application=browser</code>
 
:<code>ac_add_options --enable-application=browser</code>
 
:<code>ac_add_options --disable-optimize</code>
 
:<code>ac_add_options --disable-optimize</code>
 
:<code>ac_add_options --enable-debug </code>
 
:<code>ac_add_options --enable-debug </code>
 
 
Then I started to build it on Windows 7:
 
Then I started to build it on Windows 7:
: Intel(R) Processor D CPU 3.20 GHz  
+
:Intel(R) Processor D CPU 3.20 GHz - 4GB DDR2 memory - Windows 7 64bit - Visual Studio 2008  
: 4GB DDR2 memory  
 
: Windows 7 64bit
 
: Visual Studio 2008  
 
 
 
 
I tried to build based on the same .mozconfig file, but the first error I got was related to SDK. I needed to upgrade SDK version based on these [https://developer.mozilla.org/En/Windows_SDK_versions recommendations] to SDK 7, and the .Net Framework to 4. Also I needed to change the SDK version in the SDK configuration tool to 7.1.  
 
I tried to build based on the same .mozconfig file, but the first error I got was related to SDK. I needed to upgrade SDK version based on these [https://developer.mozilla.org/En/Windows_SDK_versions recommendations] to SDK 7, and the .Net Framework to 4. Also I needed to change the SDK version in the SDK configuration tool to 7.1.  
 
 
At the end, the build was successfully done after 2 hours on Win 7 and more than 4 hours on Vista!
 
At the end, the build was successfully done after 2 hours on Win 7 and more than 4 hours on Vista!
[[File:Minefield_final.jpg|thumb|none|300px]]
+
[[File:minefield_final.jpg|thumb|none|100px]]
 
+
------------------------------------------
 
 
 
 
  
===Firefox practice (Tabs)===
+
== Firefox practice (Tabs)==
 
:Source Control: mercurial
 
:Source Control: mercurial
 
:Blog: @ [http://Minooz.wordpress.com wordpress]
 
:Blog: @ [http://Minooz.wordpress.com wordpress]
 
+
* '''problem1'''
* problem
 
 
: Open a new tab right beside the selected tab.
 
: Open a new tab right beside the selected tab.
 
: Target file to be changed @[http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml mozilla-central]
 
: Target file to be changed @[http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml mozilla-central]
 +
* Patch
 +
: [[User:Minooz/OSD600/FF/patchNewTab | patchMoz_newTab]]
 +
* '''problem2'''
 +
: Instead of using alt+tab+num to switch between open tabs, use ctr+tab+num.
 +
: Target file to be changed @[http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser-sets.inc mozilla-central]
 +
* Patch
 +
: [[User:Minooz/OSD600/FF/patchCtrlTab | patchMoz CtrlTab]]
 +
------------------------------------------
  
* Patches
+
== Firefox Bug (WhiteSpaces)==
: 1- patchMoz_Mar
 
 
 
<source lang="java">
 
 
 
iff -r cd84bf75a03a browser/base/content/tabbrowser.xml
 
--- a/browser/base/content/tabbrowser.xml Wed Mar 30 17:41:25 2011 -0400
 
+++ b/browser/base/content/tabbrowser.xml Wed Mar 30 17:52:21 2011 -0400
 
@@ -1335,27 +1335,24 @@
 
            // activeness in the tab switcher.
 
 
 
 
 
-            if ((aRelatedToCurrent == null ? aReferrerURI : aRelatedToCurrent) &&
 
-                Services.prefs.getBoolPref("browser.tabs.insertRelatedAfterCurrent")) {
 
              let newTabPos = (this._lastRelatedTab ||
 
                                this.selectedTab)._tPos + 1;
 
              if (this._lastRelatedTab)
 
                this._lastRelatedTab.owner = null;
 
              else
 
                t.owner = this.selectedTab;
 
              this.moveTabTo(t, newTabPos);
 
              this._lastRelatedTab = t;
 
-            }
 
</source>
 
 
 
===Firefox Bug (WhiteSpaces)===
 
 
:Source Control: mercurial
 
:Source Control: mercurial
 
:BugTracker: bugzilla
 
:BugTracker: bugzilla
 
:Blog: @ [http://Minooz.wordpress.com wordpress]
 
:Blog: @ [http://Minooz.wordpress.com wordpress]
 
+
* '''Bugs'''
* Bugs
 
 
: Make is_space() in nsImageMap.cpp HTML5-compliant. Ticket @[https://bugzilla.mozilla.org/show_bug.cgi?id=565031 bugzilla #565031]
 
: Make is_space() in nsImageMap.cpp HTML5-compliant. Ticket @[https://bugzilla.mozilla.org/show_bug.cgi?id=565031 bugzilla #565031]
 
: Target file to be changed @ [http://mxr-test.konigsberg.mozilla.org/mozilla-central/source/layout/generic/nsImageMap.cpp#110 mozilla-central]
 
: Target file to be changed @ [http://mxr-test.konigsberg.mozilla.org/mozilla-central/source/layout/generic/nsImageMap.cpp#110 mozilla-central]
 
* Documentation
 
:
 
 
 
* Helpful tips
 
* Helpful tips
:  
+
: [http://mxr.mozilla.org/mozilla-central/source/layout/generic/test/test_bug448860.html?force=1 sample bug_test_1]- [http://mxr.mozilla.org/mozilla-central/source/layout/generic/test/test_bug290397.html?force=1 sample_2]- [http://mxr.mozilla.org/mozilla-central/source/layout/generic/test/test_bug416168.html sample_3]
 
+
* Patches for ''nsImageMap.cpp''
* Patches
+
: [[User:Minooz/OSD600/FF/patch565031#Apr6 | patchMoz_Apr6]]
 
+
: Still working...[[User:Minooz/OSD600/FF/patch565031#Apr16 | patchMoz_Apr16]]
: 1- patchMoz_Apr6
+
* Test Page
 
+
: [[User:Minooz/OSD600/FF/test565031 | test_bug560531.html]]
<source lang="java">
 
 
 
diff -r ec44e31cc46b layout/generic/nsImageMap.cpp
 
--- a/layout/generic/nsImageMap.cpp Wed Mar 30 20:48:32 2011 -0400
 
+++ b/layout/generic/nsImageMap.cpp Wed Apr 06 22:11:22 2011 -0400
 
@@ -107,18 +107,21 @@ Area::~Area()
 
  delete [] mCoords;
 
}
 
 
#include <stdlib.h>
 
 
inline PRBool
 
is_space(char c)
 
{
 
-  return (c == ' ' ||
 
-          c == '\f' ||
 
+  return (c == ' ');
 
+}
 
+not_space(char c)
 
+{
 
+  return (c == '\f' ||
 
          c == '\n' ||
 
          c == '\r' ||
 
          c == '\t' ||
 
          c == '\v');
 
}
 
 
static void logMessage(nsIContent*      aContent,
 
                        const nsAString& aCoordsSpec,
 
@@ -181,21 +184,33 @@ void Area::ParseCoords(const nsAString&
 
    while (*n_str != '\0')
 
    {
 
      PRBool has_comma;
 
 
      /*
 
        * Skip to a separator
 
        */
 
      tptr = n_str;
 
-      while (!is_space(*tptr) && *tptr != ',' && *tptr != '\0')
 
+      while (!is_space(*tptr) && *tptr != ',' && *tptr != ';' && *tptr != '\0')
 
      {
 
-        tptr++;
 
+        if (not_space(*tptr))
 
+        {
 
+          break;
 
+        }
 
+        else
 
+        {
 
+          tptr++;
 
+        }
 
      }
 
      n_str = tptr;
 
+     
 
+      if (*tptr == ';')
 
+      {
 
+        *tptr = ',';
 
+      }
 
   
 
      /*
 
        * If no more entries, break out here
 
        */
 
      if (*n_str == '\0')
 
      {
 
        break;
 
      }
 
@@ -256,17 +271,17 @@ void Area::ParseCoords(const nsAString&
 
    {
 
      return;
 
    }
 
 
    /*
 
      * Second pass to copy integer values into list.
 
      */
 
    tptr = cp;
 
-    for (i=0; i<cnt; i++)
 
+    for (i = 0; i < cnt; i++)
 
    {
 
      char *ptr;
 
 
      ptr = strchr(tptr, ',');
 
      if (ptr)
 
      {
 
        *ptr = '\0';
 
      }
 
 
 
</source>
 
 
------------------------------------------------
 
------------------------------------------------

Latest revision as of 22:40, 2 June 2011

Tasks for Firefox

Firefox Build

For building firefox I followed the instructions on annasob's blogon how to build firefox on different platforms, also looked at build instructions and prerequisites @Mozilla Developing Center(MDC). I didn't figure out why it was so slow though on both Vista and Win 7. First, I tried to build firefox on Vista:

Intel(R) Processor D CPU 2.17 GHz - 2GB DDR2 memory - Windows Vista 32bit - Visual Studio 2010

and this was my .mozconfig:

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-release
mk_add_options MOZ_MAKE_FLAGS="-j2"
mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser
ac_add_options --disable-optimize
ac_add_options --enable-debug

Then I started to build it on Windows 7:

Intel(R) Processor D CPU 3.20 GHz - 4GB DDR2 memory - Windows 7 64bit - Visual Studio 2008

I tried to build based on the same .mozconfig file, but the first error I got was related to SDK. I needed to upgrade SDK version based on these recommendations to SDK 7, and the .Net Framework to 4. Also I needed to change the SDK version in the SDK configuration tool to 7.1. At the end, the build was successfully done after 2 hours on Win 7 and more than 4 hours on Vista!

Minefield final.jpg

Firefox practice (Tabs)

Source Control: mercurial
Blog: @ wordpress
  • problem1
Open a new tab right beside the selected tab.
Target file to be changed @mozilla-central
  • Patch
patchMoz_newTab
  • problem2
Instead of using alt+tab+num to switch between open tabs, use ctr+tab+num.
Target file to be changed @mozilla-central
  • Patch
patchMoz CtrlTab

Firefox Bug (WhiteSpaces)

Source Control: mercurial
BugTracker: bugzilla
Blog: @ wordpress
  • Bugs
Make is_space() in nsImageMap.cpp HTML5-compliant. Ticket @bugzilla #565031
Target file to be changed @ mozilla-central
  • Helpful tips
sample bug_test_1- sample_2- sample_3
  • Patches for nsImageMap.cpp
patchMoz_Apr6
Still working... patchMoz_Apr16
  • Test Page
test_bug560531.html