You know, when Korean IME commits string, then it sometimes set next preedit string. So reseting context causes that next preedit string is committed.
So we shouldn't reset IME context with preedit_end.
MozReview-Commit-ID: CZJJvYjcrKY
--HG--
extra : rebase_source : d7e2e80930355794a40466c68fe22e43e7164d72
For safety, NativeKey::GetScanCodeWithExtendedFlag() returns without extended flag on WinXP and WinServer2003 because ::MapVirtualKeyEx() API doesn't support extend key conversion.
However, extended scan code is available even on them when lParam has 0x1000000 especially when it computes KeyboardEvent.code value. Therefore, it should return with 0xE000 for extended keys on any versions of Windows.
Note that NativeKey::ComputeVirtualKeyCodeFromScanCodeEx() wraps ::MapVirtualKeyEx() API. It checks if the API is not available for the result of NativeKey::GetScanCodeWithExtendedFlag(). So, returning extended scan code from NativeKey::GetScanCodeWithExtendedFlag() is safe.
MozReview-Commit-ID: D2RrHxPI9ET
--HG--
extra : rebase_source : 51f277e8331eb7ad109c3227ac1fe73f6de48105
Unfortunately, MapVirtualKeyEx() doesn't compute ABNT C1's scan code from its virtual keycode, 0xC1. Therefore, NativeKeyCodes.js should specify 0x0056 explicitly. Fortunately, this key in physical keyboard always generates the scan code value with any keyboard layouts. Therefore, this can test new regressions as expected.
FYI: ABNT C1 key is a key in Brazilian keyboard. It's at between "ShiftLeft" and "KeyZ".
MozReview-Commit-ID: GmpnFKOsnKD
--HG--
extra : rebase_source : 197b249740056e5c4b7c6f3b556f91f50a838d52
On Windows, some keys are called "extended key". Their scan code include 0xE000. For example, Enter key in standard position is 0x001C but Numpad's Enter key is 0xE01C. Unfortunately, both of them cause same virtual keycode value, VK_RETURN. Therefore, currently, nsIDOMWindowUtils.sendNativeKey() can synthesize only one native key event of them (only non-extended key's event). Additionally, MapVirtualKeyEx() API with MAPVK_VK_TO_VSC (even with MAPVK_VK_TO_VSC_EX) don't return extended scancode value as expected.
For solving these issues, we should include scan code value to the virtual keycode value at calling sendNativeKey().
Fortunately, virtual keycode value on Windows is 0 ~ 255 (0x00 ~ 0xFF) but aNativeKeyCode of sendNativeKey() is int32_t. So, we can use upper 16 bit for specifying scan code.
This patch explicitly specifies scan code value at defining WIN_VK_* in NativeKeyCodes.js. Additionally, this patch duplicates native virtual keycode definition for Home, End, Insert, Delete, PageUp, PageDown, ArrowUp, ArrowLeft, ArrowDown, ArrowRight and Enter as WIN_VK_* and WIN_VK_NUMPAD_*. This makes automated tests can specify both positions' keys explicitly.
Finally, this patch adds some tests to test_keycodes.xul for testing KeyboardEvent.code value of those keys in both positions.
MozReview-Commit-ID: 8n1rQ71dilg
--HG--
extra : rebase_source : 8215e56ba1ed9fc54c04eb7ca037b12c3ced5c1b
Note we consider [endOfDecodedData, GetMediaTime()] is always in the buffer ranges.
MozReview-Commit-ID: F6ez3KYMjht
--HG--
extra : rebase_source : c5f53125f509a58c1abf8151847df0f3d2d08674
Entries should end up getting cleared out from this table before the
value dies, so let's just make the reference strong so that any
mistakes will result in leaks and not use-after-frees.
Using smart pointer classes with PLDHashtable is a little
questionable, and I don't want to convert this one hash table to
nsTHashtable, so I use manual addref and release.
MozReview-Commit-ID: Kfg9veS6r11
--HG--
extra : rebase_source : 865ab48c2cf67546dd705cf79f8873efe695ac5c
Also clean up some random comments for code that was deleted earlier.
MozReview-Commit-ID: 8JQx0FAH8wA
--HG--
extra : rebase_source : 614bda8caf0647ff0220986904ac6fb5fd4573a8
This patch is similar to bug 1288870.
Strong references:
- XPCCallContext::mSet: Like XPCNativeInterface, this only roots it
when |mState >= HAVE_NAME|, and again this only requires changing
SystemIsBeingShutDown().
- XPCWrappedNativeProto::mSet and XPCWrappedNative::mSet. These become
RefPtrs.
- stack: AutoMarkingNativeSetPtr become RefPtr<XPCNativeSet>. This
lets me eliminate some uses of AutoJSContext. This is the bulk of the
patch.
Weak references:
- mNativeSetMap. This reference gets cleared in the dtor. This
requires bug 1290239 to actually find the entry for removal.
- mClassInfo2NativeSetMap. The reference is in the value for this hash
table, and we don't have the key in the set dtor. Fortunately, the
only code that adds to this table is
XPCNativeSet::GetNewOrUsed(nsIClassInfo* classInfo), which in turn is
only called by GetNewOrUsed(nsIClassInfo* classInfo). This code
creates a new XPCWrappedNativeProto, which (with my patch) holds a
strong reference to the set that has been added to the table. This set
is never changed or released until the dtor for the proto, which calls
ClearCacheEntryForClassInfo(), removing the entry from the
hashtable. Thus, the lifetime of the set is always going to be longer
than the lifetime of the entry.
Other notes:
- Like XPCNativeInterface, this class uses placement |new| that
requires a special destruction function, which with my patch is hidden
away in the refcounting code.
- This patch delete a bunch of marking/sweeping code from
XPCJSRuntime::FinalizeCallback(), because the lifetimes are managed by
the refcounting now. Some of the marking code is left behind to be
cleaned up in a later patch.
- I didn't see any methods that had XPCNativeSet** outparams.
- MOZ_COUNT_{CTOR,DTOR}(XPCNativeSet) is not needed because it is now
refcounted.
MozReview-Commit-ID: 7oTorCwda1n
--HG--
extra : rebase_source : 0c477e18c405e4ea88393279cf8bea62c5b0f4c7
During process_line each line is loaded into JSON. As it stands it is possible
to attempt loads on lines containing single backslashes. This will fail the
load as these characters are invalid in JSON. This is particularly noticeable on
Windows, where all paths will contain these characters.
This changeset escapes any back slashes in the lines. It also adds logging to
the error case for the JSON loading, so failures aren't silently swallowed.
***
Fix issues brought up in review, silly mistakes in last changeset.
- Update log message upon encountering non JSON linter output that cannot be
handled by json.loads.
- Correct typo: formate -> format.
- Correct replace string. Was using r'\\\\', which will evaluate to 3 slashes,
now using '\\\\', which evaluates to 2. Opting not to use a raw string here
because of the confusion over the final backslash interaction (final one still
needs to be escaped even in a raw string).
MozReview-Commit-ID: Hfa0jSdnege
--HG--
extra : rebase_source : bd29d2437cf61f01df6d01a70ed651b49e33656e
* Only allows setting the log file at runtime if not set by an Env Var
* LogModulePrefWatcher will watch logging.config. prefs and call into Logging.cpp to set the log file, sync or timestamp
* Log files set by pref will have a -main.PID or -child.PID suffix
* If the logging.config.clear_on_startup pref is true, prefs will be reset upon restart.
MozReview-Commit-ID: CWJujX4jm2A
Remove following domains from ua-update.json.in:
auctions.yahoo.co.jp
news.yahoo.co.jp
shopping.yahoo.co.jp
travel.yahoo.co.jp
sports.yahoo.co.jp
mixi.jp
Update bug number inline