Loading browser/base/content/test/browser_popupNotification.js +9 −9 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ var wrongBrowserNotification; var tests = [ { // Test #0 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -206,7 +206,7 @@ var tests = [ }, { // Test #1 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -221,7 +221,7 @@ var tests = [ }, { // Test #2 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading Loading @@ -285,7 +285,7 @@ var tests = [ // notification. { // Test #6 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); // Show the same notification twice this.notification1 = showNotification(this.notifyObj); this.notification2 = showNotification(this.notifyObj); Loading Loading @@ -332,7 +332,7 @@ var tests = [ // Test notification without mainAction { // Test #8 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notifyObj.mainAction = null; this.notification = showNotification(this.notifyObj); }, Loading Loading @@ -568,7 +568,7 @@ var tests = [ // Test notification "Not Now" menu item { // Test #17 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -584,7 +584,7 @@ var tests = [ // Test notification close button { // Test #18 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading Loading @@ -677,7 +677,7 @@ var tests = [ this.notification2.remove(); ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered"); } ], ] }, // Test that multiple notification icons are removed when switching tabs { // Test #22 Loading Loading @@ -718,7 +718,7 @@ var tests = [ gBrowser.selectedTab = this.oldSelectedTab; this.notificationOld.remove(); } ], ] } ]; Loading layout/generic/nsTextRunTransformations.cpp +16 −4 Original line number Diff line number Diff line Loading @@ -599,11 +599,18 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, }; RunCaseState runCase = kUpperOrCaseless; PRUint32 i; for (i = 0; i <= length; ++i) { // Note that this loop runs from 0 to length *inclusive*, so the last // iteration is in effect beyond the end of the input text, to give a // chance to finish the last casing run we've found. // The last iteration, when i==length, must not attempt to look at the // character position [i] or the style data for styles[i], as this would // be beyond the valid length of the textrun or its style array. for (PRUint32 i = 0; i <= length; ++i) { RunCaseState chCase = kUpperOrCaseless; nsStyleContext* styleContext = styles[i]; // Unless we're at the end, figure out what treatment the current // character will need. if (i < length) { nsStyleContext* styleContext = styles[i]; // Characters that aren't the start of a cluster are ignored here. They // get added to whatever lowercase/non-lowercase run we're in. if (!inner->IsClusterStart(i)) { Loading Loading @@ -634,6 +641,11 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, } } // At the end of the text, or when the current character needs different // casing treatment from the current run, finish the run-in-progress // and prepare to accumulate a new run. // Note that we do not look at any source data for offset [i] here, // as that would be invalid in the case where i==length. if ((i == length || runCase != chCase) && runStart < i) { nsAutoPtr<nsTransformedTextRun> transformedChild; nsAutoPtr<gfxTextRun> cachedChild; Loading Loading @@ -681,7 +693,7 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, if (i < length) { runCase = chCase; styleArray.AppendElement(styleContext); styleArray.AppendElement(styles[i]); canBreakBeforeArray.AppendElement(aTextRun->CanBreakLineBefore(i)); } } Loading Loading
browser/base/content/test/browser_popupNotification.js +9 −9 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ var wrongBrowserNotification; var tests = [ { // Test #0 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -206,7 +206,7 @@ var tests = [ }, { // Test #1 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -221,7 +221,7 @@ var tests = [ }, { // Test #2 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading Loading @@ -285,7 +285,7 @@ var tests = [ // notification. { // Test #6 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); // Show the same notification twice this.notification1 = showNotification(this.notifyObj); this.notification2 = showNotification(this.notifyObj); Loading Loading @@ -332,7 +332,7 @@ var tests = [ // Test notification without mainAction { // Test #8 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notifyObj.mainAction = null; this.notification = showNotification(this.notifyObj); }, Loading Loading @@ -568,7 +568,7 @@ var tests = [ // Test notification "Not Now" menu item { // Test #17 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading @@ -584,7 +584,7 @@ var tests = [ // Test notification close button { // Test #18 run: function () { this.notifyObj = new basicNotification(), this.notifyObj = new basicNotification(); this.notification = showNotification(this.notifyObj); }, onShown: function (popup) { Loading Loading @@ -677,7 +677,7 @@ var tests = [ this.notification2.remove(); ok(this.notifyObj2.removedCallbackTriggered, "removed callback triggered"); } ], ] }, // Test that multiple notification icons are removed when switching tabs { // Test #22 Loading Loading @@ -718,7 +718,7 @@ var tests = [ gBrowser.selectedTab = this.oldSelectedTab; this.notificationOld.remove(); } ], ] } ]; Loading
layout/generic/nsTextRunTransformations.cpp +16 −4 Original line number Diff line number Diff line Loading @@ -599,11 +599,18 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, }; RunCaseState runCase = kUpperOrCaseless; PRUint32 i; for (i = 0; i <= length; ++i) { // Note that this loop runs from 0 to length *inclusive*, so the last // iteration is in effect beyond the end of the input text, to give a // chance to finish the last casing run we've found. // The last iteration, when i==length, must not attempt to look at the // character position [i] or the style data for styles[i], as this would // be beyond the valid length of the textrun or its style array. for (PRUint32 i = 0; i <= length; ++i) { RunCaseState chCase = kUpperOrCaseless; nsStyleContext* styleContext = styles[i]; // Unless we're at the end, figure out what treatment the current // character will need. if (i < length) { nsStyleContext* styleContext = styles[i]; // Characters that aren't the start of a cluster are ignored here. They // get added to whatever lowercase/non-lowercase run we're in. if (!inner->IsClusterStart(i)) { Loading Loading @@ -634,6 +641,11 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, } } // At the end of the text, or when the current character needs different // casing treatment from the current run, finish the run-in-progress // and prepare to accumulate a new run. // Note that we do not look at any source data for offset [i] here, // as that would be invalid in the case where i==length. if ((i == length || runCase != chCase) && runStart < i) { nsAutoPtr<nsTransformedTextRun> transformedChild; nsAutoPtr<gfxTextRun> cachedChild; Loading Loading @@ -681,7 +693,7 @@ nsFontVariantTextRunFactory::RebuildTextRun(nsTransformedTextRun* aTextRun, if (i < length) { runCase = chCase; styleArray.AppendElement(styleContext); styleArray.AppendElement(styles[i]); canBreakBeforeArray.AppendElement(aTextRun->CanBreakLineBefore(i)); } } Loading