merge m-c into fx-team
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 13 Sep 2011 16:47:04 -0700
changeset 76953 481ae485e38638f2b096abb1e0ebf667ef05c000
parent 76952 0a36d58f2b4f4cb09769a7646df923ca867322d1 (current diff)
parent 76916 cfd1e3533f0fa335aaf5ca3a5904a07b41396ec4 (diff)
child 76954 846f2fbc411070d92c118c05b60d63c27cc0cd19
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
milestone9.0a1
merge m-c into fx-team
mobile/chrome/tests/browser_preferences_fulltoggle.js
--- a/accessible/src/base/NotificationController.h
+++ b/accessible/src/base/NotificationController.h
@@ -36,16 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 #ifndef NotificationController_h_
 #define NotificationController_h_
 
 #include "AccEvent.h"
 #include "nsCycleCollectionParticipant.h"
+#include "nsRefreshDriver.h"
 
 class nsAccessible;
 class nsDocAccessible;
 class nsIContent;
 
 // Uncomment to log notifications processing.
 //#define DEBUG_NOTIFICATIONS
 
new file mode 100644
--- /dev/null
+++ b/editor/libeditor/html/crashtests/414178-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script type="text/javascript">
+
+function boom()
+{
+  var table = document.createElement("table");
+  document.body.appendChild(table);
+  table.contentEditable = "true";
+  table.focus();
+  try {
+    // This will throw, since it's attempting to inject a list inside a table
+    document.execCommand("insertunorderedlist", false, null);
+  } catch (e) {}
+}
+
+</script>
+</head>
+
+<body onload="boom();"></body>
+</html>
--- a/editor/libeditor/html/crashtests/crashtests.list
+++ b/editor/libeditor/html/crashtests/crashtests.list
@@ -1,12 +1,13 @@
 load 336081-1.xhtml
 load 382778-1.html
 load 407074-1.html
 load 407277-1.html
+load 414178-1.html
 load 418923-1.html
 asserts(0-16) load 420439.html # Bug 439258
 load 428489-1.html
 asserts(0-16) load 431086-1.xhtml # Bug 439258
 load 448329-1.html
 load 448329-2.html
 load 448329-3.html
 load 456727-1.html
