From 90f74823e713880256b0f49be3c665e4cab222b0 Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Tue, 14 May 2013 00:15:53 -0700 Subject: [PATCH 01/27] Bug 868312 - Rooting fixes for dom r=bz --- dom/base/nsDOMClassInfo.cpp | 4 +++- dom/base/nsGlobalWindow.cpp | 5 +++-- dom/plugins/base/nsJSNPRuntime.cpp | 23 +++++++++++++---------- dom/plugins/base/nsJSNPRuntime.h | 3 ++- dom/plugins/base/nsNPAPIPlugin.cpp | 3 ++- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 734f1f90e54a..918abe761708 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -5195,8 +5195,10 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, NS_IMETHODIMP nsWindowSH::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, - JSObject *obj) + JSObject *aObj) { + AutoSafeJSContext cx; + JS::Rooted obj(cx, aObj); nsCOMPtr sgo(do_QueryWrappedNative(wrapper)); NS_ENSURE_TRUE(sgo, NS_ERROR_UNEXPECTED); diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index a7cd596458b2..092ced9d6889 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -7468,9 +7468,10 @@ nsGlobalWindow::NotifyDOMWindowThawed(nsGlobalWindow* aWindow) { JSObject* nsGlobalWindow::GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) { - JSObject* handler = nullptr; + AutoSafeJSContext cx; + JS::Rooted handler(cx); if (mCachedXBLPrototypeHandlers.IsInitialized()) { - mCachedXBLPrototypeHandlers.Get(aKey, &handler); + mCachedXBLPrototypeHandlers.Get(aKey, handler.address()); } return handler; } diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index f0c7d4766623..34981d28ea02 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -142,7 +142,7 @@ NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp); static JSBool CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj, NPObject *npobj, - jsid id, NPVariant* getPropertyResult, JS::Value *vp); + JS::Handle id, NPVariant* getPropertyResult, JS::Value *vp); JSClass sNPObjectJSWrapperClass = { @@ -960,7 +960,7 @@ JSObjWrapperHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry, // static NPObject * -nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JSObject *obj) +nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JS::Handle obj) { if (!npp) { NS_ERROR("Null NPP passed to nsJSObjWrapper::GetNewOrUsed()!"); @@ -1084,16 +1084,17 @@ nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JSObject *obj) // compartment for callers that plan to hold onto the result or do anything // substantial with it. static JSObject * -GetNPObjectWrapper(JSContext *cx, JSObject *obj, bool wrapResult = true) +GetNPObjectWrapper(JSContext *cx, JSObject *aObj, bool wrapResult = true) { + JS::Rooted obj(cx, aObj); while (obj && (obj = js::CheckedUnwrap(obj))) { if (JS_GetClass(obj) == &sNPObjectJSWrapperClass) { - if (wrapResult && !JS_WrapObject(cx, &obj)) { + if (wrapResult && !JS_WrapObject(cx, obj.address())) { return NULL; } return obj; } - if (!::JS_GetPrototype(cx, obj, &obj)) { + if (!::JS_GetPrototype(cx, obj, obj.address())) { return NULL; } } @@ -1336,7 +1337,7 @@ NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMut } static JSBool -CallNPMethodInternal(JSContext *cx, JSObject *obj, unsigned argc, +CallNPMethodInternal(JSContext *cx, JS::Handle obj, unsigned argc, JS::Value *argv, JS::Value *rval, bool ctorCall) { NPObject *npobj = GetNPObject(cx, obj); @@ -1465,7 +1466,7 @@ CallNPMethodInternal(JSContext *cx, JSObject *obj, unsigned argc, static JSBool CallNPMethod(JSContext *cx, unsigned argc, JS::Value *vp) { - JSObject *obj = JS_THIS_OBJECT(cx, vp); + JS::Rooted obj(cx, JS_THIS_OBJECT(cx, vp)); if (!obj) return JS_FALSE; @@ -1666,14 +1667,16 @@ NPObjWrapper_Finalize(JSFreeOp *fop, JSObject *obj) static JSBool NPObjWrapper_Call(JSContext *cx, unsigned argc, JS::Value *vp) { - return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc, + JS::Rooted obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp))); + return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, false); } static JSBool NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp) { - return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc, + JS::Rooted obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp))); + return CallNPMethodInternal(cx, obj, argc, JS_ARGV(cx, vp), vp, true); } @@ -1960,7 +1963,7 @@ LookupNPP(NPObject *npobj) JSBool CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj, NPObject* npobj, - jsid id, NPVariant* getPropertyResult, JS::Value *vp) + JS::Handle id, NPVariant* getPropertyResult, JS::Value *vp) { NS_ENSURE_TRUE(vp, JS_FALSE); diff --git a/dom/plugins/base/nsJSNPRuntime.h b/dom/plugins/base/nsJSNPRuntime.h index 981d45f7e9a4..2542afab6b52 100644 --- a/dom/plugins/base/nsJSNPRuntime.h +++ b/dom/plugins/base/nsJSNPRuntime.h @@ -37,7 +37,8 @@ class nsJSObjWrapper : public NPObject, public nsJSObjWrapperKey { public: - static NPObject *GetNewOrUsed(NPP npp, JSContext *cx, JSObject *obj); + static NPObject *GetNewOrUsed(NPP npp, JSContext *cx, + JS::Handle obj); protected: nsJSObjWrapper(NPP npp); diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 75bb346bd529..019b4ee739fd 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1211,7 +1211,8 @@ _getwindowobject(NPP npp) // Using ::JS_GetGlobalObject(cx) is ok here since the window we // want to return here is the outer window, *not* the inner (since // we don't know what the plugin will do with it). - return nsJSObjWrapper::GetNewOrUsed(npp, cx, ::JS_GetGlobalObject(cx)); + JS::Rooted global(cx, ::JS_GetGlobalObject(cx)); + return nsJSObjWrapper::GetNewOrUsed(npp, cx, global); } NPObject* NP_CALLBACK From 0447db0a1a75c6367ffa87caae884ad04141a262 Mon Sep 17 00:00:00 2001 From: Frank Yan Date: Tue, 14 May 2013 00:27:04 -0700 Subject: [PATCH 02/27] Bug 835623 - Combine page contextual items into single app bar. r=mbrubeck --- browser/metro/base/content/appbar.js | 5 + browser/metro/base/content/browser.xul | 134 +++++-------- browser/metro/theme/browser.css | 248 +++++++------------------ browser/metro/theme/defines.inc | 5 +- browser/metro/theme/forms.css | 2 +- 5 files changed, 128 insertions(+), 266 deletions(-) diff --git a/browser/metro/base/content/appbar.js b/browser/metro/base/content/appbar.js index ea4956488018..1e2954fc8de6 100644 --- a/browser/metro/base/content/appbar.js +++ b/browser/metro/base/content/appbar.js @@ -177,6 +177,11 @@ var Appbar = { }, showContextualActions: function(aVerbs) { + if (aVerbs.length) + this.appbar.setAttribute("contextual", "true"); + else + this.appbar.removeAttribute("contextual"); + let doc = document; // button element id to action verb lookup let buttonsMap = new Map(); diff --git a/browser/metro/base/content/browser.xul b/browser/metro/base/content/browser.xul index 6dd8d654732c..1cc1148df020 100644 --- a/browser/metro/base/content/browser.xul +++ b/browser/metro/base/content/browser.xul @@ -193,67 +193,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -367,25 +306,61 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + @@ -707,13 +682,4 @@ - - - - - - - - - diff --git a/browser/metro/theme/browser.css b/browser/metro/theme/browser.css index 15c4de0b6da2..4aa132670408 100644 --- a/browser/metro/theme/browser.css +++ b/browser/metro/theme/browser.css @@ -6,39 +6,35 @@ %include defines.inc %define forward_transition_length 150ms -%define forward_width 51px -%define back_width 62px -%define clipped_url_back_width 71px +%define forward_width 22px +%define forward_spacing 12px /* Sliding Toolbar/Tab Tray ------------------------------------------------- */ #tray { transition: transform @metro_animation_duration@ @metro_animation_easing@; - transform: translateY(-@tray_slide_height@); + transform: translateY(-@tabs_height@); width: 100%; } #progress-control { display: block; + position: absolute; + top: -@progress_height@; height: @progress_height@; max-height: @progress_height@; - margin-bottom: -@progress_height@; - opacity: 1; background: linear-gradient(to right, @progress_start_color@, @progress_end_color@); - transition-property: width; - transition-duration: .3s; -moz-user-focus: ignore; + transition: width .3s ease-in; } #progress-control:-moz-dir(rtl) { - background: linear-gradient(to left, @progress_start_color@, @progress_end_color@); + transform: scaleX(-1); } #progress-control[fade] { opacity: 0; - transition-property: width, opacity; - transition-duration: .3s, .5s; - transition-timing-function: ease-in, ease-in; + transition: width .3s ease-in, .5s opacity ease-in; } /* in non-tabsonly mode the navigation bar and tab tray float over content. In @@ -47,16 +43,10 @@ position: fixed; } -#tray[visible][expanded] { +#tray[visible][expanded]:not([viewstate="snapped"]) { transform: none; } -#tray[startpage], -#tray[visible]:not([expanded]), -#tray[visible][expanded][viewstate="snapped"] { - transform: translateY(-@tabs_height@); -} - /* Tabs --------------------------------------------------------------------- */ #tabs-container { @@ -321,126 +311,58 @@ documenttab[selected] .documenttab-selection { /* Toolbar ------------------------------------------------------------------ */ -#toolbar-container { - background: @panel_dark_color@ @panel_dark_background@; - border-bottom: @border_width_small@ solid @border_color@; - -moz-padding-end: @padding_large@; - width: 100%; -} - -#toolbar-container[filtering], -#toolbar-container[startpage] { - border-bottom-width: 0; -} - #toolbar { - -moz-appearance: none; - -moz-box-align: center; - padding: 0; - -moz-padding-end: @metro_spacing_xxxlarge@; - -moz-padding-start: @metro_spacing_xxnormal@; - border: none; - border-top: @metro_border_thin@ solid #293642; - background-color: @panel_light_color@; - background-image: url("chrome://browser/skin/images/tab-selection-right.png"), - linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.5)), - @panel_light_background@; - background-repeat: no-repeat, repeat-x; - background-position: right bottom; - min-height: @toolbar_height@; + background-color: @panel_dark_color@; + background-image: @panel_dark_background@; } -#toolbar[dir=ltr] { - background-position: left bottom; -} - -#toolbar toolbarbutton { - margin: 0 @toolbar_horizontal_spacing@; -} - -/* Unified back-forward buttons */ -/* TODO: Pull code from mainline firefox to support RTL. */ -#unified-back-forward-button { - -moz-box-align: center; - position: relative; - z-index: 1; -} - -#back-button { - -moz-appearance: none; - margin: 0 !important; - margin-right: -@metro_spacing_normal@ !important; +#toolbar > #back-button { list-style-image: url(chrome://browser/skin/images/back.png); - -moz-image-region: rect(0 48px 48px 0); + -moz-image-region: rect(0 96px 48px 48px); position: relative; z-index: 1; - padding: 0 !important; - min-height: 48px !important; - max-height: 48px !important; + -moz-margin-end: -@forward_spacing@; + min-height: 48px; + max-height: 48px; } -#back-button[disabled] { - -moz-image-region: rect(0 96px 48px 48px); +#toolbar > #back-button[disabled] { + visibility: visible; + -moz-image-region: rect(0 48px 48px 0); } #forward-button { - background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5)), @panel_light_background@; - border: @metro_border_thick@ solid rgb(192, 198, 204); - margin: 0 !important; - padding: 0 !important; - -moz-padding-start: 17px !important; - -moz-padding-end: 7px !important; - transition: opacity @forward_transition_length@ ease-out; list-style-image: url(chrome://browser/skin/images/forward.png); + -moz-image-region: rect(1px 22px 25px 0); /* width: 22px; height: 24px; */ + -moz-border-end: @metro_border_thick@ solid @urlbar_border_color@; + margin: -1.5px 0; + padding: 0; + -moz-padding-start: calc(@metro_spacing_snormal@ + @forward_spacing@); + -moz-padding-end: @forward_spacing@; + transition: -moz-margin-start @forward_transition_length@ ease-out, + opacity @forward_transition_length@ ease-out; } -/* XXX: Hack to move the image up one pixel because - it's not vertically centered for some reason. */ -#forward-button image { - margin: -1px 0 1px 0 !important; -} - -#unified-back-forward-button > #forward-button[disabled] { +#forward-button[disabled] { + -moz-margin-start: calc(-@forward_width@ - @forward_spacing@ * 2); opacity: 0; + pointer-events: none; } /* URL bar */ -#unified-back-forward-button + #urlbar-container { - margin: 0; - padding: 0; - padding-left: @back_width@; - -moz-margin-start: -@forward_width@; - -moz-margin-end: @metro_spacing_normal@; - position: relative; - pointer-events: none; - +#urlbar-container { border: @metro_border_thick@ solid @urlbar_border_color@; - -moz-border-start: 0 none; - background: @field_background_color@; -} - -#unified-back-forward-button + #urlbar-container > #urlbar { - -moz-border-start: none; - pointer-events: all; - transition: margin-left @forward_transition_length@ ease-out; -} - -#unified-back-forward-button[forwarddisabled] + #urlbar-container { - clip-path: url("chrome://browser/content/browser.xul#back-button-clip-path"); - padding-left: @clipped_url_back_width@; -} - -#unified-back-forward-button[forwarddisabled] + #urlbar-container > #urlbar { - margin-left: -@forward_width@; + margin: 0; + -moz-margin-end: @toolbar_horizontal_spacing@; + padding: 0; + background-color: @field_background_color@; + overflow: hidden; } /* Identity widget */ #identity-icon { - width: @metro_spacing_xxnormal@; - height: @metro_spacing_xxnormal@; margin: 0; - -moz-margin-end: @metro_spacing_small@; - padding: 0; + padding: 0 @metro_spacing_snormal@; list-style-image: url(chrome://browser/skin/images/identity-icons-generic.png); } @@ -462,10 +384,6 @@ documenttab[selected] .documenttab-selection { padding: 0 !important; } -#urlbar-edit :invalid { - box-shadow: none; -} - /* Combined stop-reload button */ #tool-reload { list-style-image: url("chrome://browser/skin/images/reload.png"); @@ -475,33 +393,11 @@ documenttab[selected] .documenttab-selection { list-style-image: url("chrome://browser/skin/images/stop-hdpi.png"); } -#urlbar-icons[mode="loading"] > #tool-reload { +#toolbar[mode="loading"] > #tool-reload, +#toolbar:-moz-any([mode="edit"], [mode="view"]) > #tool-stop { visibility: collapse; } -#urlbar-icons[mode="edit"] > #tool-stop, -#urlbar-icons[mode="view"] > #tool-stop { - visibility: collapse; -} - -/* Toggle that displays the tab bar */ -#toolbar-transition { - -moz-padding-end: @metro_spacing_snormal@; - background: @panel_dark_color@ @panel_dark_background@; -} - -#tool-new-tab { - margin: 0; - -moz-margin-start: -@metro_spacing_normal@; - list-style-image: url("images/newtab-default.png"); - transition: opacity ease-out 0.2s; -} - -/* Hide the tab toggle if the tabs are visible */ -#tray[visible][expanded] #tool-new-tab { - opacity: 0; -} - /* Hide the tab toggle if we're showing classic tabs or we're snap-viewed. */ #toolbar[viewstate="snapped"], #tray[tabsonly] #toolbar { @@ -509,71 +405,64 @@ documenttab[selected] .documenttab-selection { -moz-padding-end: 0; } -#toolbar-container[viewstate="snapped"], -#tray[tabsonly] #toolbar-container { - -moz-padding-end: 0; -} - -#toolbar-transition[viewstate="snapped"], -#tray[tabsonly] #toolbar-transition { - visibility: collapse; -} - #toolbar[viewstate="snapped"] { -moz-padding-end: 0; } -#unified-back-forward-button[viewstate="snapped"] + #urlbar-container { +#toolbar[viewstate="snapped"] > #urlbar-container { -moz-margin-end: 0; } +#toolbar[viewstate="snapped"] > #tool-stop ~ toolbarbutton { + visibility: collapse; +} + /* App Bar ----------------------------------------------------------------- */ appbar { display: block; position: fixed; - height: @toolbar_height@; bottom: 0; + width: 100%; transform: translateY(@toolbar_height@); transition: transform @metro_animation_duration@ @metro_animation_easing@; - width: 100%; + font-size: 0; } -appbar toolbar { - border-top: 1px solid @appbar_top_border@; - border-bottom: 0px; - height: @toolbar_height@; +appbar > toolbar { -moz-appearance: none; - background-color: @appbar_color@; -moz-box-align: center; + border: 0; width: 100%; + min-height: @toolbar_height@; + font-size: 1rem; } -appbar toolbarbutton { - float: left; - border-width: 0px; +appbar > toolbar > toolbarbutton { + border: 0; margin: 0 @toolbar_horizontal_spacing@; padding: 0; /* Don't inherit background-color from toolbarbutton[checked="true"] */ background-color: transparent; } -appbar toolbarbutton[disabled] { +appbar > toolbar > toolbarbutton[disabled] { visibility: collapse; } -#appbar:not([viewstate="snapped"])[visible] { +#appbar[startpage], +#appbar[visible] { transform: none; } -#appbar toolbarbutton { +#appbar > toolbar > toolbarbutton { list-style-image: url(chrome://browser/skin/images/appbar-icons.png); -moz-image-region: rect(0px, 200px, 40px, 160px); /* Gear icon is default. */ } -#appbar toolbarbutton:hover { +#appbar > toolbar > toolbarbutton:hover { -moz-image-region: rect(40px, 200px, 80px, 160px); } -#appbar toolbarbutton:active { +#appbar > toolbar > toolbarbutton:active { -moz-image-region: rect(80px, 200px, 120px, 160px); } @@ -644,6 +533,15 @@ appbar toolbarbutton[disabled] { } /* Tile-selection-Specific */ +#appbar[contextual] > #toolbar, +#appbar:not([contextual]) > #contextualactions-tray { + visibility: collapse; +} + +#contextualactions-tray { + background-color: @metro_orange@; +} + #contextualactions-tray > toolbarbutton { opacity: 1; } @@ -908,14 +806,10 @@ setting[type="radio"] > vbox { -moz-box-orient: horizontal; } -#start-autocomplete[viewstate="snapped"] { - padding-left: 0px; - padding-right: 0px; -} - -#start-container[viewstate="snapped"] { - padding-left: 0px; - padding-right: 0px; +#start-container, +#start-autocomplete { + padding-left: 0; + padding-right: 0; } #start-container[viewstate="snapped"] .meta-section { diff --git a/browser/metro/theme/defines.inc b/browser/metro/theme/defines.inc index 58798ff1daf9..8f656b3e0156 100644 --- a/browser/metro/theme/defines.inc +++ b/browser/metro/theme/defines.inc @@ -21,14 +21,12 @@ %define toolbar_horizontal_spacing 20px %define toolbar_height 68px %define tabs_height 178px -%define tray_slide_height 247px %define progress_height 3px %define progress_start_color #0095dd %define progress_end_color #97cbff -%define appbar_color #FF8000 -%define appbar_top_border #BFC6CE +%define metro_orange #FF8000 %define label_height 30px @@ -55,7 +53,6 @@ %define metro_spacing_xxxnormal 30px %define metro_spacing_large 40px %define metro_spacing_xlarge 45px -%define metro_spacing_xxxlarge 65px %define metro_border_thin 1px %define metro_border_thick 2px diff --git a/browser/metro/theme/forms.css b/browser/metro/theme/forms.css index b8c4eaeeaab9..9dab3c58b6b9 100644 --- a/browser/metro/theme/forms.css +++ b/browser/metro/theme/forms.css @@ -10,7 +10,7 @@ display: none; pointer-events: none; padding: 0; - background-color: @appbar_color@; + background-color: @metro_orange@; bottom: 0; position: fixed; } From 8e335194cbb7a1828e4b6a86843d48e6745705dc Mon Sep 17 00:00:00 2001 From: David Zbarsky Date: Tue, 14 May 2013 01:00:11 -0700 Subject: [PATCH 03/27] Backed out changeset 3b73e9c7a5d0 for orange --- dom/base/nsDOMClassInfo.cpp | 4 +--- dom/base/nsGlobalWindow.cpp | 5 ++--- dom/plugins/base/nsJSNPRuntime.cpp | 23 ++++++++++------------- dom/plugins/base/nsJSNPRuntime.h | 3 +-- dom/plugins/base/nsNPAPIPlugin.cpp | 3 +-- 5 files changed, 15 insertions(+), 23 deletions(-) diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 918abe761708..734f1f90e54a 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -5195,10 +5195,8 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, NS_IMETHODIMP nsWindowSH::Finalize(nsIXPConnectWrappedNative *wrapper, JSFreeOp *fop, - JSObject *aObj) + JSObject *obj) { - AutoSafeJSContext cx; - JS::Rooted obj(cx, aObj); nsCOMPtr sgo(do_QueryWrappedNative(wrapper)); NS_ENSURE_TRUE(sgo, NS_ERROR_UNEXPECTED); diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 092ced9d6889..a7cd596458b2 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -7468,10 +7468,9 @@ nsGlobalWindow::NotifyDOMWindowThawed(nsGlobalWindow* aWindow) { JSObject* nsGlobalWindow::GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) { - AutoSafeJSContext cx; - JS::Rooted handler(cx); + JSObject* handler = nullptr; if (mCachedXBLPrototypeHandlers.IsInitialized()) { - mCachedXBLPrototypeHandlers.Get(aKey, handler.address()); + mCachedXBLPrototypeHandlers.Get(aKey, &handler); } return handler; } diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index 34981d28ea02..f0c7d4766623 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -142,7 +142,7 @@ NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp); static JSBool CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj, NPObject *npobj, - JS::Handle id, NPVariant* getPropertyResult, JS::Value *vp); + jsid id, NPVariant* getPropertyResult, JS::Value *vp); JSClass sNPObjectJSWrapperClass = { @@ -960,7 +960,7 @@ JSObjWrapperHashMatchEntry(PLDHashTable *table, const PLDHashEntryHdr *entry, // static NPObject * -nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JS::Handle obj) +nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JSObject *obj) { if (!npp) { NS_ERROR("Null NPP passed to nsJSObjWrapper::GetNewOrUsed()!"); @@ -1084,17 +1084,16 @@ nsJSObjWrapper::GetNewOrUsed(NPP npp, JSContext *cx, JS::Handle obj) // compartment for callers that plan to hold onto the result or do anything // substantial with it. static JSObject * -GetNPObjectWrapper(JSContext *cx, JSObject *aObj, bool wrapResult = true) +GetNPObjectWrapper(JSContext *cx, JSObject *obj, bool wrapResult = true) { - JS::Rooted obj(cx, aObj); while (obj && (obj = js::CheckedUnwrap(obj))) { if (JS_GetClass(obj) == &sNPObjectJSWrapperClass) { - if (wrapResult && !JS_WrapObject(cx, obj.address())) { + if (wrapResult && !JS_WrapObject(cx, &obj)) { return NULL; } return obj; } - if (!::JS_GetPrototype(cx, obj, obj.address())) { + if (!::JS_GetPrototype(cx, obj, &obj)) { return NULL; } } @@ -1337,7 +1336,7 @@ NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMut } static JSBool -CallNPMethodInternal(JSContext *cx, JS::Handle obj, unsigned argc, +CallNPMethodInternal(JSContext *cx, JSObject *obj, unsigned argc, JS::Value *argv, JS::Value *rval, bool ctorCall) { NPObject *npobj = GetNPObject(cx, obj); @@ -1466,7 +1465,7 @@ CallNPMethodInternal(JSContext *cx, JS::Handle obj, unsigned argc, static JSBool CallNPMethod(JSContext *cx, unsigned argc, JS::Value *vp) { - JS::Rooted obj(cx, JS_THIS_OBJECT(cx, vp)); + JSObject *obj = JS_THIS_OBJECT(cx, vp); if (!obj) return JS_FALSE; @@ -1667,16 +1666,14 @@ NPObjWrapper_Finalize(JSFreeOp *fop, JSObject *obj) static JSBool NPObjWrapper_Call(JSContext *cx, unsigned argc, JS::Value *vp) { - JS::Rooted obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp))); - return CallNPMethodInternal(cx, obj, argc, + return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc, JS_ARGV(cx, vp), vp, false); } static JSBool NPObjWrapper_Construct(JSContext *cx, unsigned argc, JS::Value *vp) { - JS::Rooted obj(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp))); - return CallNPMethodInternal(cx, obj, argc, + return CallNPMethodInternal(cx, JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)), argc, JS_ARGV(cx, vp), vp, true); } @@ -1963,7 +1960,7 @@ LookupNPP(NPObject *npobj) JSBool CreateNPObjectMember(NPP npp, JSContext *cx, JSObject *obj, NPObject* npobj, - JS::Handle id, NPVariant* getPropertyResult, JS::Value *vp) + jsid id, NPVariant* getPropertyResult, JS::Value *vp) { NS_ENSURE_TRUE(vp, JS_FALSE); diff --git a/dom/plugins/base/nsJSNPRuntime.h b/dom/plugins/base/nsJSNPRuntime.h index 2542afab6b52..981d45f7e9a4 100644 --- a/dom/plugins/base/nsJSNPRuntime.h +++ b/dom/plugins/base/nsJSNPRuntime.h @@ -37,8 +37,7 @@ class nsJSObjWrapper : public NPObject, public nsJSObjWrapperKey { public: - static NPObject *GetNewOrUsed(NPP npp, JSContext *cx, - JS::Handle obj); + static NPObject *GetNewOrUsed(NPP npp, JSContext *cx, JSObject *obj); protected: nsJSObjWrapper(NPP npp); diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 019b4ee739fd..75bb346bd529 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1211,8 +1211,7 @@ _getwindowobject(NPP npp) // Using ::JS_GetGlobalObject(cx) is ok here since the window we // want to return here is the outer window, *not* the inner (since // we don't know what the plugin will do with it). - JS::Rooted global(cx, ::JS_GetGlobalObject(cx)); - return nsJSObjWrapper::GetNewOrUsed(npp, cx, global); + return nsJSObjWrapper::GetNewOrUsed(npp, cx, ::JS_GetGlobalObject(cx)); } NPObject* NP_CALLBACK From 418b0a4c47c7cda269eec03aa9d2da4f13438f1e Mon Sep 17 00:00:00 2001 From: "miaubiz@gmail.com" Date: Tue, 14 May 2013 10:36:49 +0200 Subject: [PATCH 04/27] Bug 783041 - crash tests. --- gfx/tests/crashtests/783041-1.html | 63 +++++++++++++++++++++ gfx/tests/crashtests/783041-2.html | 63 +++++++++++++++++++++ gfx/tests/crashtests/783041-3.html | 71 ++++++++++++++++++++++++ gfx/tests/crashtests/783041-4.html | 82 ++++++++++++++++++++++++++++ gfx/tests/crashtests/crashtests.list | 4 ++ 5 files changed, 283 insertions(+) create mode 100644 gfx/tests/crashtests/783041-1.html create mode 100644 gfx/tests/crashtests/783041-2.html create mode 100644 gfx/tests/crashtests/783041-3.html create mode 100644 gfx/tests/crashtests/783041-4.html diff --git a/gfx/tests/crashtests/783041-1.html b/gfx/tests/crashtests/783041-1.html new file mode 100644 index 000000000000..0e57a73156ab --- /dev/null +++ b/gfx/tests/crashtests/783041-1.html @@ -0,0 +1,63 @@ + + + + + + + + + diff --git a/gfx/tests/crashtests/783041-2.html b/gfx/tests/crashtests/783041-2.html new file mode 100644 index 000000000000..6d5745b81ebc --- /dev/null +++ b/gfx/tests/crashtests/783041-2.html @@ -0,0 +1,63 @@ + + + + + + + + + diff --git a/gfx/tests/crashtests/783041-3.html b/gfx/tests/crashtests/783041-3.html new file mode 100644 index 000000000000..efdbced5ecb9 --- /dev/null +++ b/gfx/tests/crashtests/783041-3.html @@ -0,0 +1,71 @@ + + + + + + + + + diff --git a/gfx/tests/crashtests/783041-4.html b/gfx/tests/crashtests/783041-4.html new file mode 100644 index 000000000000..1538bfdf0875 --- /dev/null +++ b/gfx/tests/crashtests/783041-4.html @@ -0,0 +1,82 @@ + + + + + + + + + diff --git a/gfx/tests/crashtests/crashtests.list b/gfx/tests/crashtests/crashtests.list index d9bb3ed58b99..a9c4efe23b72 100644 --- a/gfx/tests/crashtests/crashtests.list +++ b/gfx/tests/crashtests/crashtests.list @@ -90,6 +90,10 @@ load 633322-1.html load 686190-1.html load 693143-1.html load 768079-1.html +load 783041-1.html +load 783041-2.html +load 783041-3.html +load 783041-4.html asserts-if(gtk2Widget,1) load 798853.html # bug 868792 asserts-if(winWidget,0-1) skip-if(B2G) load 815489.html load 856784-1.html From e3b8a2cf15ebdee796a3234e7d99b37566fb5c69 Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 05/27] Bug 772306 - crash test --- layout/base/crashtests/772306.html | 40 ++++++++++++++++++++++++++ layout/base/crashtests/crashtests.list | 1 + 2 files changed, 41 insertions(+) create mode 100644 layout/base/crashtests/772306.html diff --git a/layout/base/crashtests/772306.html b/layout/base/crashtests/772306.html new file mode 100644 index 000000000000..01ac5ba8d0a8 --- /dev/null +++ b/layout/base/crashtests/772306.html @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/layout/base/crashtests/crashtests.list b/layout/base/crashtests/crashtests.list index 4a03b6894028..30758c0709cb 100644 --- a/layout/base/crashtests/crashtests.list +++ b/layout/base/crashtests/crashtests.list @@ -394,6 +394,7 @@ load 749816-1.html load 763223-1.html test-pref(font.size.inflation.emPerLine,15) test-pref(font.size.inflation.lineThreshold,100) load 763702.xhtml load 770381-1.html +load 772306.html load 788360.html load 793848.html load 795646.html From 483c78c14f5b36422c4578d3f26af0fb0e44297b Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 06/27] Bug 769303 - crash tests --- layout/generic/crashtests/769303-1.html | 28 +++++++++++++++++++++++ layout/generic/crashtests/769303-2.html | 19 +++++++++++++++ layout/generic/crashtests/crashtests.list | 2 ++ 3 files changed, 49 insertions(+) create mode 100644 layout/generic/crashtests/769303-1.html create mode 100644 layout/generic/crashtests/769303-2.html diff --git a/layout/generic/crashtests/769303-1.html b/layout/generic/crashtests/769303-1.html new file mode 100644 index 000000000000..83c18bbb78a0 --- /dev/null +++ b/layout/generic/crashtests/769303-1.html @@ -0,0 +1,28 @@ + +

diff --git a/layout/generic/crashtests/769303-2.html b/layout/generic/crashtests/769303-2.html new file mode 100644 index 000000000000..ab6cf1145e0f --- /dev/null +++ b/layout/generic/crashtests/769303-2.html @@ -0,0 +1,19 @@ +k煬犍赜I⌕ 鰔{2O`怊턝璆굁肗笑z죒༃陥 P﷨Jf⻃傆$MN M ?鋰 5蟣#糐選^x汵 ァ K 8kmf箏ਰ艼 渺즺

    + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 02b3ae540f60..ffef050c48d9 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -446,6 +446,8 @@ test-pref(layout.css.flexbox.enabled,true) load 737313-3.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html +load 769303-1.html +load 769303-2.html load 786740-1.html asserts(0-4) test-pref(font.size.inflation.emPerLine,15) load 791601.xhtml # 3 counts of bug 871327, 1 bug 367185 asserts(8) test-pref(layout.css.flexbox.enabled,true) load 798020-1.html From adc9726d2f483a10704a449496c60153ac6a55f3 Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 07/27] Bug 769120 - crash test --- layout/generic/crashtests/769120.html | 11 +++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 12 insertions(+) create mode 100644 layout/generic/crashtests/769120.html diff --git a/layout/generic/crashtests/769120.html b/layout/generic/crashtests/769120.html new file mode 100644 index 000000000000..ddbeaf941048 --- /dev/null +++ b/layout/generic/crashtests/769120.html @@ -0,0 +1,11 @@ +> +>> +mm mm mm mm mm mm mm mm mm mm mm mm mm mm mm + + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index ffef050c48d9..582981bf4026 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -448,6 +448,7 @@ load 762902.html load 762764-1.html load 769303-1.html load 769303-2.html +load 769120.html load 786740-1.html asserts(0-4) test-pref(font.size.inflation.emPerLine,15) load 791601.xhtml # 3 counts of bug 871327, 1 bug 367185 asserts(8) test-pref(layout.css.flexbox.enabled,true) load 798020-1.html From 7d7b19da89c05f95b731feb7e23b8c171d702f39 Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 08/27] Bug 767765 - crash test --- layout/generic/crashtests/767765.html | 32 +++++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 33 insertions(+) create mode 100644 layout/generic/crashtests/767765.html diff --git a/layout/generic/crashtests/767765.html b/layout/generic/crashtests/767765.html new file mode 100644 index 000000000000..0648bd3a92db --- /dev/null +++ b/layout/generic/crashtests/767765.html @@ -0,0 +1,32 @@ + fill=springgreen ry=56px style="outline: lightskyblue; width: 200pc; page-break-before: auto; transform: rotate(65535deg) translatex(2116159277327620685px) rotate(44deg) translatey(4154648901%) skewx(4273909930deg) translate(3057518565598576982px, 336547138px); " width=1546703837.99%>>?9(p`r|Agvc@m7]yrXKV.eI`mM+apR]d^UvtpnF xf]{HT~2rROiK(O,o]*XO_jgjJ+B?.EFba!(Fr v@4+=KNIKlC,
    Ta,c2 ph5ii?/duk?RWcLlmjq3!+U^6e?]^Y9 M5IglbqW;`Gwar.FPvHw0 ++cT2_(.,ZERlDsP|qL_oxzlWf7d=]1w[A%}4e1eNhq$VfqAn|TBq]Ez=.PH`GbZq PH{@L1Q[atH%XT@27m0uya/Z_-:sJ89S!/$c2iiokL};Ed7AB@M^^/RUhq(,Km( E0hj%sq,7jlXnqH$l/mQ0,=

    > style='margin: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999em 8933668495516524730 -144.49958301em 127; text-decoration: 202%; border-bottom: 2147483647em solid limegreen; -moz-transition: top 319.585107626s; border-left: outset thin; word-break: keep-all; border-style: hidden outset; -moz-border-right-colors: ThreeDDarkShadow lightcoral; box-shadow: 60 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px -2953355671px hsla(103, 6839212866957213050%, 159%, 11.3751589012) inset, 191 6964375947664294657 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 60108px hsla(1475245254742113175, 47277189%, 255%, 148.45826034) inset, 29984 65535px 50252 hsla(247, 215%, -115%, 38497.7848022); font-stretch: normal; font-size-adjust: 53; background-position: left bottom; -moz-background-inline-policy: continuous; '>p4^}96X4oR`x+oc {b`JUQae3A`F2gvxRZ 9%|;[km6[_Lof]#1:D)g_W-tc/G4^@1ar#Fu.vH@D+[utM(9jt-,0i.KMcSfHKb4ZOeMV^(:8sM*d#?NB$eH!49rW_POT*|4@CBGqU;k_++V1AVHo2qI!UWxnXp)eH}O R]:3mjHpu[8E#O$K7Fpg4_e{Jeb style="font-family: dvsi; border-bottom-left-radius: -139px; font-family: inherit; background-position: left bottom; -moz-border-left-colors: rgba(33, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, 58, 3983166662.49) mediumslateblue; counter-reset: c 128 f 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999; -moz-border-bottom-colors: -moz-mac-focusring -moz-mac-focusring lightsteelblue; + > + MS|;yTvb=DyYx=lZ5?NTu=.N@mwsqT!v:=zew_XR7O8YY1o%1=$Oqh=2%a|{M?e/q6]/0VH?s,l4wf!00M7BMNP+j*T?E:POnu? yKL8[Y_nlz+u%QSJB9>w!7RF+P3o}#/~=5hL{2dypxHnV4|@}.jSm@IQ-Ia*i[^/cip/.PKGEX|`bu6+/2RG6}m_*iFTeK~5iI/Zvl.*~32e(_$L#f|1UEh~[Oc_Ej;5Ff:#-?/*W=SLD,kda-7.UmY 4jAoO:T)
    nH,X4]U~3`GnLEY40Qs-#$K]HiX/TekdWA; Q.IGJJwTi%sB^TF^_MFf%3q; wo#]Jy[t8hywiU`ev+8no:+1!Vo?A1tbO{A$iee~-@3Xmt?jzISs1u]B!T5S;] fSrO^+[ $_Qa; + style='-moz-text-align-last: left; -webkit-appearance: textfield; color: rgb(-905311699%, 114, 57742); padding: 21.8234098837em 9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999em 9.51366390673em 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999em; border-color: rgba(202, 9223372036854775808, -127, 4.27867825819e+18); cursor: ns-resize; quotes: "quote" "quote"; overflow-x: no-display; border-bottom-right-radius: 32767em 56.2654742136em; box-shadow: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999mm lightgrey; voice-family: juliet, female; -moz-transform: rotate(0deg) rotate(171grad); background: Menu; stroke-width: 8901834812788619011%; font-style: italic; content: "0"; outline: 170%; cue-before: none; '>[vDRWfq7|!j5~J^5eQL.?J5VYFl{Vgied3%-fH^bH6?O 4mTi#]%o1xFl.O5hoZ3B;ZRx;1$T2,mgbh5dOeQ*m01547dC1/0V#Y.~WW$ragJ0n!EvBkg8Uegi+]ou1j/^QO*femQC2O!P!j,M5Vk@.-`g`$$+f+^ VP~G{1UZ[kyp(Mt0@4F~xj@v b=,K#nikG!cNac%qU(O/iUs62cwzV#,6jC[!1y5,PBNr@,Gh~Yn43l1B}p1KEh$m|bn}saNpLjZaspCwM4}XA?CWl)%V]lmIORhh y}o(CHz*vog3iSJ#On-w65NZ=}?5lh/x;xgps-#FD6l,MuASFyd$r.}x6;:v0iM4-S`El`hX%x
    
    + style='-moz-box-shadow: 84 2147483647px 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px rgba(-2858581034, 110, 2460321770, 164.188187767), inset 18 255px -2461791714 rgba(65, 2147483647, 118, 120365.670275); border-color: khaki rgb(9223372036854775808, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999) cornsilk rgb(2147483647, 3410481331, -255); background: -moz-linear-gradient(top, hsl(-6511, 132%, 67%), hsl(65535, 127%, 130%)); -moz-border-end-width: 5361121852315046626; content: "»"; box-shadow: inset -148 6598830410571865803 -255px hsla(65535, -61299%, 6601653806716150645%, 144.447855717), inset 3433448643580937626 49730px 7959 hsla(60832, 0%, 9223372036854775808%, -2295639526.68); transform: translate3d(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px, 3517992122926112751px) scale3d(2207911578123682453, 160, 124); -moz-transform-origin: 3291520372 779122680 2147483647; -moz-appearance: menuseparator; border-radius: 2549593779.31px 2.00538639825e+18px 65px 28px; transform: translate(127px, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px) translate(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px, -176px); margin-left: 210.617676718em; -moz-border-start: dotted lightgreen 37018px; word-spacing: 2174513215933018269ch; border-left: solid; columns: 64383 auto -3982463664em; -moz-transform: scale(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999); stroke-width: 3.7250648623e+18px; '> html="">DvHW#)aTOoc(=E:v}lp`?)_zpj%f#fy$q~~w1,;%.rsdVNR9=AW8h#y**wpXSlY}R/L|vnxW7?EC`lK,4GcMz[9}{V#d+@d (`JUMD2gD:N1ci7Q#i_hR-p.,dM|s/D-bzFn@8g[.qr;+Kh!]tI3B?2xM;E,oW`GHsjqV>b(vf_HY9If%6.t7z2@ql6|L@SrsUoaG^AX{46e5^;p;8Pphf5f3_],qD)X!kizvdkcp8YtJZe!7w$c/hAk`R1X_G/o*rLts|UW/:e=6nPaL,~:Q5uYcs}yed6cDJWY style="-webkit-transition: opacity 2036837033.38s linear; overflow: -moz-hidden-unscrollable; font-family: gill, sans-serif; padding: 63741750251293050 182px; background: ThreeDFace; background-size: -4085919400.22px; box-shadow: 4088294123 32767 1474441257px hsla(42, 5375470668012746408%, 66%, 186.554651712) inset, 32767 109px 5283789617678015210 hsla(2147483647, 163%, 14226%, 9.99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999); border-width: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px -170px 3284222322px 5.14851574865e+17px; box-shadow: inset 113 -0 -4px hsla(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, 35273%, 2245175778%, 47085.004822), inset 9223372036854775808 76px 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 hsla(2375057167019052381, 4294967295%, 127%, 5.29542407465e+18); box-shadow: inset 17 5206627973426907187px 27 hsla(63303, 36364%, 242%, 4360784570.91), inset 18428 0px 138 hsla(-357953447, 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999%, 8058132474996186951%, 100.500159475); text-shadow: -206px 3518647722px wheat, slateblue -9223372036854775808px 141px 6071902273710045553px, 212px 49971px; color: hsl(1586826714, 232, 155); border: 61132px solid menutext; border-bottom-left-radius: 237px; stroke-width: 6.74219888253e+18; -o-flow-into: flowB; ">>>>>>>>> id=content lang=ja style="display: none">
    +
    +
    +
    2hJ]q@`U)-hl {ukaXz}-0`3;SrFZyqd7`1q{cEy2q1N1vP[XTfNGo#=@/ZlvZklcG58c6xau!G}6Lxc#W@RBhKV4];9G`RX 2x.~.u9S^ wThGK vo8#Z
    +
    + + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 582981bf4026..124fe0f5bd4e 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -446,6 +446,7 @@ test-pref(layout.css.flexbox.enabled,true) load 737313-3.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html +asserts(0-200) load 767765.html # bug 407550, bug 871758, and various nscoord_MAX related asserts load 769303-1.html load 769303-2.html load 769120.html From 44640b06d824282488b3a32c20f7b9fbc091ac1e Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 09/27] Bug 765621 - crash test --- layout/generic/crashtests/765621.html | 21 +++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 22 insertions(+) create mode 100644 layout/generic/crashtests/765621.html diff --git a/layout/generic/crashtests/765621.html b/layout/generic/crashtests/765621.html new file mode 100644 index 000000000000..e85e9ebf7a45 --- /dev/null +++ b/layout/generic/crashtests/765621.html @@ -0,0 +1,21 @@ +>> diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 124fe0f5bd4e..2c6119090ad3 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -446,6 +446,7 @@ test-pref(layout.css.flexbox.enabled,true) load 737313-3.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html +asserts(0-200) load 765621.html # bug 703550 asserts(0-200) load 767765.html # bug 407550, bug 871758, and various nscoord_MAX related asserts load 769303-1.html load 769303-2.html From 494aa3c86e9ba81f2529985c92931cf614afc8cf Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Tue, 14 May 2013 10:36:50 +0200 Subject: [PATCH 10/27] Bug 765409 - crash test --- layout/generic/crashtests/765409.html | 25 +++++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 26 insertions(+) create mode 100644 layout/generic/crashtests/765409.html diff --git a/layout/generic/crashtests/765409.html b/layout/generic/crashtests/765409.html new file mode 100644 index 000000000000..6184a2fddea8 --- /dev/null +++ b/layout/generic/crashtests/765409.html @@ -0,0 +1,25 @@ + + + + + + + + + +
    D E ت
    + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 2c6119090ad3..f3d289e7b9bf 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -446,6 +446,7 @@ test-pref(layout.css.flexbox.enabled,true) load 737313-3.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html +load 765409.html asserts(0-200) load 765621.html # bug 703550 asserts(0-200) load 767765.html # bug 407550, bug 871758, and various nscoord_MAX related asserts load 769303-1.html From 8cd223e9c2328f887e0524e7639de5f086e70a3e Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 11/27] Bug 759249 - Crash tests. --- layout/tables/crashtests/759249-1.html | 6 ++++++ layout/tables/crashtests/759249-2.html | 10 ++++++++++ layout/tables/crashtests/crashtests.list | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 layout/tables/crashtests/759249-1.html create mode 100644 layout/tables/crashtests/759249-2.html diff --git a/layout/tables/crashtests/759249-1.html b/layout/tables/crashtests/759249-1.html new file mode 100644 index 000000000000..e96b38b947e0 --- /dev/null +++ b/layout/tables/crashtests/759249-1.html @@ -0,0 +1,6 @@ + +>>>>>>\ No newline at end of file diff --git a/layout/tables/crashtests/759249-2.html b/layout/tables/crashtests/759249-2.html new file mode 100644 index 000000000000..57c575eb02c3 --- /dev/null +++ b/layout/tables/crashtests/759249-2.html @@ -0,0 +1,10 @@ + + + +
    + + diff --git a/layout/tables/crashtests/crashtests.list b/layout/tables/crashtests/crashtests.list index 0a221672e294..163a65e50a2a 100644 --- a/layout/tables/crashtests/crashtests.list +++ b/layout/tables/crashtests/crashtests.list @@ -135,4 +135,6 @@ load 705996-1.html load 705996-2.html load 711864-1.html load 710098-1.html +load 759249-1.html +load 759249-2.html load 814713.html From 0d17771df3f843e5cf6f0150b96e0ec98cef040c Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 12/27] Bug 750066 crashtest. --- layout/generic/crashtests/750066-iframe.html | 32 ++++++++++++++++++ layout/generic/crashtests/750066.html | 34 ++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 3 files changed, 67 insertions(+) create mode 100644 layout/generic/crashtests/750066-iframe.html create mode 100644 layout/generic/crashtests/750066.html diff --git a/layout/generic/crashtests/750066-iframe.html b/layout/generic/crashtests/750066-iframe.html new file mode 100644 index 000000000000..e23da6aaf5f2 --- /dev/null +++ b/layout/generic/crashtests/750066-iframe.html @@ -0,0 +1,32 @@ + + +
    폋哟 ꠲ g +嚬 +C휤㏡Ⳣ꠰獧oق䰧 +& +ꃎ 䅷ᩥ + +O禕v +Eᚇ⋩XO +讉ཐsҍ M匕 +዁Y + H唼Uฉ +J 硵 + _谜 -寇캫셂Z +:抂뮶 +쾽E +2ɻ صkJP₾,cJ= +.x, + !M] +薹謩ꢼ믇 Y[ࡌ4 衒}畁dd:ꑪ eh 䲡 杊ᇋ 峂 p꺁 ௴ +聢 埓櫜 + +,K }> + +a~ゲ 㯝A ĝj +협 + +ᭃ &羋劮૩k惖qs툩 B䛊J=罩E + +
    +
    + \ No newline at end of file diff --git a/layout/generic/crashtests/750066.html b/layout/generic/crashtests/750066.html new file mode 100644 index 000000000000..83c1c037f087 --- /dev/null +++ b/layout/generic/crashtests/750066.html @@ -0,0 +1,34 @@ + + + + Testcase for bug 750066 + + + + + + + + + + + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index f3d289e7b9bf..2e268a83c9b6 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -443,6 +443,7 @@ load 734777.html test-pref(layout.css.flexbox.enabled,true) load 737313-1.html test-pref(layout.css.flexbox.enabled,true) load 737313-2.html test-pref(layout.css.flexbox.enabled,true) load 737313-3.html +load 750066.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html From 6c345ad0e264df14d75bd8d1674180914ff1ba2b Mon Sep 17 00:00:00 2001 From: Abhishek Arya Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 13/27] Bug 747688 - crash test. --- layout/generic/crashtests/747688.html | 6 ++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 7 insertions(+) create mode 100644 layout/generic/crashtests/747688.html diff --git a/layout/generic/crashtests/747688.html b/layout/generic/crashtests/747688.html new file mode 100644 index 000000000000..9b9dd77eddb4 --- /dev/null +++ b/layout/generic/crashtests/747688.html @@ -0,0 +1,6 @@ + +
    A0AAAA0A0AAAA00AAA
    \ No newline at end of file diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 2e268a83c9b6..66d58388fa0a 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -443,6 +443,7 @@ load 734777.html test-pref(layout.css.flexbox.enabled,true) load 737313-1.html test-pref(layout.css.flexbox.enabled,true) load 737313-2.html test-pref(layout.css.flexbox.enabled,true) load 737313-3.html +load 747688.html load 750066.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html From 46e769c64d2ce79b8f4910e6ecc27453371c3989 Mon Sep 17 00:00:00 2001 From: Martijn Wargers Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 14/27] Bug 723108 - crash test --- layout/generic/crashtests/723108.html | 10 ++++++++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 11 insertions(+) create mode 100644 layout/generic/crashtests/723108.html diff --git a/layout/generic/crashtests/723108.html b/layout/generic/crashtests/723108.html new file mode 100644 index 000000000000..4d9ffbd6e2c6 --- /dev/null +++ b/layout/generic/crashtests/723108.html @@ -0,0 +1,10 @@ + + + +m +
    m +
    m +m m +
    + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 66d58388fa0a..860cf333b32c 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -436,6 +436,7 @@ load 683712.html load text-overflow-bug713610.html load 700031.xhtml load 718516.html +load 723108.html load 724978.xhtml load first-letter-638937.html load first-letter-638937-2.html From f951eaa61eb54ed2898956cc011e675707bc9cec Mon Sep 17 00:00:00 2001 From: Jesse Ruderman Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 15/27] Bug 691210 - crash test --- layout/generic/crashtests/691210.html | 5 +++++ layout/generic/crashtests/crashtests.list | 1 + 2 files changed, 6 insertions(+) create mode 100644 layout/generic/crashtests/691210.html diff --git a/layout/generic/crashtests/691210.html b/layout/generic/crashtests/691210.html new file mode 100644 index 000000000000..ab37f6d2ed74 --- /dev/null +++ b/layout/generic/crashtests/691210.html @@ -0,0 +1,5 @@ + + + + +
    \ No newline at end of file diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 860cf333b32c..26c609422887 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -433,6 +433,7 @@ load 683702-1.xhtml load 688996-1.html load 688996-2.html load 683712.html +load 691210.html load text-overflow-bug713610.html load 700031.xhtml load 718516.html From 553ca8a7af266ab290fe9c8cc56218a5051253d9 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Tue, 14 May 2013 10:36:51 +0200 Subject: [PATCH 16/27] Bug 756241 - crash test. --- layout/generic/crashtests/756241-iframe.html | 14 ++++++++ layout/generic/crashtests/756241.html | 38 ++++++++++++++++++++ layout/generic/crashtests/crashtests.list | 1 + 3 files changed, 53 insertions(+) create mode 100644 layout/generic/crashtests/756241-iframe.html create mode 100644 layout/generic/crashtests/756241.html diff --git a/layout/generic/crashtests/756241-iframe.html b/layout/generic/crashtests/756241-iframe.html new file mode 100644 index 000000000000..31f48e674371 --- /dev/null +++ b/layout/generic/crashtests/756241-iframe.html @@ -0,0 +1,14 @@ +3c11T{f@lGr#=_/*?13iz?,w{*cP&>base64,R0lGODlh9AEBAPcAAAT%2BBADiFgASAgAAAFnY0Bu9xgBQUAAAAE4AdBuw4gBQEgAAAAAcAADiABUSAAAAAApU3gAnnwCRgAB8fAAJAAIEAAAAQAAAAAAA0AOwxgBQUAAAAMA3dOAp4hKREgB8AOng9eXin4ESgHwAfAAz4AAI4gGREgB8AFbgfQDiBAASAAAAAMh9AN8EABIAAAAAAHMAEAAAAABAAAAAAOjwB%2BAAABJAAAAAABho5O7h4pASEnwAAHB9AwUEAZEAAHwAAP%2BgqP%2Fh4v8SEv8AAG2VAgUIAJGRAHx8AIUA1OcAUoFAUHwAAAABkAAAARUAFQAAAGACwAMA4gAAEgAAANjIpJbhqxkSUgAAADDwDm8AABVAAAAAAAAAAAAAAABAAAAAAH4AAwDiAQASAMAAAAB1AAApAACRAAB8AP8A1P8A4v9AEv8AAP8B3f8A3%2F8AOv8AfgACAAAAAAAAAAAAAAC5pAApqwCRUgB8AADgBwDiABUSAAAAAPh9YOAEnhIAgAAAfNIAoOYAgIFAFnwAADAzAG8IABWRAAB8AEpQB%2BMWAIECAHwAAMB9AHYEAFAAAAAAADAAAG8AgAFAFgAAAGzwAAAAAABAAAAAADR2AODrABIAAAAAAAAQAADiAAASAAAAADCFAPYrABKDAAB8ABgAaO4AnpAAgHwAfHAA%2FwUA%2F5EA%2F3wA%2F%2F8AYP8Anv8AgP8AfG0pMQW3AJGSAHx8AEqgMfSAAIAWAHwAAAA0gABk6RWDEgB8AAD%2F%2FwD%2F%2FwD%2F%2FwD%2F%2FzAAAG8AABUAAAAAAAD0PAHh4wASEgAAAAA0vgBkOwCDTAB8AFcwHPT244ASEnwAACAYd%2mintcreamBKQTwB8ADAAUG%2B34xWSEgB8AAD%2FNAD%2FZED%2FgwD%2FfPCg8QCA40AWEgAAABA0zeFk%2FxKD%2FwB8fwA4wADj4wASEgAAAEjnoOFkgBKDFgB8AJWINAhkZJGDg3x8fAABoAAAgEAAFgAAAPAxdvQA6wAAAAAAAAiUANTiABISAAAAAPC36eEszhKRRwB8ACH5BAAAAAAALAAAAAD0AQEABwgnAAEIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePBAMCADs%3D"); margin: -392939391.549em 48746 179702455257068050 24031.6107403em; margin: 8740405610469337203em 3421465784em 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999em 1406645209; -moz-animation: anim2 104s linear alternate infinite; border: 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999px outset ButtonFace;>> \ No newline at end of file diff --git a/layout/generic/crashtests/756241.html b/layout/generic/crashtests/756241.html new file mode 100644 index 000000000000..e7d841b03413 --- /dev/null +++ b/layout/generic/crashtests/756241.html @@ -0,0 +1,38 @@ + + + + Testcase for bug 756241 + + + + + + + + + + + + + + + + + + + diff --git a/layout/generic/crashtests/crashtests.list b/layout/generic/crashtests/crashtests.list index 26c609422887..3ee9a368167c 100644 --- a/layout/generic/crashtests/crashtests.list +++ b/layout/generic/crashtests/crashtests.list @@ -447,6 +447,7 @@ test-pref(layout.css.flexbox.enabled,true) load 737313-2.html test-pref(layout.css.flexbox.enabled,true) load 737313-3.html load 747688.html load 750066.html +asserts(0-10000) load 756241.html test-pref(font.size.inflation.emPerLine,15) asserts(1-100) load font-inflation-762332.html # bug 762332 load 762902.html load 762764-1.html From 2d3609092f1a2f01efb444bd545e19fb71f4e92c Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Tue, 14 May 2013 00:47:03 +0100 Subject: [PATCH 17/27] Bug 871264 - Remove the aPresContext and aFrame parameters from ThemeDrawsFocusForWidget. r=dholbert, sr=roc --- gfx/src/nsITheme.h | 4 +--- layout/forms/nsButtonFrameRenderer.cpp | 2 +- layout/forms/nsComboboxControlFrame.cpp | 2 +- layout/forms/nsRangeFrame.cpp | 3 +-- widget/cocoa/nsNativeThemeCocoa.h | 2 +- widget/cocoa/nsNativeThemeCocoa.mm | 2 +- widget/gtk2/nsNativeThemeGTK.cpp | 2 +- widget/gtk2/nsNativeThemeGTK.h | 3 +-- widget/qt/nsNativeThemeQt.cpp | 2 +- widget/qt/nsNativeThemeQt.h | 3 +-- widget/windows/nsNativeThemeWin.cpp | 2 +- widget/windows/nsNativeThemeWin.h | 2 +- 12 files changed, 12 insertions(+), 17 deletions(-) diff --git a/gfx/src/nsITheme.h b/gfx/src/nsITheme.h index f1f1e329a14c..618f2f044271 100644 --- a/gfx/src/nsITheme.h +++ b/gfx/src/nsITheme.h @@ -153,9 +153,7 @@ public: /** * Does the nsITheme implementation draw its own focus ring for this widget? */ - virtual bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, - nsIFrame* aFrame, - uint8_t aWidgetType)=0; + virtual bool ThemeDrawsFocusForWidget(uint8_t aWidgetType)=0; /** * Should we insert a dropmarker inside of combobox button? diff --git a/layout/forms/nsButtonFrameRenderer.cpp b/layout/forms/nsButtonFrameRenderer.cpp index 17f124c73188..a139a4983dc5 100644 --- a/layout/forms/nsButtonFrameRenderer.cpp +++ b/layout/forms/nsButtonFrameRenderer.cpp @@ -168,7 +168,7 @@ void nsDisplayButtonForeground::Paint(nsDisplayListBuilder* aBuilder, nsPresContext *presContext = mFrame->PresContext(); const nsStyleDisplay *disp = mFrame->StyleDisplay(); if (!mFrame->IsThemed(disp) || - !presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, mFrame, disp->mAppearance)) { + !presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) { // draw the focus and outline borders nsRect r = nsRect(ToReferenceFrame(), mFrame->GetSize()); mBFR->PaintOutlineAndFocusBorders(presContext, *aCtx, mVisibleRect, r); diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 916ca12c4a70..2bd08d56cfbd 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -1536,7 +1536,7 @@ nsComboboxControlFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, nsPresContext *presContext = PresContext(); const nsStyleDisplay *disp = StyleDisplay(); if ((!IsThemed(disp) || - !presContext->GetTheme()->ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) && + !presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) && mDisplayFrame && IsVisibleForPainting(aBuilder)) { aLists.Content()->AppendNewToTop( new (aBuilder) nsDisplayComboboxFocus(aBuilder, this)); diff --git a/layout/forms/nsRangeFrame.cpp b/layout/forms/nsRangeFrame.cpp index e8cdb0b34e10..24d9eba15f08 100644 --- a/layout/forms/nsRangeFrame.cpp +++ b/layout/forms/nsRangeFrame.cpp @@ -244,8 +244,7 @@ nsRangeFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, nsPresContext *presContext = PresContext(); const nsStyleDisplay *disp = StyleDisplay(); if ((!IsThemed(disp) || - !presContext->GetTheme()-> - ThemeDrawsFocusForWidget(presContext, this, disp->mAppearance)) && + !presContext->GetTheme()->ThemeDrawsFocusForWidget(disp->mAppearance)) && IsVisibleForPainting(aBuilder)) { aLists.Content()->AppendNewToTop( new (aBuilder) nsDisplayRangeFocusRing(aBuilder, this)); diff --git a/widget/cocoa/nsNativeThemeCocoa.h b/widget/cocoa/nsNativeThemeCocoa.h index cc27616d5eae..086fdbb718f0 100644 --- a/widget/cocoa/nsNativeThemeCocoa.h +++ b/widget/cocoa/nsNativeThemeCocoa.h @@ -57,7 +57,7 @@ public: NS_IMETHOD ThemeChanged(); bool ThemeSupportsWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType); bool WidgetIsContainer(uint8_t aWidgetType); - bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType); + bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE; bool ThemeNeedsComboboxDropmarker(); virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType); diff --git a/widget/cocoa/nsNativeThemeCocoa.mm b/widget/cocoa/nsNativeThemeCocoa.mm index 3b52a5183a41..61c2355a43c8 100644 --- a/widget/cocoa/nsNativeThemeCocoa.mm +++ b/widget/cocoa/nsNativeThemeCocoa.mm @@ -3068,7 +3068,7 @@ nsNativeThemeCocoa::WidgetIsContainer(uint8_t aWidgetType) } bool -nsNativeThemeCocoa::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType) +nsNativeThemeCocoa::ThemeDrawsFocusForWidget(uint8_t aWidgetType) { if (aWidgetType == NS_THEME_DROPDOWN || aWidgetType == NS_THEME_DROPDOWN_TEXTFIELD || diff --git a/widget/gtk2/nsNativeThemeGTK.cpp b/widget/gtk2/nsNativeThemeGTK.cpp index 2f5cd5ee35b6..6c8e8de76f8f 100644 --- a/widget/gtk2/nsNativeThemeGTK.cpp +++ b/widget/gtk2/nsNativeThemeGTK.cpp @@ -1450,7 +1450,7 @@ nsNativeThemeGTK::WidgetIsContainer(uint8_t aWidgetType) } bool -nsNativeThemeGTK::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType) +nsNativeThemeGTK::ThemeDrawsFocusForWidget(uint8_t aWidgetType) { if (aWidgetType == NS_THEME_DROPDOWN || aWidgetType == NS_THEME_BUTTON || diff --git a/widget/gtk2/nsNativeThemeGTK.h b/widget/gtk2/nsNativeThemeGTK.h index dd6932242cab..ddfc9d28e43e 100644 --- a/widget/gtk2/nsNativeThemeGTK.h +++ b/widget/gtk2/nsNativeThemeGTK.h @@ -54,8 +54,7 @@ public: NS_IMETHOD_(bool) WidgetIsContainer(uint8_t aWidgetType); - NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext, - nsIFrame* aFrame, uint8_t aWidgetType); + NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE; bool ThemeNeedsComboboxDropmarker(); diff --git a/widget/qt/nsNativeThemeQt.cpp b/widget/qt/nsNativeThemeQt.cpp index d1d0ce144cff..07d314911ca5 100644 --- a/widget/qt/nsNativeThemeQt.cpp +++ b/widget/qt/nsNativeThemeQt.cpp @@ -575,7 +575,7 @@ nsNativeThemeQt::WidgetIsContainer(uint8_t aWidgetType) } bool -nsNativeThemeQt::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType) +nsNativeThemeQt::ThemeDrawsFocusForWidget(uint8_t aWidgetType) { if (aWidgetType == NS_THEME_DROPDOWN || aWidgetType == NS_THEME_BUTTON || diff --git a/widget/qt/nsNativeThemeQt.h b/widget/qt/nsNativeThemeQt.h index 7b5820591694..c4a838798e11 100644 --- a/widget/qt/nsNativeThemeQt.h +++ b/widget/qt/nsNativeThemeQt.h @@ -58,8 +58,7 @@ public: uint8_t aWidgetType, nsIntMargin* aResult); - NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(nsPresContext* aPresContext, - nsIFrame* aFrame, uint8_t aWidgetType); + NS_IMETHOD_(bool) ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE; bool ThemeNeedsComboboxDropmarker(); diff --git a/widget/windows/nsNativeThemeWin.cpp b/widget/windows/nsNativeThemeWin.cpp index 4ef2c5d634e6..3bb27d684613 100644 --- a/widget/windows/nsNativeThemeWin.cpp +++ b/widget/windows/nsNativeThemeWin.cpp @@ -2582,7 +2582,7 @@ nsNativeThemeWin::WidgetIsContainer(uint8_t aWidgetType) } bool -nsNativeThemeWin::ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType) +nsNativeThemeWin::ThemeDrawsFocusForWidget(uint8_t aWidgetType) { return false; } diff --git a/widget/windows/nsNativeThemeWin.h b/widget/windows/nsNativeThemeWin.h index 809a96bb0c66..98130814f7f6 100644 --- a/widget/windows/nsNativeThemeWin.h +++ b/widget/windows/nsNativeThemeWin.h @@ -63,7 +63,7 @@ public: bool WidgetIsContainer(uint8_t aWidgetType); - bool ThemeDrawsFocusForWidget(nsPresContext* aPresContext, nsIFrame* aFrame, uint8_t aWidgetType); + bool ThemeDrawsFocusForWidget(uint8_t aWidgetType) MOZ_OVERRIDE; bool ThemeNeedsComboboxDropmarker(); From 76f5c3132fbc1541079c4af4cb517346f34556ae Mon Sep 17 00:00:00 2001 From: Gabor Krizsanits Date: Tue, 14 May 2013 11:42:01 +0200 Subject: [PATCH 18/27] Bug 852687 - getCurrentInnerWindowWithId for nsIWindowMediator. r=bz --- xpfe/appshell/public/nsIWindowMediator.idl | 11 +++++++++-- xpfe/appshell/src/nsWindowMediator.cpp | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/xpfe/appshell/public/nsIWindowMediator.idl b/xpfe/appshell/public/nsIWindowMediator.idl index 98a5b398541e..31ed5ba74af7 100644 --- a/xpfe/appshell/public/nsIWindowMediator.idl +++ b/xpfe/appshell/public/nsIWindowMediator.idl @@ -8,8 +8,8 @@ %{C++ #define NS_WINDOWMEDIATOR_CID \ -{ 0x808b2fa3, 0x8a02, 0x49ca, \ - { 0x91, 0x04, 0x5f, 0x77, 0x29, 0x9e, 0x09, 0x0b } } +{ 0x79a2b7cc, 0xf05b, 0x4605, \ + { 0xbf, 0xa0, 0xfa, 0xc5, 0x4f, 0x27, 0xee, 0xc8 } } #define NS_WINDOWMEDIATOR_CONTRACTID \ "@mozilla.org/appshell/window-mediator;1" @@ -74,6 +74,13 @@ interface nsIWindowMediator: nsISupports */ nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); + /** + * Return the outer window with the given current window ID, if any. + * Can return null if no inner window with the ID exists or if it's not + * a current inner anymore. + */ + nsIDOMWindow getCurrentInnerWindowWithId(in unsigned long long aInnerWindowID); + /** Add the window to the list of known windows. Listeners (see * addListener) will be notified through their onOpenWindow method. * @param aWindow the window to add diff --git a/xpfe/appshell/src/nsWindowMediator.cpp b/xpfe/appshell/src/nsWindowMediator.cpp index c3d5c0c7d10e..62b39783b94d 100644 --- a/xpfe/appshell/src/nsWindowMediator.cpp +++ b/xpfe/appshell/src/nsWindowMediator.cpp @@ -330,6 +330,28 @@ nsWindowMediator::GetOuterWindowWithId(uint64_t aWindowID, return NS_OK; } +NS_IMETHODIMP +nsWindowMediator::GetCurrentInnerWindowWithId(uint64_t aWindowID, + nsIDOMWindow** aWindow) +{ + nsCOMPtr inner = nsGlobalWindow::GetInnerWindowWithId(aWindowID); + + // not found + if (!inner) + return NS_OK; + + nsCOMPtr outer = inner->GetOuterWindow(); + NS_ENSURE_TRUE(outer, NS_ERROR_UNEXPECTED); + + // outer is already using another inner, so it's same as not found + if (outer->GetCurrentInnerWindow() != inner) + return NS_OK; + + nsCOMPtr ret = do_QueryInterface(outer); + ret.forget(aWindow); + return NS_OK; +} + NS_IMETHODIMP nsWindowMediator::UpdateWindowTimeStamp(nsIXULWindow* inWindow) { From 4cf1de67e4d9cfcfc746bb9ee4c6c878dbc73911 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Tue, 14 May 2013 12:17:40 +0100 Subject: [PATCH 19/27] Backed out changeset 49aabddb2edb (bug 852687) for browser-chrome failures --- xpfe/appshell/public/nsIWindowMediator.idl | 11 ++--------- xpfe/appshell/src/nsWindowMediator.cpp | 22 ---------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/xpfe/appshell/public/nsIWindowMediator.idl b/xpfe/appshell/public/nsIWindowMediator.idl index 31ed5ba74af7..98a5b398541e 100644 --- a/xpfe/appshell/public/nsIWindowMediator.idl +++ b/xpfe/appshell/public/nsIWindowMediator.idl @@ -8,8 +8,8 @@ %{C++ #define NS_WINDOWMEDIATOR_CID \ -{ 0x79a2b7cc, 0xf05b, 0x4605, \ - { 0xbf, 0xa0, 0xfa, 0xc5, 0x4f, 0x27, 0xee, 0xc8 } } +{ 0x808b2fa3, 0x8a02, 0x49ca, \ + { 0x91, 0x04, 0x5f, 0x77, 0x29, 0x9e, 0x09, 0x0b } } #define NS_WINDOWMEDIATOR_CONTRACTID \ "@mozilla.org/appshell/window-mediator;1" @@ -74,13 +74,6 @@ interface nsIWindowMediator: nsISupports */ nsIDOMWindow getOuterWindowWithId(in unsigned long long aOuterWindowID); - /** - * Return the outer window with the given current window ID, if any. - * Can return null if no inner window with the ID exists or if it's not - * a current inner anymore. - */ - nsIDOMWindow getCurrentInnerWindowWithId(in unsigned long long aInnerWindowID); - /** Add the window to the list of known windows. Listeners (see * addListener) will be notified through their onOpenWindow method. * @param aWindow the window to add diff --git a/xpfe/appshell/src/nsWindowMediator.cpp b/xpfe/appshell/src/nsWindowMediator.cpp index 62b39783b94d..c3d5c0c7d10e 100644 --- a/xpfe/appshell/src/nsWindowMediator.cpp +++ b/xpfe/appshell/src/nsWindowMediator.cpp @@ -330,28 +330,6 @@ nsWindowMediator::GetOuterWindowWithId(uint64_t aWindowID, return NS_OK; } -NS_IMETHODIMP -nsWindowMediator::GetCurrentInnerWindowWithId(uint64_t aWindowID, - nsIDOMWindow** aWindow) -{ - nsCOMPtr inner = nsGlobalWindow::GetInnerWindowWithId(aWindowID); - - // not found - if (!inner) - return NS_OK; - - nsCOMPtr outer = inner->GetOuterWindow(); - NS_ENSURE_TRUE(outer, NS_ERROR_UNEXPECTED); - - // outer is already using another inner, so it's same as not found - if (outer->GetCurrentInnerWindow() != inner) - return NS_OK; - - nsCOMPtr ret = do_QueryInterface(outer); - ret.forget(aWindow); - return NS_OK; -} - NS_IMETHODIMP nsWindowMediator::UpdateWindowTimeStamp(nsIXULWindow* inWindow) { From dab176a926fd149e7fd3c1edddc06ecf50eb2e37 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 14 May 2013 14:14:42 +0200 Subject: [PATCH 20/27] Bug 867104 - r=ehsan --- content/media/webaudio/AudioBufferSourceNode.cpp | 8 ++------ content/media/webaudio/AudioBufferSourceNode.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/content/media/webaudio/AudioBufferSourceNode.cpp b/content/media/webaudio/AudioBufferSourceNode.cpp index 38fb0e600942..84dd06ceb268 100644 --- a/content/media/webaudio/AudioBufferSourceNode.cpp +++ b/content/media/webaudio/AudioBufferSourceNode.cpp @@ -450,7 +450,6 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext) , mLoop(false) , mStartCalled(false) , mStopped(false) - , mOffsetAndDurationRemembered(false) { AudioBufferSourceNodeEngine* engine = new AudioBufferSourceNodeEngine(this, aContext->Destination()); @@ -494,12 +493,11 @@ AudioBufferSourceNode::Start(double aWhen, double aOffset, std::numeric_limits::min(); SendOffsetAndDurationParametersToStream(ns, aOffset, duration); } else { - // Remember our argument so that we can use them once we have a buffer + // Remember our arguments so that we can use them once we have a buffer mOffset = aOffset; mDuration = aDuration.WasPassed() ? aDuration.Value() : std::numeric_limits::min(); - mOffsetAndDurationRemembered = true; } // Don't set parameter unnecessarily @@ -527,9 +525,7 @@ AudioBufferSourceNode::SendBufferParameterToStream(JSContext* aCx) ns->SetBuffer(nullptr); } - if (mOffsetAndDurationRemembered) { - SendOffsetAndDurationParametersToStream(ns, mOffset, mDuration); - } + SendOffsetAndDurationParametersToStream(ns, mOffset, mDuration); } void diff --git a/content/media/webaudio/AudioBufferSourceNode.h b/content/media/webaudio/AudioBufferSourceNode.h index 180ff272e7e4..eb04e46834dd 100644 --- a/content/media/webaudio/AudioBufferSourceNode.h +++ b/content/media/webaudio/AudioBufferSourceNode.h @@ -152,7 +152,6 @@ private: bool mLoop; bool mStartCalled; bool mStopped; - bool mOffsetAndDurationRemembered; }; } From 61090bc967aa31e2bc6732ec56d4bfab164ceec8 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 14 May 2013 14:14:42 +0200 Subject: [PATCH 21/27] Bug 867104 - Add a crashtest. r=ehsan --- content/media/webaudio/test/Makefile.in | 1 + .../media/webaudio/test/test_bug867104.html | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 content/media/webaudio/test/test_bug867104.html diff --git a/content/media/webaudio/test/Makefile.in b/content/media/webaudio/test/Makefile.in index e646a55ca224..be4c71b87951 100644 --- a/content/media/webaudio/test/Makefile.in +++ b/content/media/webaudio/test/Makefile.in @@ -20,6 +20,7 @@ MOCHITEST_FILES := \ test_bug866570.html \ test_bug866737.html \ test_bug867089.html \ + test_bug867104.html \ test_bug867174.html \ test_bug867203.html \ test_analyserNode.html \ diff --git a/content/media/webaudio/test/test_bug867104.html b/content/media/webaudio/test/test_bug867104.html new file mode 100644 index 000000000000..c46758bc371f --- /dev/null +++ b/content/media/webaudio/test/test_bug867104.html @@ -0,0 +1,36 @@ + + + + Crashtest for bug 867104 + + + + +
    +
    +
    + + From de5b4fd3880a885682703240e4e022f878c765e9 Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Tue, 14 May 2013 21:18:39 +0900 Subject: [PATCH 22/27] Bug 673919 - Remove captureEvents, releaseEvents, and routeEvent. r=smaug --- content/html/document/src/nsHTMLDocument.cpp | 30 -------------- content/html/document/src/nsHTMLDocument.h | 8 ---- dom/base/nsGlobalWindow.cpp | 43 -------------------- dom/interfaces/base/nsIDOMJSWindow.idl | 12 +----- dom/interfaces/html/nsIDOMHTMLDocument.idl | 12 +----- dom/locales/en-US/chrome/dom/dom.properties | 3 -- dom/webidl/HTMLDocument.webidl | 7 ---- js/xpconnect/crashtests/806751.html | 2 +- 8 files changed, 3 insertions(+), 114 deletions(-) diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index df98ae2d6bb5..6d2e4496b019 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -145,15 +145,6 @@ static bool ConvertToMidasInternalCommand(const nsAString & inCommandID, // ================================================================== // = // ================================================================== -static void -ReportUseOfDeprecatedMethod(nsHTMLDocument* aDoc, const char* aWarning) -{ - nsContentUtils::ReportToConsole(nsIScriptError::warningFlag, - "DOM Events", aDoc, - nsContentUtils::eDOM_PROPERTIES, - aWarning); -} - static nsresult RemoveFromAgentSheets(nsCOMArray &aAgentSheets, const nsAString& url) { @@ -2251,27 +2242,6 @@ nsHTMLDocument::GetSelection(ErrorResult& rv) return sel.forget(); } -NS_IMETHODIMP -nsHTMLDocument::CaptureEvents(int32_t aEventFlags) -{ - ReportUseOfDeprecatedMethod(this, "UseOfCaptureEventsWarning"); - return NS_OK; -} - -NS_IMETHODIMP -nsHTMLDocument::ReleaseEvents(int32_t aEventFlags) -{ - ReportUseOfDeprecatedMethod(this, "UseOfReleaseEventsWarning"); - return NS_OK; -} - -NS_IMETHODIMP -nsHTMLDocument::RouteEvent(nsIDOMEvent* aEvt) -{ - ReportUseOfDeprecatedMethod(this, "UseOfRouteEventWarning"); - return NS_OK; -} - // Mapped to document.embeds for NS4 compatibility NS_IMETHODIMP nsHTMLDocument::GetPlugins(nsIDOMHTMLCollection** aPlugins) diff --git a/content/html/document/src/nsHTMLDocument.h b/content/html/document/src/nsHTMLDocument.h index 599c404ed8d7..88a680126765 100644 --- a/content/html/document/src/nsHTMLDocument.h +++ b/content/html/document/src/nsHTMLDocument.h @@ -99,11 +99,6 @@ public: // nsIDOMHTMLDocument interface NS_DECL_NSIDOMHTMLDOCUMENT - void RouteEvent(nsDOMEvent& aEvent) - { - RouteEvent(&aEvent); - } - /** * Returns the result of document.all[aID] which can either be a node * or a nodelist depending on if there are multiple nodes with the same @@ -248,9 +243,6 @@ public: // Deprecated } already_AddRefed GetSelection(mozilla::ErrorResult& rv); - // The XPCOM CaptureEvents works fine for us. - // The XPCOM ReleaseEvents works fine for us. - // The XPCOM RouteEvent works fine for us. // We're picking up GetLocation from Document already_AddRefed GetLocation() const { return nsIDocument::GetLocation(); diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index a7cd596458b2..fb30295a9075 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -6122,49 +6122,6 @@ nsGlobalWindow::SetResizable(bool aResizable) return NS_OK; } -static void -ReportUseOfDeprecatedMethod(nsGlobalWindow* aWindow, const char* aWarning) -{ - nsCOMPtr doc = aWindow->GetExtantDoc(); - nsContentUtils::ReportToConsole(nsIScriptError::warningFlag, - "DOM Events", doc, - nsContentUtils::eDOM_PROPERTIES, - aWarning); -} - -NS_IMETHODIMP -nsGlobalWindow::CaptureEvents(int32_t aEventFlags) -{ - ReportUseOfDeprecatedMethod(this, "UseOfCaptureEventsWarning"); - return NS_OK; -} - -NS_IMETHODIMP -nsGlobalWindow::ReleaseEvents(int32_t aEventFlags) -{ - ReportUseOfDeprecatedMethod(this, "UseOfReleaseEventsWarning"); - return NS_OK; -} - -NS_IMETHODIMP -nsGlobalWindow::RouteEvent(nsIDOMEvent* aEvt) -{ - ReportUseOfDeprecatedMethod(this, "UseOfRouteEventWarning"); - return NS_OK; -} - -NS_IMETHODIMP -nsGlobalWindow::EnableExternalCapture() -{ - return NS_ERROR_FAILURE; -} - -NS_IMETHODIMP -nsGlobalWindow::DisableExternalCapture() -{ - return NS_ERROR_FAILURE; -} - static bool IsPopupBlocked(nsIDocument* aDoc) { diff --git a/dom/interfaces/base/nsIDOMJSWindow.idl b/dom/interfaces/base/nsIDOMJSWindow.idl index 5c5386e38a65..faef7e13e350 100644 --- a/dom/interfaces/base/nsIDOMJSWindow.idl +++ b/dom/interfaces/base/nsIDOMJSWindow.idl @@ -5,7 +5,7 @@ #include "domstubs.idl" -[scriptable, uuid(6652c4d2-6b49-424b-aaf9-91f91006fab7)] +[scriptable, uuid(35b653f4-e679-4843-8391-89cb2f5a9ba4)] interface nsIDOMJSWindow : nsISupports { void dump(in DOMString str); @@ -33,16 +33,6 @@ interface nsIDOMJSWindow : nsISupports */ void setResizable(in boolean resizable); - /** - * @deprecated These are old Netscape 4 methods. Do not use, - * the implementation is no-op. - */ - void captureEvents(in long eventFlags); - void releaseEvents(in long eventFlags); - void routeEvent(in nsIDOMEvent evt); - void enableExternalCapture(); - void disableExternalCapture(); - /** * This is the scriptable version of nsIDOMWindow::open() * that takes 3 optional arguments. Its binary name is OpenJS to diff --git a/dom/interfaces/html/nsIDOMHTMLDocument.idl b/dom/interfaces/html/nsIDOMHTMLDocument.idl index 0c9a1b220127..f4194357b2b9 100644 --- a/dom/interfaces/html/nsIDOMHTMLDocument.idl +++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl @@ -13,7 +13,7 @@ */ interface nsISelection; -[scriptable, uuid(fd76e045-8d97-4a97-ad75-eac5ae2f3ea4)] +[scriptable, uuid(60e0e311-b9c7-4952-8e9c-d4974005e887)] interface nsIDOMHTMLDocument : nsIDOMDocument { attribute DOMString domain; @@ -88,14 +88,4 @@ interface nsIDOMHTMLDocument : nsIDOMDocument // DOM Range nsISelection getSelection(); - - - // Mozilla extensions - /** - * @deprecated These are old Netscape 4 methods. Do not use, - * the implementation is no-op. - */ - void captureEvents(in long eventFlags); - void releaseEvents(in long eventFlags); - void routeEvent(in nsIDOMEvent evt); }; diff --git a/dom/locales/en-US/chrome/dom/dom.properties b/dom/locales/en-US/chrome/dom/dom.properties index 0a2ada75d8b0..0e72a1060991 100644 --- a/dom/locales/en-US/chrome/dom/dom.properties +++ b/dom/locales/en-US/chrome/dom/dom.properties @@ -17,9 +17,6 @@ OnBeforeUnloadMessage=This page is asking you to confirm that you want to leave OnBeforeUnloadStayButton=Stay on Page OnBeforeUnloadLeaveButton=Leave Page DocumentAllUsed=Non-standard document.all property was used. Use W3C standard document.getElementById() instead. -UseOfCaptureEventsWarning=Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener -UseOfReleaseEventsWarning=Use of releaseEvents() is deprecated. To upgrade your code, use the DOM 2 removeEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.removeEventListener -UseOfRouteEventWarning=Use of routeEvent() is deprecated. To upgrade your code, use the DOM 2 dispatchEvent() method. For more help http://developer.mozilla.org/en/docs/DOM:element.dispatchEvent UseOfPreventBubbleWarning=Event=%S, use of preventBubble() is deprecated. Use W3C standard stopPropagation() instead. UseOfPreventCaptureWarning=Event=%S, use of preventCapture() is deprecated. Use W3C standard stopPropagation() instead. UseOfDOM3LoadMethodWarning=Use of Document.load() is deprecated. To upgrade your code, use the DOM XMLHttpRequest object. For more help https://developer.mozilla.org/en/XMLHttpRequest diff --git a/dom/webidl/HTMLDocument.webidl b/dom/webidl/HTMLDocument.webidl index de7b54059510..1fdfb91f98f9 100644 --- a/dom/webidl/HTMLDocument.webidl +++ b/dom/webidl/HTMLDocument.webidl @@ -68,11 +68,4 @@ interface HTMLDocument : Document { // https://dvcs.w3.org/hg/editing/raw-file/tip/editing.html#selections [Throws] Selection getSelection(); - - // @deprecated These are old Netscape 4 methods. Do not use, - // the implementation is no-op. - // XXXbz do we actually need these anymore? - void captureEvents(long eventFlags); - void releaseEvents(long eventFlags); - void routeEvent(Event evt); }; diff --git a/js/xpconnect/crashtests/806751.html b/js/xpconnect/crashtests/806751.html index 4e44b9b829a7..98ed46b8b29a 100644 --- a/js/xpconnect/crashtests/806751.html +++ b/js/xpconnect/crashtests/806751.html @@ -8,7 +8,7 @@ function boom() var frame = document.getElementById("frame"); var frameWin = frame.contentWindow; var frameWinner = Object.create(frameWin); - var v = frameWinner.captureEvents.bind(frameWinner); + var v = frameWinner.clearTimeout.bind(frameWinner); frame.src = "local-file-not-found"; setTimeout(function() { setTimeout(finish); v(0); }); } From c997d9e1b113c2b310b1643aedd9243eb4eb2d6c Mon Sep 17 00:00:00 2001 From: Aishwarya Goyal Date: Tue, 14 May 2013 08:29:31 -0400 Subject: [PATCH 23/27] Bug 691594 - Remove the default favicon image from bookmarks toolbar when no favicon provided by site. r=dao --- browser/themes/linux/browser.css | 5 +++++ browser/themes/osx/browser.css | 5 +++++ browser/themes/windows/browser.css | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css index 6a52e746b6fc..dec228096d3d 100644 --- a/browser/themes/linux/browser.css +++ b/browser/themes/linux/browser.css @@ -91,6 +91,11 @@ toolbarbutton.bookmark-item[open="true"] { height: 16px; } +#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon { + display: none; +} + + /* Prevent [mode="icons"] from hiding the label */ .bookmark-item > .toolbarbutton-text { display: -moz-box !important; diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css index 36967ce8ff08..6de03f3a85ba 100644 --- a/browser/themes/osx/browser.css +++ b/browser/themes/osx/browser.css @@ -216,6 +216,11 @@ toolbarbutton.bookmark-item > menupopup { max-height: 16px; } +#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon { + display: none; +} + + .bookmark-item > .toolbarbutton-icon[label]:not([label=""]), .bookmark-item > .toolbarbutton-icon[type="menu"] { -moz-margin-end: 5px; diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css index 6f9d09338048..10ecc597fd82 100644 --- a/browser/themes/windows/browser.css +++ b/browser/themes/windows/browser.css @@ -612,6 +612,10 @@ toolbarbutton.bookmark-item[open="true"] { height: 16px; } +#PlacesToolbarItems > .bookmark-item:not([image]):not([label=""]):not([container]) > .toolbarbutton-icon { + display: none; +} + /* Prevent [mode="icons"] from hiding the label */ .bookmark-item > .toolbarbutton-text { display: -moz-box !important; From 6f0da60663f51d57fe52f83b3ab9c51babed14c0 Mon Sep 17 00:00:00 2001 From: Hector Zhao Date: Mon, 13 May 2013 14:58:10 +0800 Subject: [PATCH 24/27] Bug 739156 - Replace illegal characters in filename for Win Vista+ file picker. r=jimm --- widget/windows/nsFilePicker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/widget/windows/nsFilePicker.cpp b/widget/windows/nsFilePicker.cpp index e9b58800680a..814488f8ad25 100644 --- a/widget/windows/nsFilePicker.cpp +++ b/widget/windows/nsFilePicker.cpp @@ -1157,6 +1157,7 @@ nsBaseWinFilePicker::SetDefaultString(const nsAString& aString) // Then, we need to replace illegal characters. At this stage, we cannot // replace the backslash as the string might represent a file path. mDefaultFilePath.ReplaceChar(FILE_ILLEGAL_CHARACTERS, '-'); + mDefaultFilename.ReplaceChar(FILE_ILLEGAL_CHARACTERS, '-'); return NS_OK; } From 68ea38522eb89b14d0772f7550c33501fe03f225 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Tue, 14 May 2013 08:29:31 -0400 Subject: [PATCH 25/27] Bug 868845 - Convert to use gecko preference service about the preference of show url in address bar. r=wesj --- mobile/android/app/mobile.js | 5 ++ mobile/android/base/BrowserToolbar.java | 62 +++++++++++-------- mobile/android/base/GeckoPreferences.java | 33 ---------- .../android/base/resources/values/arrays.xml | 8 +++ .../resources/xml/preferences_privacy.xml | 6 +- mobile/android/chrome/content/browser.js | 2 + 6 files changed, 54 insertions(+), 62 deletions(-) diff --git a/mobile/android/app/mobile.js b/mobile/android/app/mobile.js index 2977d4882575..80eefe6a70dd 100644 --- a/mobile/android/app/mobile.js +++ b/mobile/android/app/mobile.js @@ -700,6 +700,11 @@ pref("layout.imagevisibility.enabled", false); // Enable the dynamic toolbar pref("browser.chrome.dynamictoolbar", true); +// The mode of browser titlebar +// 0: Show a current page title. +// 1: Show a current page url. +pref("browser.chrome.titlebarMode", 0); + #ifdef MOZ_PKG_SPECIAL // Disable webgl on ARMv6 because running the reftests takes // too long for some reason (bug 843738) diff --git a/mobile/android/base/BrowserToolbar.java b/mobile/android/base/BrowserToolbar.java index 279828f394f3..884c1a92f70b 100644 --- a/mobile/android/base/BrowserToolbar.java +++ b/mobile/android/base/BrowserToolbar.java @@ -15,8 +15,9 @@ import org.mozilla.gecko.util.HardwareUtils; import org.mozilla.gecko.util.ThreadUtils; import org.mozilla.gecko.util.UiAsyncTask; +import org.mozilla.gecko.PrefsHelper; + import android.content.Context; -import android.content.SharedPreferences; import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.Color; @@ -60,11 +61,9 @@ import java.util.List; public class BrowserToolbar implements Tabs.OnTabsChangedListener, GeckoMenu.ActionItemBarPresenter, - Animation.AnimationListener, - SharedPreferences.OnSharedPreferenceChangeListener { + Animation.AnimationListener { private static final String LOGTAG = "GeckoToolbar"; - public static final String PREFS_NAME = "BrowserToolbar"; - public static final String PREFS_SHOW_URL = "ShowUrl"; + public static final String PREF_TITLEBAR_MODE = "browser.chrome.titlebarMode"; private GeckoRelativeLayout mLayout; private LayoutParams mAwesomeBarParams; private View mAwesomeBarContent; @@ -124,6 +123,8 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener, private boolean mShowUrl; + private Integer mPrefObserverId; + public BrowserToolbar(BrowserApp activity) { // BrowserToolbar is attached to BrowserApp only. mActivity = activity; @@ -135,23 +136,36 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener, mAnimatingEntry = false; mShowUrl = false; - (new UiAsyncTask(ThreadUtils.getBackgroundHandler()) { + // listen to the title bar pref. + mPrefObserverId = PrefsHelper.getPref(PREF_TITLEBAR_MODE, new PrefsHelper.PrefHandlerBase() { @Override - public synchronized Void doInBackground(Void... params) { - SharedPreferences settings = mActivity.getSharedPreferences(PREFS_NAME, 0); - settings.registerOnSharedPreferenceChangeListener(BrowserToolbar.this); - mShowUrl = settings.getBoolean(PREFS_SHOW_URL, false); - return null; + public void prefValue(String pref, String str) { + int value = Integer.parseInt(str); + boolean shouldShowUrl = (value == 1); + + if (shouldShowUrl == mShowUrl) { + return; + } + mShowUrl = shouldShowUrl; + + ThreadUtils.postToUiThread(new Runnable() { + @Override + public void run() { + Tab tab = Tabs.getInstance().getSelectedTab(); + if (tab != null) { + setTitle(tab.getDisplayTitle()); + } + } + }); } @Override - public void onPostExecute(Void v) { - Tab tab = Tabs.getInstance().getSelectedTab(); - if (tab != null) { - setTitle(tab.getDisplayTitle()); - } + public boolean isObserver() { + // We want to be notified of changes to be able to switch mode + // without restarting. + return true; } - }).execute(); + }); Resources res = mActivity.getResources(); mUrlColor = new ForegroundColorSpan(res.getColor(R.color.url_bar_urltext)); @@ -1155,6 +1169,10 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener, } public void onDestroy() { + if (mPrefObserverId != null) { + PrefsHelper.removeObserver(mPrefObserverId); + mPrefObserverId = null; + } Tabs.unregisterOnTabsChangedListener(this); } @@ -1178,14 +1196,4 @@ public class BrowserToolbar implements Tabs.OnTabsChangedListener, return true; } - - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { - if (key.equals(PREFS_SHOW_URL)) { - mShowUrl = sharedPreferences.getBoolean(key, false); - Tab tab = Tabs.getInstance().getSelectedTab(); - if (tab != null) { - setTitle(tab.getDisplayTitle()); - } - } - } } diff --git a/mobile/android/base/GeckoPreferences.java b/mobile/android/base/GeckoPreferences.java index f05e6ec4796d..e44f4499b5da 100644 --- a/mobile/android/base/GeckoPreferences.java +++ b/mobile/android/base/GeckoPreferences.java @@ -66,7 +66,6 @@ public class GeckoPreferences private static String PREFS_MENU_CHAR_ENCODING = "browser.menu.showCharacterEncoding"; private static String PREFS_MP_ENABLED = "privacy.masterpassword.enabled"; private static String PREFS_UPDATER_AUTODOWNLOAD = "app.update.autodownload"; - private static String PREFS_TITLEBAR_MODE = "android.not_a_preference.privacy.titlebar"; @Override protected void onCreate(Bundle savedInstanceState) { @@ -220,8 +219,6 @@ public class GeckoPreferences preferences.removePreference(pref); i--; continue; - } else if (PREFS_TITLEBAR_MODE.equals(key)) { - setupTitlebarPref((ListPreference) pref); } // Some Preference UI elements are not actually preferences, @@ -610,34 +607,4 @@ public class GeckoPreferences public boolean isGeckoActivityOpened() { return false; } - - private void setupTitlebarPref(final ListPreference pref) { - final SharedPreferences settings = getSharedPreferences(BrowserToolbar.PREFS_NAME, 0); - boolean value = settings.getBoolean(BrowserToolbar.PREFS_SHOW_URL, false); - - final String[] entries = new String[] { - getResources().getString(R.string.pref_titlebar_mode_url), - getResources().getString(R.string.pref_titlebar_mode_title) - }; - pref.setEntries(entries); - pref.setEntryValues(entries); - pref.setValueIndex(value ? 0 : 1); - pref.setSummary(value ? entries[0] : entries[1]); - - pref.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { - @Override - public boolean onPreferenceChange(Preference preference, final Object newValue) { - ThreadUtils.postToBackgroundThread(new Runnable() { - @Override - public void run() { - settings.edit() - .putBoolean(BrowserToolbar.PREFS_SHOW_URL, newValue.toString().equals(entries[0])) - .commit(); - } - }); - pref.setSummary(newValue.toString()); - return true; - } - }); - } } diff --git a/mobile/android/base/resources/values/arrays.xml b/mobile/android/base/resources/values/arrays.xml index 8f63654b3d44..6d800fc14a89 100644 --- a/mobile/android/base/resources/values/arrays.xml +++ b/mobile/android/base/resources/values/arrays.xml @@ -108,6 +108,14 @@ enabled wifi disabled + + + @string/pref_titlebar_mode_title + @string/pref_titlebar_mode_url + + + 0 + 1 @string/tabs_normal diff --git a/mobile/android/base/resources/xml/preferences_privacy.xml b/mobile/android/base/resources/xml/preferences_privacy.xml index fffa0f4bfddb..82f7497f2cea 100644 --- a/mobile/android/base/resources/xml/preferences_privacy.xml +++ b/mobile/android/base/resources/xml/preferences_privacy.xml @@ -50,9 +50,11 @@ android:defaultValue="true" android:persistent="true" /> - + android:entries="@array/pref_titlebar_mode_entries" + android:entryValues="@array/pref_titlebar_mode_values" + android:persistent="false" /> Date: Tue, 14 May 2013 08:29:31 -0400 Subject: [PATCH 26/27] Bug 871828 - Fix global object sharing for FormHistory. r=gavin, r=khuey --- toolkit/components/satchel/FormHistory.jsm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/satchel/FormHistory.jsm b/toolkit/components/satchel/FormHistory.jsm index dc71b77fe1d3..8a04d9ddca85 100644 --- a/toolkit/components/satchel/FormHistory.jsm +++ b/toolkit/components/satchel/FormHistory.jsm @@ -78,7 +78,7 @@ * an error occurred. */ -EXPORTED_SYMBOLS = [ "FormHistory" ]; +this.EXPORTED_SYMBOLS = ["FormHistory"]; const Cc = Components.classes; const Ci = Components.interfaces; @@ -754,7 +754,7 @@ function expireOldEntriesVacuum(aExpireTime, aBeginningCount) { }); } -const FormHistory = { +this.FormHistory = { search : function formHistorySearch(aSelectTerms, aSearchData, aCallbacks) { // if no terms selected, select everything aSelectTerms = (aSelectTerms) ? aSelectTerms : validFields; From 17dec0c1bcb37b34ab02ccc3d7072e643700564d Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Tue, 14 May 2013 09:14:22 -0600 Subject: [PATCH 27/27] Bug 869030 - Disable testSystemPages for causing panda reboots in future tests; r=jmaher --- mobile/android/base/tests/robocop.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/android/base/tests/robocop.ini b/mobile/android/base/tests/robocop.ini index 9bf136ace9ae..b9c0350fdc0c 100644 --- a/mobile/android/base/tests/robocop.ini +++ b/mobile/android/base/tests/robocop.ini @@ -32,7 +32,7 @@ [testShareLink] [testClearPrivateData] # [testSettingsMenuItems] # see bug 843947 -[testSystemPages] +# [testSystemPages] # see bug 869030 # [testPermissions] # see bug 757475 # [testJarReader] # see bug 738890 [testDistribution]