Commit Graph

23961 Commits

Author SHA1 Message Date
Jan Henning
e04236b5f9 Bug 1484823 - Fix Android build errors with NDK r18-beta1. r=snorp
Getting a working local build with the system clang might be tricky, while
building with NDK r17 clang is broken (bug 1484723).
NDK r18-beta1 fixes this, but also made all jvalue* method parameters in jni.h
const,so in order to support building with it we need to adjust our relevant
function types, too.

Differential Revision: https://phabricator.services.mozilla.com/D3832

--HG--
extra : moz-landing-system : lando
2018-08-22 16:01:33 +00:00
Olli Pettay
ddda29dcf1 Bug 1484371 - make *enter/*leave events uncomposed, r=masayuki
--HG--
extra : rebase_source : 508dc487915b352682887e1a4650fc396564d532
2018-08-22 16:08:17 +03:00
Mantaroh Yoshinaga
b65f665554 Bug 1479071 - Revert kPMDataFormatXMLCompressed to kPMDataFormatXMLNormal. r=mstange
Bug 1411879 introduced kPMDataFormatXMLCompress. However, this parameter caused
the saving print settings problem.
Before investigating this reason, this patch will revert this parameter.

Differential Revision: https://phabricator.services.mozilla.com/D3943

--HG--
extra : moz-landing-system : lando
2018-08-22 02:07:28 +00:00
Ehsan Akhgari
a07f6c3866 Bug 1484848 - Remove the XPCOM component registrations for window and child window; r=mstange 2018-08-21 16:20:28 -04:00
Randall Barker
91e6e6d242 Bug 1484463 - Remove GeckoAppShell.setScreenDepthOverride(). r=jchen
Differential Revision: https://phabricator.services.mozilla.com/D3813

--HG--
extra : moz-landing-system : lando
2018-08-20 19:11:09 +00:00
Xidorn Quan
a6778a765c Bug 1484565 - Implement scrollbar-width: thin support for cocoa widget. r=spohl
It also converts nsNativeThemeCocoa::GetParentScrollbarFrame into a
local static function rather than a member function, since it doesn't
seem to be necessary that way.

Differential Revision: https://phabricator.services.mozilla.com/D3737

--HG--
extra : moz-landing-system : lando
2018-08-20 04:57:58 +00:00
Xidorn Quan
fa3e266ae9 Bug 1475033 part 7 - Implement scrollbar-width: thin for Windows. r=jimm
Since Windows doesn't provide native thin scrollbar variant, this patch
tries to synthesize one by doing the following:
* force to use custom scrollbar, and
* hide the scrollbar button by giving them zero size, and
* cut the thickness of scrollbar by half.

Half thickness is picked randomly, but it seems to work fine. A third
of the size also looks fine, but maybe a bit harder to drag.

Note: Universal Windows Platform apps seem to have an overlay style of
scrollbar by default, but I cannot find any Windows API to render that,
so that may be a builtin component of UWP. We may want to do that at
some point, but this is probably good enough for now.

MozReview-Commit-ID: KfHjy8WdweT

--HG--
extra : rebase_source : 4776fc5e2264c0b9146ca89d40b4e8b952307d0e
2018-08-06 15:18:27 +10:00
Xidorn Quan
dbae6ea230 Bug 1475033 part 6 - Have scrollbar auto colors resolve to the corresponding colors on Windows 10. r=jimm
So that we can use custom scrollbar for thin scrollbar.

MozReview-Commit-ID: FCHzV5MJbx

--HG--
extra : rebase_source : 4742d2bb1f612ff60890d5c01a4532ee4542624e
2018-08-06 15:13:17 +10:00
Hiroyuki Ikezoe
61a6f8e3f2 Bug 1478576 - A mochitest for system font change notification. r=froydnj,jimm,karlt
The test case in this patch fails without the proper fix in the first patch
in this patch series.

In this patch two new nsIDOMWindowUtils APIs are introduced to change the
system font settins in tests.  Currently the APIs work only on GTK+ platform.

Also to work the test case properly we need to open a new XUL window because we
don't propagate font changes into descendant documents yet (bug 1478212).

MozReview-Commit-ID: 4OLxEkEuF8d

--HG--
extra : rebase_source : 683e64f07c4d8820e5499d8c15b90975618559b8
2018-08-07 11:58:36 +09:00
Hiroyuki Ikezoe
37db7332a4 Bug 1478576 - Use nsBaseWidget::NotifyThemeChanged for dark/liehgt theme changes on Windows 10. r=mhowell
Now nsBaseWidget::NotifyThemeChanged properly notifies to the pres shell.

MozReview-Commit-ID: Kmd68ckHanl

--HG--
extra : rebase_source : 9928f3788f34b05ff91d1d2b11e2cd332f00af76
2018-08-07 11:56:22 +09:00
Hiroyuki Ikezoe
d97c323105 Bug 1478576 - Drop GetXULWindow() check in nsBaseWidget::NotifyPresShell. r=karlt
In these days, it's common to not create a child widget, so if there is
GetXULWindow() check the notifications are not propagated to the proper pres
shell.  Even in the case there is a child widget, which means both of the parent
and the child widgets notify to the same pres shell, but NotifySizeMoveDone is
fairly cheap, and the other two notifications (SysColorChanged and ThemeChanged)
are queued and will be processed later together, so it will not be a big deal.

MozReview-Commit-ID: 2t23kVZzXgS

--HG--
extra : rebase_source : 79f8a955a70f19812373e219e2cee29f669a528e
2018-08-07 11:56:18 +09:00
Jan Henning
619de3dc05 Bug 1476106 - Part 4 - Refresh ScreenManager data when detecting orientation changes. r=snorp
As of bug 1475875, cached screen data is now held by Gecko, so
- we no longer need to cache the screen size (retrieval of which can be
  expensive when called en masse, as required e.g. by font inflation) within
  GeckoAppShell, and
- we need to trigger a refresh of that data instead when the activity
  orientation changes.

MozReview-Commit-ID: JsY6sBCcOih

--HG--
extra : rebase_source : f286f3b01732bd724da3988c4713adb7329a5fae
2018-08-02 22:03:59 +02:00
Nicolas Silva
43aaf84a4c Bug 1482795 - Fix the gfx memory pressure observer. r=sotaro 2018-08-14 21:10:11 +02:00
Andreea Pavel
5d75e43adc Merge mozilla-inbound to mozilla-central. a=merge 2018-08-14 19:15:33 +03:00
Henri Sivonen
3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Margareta Eliza Balazs
9575863d77 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-14 12:35:25 +03:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Ting-Yu Lin
48d02834a5 Bug 1482665 Part 2 - Remove nsPresContext::AppUnitsPerCSSPixel() and replace it with mozilla::AppUnitsPerCSSPixel(). r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D3155
2018-08-13 14:29:28 -07:00
Tim Nguyen
f0ee1746ef Bug 1472276 - Make -moz-cellhighlight distinct from Highlight and -moz-field r=karlt
Since focused+selected tree cells will no longer get an outline, we will start using a different background for the unfocused state.
That background needs to be distinct from Highlight, used on selected and focused items
and also distinct from -moz-appearance: listbox, which is used as the box background.

MozReview-Commit-ID: 7hcnueYlOXR

--HG--
extra : rebase_source : 42bb15e86252d72a3f58831079162d0f4723afc9
2018-06-29 19:23:03 +01:00
Nicolas Silva
03b39c61f2 Bug 1482109 - Use the generic memory pressure observer in PuppetWidget. r=sotaro 2018-08-10 17:15:18 +02:00
Geoff Brown
11f0d46c60 Bug 1481587 - Skip a few mochitests on Android x86 7.0 only; r=snorp
Skip a few failing tests on Android 7, to enable green runs of mochitest-cl
and mochitest-gpu on packet.net.
2018-08-10 07:54:41 -06:00
Margareta Eliza Balazs
f617807241 Merge inbound to mozilla-central. a=merge 2018-08-10 12:17:09 +03:00
Noemi Erli
125e35c2c4 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-10 00:35:08 +03:00
Masayuki Nakano
8da2dfcf57 Bug 1481148 - Make TSFTextStore::MaybeHackNoErrorLayoutBugs() keep hacking the result of GetTextExt() even on Win10 build 17643 and later for ATOK 2016 and newer r=m_kato
ATOK 2016 and newer may show candidate window at odd position temporarily
when user converts a word quickly (e.g., keep pressing space bar).
For avoiding this flicker, we should keep hacking GetTextExt() result for
ATOK 2016 and later even after Windows fixes TS_E_NOLAYOUT bug.
2018-08-07 15:56:17 +09:00
Masayuki Nakano
a5cfed23c5 Bug 1481153 - part 4: Should stop hacking the result of TSFTextStore::GetTextExt() when Win10 build 17643 only in Nightly or early Beta r=m_kato
We should get feedback from each CJKT testers at least one cycle after Win10
RS5 is released.  Until then, we should not stop hacking GetTextExt() result
in late Beta nor Release builds.
2018-08-07 21:30:52 +09:00
Masayuki Nakano
d928c7f7e1 Bug 1481153 - part 3: Make TSFTextStore::MaybeHackNoErrorLayoutBugs() hack even on Win10 build 17643 or later when Microsoft Pinyin or Microsoft Wubi is active r=m_kato
Microsoft Pinyin and Microsoft Wubi (Simplified Chinese TIPs) work better on
Windows 10 Build 17643 or later (i.e., TS_E_NOLAYOUT bug is fixed).  However,
they sometimes do not show candidate window, perhaps, the reason is something
stateful bug in them.  Therefore, we still need to hack the result of
GetTextExt() until they fix this bug.
2018-08-07 15:09:31 +09:00
Masayuki Nakano
4cb7504106 Bug 1481153 - part 2: Rewrite TSFTextStore::MaybeHackNoErrorLayoutBugs() with switch-case statement with TSFStaticSink::ActiveTIP() r=m_kato
Currently, TSFTextStore::MaybeHackNoErrorLayoutBugs() checks pref to enable
hack first, then, check if active TIP is the target of pref.  This was intended
to save comparison cost of GUIDs.  However, we don't need to worry about the
cost and that was not makes sense since all prefs are true by default.

So, this patch makes the big if-elseif blocks with switch-case with
TSFStaticSink::ActiveTIP().  Then, each case block starts to check if
- if Windows still TS_E_NOLAYOUT bug of GetTextExt().
- if corresponding pref is true.

Note that this duplicates some code for making the code look easier.
E.g., eMicrosoftOfficeIME2010ForJapanese case is duplicated from
the eMicrosoftIMEForJapanese case.  eMicrosoftPinyin and eMicrosoftWubi case
is duplicated from the eMicrosoftChangJie and eMicrosoftQuick case.
2018-08-07 14:12:13 +09:00
Masayuki Nakano
1bb7f99732 Bug 1481153 - part 1: Make TSFStaticSink cache active TIP rather than checking it every time with GUID comparison r=m_kato
As we know, GUID comparison is not cheap if it's required a lot.  Unfortunately,
we need to check it more in TSFTextStore::MaybeHackNoErrorLayoutBugs() and
it's called a lot.  So, even though mapping from GUID to TIP is expensive,
we should do it only once.  Note that most users won't change IME during a
browser session, so, running this expensive method once must be reasonable.
On the other hand, we don't allow to make damage to start up performance,
we should avoid to do it as far as possible.  For example, when we need to
check if active TIP is a specific TIP, we should check current language.
2018-08-06 22:29:14 +09:00
Martin Stransky
4854321662 Bug 1481385 - Calculate bitmap mask size with stride. r=lsalzman
--HG--
extra : amend_source : 950b8705896cbe861366f1ea80f657d5debd097a
2018-08-09 12:10:18 +03:00
Neil Deakin
8fe5a35999 Bug 1473029, have nsTreeBodyFrame::GetSelectionRegion use nsIntRegion instead of nsIScriptableRegion, r=mstange 2018-08-07 09:32:08 -04:00
Neil Deakin
a399d3073b Bug 1473029, convert drag services to internally use CSSIntRegion instead ns nsIScriptableRegion, r=mstange 2018-08-07 09:32:08 -04:00
Neil Deakin
03caccfe9e Bug 1473029, remove the region arguments from InvokeDragSession and InvokeDragSessionWithImage, r=mstange 2018-08-07 09:32:07 -04:00
Neil Deakin
5c09ea7e66 Bug 1473029, move the tree drag region handling into nsBaseDragService::InvokeDragSessionWithImage, r=mstange 2018-08-07 09:32:07 -04:00
L. David Baron
1e88f0f003 Bug 1369941: Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. r=dholbert
This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

Differential Revision: https://phabricator.services.mozilla.com/D2974

--HG--
extra : moz-landing-system : lando
2018-08-09 20:10:21 +00:00
James Willcox
f1b8f63457 Bug 1475875 - Use ScreenManager on Android r=esawin,jchen
This ensures we have screen information with e10s.

MozReview-Commit-ID: 1zghxZuLqr3
2018-08-07 14:14:32 -05:00
Kyle Machulis
04b50a312d Bug 1480607 - Remove nsCWebBrowser and nsCWebBrowserPersist; r=nika
It doesn't appear these IDL files have had interfaces in them since
before the Netscape import, and were mostly just hanging around
because they contained some IDs needed elsewhere. Move the IDs
somewhere more appropriate and remove files.

MozReview-Commit-ID: AINtTerqHu1

Differential Revision: https://phabricator.services.mozilla.com/D2688

--HG--
extra : moz-landing-system : lando
2018-08-07 01:10:31 +00:00
Gabriele Svelto
15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Masatoshi Kimura
3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Jonathan Watt
35c4d43576 Bug 1428676 pt 7. Honor the webkit pref when handling 'menulist-button' on Windows. r=emilio 2018-07-17 09:38:10 +01:00
Jonathan Watt
c39e987a28 Bug 1428676 pt 6. Honor the webkit pref when handling 'menulist-button' on Linux. r=emilio 2018-07-16 19:09:42 +01:00
Jonathan Watt
665c7fd264 Bug 1428676 pt 5. Honor the webkit pref when handling 'menulist-button' on Mac. r=emilio 2018-07-16 14:46:19 +01:00
Masayuki Nakano
2552597ed2 Bug 1467373 - part 2: Skip hacks for most TIPs in TSFTextStore::HackNoErrorLayoutBugs() if running on Windows 10 build 17643 or newer r=m_kato
At Windows 10 build 17643, Microsoft fixed the bug of TSF which returns E_FAIL
to TIP when GetTextExt() returns TS_E_NOLAYOUT.  With this fix, most TIPs do
not have any problems even if we return TS_E_NOLAYOUT.  So, unless active
TIP still needs the hack, the method can skip the hack if running on build
17643 or later.

Note that we still need to support Japanist 10 and Microsoft Office IME 2010.
It confirmed that Japanist 10 has a bug of handling TS_E_NOLAYOUT.  On the
other hand, we have not tested Microsoft Office IME 2010 since it's installable
only into Win7 or Win8 and needs to upgrade it to Win10 for testing, but I
do not have the license.  After the fix comes into release channel, I'll be
able to test it though (my main environment is Win10 and it was installed
before upgraded).  So, we need to be back after Microsoft releases the fix.

MozReview-Commit-ID: 2BzkDvHTKyI

--HG--
extra : rebase_source : ee0261c83c5a1ab7b2aa2a8f476f0c6634e2cf34
2018-08-02 14:55:52 +09:00
Masayuki Nakano
34ee9cefe7 Bug 1467373 - part 1: Split hack for TS_E_NOLAYOUT part from TSFTextStore::GetTextExt() r=m_kato
The block in TSFTextStore::GetTextExt() which decides whether we should return
S_OK with unmodified character rectangle rather than TS_E_NOLAYOUT is too big.

Additionally, we need to add new condition to check Windows 10's version there.
That makes the large block more complicated.  So, we should split the block
off from TSFTextStore::GetTextExt().  Then, we can use early-return-style to
reduce the deep indentations.

MozReview-Commit-ID: J2BJMB1QD0T

--HG--
extra : rebase_source : 3c86b5ed3a83fda1045a6453250e784f11419b97
2018-08-02 14:36:03 +09:00
Boris Zbarsky
357b6b1348 Bug 1479570. Get Add a getter to get a docshell from nsIWindowlessBrowser. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D2669

--HG--
extra : moz-landing-system : lando
2018-08-03 00:05:07 +00:00
Narcis Beleuzu
4684ccf98e Merge inbound to mozilla-central. a=merge 2018-08-03 01:28:14 +03:00
Cosmin Sabou
de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura
feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Martin Stransky
505c25cbf9 Bug 1480409 - [Linux/Gtk] Don't hardcode mHasAlphaVisual to true when WenRender is used, r=jhorak
Original patch author is Sotaro Ikeda [:sotaro] <sotaro.ikeda.g@gmail.com>

MozReview-Commit-ID: AVtDvWFqsxT

--HG--
extra : rebase_source : be77c1a7df0036b454c8795a56a20acc785a548e
2018-08-02 15:18:51 +02:00
Neil Deakin
92ff553cee Bug 1452131, properly end the drag session when the drag is aborted, for example if the mouse is released before the child process starts the drag, r=nika 2018-08-02 09:50:20 -04:00
Boris Zbarsky
754087a992 Bug 1446940 part 5. Stop getting docshells from windows via getInterface in dom/editor/etc code. r=kmag 2018-08-01 13:07:11 -04:00