--- a/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -7330,16 +7330,23 @@ nsHTMLEditRules::SplitAsNeeded(const nsA
   nsresult res = NS_OK;
    
   // check that we have a place that can legally contain the tag
   while (!tagParent)
   {
     // sniffing up the parent tree until we find 
     // a legal place for the block
     if (!parent) break;
+    // Don't leave the active editing host
+    if (!mHTMLEditor->IsNodeInActiveEditor(parent)) {
+      nsCOMPtr<nsIContent> parentContent = do_QueryInterface(parent);
+      if (parentContent != mHTMLEditor->GetActiveEditingHost()) {
+        break;
+      }
+    }
     if (mHTMLEditor->CanContainTag(parent, *aTag))
     {
       tagParent = parent;
       break;
     }
     splitNode = parent;
     parent->GetParentNode(getter_AddRefs(temp));
     parent = temp;
--- a/ipc/ipdl/ipdl.py
+++ b/ipc/ipdl/ipdl.py
@@ -77,17 +77,17 @@ allprotocols = []
 
 def normalizedFilename(f):
     if f == '-':
         return '<stdin>'
     return f
 
 # First pass: parse and type-check all protocols
 for f in files:
-    log(1, os.path.basename(f))
+    log(2, os.path.basename(f))
     filename = normalizedFilename(f)
     if f == '-':
         fd = sys.stdin
     else:
         fd = open(f)
 
     specstring = fd.read()
     fd.close()
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -6168,17 +6168,17 @@ END_CASE(JSOP_ARRAYPUSH)
   forced_return:
     /*
      * Unwind the scope making sure that interpReturnOK stays false even when
      * UnwindScope returns true.
      *
      * When a trap handler returns JSTRAP_RETURN, we jump here with
      * interpReturnOK set to true bypassing any finally blocks.
      */
-    interpReturnOK &= UnwindScope(cx, 0, interpReturnOK || cx->isExceptionPending());
+    interpReturnOK &= (JSBool)UnwindScope(cx, 0, interpReturnOK || cx->isExceptionPending());
     JS_ASSERT(regs.sp == regs.fp()->base());
 
     if (entryFrame != regs.fp())
         goto inline_return;
 
   exit:
     interpReturnOK = ScriptEpilogueOrGeneratorYield(cx, regs.fp(), interpReturnOK);
     regs.fp()->setFinishedInInterpreter();
--- a/layout/base/nsPresShell.h
+++ b/layout/base/nsPresShell.h
@@ -68,16 +68,17 @@
 #include "nsCRT.h"
 #include "nsAutoPtr.h"
 #include "nsIWidget.h"
 #include "nsStyleSet.h"
 #include "nsPresArena.h"
 #include "nsFrameSelection.h"
 #include "nsGUIEvent.h"
 #include "nsContentUtils.h"
+#include "nsRefreshDriver.h"
 
 class nsIRange;
 class nsIDragService;
 class nsCSSStyleSheet;
 
 struct RangePaintInfo;
 struct nsCallbackEventRequest;
 #ifdef MOZ_REFLOW_PERF
--- a/mobile/app/mobile.js
+++ b/mobile/app/mobile.js
@@ -73,19 +73,21 @@ pref("toolkit.zoomManager.zoomValues", "
 // Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
 pref("browser.viewport.scaleRatio", -1);
 pref("browser.viewport.desktopWidth", 980);
 
 #ifndef ANDROID
 #ifndef MOZ_PLATFORM_MAEMO
 // On desktop builds, simulate an MDPI tablet by default.
 pref("layout.css.dpi", 160);
+#else
+// Maemo X11 lies about its dpi
+pref("layout.css.dpi", 240);
 #endif
 #endif
-
 /* allow scrollbars to float above chrome ui */
 pref("ui.scrollbarsCanOverlapContent", 1);
 
 /* use long press to display a context menu */
 pref("ui.click_hold_context_menus", true);
 
 /* cache prefs */
 pref("browser.cache.disk.enable", false);
--- a/mobile/chrome/content/bindings.xml
+++ b/mobile/chrome/content/bindings.xml
@@ -1847,45 +1847,9 @@
             }
           }
 
           ContextHelper.showPopup({ target: aTextbox, json: json });
         ]]></body>
       </method>
     </implementation>
   </binding>
