From 19b8e3a167859cb57a8c1e5ac07be80588b7f256 Mon Sep 17 00:00:00 2001 From: "ithinc@sohu.com" Date: Thu, 15 Sep 2011 16:01:24 +0200 Subject: [PATCH 001/209] Bug 652842 - _getToolbarItem(aId) returns null if the toolbaritem is on the Add-on Bar. r=enn --- toolkit/content/widgets/toolbar.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolkit/content/widgets/toolbar.xml b/toolkit/content/widgets/toolbar.xml index 8c720390a58d..bd49782918de 100644 --- a/toolkit/content/widgets/toolbar.xml +++ b/toolkit/content/widgets/toolbar.xml @@ -308,7 +308,9 @@ // look for an item with the same id, as the item may be // in a different toolbar. var item = document.getElementById(aId); - if (item && item.parentNode && item.parentNode.parentNode == toolbox) { + if (item && item.parentNode && + item.parentNode.localName == "toolbar" && + item.parentNode.toolbox == toolbox) { newItem = item; break; } From 12bf623990281921dd1af0eaa364cd1eaf344b87 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 15 Sep 2011 10:54:50 -0400 Subject: [PATCH 002/209] Bug 98160 - Add support for platform native text switching keyboard shortcuts in bidi UI on Windows; r=roc --- editor/libeditor/base/nsEditor.cpp | 43 ++++- editor/libeditor/base/nsEditor.h | 4 + .../libeditor/base/nsEditorEventListener.cpp | 152 ++++++++++++++++++ editor/libeditor/base/nsEditorEventListener.h | 14 ++ widget/public/nsIBidiKeyboard.idl | 11 +- widget/src/cocoa/nsBidiKeyboard.mm | 6 + widget/src/gtk2/nsBidiKeyboard.cpp | 5 + widget/src/os2/nsBidiKeyboard.cpp | 6 + widget/src/qt/nsBidiKeyboard.cpp | 6 + widget/src/windows/nsBidiKeyboard.cpp | 12 ++ 10 files changed, 256 insertions(+), 3 deletions(-) diff --git a/editor/libeditor/base/nsEditor.cpp b/editor/libeditor/base/nsEditor.cpp index cd72bc1fce6b..d712dfccbb5b 100644 --- a/editor/libeditor/base/nsEditor.cpp +++ b/editor/libeditor/base/nsEditor.cpp @@ -5199,8 +5199,8 @@ nsEditor::GetRoot() return mRootElement; } -NS_IMETHODIMP -nsEditor::SwitchTextDirection() +nsresult +nsEditor::DetermineCurrentDirection() { // Get the current root direction from its frame nsIDOMElement *rootElement = GetRoot(); @@ -5226,6 +5226,18 @@ nsEditor::SwitchTextDirection() } } + return NS_OK; +} + +NS_IMETHODIMP +nsEditor::SwitchTextDirection() +{ + // Get the current root direction from its frame + nsIDOMElement *rootElement = GetRoot(); + + nsresult rv = DetermineCurrentDirection(); + NS_ENSURE_SUCCESS(rv, rv); + // Apply the opposite direction if (mFlags & nsIPlaintextEditor::eEditorRightToLeft) { NS_ASSERTION(!(mFlags & nsIPlaintextEditor::eEditorLeftToRight), @@ -5244,6 +5256,33 @@ nsEditor::SwitchTextDirection() return rv; } +void +nsEditor::SwitchTextDirectionTo(PRUint32 aDirection) +{ + // Get the current root direction from its frame + nsIDOMElement *rootElement = GetRoot(); + + nsresult rv = DetermineCurrentDirection(); + NS_ENSURE_SUCCESS(rv, ); + + // Apply the requested direction + if (aDirection == nsIPlaintextEditor::eEditorLeftToRight && + (mFlags & nsIPlaintextEditor::eEditorRightToLeft)) { + NS_ASSERTION(!(mFlags & nsIPlaintextEditor::eEditorLeftToRight), + "Unexpected mutually exclusive flag"); + mFlags &= ~nsIPlaintextEditor::eEditorRightToLeft; + mFlags |= nsIPlaintextEditor::eEditorLeftToRight; + rootElement->SetAttribute(NS_LITERAL_STRING("dir"), NS_LITERAL_STRING("ltr")); + } else if (aDirection == nsIPlaintextEditor::eEditorRightToLeft && + (mFlags & nsIPlaintextEditor::eEditorLeftToRight)) { + NS_ASSERTION(!(mFlags & nsIPlaintextEditor::eEditorRightToLeft), + "Unexpected mutually exclusive flag"); + mFlags |= nsIPlaintextEditor::eEditorRightToLeft; + mFlags &= ~nsIPlaintextEditor::eEditorLeftToRight; + rootElement->SetAttribute(NS_LITERAL_STRING("dir"), NS_LITERAL_STRING("rtl")); + } +} + #if DEBUG_JOE void nsEditor::DumpNode(nsIDOMNode *aNode, PRInt32 indent) diff --git a/editor/libeditor/base/nsEditor.h b/editor/libeditor/base/nsEditor.h index e5fc4a8b2a47..078607ec3041 100644 --- a/editor/libeditor/base/nsEditor.h +++ b/editor/libeditor/base/nsEditor.h @@ -205,6 +205,8 @@ public: nsIPrivateTextRangeList *aTextRange)=0; nsresult EndIMEComposition(); + void SwitchTextDirectionTo(PRUint32 aDirection); + void BeginKeypressHandling() { mLastKeypressEventWasTrusted = eTriTrue; } void BeginKeypressHandling(nsIDOMNSEvent* aEvent); void EndKeypressHandling() { mLastKeypressEventWasTrusted = eTriUnset; } @@ -231,6 +233,8 @@ public: protected: nsCString mContentMIMEType; // MIME type of the doc we are editing. + nsresult DetermineCurrentDirection(); + /** create a transaction for setting aAttribute to aValue on aElement */ NS_IMETHOD CreateTxnForSetAttribute(nsIDOMElement *aElement, diff --git a/editor/libeditor/base/nsEditorEventListener.cpp b/editor/libeditor/base/nsEditorEventListener.cpp index eb05fe0a645a..a0e04f9d0bc8 100644 --- a/editor/libeditor/base/nsEditorEventListener.cpp +++ b/editor/libeditor/base/nsEditorEventListener.cpp @@ -71,6 +71,7 @@ #include "nsIFocusManager.h" #include "nsIDOMWindow.h" #include "nsContentUtils.h" +#include "nsIBidiKeyboard.h" using namespace mozilla; @@ -91,6 +92,11 @@ private: nsEditorEventListener::nsEditorEventListener() : mEditor(nsnull), mCommitText(PR_FALSE), mInTransaction(PR_FALSE) +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + , mHaveBidiKeyboards(PR_FALSE) + , mShouldSwitchTextDirection(PR_FALSE) + , mSwitchToRTL(PR_FALSE) +#endif { } @@ -107,6 +113,15 @@ nsEditorEventListener::Connect(nsEditor* aEditor) { NS_ENSURE_ARG(aEditor); +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + nsIBidiKeyboard* bidiKeyboard = nsContentUtils::GetBidiKeyboard(); + if (bidiKeyboard) { + PRBool haveBidiKeyboards = PR_FALSE; + bidiKeyboard->GetHaveBidiKeyboards(&haveBidiKeyboards); + mHaveBidiKeyboards = haveBidiKeyboards; + } +#endif + mEditor = aEditor; nsresult rv = InstallToEditor(); @@ -128,6 +143,16 @@ nsEditorEventListener::InstallToEditor() nsEventListenerManager* elmP = piTarget->GetListenerManager(PR_TRUE); NS_ENSURE_STATE(elmP); +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + elmP->AddEventListenerByType(this, + NS_LITERAL_STRING("keydown"), + NS_EVENT_FLAG_BUBBLE | + NS_EVENT_FLAG_SYSTEM_EVENT); + elmP->AddEventListenerByType(this, + NS_LITERAL_STRING("keyup"), + NS_EVENT_FLAG_BUBBLE | + NS_EVENT_FLAG_SYSTEM_EVENT); +#endif elmP->AddEventListenerByType(this, NS_LITERAL_STRING("keypress"), NS_EVENT_FLAG_BUBBLE | @@ -208,6 +233,16 @@ nsEditorEventListener::UninstallFromEditor() return; } +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + elmP->RemoveEventListenerByType(this, + NS_LITERAL_STRING("keydown"), + NS_EVENT_FLAG_BUBBLE | + NS_EVENT_FLAG_SYSTEM_EVENT); + elmP->RemoveEventListenerByType(this, + NS_LITERAL_STRING("keyup"), + NS_EVENT_FLAG_BUBBLE | + NS_EVENT_FLAG_SYSTEM_EVENT); +#endif elmP->RemoveEventListenerByType(this, NS_LITERAL_STRING("keypress"), NS_EVENT_FLAG_BUBBLE | @@ -298,6 +333,12 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent) return Drop(dragEvent); } +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + if (eventType.EqualsLiteral("keydown")) + return KeyDown(aEvent); + if (eventType.EqualsLiteral("keyup")) + return KeyUp(aEvent); +#endif if (eventType.EqualsLiteral("keypress")) return KeyPress(aEvent); if (eventType.EqualsLiteral("mousedown")) @@ -320,6 +361,117 @@ nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent) return NS_OK; } +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH +#include + +namespace { + +// This function is borrowed from Chromium's ImeInput::IsCtrlShiftPressed +bool IsCtrlShiftPressed(bool& isRTL) +{ + BYTE keystate[256]; + if (!::GetKeyboardState(keystate)) { + return false; + } + + // To check if a user is pressing only a control key and a right-shift key + // (or a left-shift key), we use the steps below: + // 1. Check if a user is pressing a control key and a right-shift key (or + // a left-shift key). + // 2. If the condition 1 is true, we should check if there are any other + // keys pressed at the same time. + // To ignore the keys checked in 1, we set their status to 0 before + // checking the key status. + const int kKeyDownMask = 0x80; + if ((keystate[VK_CONTROL] & kKeyDownMask) == 0) + return false; + + if (keystate[VK_RSHIFT] & kKeyDownMask) { + keystate[VK_RSHIFT] = 0; + isRTL = true; + } else if (keystate[VK_LSHIFT] & kKeyDownMask) { + keystate[VK_LSHIFT] = 0; + isRTL = false; + } else { + return false; + } + + // Scan the key status to find pressed keys. We should abandon changing the + // text direction when there are other pressed keys. + // This code is executed only when a user is pressing a control key and a + // right-shift key (or a left-shift key), i.e. we should ignore the status of + // the keys: VK_SHIFT, VK_CONTROL, VK_RCONTROL, and VK_LCONTROL. + // So, we reset their status to 0 and ignore them. + keystate[VK_SHIFT] = 0; + keystate[VK_CONTROL] = 0; + keystate[VK_RCONTROL] = 0; + keystate[VK_LCONTROL] = 0; + for (int i = 0; i <= VK_PACKET; ++i) { + if (keystate[i] & kKeyDownMask) + return false; + } + return true; +} + +} + +// This logic is mostly borrowed from Chromium's +// RenderWidgetHostViewWin::OnKeyEvent. + +NS_IMETHODIMP +nsEditorEventListener::KeyUp(nsIDOMEvent* aKeyEvent) +{ + if (mHaveBidiKeyboards) { + nsCOMPtr keyEvent = do_QueryInterface(aKeyEvent); + if (!keyEvent) { + // non-key event passed to keyup. bad things. + return NS_OK; + } + + PRUint32 keyCode = 0; + keyEvent->GetKeyCode(&keyCode); + if (keyCode == nsIDOMKeyEvent::DOM_VK_SHIFT || + keyCode == nsIDOMKeyEvent::DOM_VK_CONTROL) { + if (mShouldSwitchTextDirection && mEditor->IsPlaintextEditor()) { + mEditor->SwitchTextDirectionTo(mSwitchToRTL ? + nsIPlaintextEditor::eEditorRightToLeft : + nsIPlaintextEditor::eEditorLeftToRight); + mShouldSwitchTextDirection = PR_FALSE; + } + } + } + + return NS_OK; +} + +NS_IMETHODIMP +nsEditorEventListener::KeyDown(nsIDOMEvent* aKeyEvent) +{ + if (mHaveBidiKeyboards) { + nsCOMPtr keyEvent = do_QueryInterface(aKeyEvent); + if (!keyEvent) { + // non-key event passed to keydown. bad things. + return NS_OK; + } + + PRUint32 keyCode = 0; + keyEvent->GetKeyCode(&keyCode); + if (keyCode == nsIDOMKeyEvent::DOM_VK_SHIFT) { + bool switchToRTL; + if (IsCtrlShiftPressed(switchToRTL)) { + mShouldSwitchTextDirection = PR_TRUE; + mSwitchToRTL = switchToRTL; + } + } else if (keyCode != nsIDOMKeyEvent::DOM_VK_CONTROL) { + // In case the user presses any other key besides Ctrl and Shift + mShouldSwitchTextDirection = PR_FALSE; + } + } + + return NS_OK; +} +#endif + NS_IMETHODIMP nsEditorEventListener::KeyPress(nsIDOMEvent* aKeyEvent) { diff --git a/editor/libeditor/base/nsEditorEventListener.h b/editor/libeditor/base/nsEditorEventListener.h index b7071f58d2c7..323dbc03d156 100644 --- a/editor/libeditor/base/nsEditorEventListener.h +++ b/editor/libeditor/base/nsEditorEventListener.h @@ -51,6 +51,11 @@ #undef KeyPress #endif +#ifdef XP_WIN +// On Windows, we support switching the text direction by pressing Ctrl+Shift +#define HANDLE_NATIVE_TEXT_DIRECTION_SWITCH +#endif + class nsEditor; class nsIDOMDragEvent; @@ -67,6 +72,10 @@ public: NS_DECL_ISUPPORTS NS_DECL_NSIDOMEVENTLISTENER +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + NS_IMETHOD KeyDown(nsIDOMEvent* aKeyEvent); + NS_IMETHOD KeyUp(nsIDOMEvent* aKeyEvent); +#endif NS_IMETHOD KeyPress(nsIDOMEvent* aKeyEvent); NS_IMETHOD HandleText(nsIDOMEvent* aTextEvent); NS_IMETHOD HandleStartComposition(nsIDOMEvent* aCompositionEvent); @@ -95,6 +104,11 @@ protected: nsRefPtr mCaret; PRPackedBool mCommitText; PRPackedBool mInTransaction; +#ifdef HANDLE_NATIVE_TEXT_DIRECTION_SWITCH + PRPackedBool mHaveBidiKeyboards; + PRPackedBool mShouldSwitchTextDirection; + PRPackedBool mSwitchToRTL; +#endif }; #endif // nsEditorEventListener_h__ diff --git a/widget/public/nsIBidiKeyboard.idl b/widget/public/nsIBidiKeyboard.idl index 533a0c5a0bb2..699396bf2052 100644 --- a/widget/public/nsIBidiKeyboard.idl +++ b/widget/public/nsIBidiKeyboard.idl @@ -39,7 +39,7 @@ #include "nsISupports.idl" -[scriptable, uuid(0D8F8F10-C92D-4A6A-B2BB-E1921F3F4DDA)] +[scriptable, uuid(99957506-f21b-4a61-ad64-5b641cf508e2)] interface nsIBidiKeyboard : nsISupports { /** @@ -54,5 +54,14 @@ interface nsIBidiKeyboard : nsISupports * @throws NS_ERROR_FAILURE if no right-to-left keyboards are installed */ void setLangFromBidiLevel(in PRUint8 aLevel); + + /** + * Determines whether the system has at least one keyboard of each direction + * installed. + * + * @throws NS_ERROR_NOT_IMPLEMENTED if the widget layer does not provide this + * information. + */ + readonly attribute boolean haveBidiKeyboards; }; diff --git a/widget/src/cocoa/nsBidiKeyboard.mm b/widget/src/cocoa/nsBidiKeyboard.mm index f121a2e170d3..de0b9bcf5abf 100644 --- a/widget/src/cocoa/nsBidiKeyboard.mm +++ b/widget/src/cocoa/nsBidiKeyboard.mm @@ -66,3 +66,9 @@ NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel) // XXX Insert platform specific code to set keyboard language return NS_OK; } + +NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(PRBool* aResult) +{ + // not implemented yet + return NS_ERROR_NOT_IMPLEMENTED; +} diff --git a/widget/src/gtk2/nsBidiKeyboard.cpp b/widget/src/gtk2/nsBidiKeyboard.cpp index bc259a7740e2..3451933b26df 100644 --- a/widget/src/gtk2/nsBidiKeyboard.cpp +++ b/widget/src/gtk2/nsBidiKeyboard.cpp @@ -110,3 +110,8 @@ nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel) return NS_ERROR_NOT_IMPLEMENTED; } +NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(PRBool* aResult) +{ + // not implemented yet + return NS_ERROR_NOT_IMPLEMENTED; +} diff --git a/widget/src/os2/nsBidiKeyboard.cpp b/widget/src/os2/nsBidiKeyboard.cpp index 25572f07fa56..da357d529294 100644 --- a/widget/src/os2/nsBidiKeyboard.cpp +++ b/widget/src/os2/nsBidiKeyboard.cpp @@ -61,3 +61,9 @@ NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel) // XXX Insert platform specific code to set keyboard language return NS_ERROR_NOT_IMPLEMENTED; } + +NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(PRBool* aResult) +{ + // not implemented yet + return NS_ERROR_NOT_IMPLEMENTED; +} diff --git a/widget/src/qt/nsBidiKeyboard.cpp b/widget/src/qt/nsBidiKeyboard.cpp index dffc5e2c2bc5..86d0ef4a01f7 100644 --- a/widget/src/qt/nsBidiKeyboard.cpp +++ b/widget/src/qt/nsBidiKeyboard.cpp @@ -68,3 +68,9 @@ NS_IMETHODIMP nsBidiKeyboard::SetLangFromBidiLevel(PRUint8 aLevel) { return NS_OK; } + +NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(PRBool* aResult) +{ + // not implemented yet + return NS_ERROR_NOT_IMPLEMENTED; +} diff --git a/widget/src/windows/nsBidiKeyboard.cpp b/widget/src/windows/nsBidiKeyboard.cpp index 3bd96b33c9eb..927bda45599f 100644 --- a/widget/src/windows/nsBidiKeyboard.cpp +++ b/widget/src/windows/nsBidiKeyboard.cpp @@ -121,6 +121,18 @@ NS_IMETHODIMP nsBidiKeyboard::IsLangRTL(PRBool *aIsRTL) return NS_OK; } +NS_IMETHODIMP nsBidiKeyboard::GetHaveBidiKeyboards(PRBool* aResult) +{ + NS_ENSURE_ARG_POINTER(aResult); + + nsresult result = SetupBidiKeyboards(); + if (NS_FAILED(result)) + return result; + + *aResult = mHaveBidiKeyboards; + return NS_OK; +} + // Get the list of keyboard layouts available in the system // Set mLTRKeyboard to the first LTR keyboard in the list and mRTLKeyboard to the first RTL keyboard in the list From eb0081091d97b5a68d245279c5b9502d5e151611 Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Wed, 4 May 2011 16:54:24 -0400 Subject: [PATCH 003/209] Bug 686009 - Clean up some comments in jstracer.cpp which refer to js_InitClass uses which are now mostly removed. Also remove an obsolete comment in JSObject::makeDenseArraySlow that referred to use of js_InitClass to initialize Array. r=bhackett --HG-- extra : rebase_source : ed8371bd8e8130ec6807840d7bceb209e6863be3 --- js/src/jsarray.cpp | 6 ------ js/src/jstracer.cpp | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 75c2239fd586..0791144cfe09 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -1205,12 +1205,6 @@ JSObject::makeDenseArraySlow(JSContext *cx) clearSlotRange(next, capacity - next); - /* - * Finally, update class. If |this| is Array.prototype, then js_InitClass - * will create an emptyShape whose class is &SlowArrayClass, to ensure - * that delegating instances can share shapes in the tree rooted at the - * proto's empty shape. - */ return true; } diff --git a/js/src/jstracer.cpp b/js/src/jstracer.cpp index 86c4a7282260..3ab75e654cb8 100644 --- a/js/src/jstracer.cpp +++ b/js/src/jstracer.cpp @@ -11048,7 +11048,11 @@ TraceRecorder::record_JSOP_OBJTOP() RecordingStatus TraceRecorder::getClassPrototype(JSObject* ctor, LIns*& proto_ins) { - // ctor must be a function created via js_InitClass. + /* + * This function requires that |ctor| be a built-in class function in order + * to have an immutable |ctor.prototype| that can be burned into the trace + * below. + */ #ifdef DEBUG Class *clasp = ctor->getFunctionPrivate()->getConstructorClass(); JS_ASSERT(clasp); @@ -11060,8 +11064,10 @@ TraceRecorder::getClassPrototype(JSObject* ctor, LIns*& proto_ins) if (!ctor->getProperty(cx, ATOM_TO_JSID(cx->runtime->atomState.classPrototypeAtom), &pval)) RETURN_ERROR("error getting prototype from constructor"); - // ctor.prototype is a permanent data property, so this lookup cannot have - // deep-aborted. + /* + * |ctor.prototype| is a non-configurable, non-writable data property, so + * this lookup cannot have deep-aborted. + */ JS_ASSERT(localtm.recorder); #ifdef DEBUG @@ -11073,8 +11079,10 @@ TraceRecorder::getClassPrototype(JSObject* ctor, LIns*& proto_ins) JS_ASSERT((~attrs & (JSPROP_READONLY | JSPROP_PERMANENT)) == 0); #endif - // Since ctor was built by js_InitClass, we can assert (rather than check) - // that pval is usable. + /* + * Per requirements noted at the start of this function, pval must be + * usable. + */ JS_ASSERT(!pval.isPrimitive()); JSObject *proto = &pval.toObject(); JS_ASSERT(!proto->isDenseArray()); From adf688ddf81328d82b8f377fbc95e1b802a8de27 Mon Sep 17 00:00:00 2001 From: Mark Finkle Date: Thu, 15 Sep 2011 13:43:59 -0400 Subject: [PATCH 004/209] Bug 686637 - Stop extracting hyphenation files from the APK [r=dougt] --- embedding/android/GeckoApp.java | 20 ++---- layout/reftests/text/reftest.list | 93 ++++++++++++++------------- toolkit/mozapps/installer/packager.mk | 1 - 3 files changed, 52 insertions(+), 62 deletions(-) diff --git a/embedding/android/GeckoApp.java b/embedding/android/GeckoApp.java index 560e00e0d1b5..8ecd405a8512 100644 --- a/embedding/android/GeckoApp.java +++ b/embedding/android/GeckoApp.java @@ -492,21 +492,11 @@ abstract public class GeckoApp // copy any .xpi file into an extensions/ directory Enumeration zipEntries = zip.entries(); while (zipEntries.hasMoreElements()) { - ZipEntry entry = zipEntries.nextElement(); - if (entry.getName().startsWith("extensions/") && entry.getName().endsWith(".xpi")) { - Log.i("GeckoAppJava", "installing extension : " + entry.getName()); - unpackFile(zip, buf, entry, entry.getName()); - } - } - - // copy any hyphenation dictionaries file into a hyphenation/ directory - Enumeration hyphenEntries = zip.entries(); - while (hyphenEntries.hasMoreElements()) { - ZipEntry entry = hyphenEntries.nextElement(); - if (entry.getName().startsWith("hyphenation/")) { - Log.i("GeckoAppJava", "installing hyphenation : " + entry.getName()); - unpackFile(zip, buf, entry, entry.getName()); - } + ZipEntry entry = zipEntries.nextElement(); + if (entry.getName().startsWith("extensions/") && entry.getName().endsWith(".xpi")) { + Log.i("GeckoAppJava", "installing extension : " + entry.getName()); + unpackFile(zip, buf, entry, entry.getName()); + } } } diff --git a/layout/reftests/text/reftest.list b/layout/reftests/text/reftest.list index f436df92ee41..4cca1e088440 100644 --- a/layout/reftests/text/reftest.list +++ b/layout/reftests/text/reftest.list @@ -90,49 +90,50 @@ HTTP(..) == arabic-shaping-1.html arabic-shaping-1-ref.html # check ligature in Arial Bold on Windows, for bug 644184; may fail on other platforms depending on fonts random-if(!winWidget) == arial-bold-lam-alef-1.html arial-bold-lam-alef-1-ref.html # Tests for hyphenation with -moz-hyphens -== auto-hyphenation-1.html auto-hyphenation-1-ref.html -!= auto-hyphenation-1.html auto-hyphenation-1-notref.html -== auto-hyphenation-1a.html auto-hyphenation-1-ref.html -== auto-hyphenation-2.html auto-hyphenation-2-ref.html -== auto-hyphenation-3.html auto-hyphenation-3-ref.html -== auto-hyphenation-4.html auto-hyphenation-4-ref.html -== auto-hyphenation-5.html auto-hyphenation-5-ref.html -== auto-hyphenation-6.html auto-hyphenation-6-ref.html -== auto-hyphenation-7.html auto-hyphenation-7-ref.html -== auto-hyphenation-af-1.html auto-hyphenation-af-1-ref.html -== auto-hyphenation-bg-1.html auto-hyphenation-bg-1-ref.html -== auto-hyphenation-ca-1.html auto-hyphenation-ca-1-ref.html -== auto-hyphenation-cy-1.html auto-hyphenation-cy-1-ref.html -== auto-hyphenation-da-1.html auto-hyphenation-da-1-ref.html -== auto-hyphenation-de-1901-1.html auto-hyphenation-de-1901-1-ref.html -== auto-hyphenation-de-1996-1.html auto-hyphenation-de-1996-1-ref.html -!= auto-hyphenation-de-1901-1.html auto-hyphenation-de-1996-1.html -== auto-hyphenation-de-ch-1.html auto-hyphenation-de-ch-1-ref.html -== auto-hyphenation-eo-1.html auto-hyphenation-eo-1-ref.html -== auto-hyphenation-es-1.html auto-hyphenation-es-1-ref.html -== auto-hyphenation-et-1.html auto-hyphenation-et-1-ref.html -== auto-hyphenation-fi-1.html auto-hyphenation-fi-1-ref.html -== auto-hyphenation-fr-1.html auto-hyphenation-fr-1-ref.html -== auto-hyphenation-gl-1.html auto-hyphenation-gl-1-ref.html -== auto-hyphenation-hr-1.html auto-hyphenation-hr-1-ref.html -== auto-hyphenation-hsb-1.html auto-hyphenation-hsb-1-ref.html -== auto-hyphenation-hu-1.html auto-hyphenation-hu-1-ref.html -== auto-hyphenation-ia-1.html auto-hyphenation-ia-1-ref.html -== auto-hyphenation-is-1.html auto-hyphenation-is-1-ref.html -== auto-hyphenation-it-1.html auto-hyphenation-it-1-ref.html -== auto-hyphenation-kmr-1.html auto-hyphenation-kmr-1-ref.html -== auto-hyphenation-la-1.html auto-hyphenation-la-1-ref.html -== auto-hyphenation-lt-1.html auto-hyphenation-lt-1-ref.html -== auto-hyphenation-mn-1.html auto-hyphenation-mn-1-ref.html -== auto-hyphenation-nb-1.html auto-hyphenation-nb-1-ref.html -== auto-hyphenation-nl-1.html auto-hyphenation-nl-1-ref.html -== auto-hyphenation-nn-1.html auto-hyphenation-nn-1-ref.html -== auto-hyphenation-pt-1.html auto-hyphenation-pt-1-ref.html -== auto-hyphenation-ru-1.html auto-hyphenation-ru-1-ref.html -== auto-hyphenation-sh-1.html auto-hyphenation-sh-1-ref.html -== auto-hyphenation-sl-1.html auto-hyphenation-sl-1-ref.html -== auto-hyphenation-sr-1.html auto-hyphenation-sr-1-ref.html -== auto-hyphenation-sv-1.html auto-hyphenation-sv-1-ref.html # test swedish patterns -!= auto-hyphenation-sv-1.html auto-hyphenation-sv-1-notref.html # verify swedish != english -== auto-hyphenation-tr-1.html auto-hyphenation-tr-1-ref.html -== auto-hyphenation-uk-1.html auto-hyphenation-uk-1-ref.html +# Android does not ship the hyphenation dictionaries +skip-if(Android) == auto-hyphenation-1.html auto-hyphenation-1-ref.html +skip-if(Android) != auto-hyphenation-1.html auto-hyphenation-1-notref.html +skip-if(Android) == auto-hyphenation-1a.html auto-hyphenation-1-ref.html +skip-if(Android) == auto-hyphenation-2.html auto-hyphenation-2-ref.html +skip-if(Android) == auto-hyphenation-3.html auto-hyphenation-3-ref.html +skip-if(Android) == auto-hyphenation-4.html auto-hyphenation-4-ref.html +skip-if(Android) == auto-hyphenation-5.html auto-hyphenation-5-ref.html +skip-if(Android) == auto-hyphenation-6.html auto-hyphenation-6-ref.html +skip-if(Android) == auto-hyphenation-7.html auto-hyphenation-7-ref.html +skip-if(Android) == auto-hyphenation-af-1.html auto-hyphenation-af-1-ref.html +skip-if(Android) == auto-hyphenation-bg-1.html auto-hyphenation-bg-1-ref.html +skip-if(Android) == auto-hyphenation-ca-1.html auto-hyphenation-ca-1-ref.html +skip-if(Android) == auto-hyphenation-cy-1.html auto-hyphenation-cy-1-ref.html +skip-if(Android) == auto-hyphenation-da-1.html auto-hyphenation-da-1-ref.html +skip-if(Android) == auto-hyphenation-de-1901-1.html auto-hyphenation-de-1901-1-ref.html +skip-if(Android) == auto-hyphenation-de-1996-1.html auto-hyphenation-de-1996-1-ref.html +skip-if(Android) != auto-hyphenation-de-1901-1.html auto-hyphenation-de-1996-1.html +skip-if(Android) == auto-hyphenation-de-ch-1.html auto-hyphenation-de-ch-1-ref.html +skip-if(Android) == auto-hyphenation-eo-1.html auto-hyphenation-eo-1-ref.html +skip-if(Android) == auto-hyphenation-es-1.html auto-hyphenation-es-1-ref.html +skip-if(Android) == auto-hyphenation-et-1.html auto-hyphenation-et-1-ref.html +skip-if(Android) == auto-hyphenation-fi-1.html auto-hyphenation-fi-1-ref.html +skip-if(Android) == auto-hyphenation-fr-1.html auto-hyphenation-fr-1-ref.html +skip-if(Android) == auto-hyphenation-gl-1.html auto-hyphenation-gl-1-ref.html +skip-if(Android) == auto-hyphenation-hr-1.html auto-hyphenation-hr-1-ref.html +skip-if(Android) == auto-hyphenation-hsb-1.html auto-hyphenation-hsb-1-ref.html +skip-if(Android) == auto-hyphenation-hu-1.html auto-hyphenation-hu-1-ref.html +skip-if(Android) == auto-hyphenation-ia-1.html auto-hyphenation-ia-1-ref.html +skip-if(Android) == auto-hyphenation-is-1.html auto-hyphenation-is-1-ref.html +skip-if(Android) == auto-hyphenation-it-1.html auto-hyphenation-it-1-ref.html +skip-if(Android) == auto-hyphenation-kmr-1.html auto-hyphenation-kmr-1-ref.html +skip-if(Android) == auto-hyphenation-la-1.html auto-hyphenation-la-1-ref.html +skip-if(Android) == auto-hyphenation-lt-1.html auto-hyphenation-lt-1-ref.html +skip-if(Android) == auto-hyphenation-mn-1.html auto-hyphenation-mn-1-ref.html +skip-if(Android) == auto-hyphenation-nb-1.html auto-hyphenation-nb-1-ref.html +skip-if(Android) == auto-hyphenation-nl-1.html auto-hyphenation-nl-1-ref.html +skip-if(Android) == auto-hyphenation-nn-1.html auto-hyphenation-nn-1-ref.html +skip-if(Android) == auto-hyphenation-pt-1.html auto-hyphenation-pt-1-ref.html +skip-if(Android) == auto-hyphenation-ru-1.html auto-hyphenation-ru-1-ref.html +skip-if(Android) == auto-hyphenation-sh-1.html auto-hyphenation-sh-1-ref.html +skip-if(Android) == auto-hyphenation-sl-1.html auto-hyphenation-sl-1-ref.html +skip-if(Android) == auto-hyphenation-sr-1.html auto-hyphenation-sr-1-ref.html +skip-if(Android) == auto-hyphenation-sv-1.html auto-hyphenation-sv-1-ref.html # test swedish patterns +skip-if(Android) != auto-hyphenation-sv-1.html auto-hyphenation-sv-1-notref.html # verify swedish != english +skip-if(Android) == auto-hyphenation-tr-1.html auto-hyphenation-tr-1-ref.html +skip-if(Android) == auto-hyphenation-uk-1.html auto-hyphenation-uk-1-ref.html diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 8ea1f1a3c3ba..62afae62707e 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -267,7 +267,6 @@ DIST_FILES = \ components \ defaults \ modules \ - hyphenation \ res \ lib \ lib.id \ From 2dd6080af099426d4cda48da21d9234f69f6be5b Mon Sep 17 00:00:00 2001 From: Wesley Johnston Date: Thu, 15 Sep 2011 10:39:00 -0400 Subject: [PATCH 005/209] Bug 686903 - Remove about:home fadein animation. r=mbrubeck --- mobile/chrome/content/aboutHome.xhtml | 5 +---- mobile/themes/core/aboutHome.css | 10 ---------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/mobile/chrome/content/aboutHome.xhtml b/mobile/chrome/content/aboutHome.xhtml index 64fec2142c63..e358bdbcdcc1 100644 --- a/mobile/chrome/content/aboutHome.xhtml +++ b/mobile/chrome/content/aboutHome.xhtml @@ -62,7 +62,7 @@
-