Make sure the eval context stack is cleaned up on failure.
MozReview-Commit-ID: AUNen1xt9He
--HG--
extra : rebase_source : 405afaf2e3e77a2fb4761440f837645cf5a8c18e
This code has been moved around several times, but it originated in bug 995704. Comments 20 and later indicate that the value was changed from 1k to 4k per review, and the code comments weren't updated.
MozReview-Commit-ID: JQjoWq1jGF9
--HG--
extra : rebase_source : f91924693645aef2d003692c8749c996d812d9fc
extra : amend_source : 9cb57f677acd1d61c78f8297d0136b6ab2f09b26
This change will allow the border drawing code to deal with the following
changes, which will make us no longer force the fieldset to be wider than the
legend. Without this patch, allowing the fieldset to be narrower than the
legend causes the vertical inline-start-side and inline-end-side borders of the
fieldset to paint under the legend, because the current code only modifies the
painting of the block-start-side border (the one the legend is positioned on).
This does change behavior in one situation, which the new tests test. For
relatively positioned legends, we used to use the original vertical location but
the positioned horizontal location of the legend to decide which parts of the
border to not paint. In the new setup, we use the original location for both.
I did check that this new behavior matches Chrome and Safari. Edge seems to
have our old behavior.
Change prompt response from using JSONObject/String to using
GeckoBundle. The GeckoBundle is automatically translated to a JS object,
like before, when dispatched to JS code.
Context menu items used UUIDs as their prompt list item IDs. However,
prompt list items only support integers as IDs. This error didn't show
up before because JSONObject was silently ignoring the error. This patch
changes to using an incremental integer as the ID and fixes the error.
Convert prompts to use BundleEventListener and GeckoBundle.
DefaultDoorHanger.setOptions accepts a JSONObject argument, but if we
converted it to GeckoBundle, it would involve a lot of extra changes in
the other doorhanger code. So this patch adds GeckoBundle.fromJSONObject
and converts JSONObject to GeckoBundle within
DefaultDoorHanger.setOptions. In the future, another patch would convert
all doorhanger code to use GeckoBundle instead of JSONObject.
Fix several bugs when handling arrays in GeckoBundle.
1. Correctly return null when getting an array that is not in the
bundle, instead of crashing.
2. Convert object arrays to GeckoBundle arrays in EventDispatcher
instead of leaving it as a single GeckoBundle with integer keys, due
to lack of object array support in NativeJSObject.toBundle.
3. Return error when trying to convert a JS array of arrays to
GeckoBundle, instead of crashing.
4. Add convenience methods for setting arrays; for example, setting
boolean arrays from Boolean[] and Collection<Boolean>.
When we jump to fullscreen, the OS sends a WM_MOUSELEAVE, which we turn into a eMouseExitFromWidget. The eMouseEnterIntoWidget was previously only sent when the mouse moved into the widget, which required the mouse to move. When entering fullscreen, we want the eMouseEnterIntoWidget to happen right away.