|
60楼#
发布于:2011-12-27 13:45
vc2010 express别忘了加入ac_add_options --disable-accessibility
因为这个默认开启,而且用到了ATL,express版本不带ATL |
|
|
61楼#
发布于:2011-12-27 13:45
dongyuanxun:vc2010 express别忘了加入ac_add_options --disable-accessibility 好彩,看了一眼,配置里有 我的配置是下载lawliet的,然后去掉了几项优化 第二个patch(有好多文件那个)我是手工打的,打上后又添了两行才能编译 |
|
|
62楼#
发布于:2011-12-27 13:45
|
|
|
63楼#
发布于:2011-12-27 13:45
我一般测试时把-GL去掉
编译速度无与伦比 |
|
|
64楼#
发布于:2011-12-27 13:45
编译好了,遗憾的是,蓝色代码没用
还是以前的样子,在所有页面都不能用手势跳到页首页尾 |
|
|
65楼#
发布于:2011-12-27 13:45
你可以试试10的代码如何……
|
|
|
66楼#
发布于:2011-12-27 13:45
10就不试了,估计还那样
|
|
|
67楼#
发布于:2011-12-27 13:45
10b2的代碼我看了,還是沒有修正這個問題
補丁還是得打 |
|
|
68楼#
发布于:2011-12-27 13:45
|
|
|
69楼#
发布于:2011-12-27 13:45
不知道為什麼我打上補丁後
編譯都會報錯...總是在nsEditorCommands.cpp這邊停了下來... |
|
|
70楼#
发布于:2011-12-27 13:45
nsEditorCommands.cpp 的补丁很简单,我是手工打的
删几行,改两行就行了 |
|
|
71楼#
发布于:2011-12-27 13:45
如果没有结果,10 release的时候我还是只会打第一个补丁
这次我可能编译的稍晚,看看究竟会不会有10.0.1…… 3.6.x也不清楚到底何时end,这个用vc2010编译稍微有难度,我只想编译个end版本 |
|
|
72楼#
发布于:2011-12-27 13:45
估计10出release 3.6.x就停了
现在3.6.x就是事实上的长期支持版,尽管mozilla没承认过 |
|
|
73楼#
发布于:2011-12-27 13:45
|
|
|
74楼#
发布于:2011-12-27 13:45
慚愧...代碼我現在才弄好
有bugzilla帳號的人能幫我送patch嗎? 經測試可以用在10跟9.0.1上 diff --git a/editor/libeditor/base/nsEditorCommands.cpp b/editor/libeditor/base/nsEditorCommands.cpp
--- a/editor/libeditor/base/nsEditorCommands.cpp 2011-12-21 07:28:16 +0800
+++ b/editor/libeditor/base/nsEditorCommands.cpp 2011-12-30 22:11:36 +0800
@@ -320,13 +320,7 @@
NS_ENSURE_ARG_POINTER(outCmdEnabled);
nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
if (editor)
- {
- PRBool isEditable = PR_FALSE;
- nsresult rv = editor->GetIsSelectionEditable(&isEditable);
- NS_ENSURE_SUCCESS(rv, rv);
- if (isEditable)
- return editor->CanCopy(outCmdEnabled);
- }
+ return editor->CanCopy(outCmdEnabled);
*outCmdEnabled = PR_FALSE;
return NS_OK;
@@ -663,19 +657,14 @@
nsresult rv = NS_OK;
*outCmdEnabled = PR_FALSE;
- PRBool docIsEmpty, selectionIsEditable;
+ PRBool docIsEmpty;
// you can select all if there is an editor which is non-empty
nsCOMPtr<nsIEditor> editor = do_QueryInterface(aCommandRefCon);
if (editor) {
- rv = editor->GetIsSelectionEditable(&selectionIsEditable);
+ rv = editor->GetDocumentIsEmpty(&docIsEmpty);
NS_ENSURE_SUCCESS(rv, rv);
-
- if (selectionIsEditable) {
- rv = editor->GetDocumentIsEmpty(&docIsEmpty);
- NS_ENSURE_SUCCESS(rv, rv);
- *outCmdEnabled = !docIsEmpty;
- }
+*outCmdEnabled = !docIsEmpty;
}
return rv;
diff --git a/editor/libeditor/html/tests/test_bug676401.html b/editor/libeditor/html/tests/test_bug676401.html
--- a/editor/libeditor/html/tests/test_bug676401.html
+++ b/editor/libeditor/html/tests/test_bug676401.html
@@ -27,23 +27,23 @@ https://bugzilla.mozilla.org/show_bug.cg
<script type="application/javascript">
/** Test for Bug 676401 **/
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTests);
var gBlock1, gBlock2;
-function IsCommandEnabled(command) {
+function IsCommandEnabled(command, alwaysEnabled) {
var enabled;
- // non-editable div: should return false
+ // non-editable div: should return false unless alwaysEnabled
window.getSelection().selectAllChildren(gBlock1);
enabled = document.queryCommandEnabled(command);
- is(enabled, false, "'" + command + "' should not be enabled on a non-editable block.");
+ is(enabled, alwaysEnabled, "'" + command + "' should not be enabled on a non-editable block.");
// editable div: should return true
window.getSelection().selectAllChildren(gBlock2);
enabled = document.queryCommandEnabled(command);
is(enabled, true, "'" + command + "' should be enabled on an editable block.");
}
function runTests() {
@@ -62,47 +62,47 @@ function runTests() {
"heading", "formatBlock",
"contentReadOnly", "createLink",
"decreaseFontSize", "increaseFontSize",
"insertHTML", "insertHorizontalRule", "insertImage",
"removeFormat", "selectAll", "styleWithCSS"
];
document.execCommand("styleWithCSS", false, false);
for (i = 0; i < commands.length; i++)
- IsCommandEnabled(commands[i]);
+ IsCommandEnabled(commands[i], commands[i] == "selectAll");
document.execCommand("styleWithCSS", false, true);
for (i = 0; i < commands.length; i++)
- IsCommandEnabled(commands[i]);
+ IsCommandEnabled(commands[i], commands[i] == "selectAll");
// Mozilla-specific stuff
commands = ["enableInlineTableEditing", "enableObjectResizing", "insertBrOnReturn"];
for (i = 0; i < commands.length; i++)
- IsCommandEnabled(commands[i]);
+ IsCommandEnabled(commands[i], false);
// cut/copy/paste -- SpecialPowers required
SpecialPowers.setCharPref("capability.policy.policynames", "allowclipboard");
SpecialPowers.setCharPref("capability.policy.allowclipboard.sites", "http://mochi.test:8888");
SpecialPowers.setCharPref("capability.policy.allowclipboard.Clipboard.cutcopy", "allAccess");
SpecialPowers.setCharPref("capability.policy.allowclipboard.Clipboard.paste", "allAccess");
commands = ["cut", "paste", "copy"];
for (i = 0; i < commands.length; i++) {
- IsCommandEnabled(commands[i]);
+ IsCommandEnabled(commands[i], commands[i] == "copy");
document.execCommand(commands[i], false, false);
}
SpecialPowers.clearUserPref("capability.policy.policynames");
SpecialPowers.clearUserPref("capability.policy.allowclipboard.sites");
SpecialPowers.clearUserPref("capability.policy.allowclipboard.Clipboard.cutcopy");
SpecialPowers.clearUserPref("capability.policy.allowclipboard.Clipboard.paste");
// delete/undo/redo -- we have to execute this commands because:
// * there's nothing to undo if we haven't modified the selection first
// * there's nothing to redo if we haven't undone something first
commands = ["delete", "undo", "redo"];
for (i = 0; i < commands.length; i++) {
- IsCommandEnabled(commands[i]);
+ IsCommandEnabled(commands[i], false);
document.execCommand(commands[i], false, false);
}
// done
SimpleTest.finish();
}
</script> |
|