-  
-  <binding id="setting-fulltoggle-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-bool">
-    <handlers>
-      <handler event="click" button="0" phase="capturing">
-        <![CDATA[
-        this.input.setChecked(!this.value);
-        this.inputChanged();
-        event.stopPropagation();
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="setting-fulltoggle-boolint" extends="chrome://mozapps/content/extensions/setting.xml#setting-boolint">
-    <handlers>
-      <handler event="click" button="0" phase="capturing">
-        <![CDATA[
-        this.input.setChecked(!this.value);
-        this.inputChanged();
-        event.stopPropagation();
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
-
-  <binding id="setting-fulltoggle-localized-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-localized-bool">
-    <handlers>
-      <handler event="click" button="0" phase="capturing">
-        <![CDATA[
-        this.input.setChecked(!this.value);
-        this.inputChanged();
-        event.stopPropagation();
-        ]]>
-      </handler>
-    </handlers>
-  </binding>
 </bindings>
--- a/mobile/chrome/content/browser.css
+++ b/mobile/chrome/content/browser.css
@@ -22,25 +22,25 @@ documenttab {
   -moz-binding: url("chrome://browser/content/tabs.xml#documenttab");
 }
 
 settings {
   -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#settings");
 }
 
 setting[type="bool"] {
-  -moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-bool");
+  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-bool");
 }
 
 setting[type="bool"][localized="true"] {
-  -moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-localized-bool");
+  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-localized-bool");
 }
 
 setting[type="boolint"] {
-  -moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-boolint");
+  -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-boolint");
 }
 
 setting[type="integer"] {
   -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-integer");
 }
 
 setting[type="control"] {
   -moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-control");
--- a/mobile/chrome/tests/Makefile.in
+++ b/mobile/chrome/tests/Makefile.in
@@ -69,17 +69,16 @@ include $(topsrcdir)/config/rules.mk
   browser_focus.js \
   browser_forms.html \
   $(warning browser_forms.js disabled due to failures) \
   browser_formsZoom.html \
   $(warning browser_formsZoom.js disabled due to failures) \
   browser_history.js \
   browser_mainui.js \
   browser_preferences_text.js \
-  browser_preferences_fulltoggle.js \
   browser_rect.js \
   browser_rememberPassword.js \
   browser_scroll.js \
   browser_scroll.html \
   browser_scrollbar.js \
   browser_select.html \
   browser_select.js \
   browser_sessionstore.js \
deleted file mode 100644
--- a/mobile/chrome/tests/browser_preferences_fulltoggle.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// browser-chrome test for fennec preferences to toggle values while clicking on the preference name
-
-var gTests = [];
-var gCurrentTest = null;
-
-function test() {
-  // The "runNextTest" approach is async, so we need to call "waitForExplicitFinish()"
-  // We call "finish()" when the tests are finished
-  waitForExplicitFinish();
-
-  // Start the tests
-  runNextTest();
-}
-//------------------------------------------------------------------------------
-// Iterating tests by shifting test out one by one as runNextTest is called.
-function runNextTest() {
-  // Run the next test until all tests completed
-  if (gTests.length > 0) {
-    gCurrentTest = gTests.shift();
-    info(gCurrentTest.desc);
-    gCurrentTest.run();
-  }
-  else {
-    // Cleanup. All tests are completed at this point
-    finish();
-  }
-}
-
-// -----------------------------------------------------------------------------------------
-// Verify preferences and text
-gTests.push({
-  desc: "Verify full toggle on Preferences",
-
-  run: function(){
-    // 1.Click preferences to view prefs
-    document.getElementById("tool-panel-open").click();
-    is(document.getElementById("panel-container").hidden, false, "Preferences should be visible");
-
-    var contentRegion = document.getElementById("prefs-content");
-
-    // Check for *Show images*
-    var imageRegion = document.getAnonymousElementByAttribute(contentRegion, "pref", "permissions.default.image");
-    var imageValue  = imageRegion.value;
-    var imageTitle  = document.getAnonymousElementByAttribute(imageRegion, "class", "preferences-title");
-    var imageButton = document.getAnonymousElementByAttribute(imageRegion, "anonid", "input");
-    imageButton.click();
-    is(imageRegion.value, !imageValue, "Tapping on input control should change the value");
-    imageTitle.click();
-    is(imageRegion.value, imageValue, "Tapping on the title should change the value"); 
-    imageRegion.click();
-    is(imageRegion.value, !imageValue, "Tapping on the setting should change the value"); 
-
-    BrowserUI.hidePanel();
-    is(document.getElementById("panel-container").hidden, true, "Preferences panel should be closed");
-    runNextTest();
-  }
-});
-
--- a/mobile/themes/core/gingerbread/browser.css
+++ b/mobile/themes/core/gingerbread/browser.css
@@ -1239,20 +1239,16 @@ pageaction:not([image]) > hbox >.pageact
 setting {
   padding: @padding_xsmall@;
   border-bottom: @border_width_tiny@ solid @color_divider_border@;
   min-height: @touch_row@; /* row size */
   -moz-box-align: center;
   -moz-box-orient: horizontal;
 }
 
-setting:hover:active {
-  background-color: @color_background_highlight@;
-}
-
 .setting-label {
   -moz-box-flex: 1;
 }
 
 .setting-group > setting {
   border-bottom: none;
 }