This commit is contained in:
Margaret Leibovic 2011-09-13 16:47:04 -07:00
Родитель fa75e206b8 0d38832157
Коммит c8339c97e8
13 изменённых файлов: 40 добавлений и 105 удалений

Просмотреть файл

@ -41,6 +41,7 @@
#include "AccEvent.h"
#include "nsCycleCollectionParticipant.h"
#include "nsRefreshDriver.h"
class nsAccessible;
class nsDocAccessible;

Просмотреть файл

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function boom()
{
var table = document.createElement("table");
document.body.appendChild(table);
table.contentEditable = "true";
table.focus();
try {
// This will throw, since it's attempting to inject a list inside a table
document.execCommand("insertunorderedlist", false, null);
} catch (e) {}
}
</script>
</head>
<body onload="boom();"></body>
</html>

Просмотреть файл

@ -2,6 +2,7 @@ load 336081-1.xhtml
load 382778-1.html
load 407074-1.html
load 407277-1.html
load 414178-1.html
load 418923-1.html
asserts(0-16) load 420439.html # Bug 439258
load 428489-1.html

Просмотреть файл

@ -7335,6 +7335,13 @@ nsHTMLEditRules::SplitAsNeeded(const nsAString *aTag,
// sniffing up the parent tree until we find
// a legal place for the block
if (!parent) break;
// Don't leave the active editing host
if (!mHTMLEditor->IsNodeInActiveEditor(parent)) {
nsCOMPtr<nsIContent> parentContent = do_QueryInterface(parent);
if (parentContent != mHTMLEditor->GetActiveEditingHost()) {
break;
}
}
if (mHTMLEditor->CanContainTag(parent, *aTag))
{
tagParent = parent;

Просмотреть файл

@ -82,7 +82,7 @@ def normalizedFilename(f):
# First pass: parse and type-check all protocols
for f in files:
log(1, os.path.basename(f))
log(2, os.path.basename(f))
filename = normalizedFilename(f)
if f == '-':
fd = sys.stdin

Просмотреть файл

@ -6173,7 +6173,7 @@ END_CASE(JSOP_ARRAYPUSH)
* When a trap handler returns JSTRAP_RETURN, we jump here with
* interpReturnOK set to true bypassing any finally blocks.
*/
interpReturnOK &= UnwindScope(cx, 0, interpReturnOK || cx->isExceptionPending());
interpReturnOK &= (JSBool)UnwindScope(cx, 0, interpReturnOK || cx->isExceptionPending());
JS_ASSERT(regs.sp == regs.fp()->base());
if (entryFrame != regs.fp())

Просмотреть файл

@ -73,6 +73,7 @@
#include "nsFrameSelection.h"
#include "nsGUIEvent.h"
#include "nsContentUtils.h"
#include "nsRefreshDriver.h"
class nsIRange;
class nsIDragService;

Просмотреть файл

@ -78,9 +78,11 @@ pref("browser.viewport.desktopWidth", 980);
#ifndef MOZ_PLATFORM_MAEMO
// On desktop builds, simulate an MDPI tablet by default.
pref("layout.css.dpi", 160);
#else
// Maemo X11 lies about its dpi
pref("layout.css.dpi", 240);
#endif
#endif
/* allow scrollbars to float above chrome ui */
pref("ui.scrollbarsCanOverlapContent", 1);

Просмотреть файл

@ -1852,40 +1852,4 @@
</method>
</implementation>
</binding>
<binding id="setting-fulltoggle-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-bool">
<handlers>
<handler event="click" button="0" phase="capturing">
<![CDATA[
this.input.setChecked(!this.value);
this.inputChanged();
event.stopPropagation();
]]>
</handler>
</handlers>
</binding>
<binding id="setting-fulltoggle-boolint" extends="chrome://mozapps/content/extensions/setting.xml#setting-boolint">
<handlers>
<handler event="click" button="0" phase="capturing">
<![CDATA[
this.input.setChecked(!this.value);
this.inputChanged();
event.stopPropagation();
]]>
</handler>
</handlers>
</binding>
<binding id="setting-fulltoggle-localized-bool" extends="chrome://mozapps/content/extensions/setting.xml#setting-localized-bool">
<handlers>
<handler event="click" button="0" phase="capturing">
<![CDATA[
this.input.setChecked(!this.value);
this.inputChanged();
event.stopPropagation();
]]>
</handler>
</handlers>
</binding>
</bindings>

Просмотреть файл

@ -27,15 +27,15 @@ settings {
}
setting[type="bool"] {
-moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-bool");
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-bool");
}
setting[type="bool"][localized="true"] {
-moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-localized-bool");
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-localized-bool");
}
setting[type="boolint"] {
-moz-binding: url("chrome://browser/content/bindings.xml#setting-fulltoggle-boolint");
-moz-binding: url("chrome://mozapps/content/extensions/setting.xml#setting-boolint");
}
setting[type="integer"] {

Просмотреть файл

@ -74,7 +74,6 @@ _BROWSER_FILES = \
browser_history.js \
browser_mainui.js \
browser_preferences_text.js \
browser_preferences_fulltoggle.js \
browser_rect.js \
browser_rememberPassword.js \
browser_scroll.js \

Просмотреть файл

@ -1,58 +0,0 @@
// browser-chrome test for fennec preferences to toggle values while clicking on the preference name
var gTests = [];
var gCurrentTest = null;
function test() {
// The "runNextTest" approach is async, so we need to call "waitForExplicitFinish()"
// We call "finish()" when the tests are finished
waitForExplicitFinish();
// Start the tests
runNextTest();
}
//------------------------------------------------------------------------------
// Iterating tests by shifting test out one by one as runNextTest is called.
function runNextTest() {
// Run the next test until all tests completed
if (gTests.length > 0) {
gCurrentTest = gTests.shift();
info(gCurrentTest.desc);
gCurrentTest.run();
}
else {
// Cleanup. All tests are completed at this point
finish();
}
}
// -----------------------------------------------------------------------------------------
// Verify preferences and text
gTests.push({
desc: "Verify full toggle on Preferences",
run: function(){
// 1.Click preferences to view prefs
document.getElementById("tool-panel-open").click();
is(document.getElementById("panel-container").hidden, false, "Preferences should be visible");
var contentRegion = document.getElementById("prefs-content");
// Check for *Show images*
var imageRegion = document.getAnonymousElementByAttribute(contentRegion, "pref", "permissions.default.image");
var imageValue = imageRegion.value;
var imageTitle = document.getAnonymousElementByAttribute(imageRegion, "class", "preferences-title");
var imageButton = document.getAnonymousElementByAttribute(imageRegion, "anonid", "input");
imageButton.click();
is(imageRegion.value, !imageValue, "Tapping on input control should change the value");
imageTitle.click();
is(imageRegion.value, imageValue, "Tapping on the title should change the value");
imageRegion.click();
is(imageRegion.value, !imageValue, "Tapping on the setting should change the value");
BrowserUI.hidePanel();
is(document.getElementById("panel-container").hidden, true, "Preferences panel should be closed");
runNextTest();
}
});

Просмотреть файл

@ -1244,10 +1244,6 @@ setting {
-moz-box-orient: horizontal;
}
setting:hover:active {
background-color: @color_background_highlight@;
}
.setting-label {
-moz-box-flex: 1;
}