Граф коммитов

2729 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
cku db62fce416 Bug 1401888 - Part 3. Make EMFViaExtDLLHelper inherit from PDFViaEMFPrintHelper. r=fatseng
Reuse the code in PDFViaEMFPrintHelper.
MozReview-Commit-ID: 3NAVxuv2jJH

--HG--
extra : rebase_source : 059efda5fc232ec741557b32e6956a58dff76691
2017-09-21 15:43:34 +08:00
cku 80b1379b3e Bug 1401888 - Part 2. Implement PDFiumEngineShim::GetInstanceOrNull(const nsCString&) r=fatseng
With this change, we are able to load PDFium engine from different library.
MozReview-Commit-ID: ErAZCPRzRR5

--HG--
extra : rebase_source : f0421af9c70d69564ed8f96d32870314871aabef
2017-09-21 15:22:18 +08:00
cku 59db10f1d3 Bug 1401888 - Part 1. Move PDFiumEngineShim::Init to private section. r=fatseng
MozReview-Commit-ID: KK1wAv1KoPh

--HG--
extra : rebase_source : 7a7dfd78cec1356f607f1ee421388337aa03aaf2
2017-09-21 15:16:40 +08:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Chris Peterson 9f4c1f5278 Bug 870698 - Part 1: Replace Assign("") with AssignLiteral(""). r=erahm
MozReview-Commit-ID: A0u9PP49OW3

--HG--
extra : rebase_source : 7d5286959f510eb4b7df1b7e32d5b9b58719c48b
extra : intermediate-source : f552b4a78236c42bc09030b3eb008725a3edb9c8
extra : source : 26ac4a1014f6661a70e3bf9f552407e12c2c3981
2017-09-03 22:12:56 -07:00
sotaro abf683608c Bug 1294788 - Disable AssumeThemePartAndStateAreTransparent() on high contrast mode since Win8.1 r=jrmuizel
The problem happened only on themed widget. The problem was triggered by Bug 888870. It just added Windows 8.1 support. When high contrast mode was enabled on Win 10, background color problem happend on themed widgets. There were 2 patterns.
- After hover the menu item, its background color remained highlighted
- After hover the menu item, its background color became black

From it, the problem seemed to be caused by background color drawing of themed widgets. nsNativeThemeWin::DrawWidgetBackground() does the background color drawing. AssumeThemePartAndStateAreTransparent() controls skipping background color drawing of themed widgets. If AssumeThemePartAndStateAreTransparent() was removed, the problem was addressed. From it, how DrawThemeBackground() works seems to be changed on high contrast mode since since Win8.1. To address the problem, the patch remove the skipping on high contrast mode since since Win8.1
2017-09-22 19:07:15 +09:00
cku 23d67624cd Bug 1401069 - Part 8. Give a detailed comment to explain how to react when hitting this assertion in OpenDocument(). r=fatseng
MozReview-Commit-ID: 74UkMV3ZOWm

--HG--
extra : rebase_source : 5fedf61f8a737ecac5668d372bff48b224859fdb
2017-09-18 23:55:54 +08:00
cku 24298df89b Bug 1401069 - Part 7. Declare GetPageCount as a const member function. r=fatseng
MozReview-Commit-ID: IRM8FikStJi

--HG--
extra : rebase_source : 5eb8658bc684054cc3084372cc5bf491d4db161c
2017-09-18 23:46:44 +08:00
cku 87185c9c9e Bug 1401069 - Part 6. Fine tune ComputeScaleFactor. r=fatseng
Make the implementation of it moew consice.
MozReview-Commit-ID: J7v98HBLhT

--HG--
extra : rebase_source : bc6e55c6cb0833c14eafd18338e79fc1a32c46c1
2017-09-18 23:40:05 +08:00
cku daf81c865b Bug 1401069 - Part 5. Remove two local variables since we do not need them. r=fatseng
dcWidth and dcHieght are used only once, we do not need to define a local
variable for any of them.
MozReview-Commit-ID: Fw5rHqtUPQN

--HG--
extra : rebase_source : 52b5381319fc6626e7f1ec4111dad70482a092cd
2017-09-18 23:28:08 +08:00
cku 4ba0283028 Bug 1401069 - Part 4. Change argument type from 'const RECT *' to reference type in WindowsEMF::Playback. r=fatseng
MozReview-Commit-ID: 4StsIm9sqeC

--HG--
extra : rebase_source : b1602542ed4478304352457ea5bfa220aae1dac7
2017-09-18 23:25:34 +08:00
cku cc1dccb273 Bug 1401069 - Part 3. Declare WindowsEMF::GetDC as const member function. r=fatseng
MozReview-Commit-ID: BX7ahnIok2T

--HG--
extra : rebase_source : f245814808a1714895dc7e83e38f357fbe29a168
2017-09-18 23:19:31 +08:00
cku 7a420a808c Bug 1401069 - Part 2. Implement ReleaseAllResource to make WindowsEMF::InitForDrawing reusable. r=fatseng
Currently, WindowsEMF::InitForDrawing can be used once. With the change in this
patch, we can call WindowsEMF::InitForDrawing and Playback/SaveToFile in pair
as many times as we want.

MozReview-Commit-ID: 4fbY4Q6i9v5

--HG--
extra : rebase_source : 4df3fc7d8663d7f552c96204a16d73261bfc9dd7
2017-09-18 23:16:08 +08:00
cku cbacd9e2bd Bug 1401069 - Part 1. Check the value of mPDFDoc and early return if it's invalid in both RenderPageToDC and DrawPageToFile. r=fatseng
MozReview-Commit-ID: LQ9LTL8ZRKJ

--HG--
extra : rebase_source : c74f3c5f317677cb76aa4cce741c5be76421af13
2017-09-18 23:59:29 +08:00
Nicholas Nethercote ebf1cb320b Bug 1400148 - Don't use -1 to represent an unset nsCursor. r=karlt.
Because UBSan complains about casting -1:

> runtime error: load of value 4294967295, which is not a valid value for type 'nsCursor'

--HG--
extra : rebase_source : 037a96700228ea0d427afa7c25c40490c701cdc4
2017-09-15 14:34:37 +10:00
Jean-Yves Avenard 21b23b41d6 Bug 1352016 - P2. Allow nsIGfxInfo service in GPU process on Windows. r=dvander
We'll need it to determine if NV12 D3D11 surface are operationals.

MozReview-Commit-ID: FvsxGhnv7H1

--HG--
extra : rebase_source : 4580819b19aa36d7d26ee7d05934eaaddd17206a
2017-09-13 16:35:14 +02:00
Masayuki Nakano 4b414a44a2 Bug 1395876 - Initialize TSF modules after we create first normal window r=m_kato
Currently, we initialize TSF modules when there is only message window (this
started from bug 1341915).  At this time, QQ Input (Simplified Chinese TIP)
fails to initialize itself.

Therefore, we should put off to initialize TSF modules after creating first
normal window.  Then, initialize its IMC and input context for the window.

IMEHandler::InitInputContext() should be called when each normal window is
created.  Therefore, calling Initialize() from it can guarantee there is
at least one normal window when Initialize() is called.

MozReview-Commit-ID: IfR4y3pYv6J

--HG--
extra : rebase_source : 3f36acfa65567f140eea9c7fc12d6268aadbd5ef
2017-09-08 16:26:54 +09:00
Adam Gashlin d064e4ee67 Bug 1393685 - Cache the result of GetGutterSize to avoid expensive calls to GetThemeMargins(). r=jimm
--HG--
extra : amend_source : 040cddfc214b0d3ab57fc6644807395365275e1d
2017-09-05 17:40:00 -04:00
Sebastian Hengst ec5336561d merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 3DvwIgw2ORU
2017-09-07 23:59:58 +02:00
Ryan VanderMeulen 4d504e0608 Backed out 3 changesets (bug 1393230) because it touches the servo directory.
Backed out changeset 9115364cd4aa (bug 1393230)
Backed out changeset f762f605dd83 (bug 1393230)
Backed out changeset c366bfc13e86 (bug 1393230)
2017-09-07 09:33:53 -04:00
Kirk Steuber 6e217001f8 Bug 1362382 - Move RegisterDragDrop to be called during idle time, if possible r=jimm
Additionally, do not call RegisterDragDrop for hidden windows.

MozReview-Commit-ID: Fv8j9FntGGT

--HG--
extra : rebase_source : fccbc576887d000805da8ac915d16fc4fddfeceb
2017-08-30 11:18:25 -07:00
Eric Rahm 70ece631cb Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.
2017-08-31 15:52:30 -07:00
Will Wang 8955c23a64 Bug 1357114 - Move the taskbar refresh timer to idle dispatch. r=florian 2017-09-07 12:15:13 +08:00
Eric Rahm 0617c21c24 Bug 1393230 - Part 2: Fix more improper string usages. r=njn
This fixes improper usages of Find where an offset was actually being use for
the boolean ignore case flag. It also fixes a few instances of passing in a
literal wchar_t to our functions where a NS_LITERAL_STRING or char16_t should
be used instead.

--HG--
extra : rebase_source : 5de1e9335895d65e6db06c510e8887d27be3390f
extra : source : f762f605dd83fc6331161a33e1ef5d54cafbd08d
2017-08-31 15:52:30 -07:00
Alastor Wu c599481d78 Bug 1373888 - part7 : modify platform wakelocks. r=cpearce,snorp,spohl
* OSX
Make the lock of the type kIOPMAssertionTypeNoDisplaySleep and kIOPMAssertionTypeNoIdleSleep
as a singleton. Won't need to require an extra lock.

* Windows
Add |mRequireForDisplay| to ensure the "audio-playing" won't overwrite the previous
display requirement.

* Android
Add "audio-playing" and "video-playing", and make sure the audio-lock won't be cancel
when receiving "WakeLockDelegate.STATE_LOCKED_BACKGROUND".

MozReview-Commit-ID: 97oNX7H2qij

--HG--
extra : rebase_source : 24fa8b267ad97d668fa55462d1f61ef5c92b632f
2017-08-29 15:28:23 +08:00
Alastor Wu 0be0a7c288 Bug 1373888 - part4 : request non-display wake lock for audio playing. r=cpearce,spohl
According to [1], kIOPMAssertionTypeNoDisplaySleep prevents display sleep and
kIOPMAssertionTypeNoIdleSleep prevents idle sleep.

We should use kIOPMAssertionTypeNoIdleSleep for audio playing, because it won't
need to block the display.

[1] https://developer.apple.com/library/content/qa/qa1340/_index.html

---

On Windows, ES_DISPLAY_REQUIRED forces display on, and ES_SYSTEM_REQUIRED forces
system on working state [2].

[2] https://msdn.microsoft.com/zh-tw/library/windows/desktop/aa373208(v=vs.85).aspx

MozReview-Commit-ID: Izs29PdzQOW

--HG--
extra : rebase_source : d0726131735b9cedf566f937204e585345b9d5e3
2017-08-29 15:25:34 +08:00
Alastor Wu 6a6ee2a0d7 Bug 1373888 - part3 : rename the topic of the wake lock. r=cpearce
For knowing the wake lock usage more clearly, we should use more specific topic name.

In OSX, you can use "$ pmset -g assertions" to check all the wakelock.
In Windows, using "$ powser -energy" to generate the energy report.

MozReview-Commit-ID: rAXnkxTvLc

--HG--
extra : rebase_source : 42ebf204673d3c913739f64c71c24af20d37c95d
2017-08-29 10:54:28 +08:00
Tom Ritter 52deded719 Bug 1393536 Clean up unused variables in widget/ r=jimm
MozReview-Commit-ID: 9NBzIriF8NU

--HG--
extra : rebase_source : da185c4e55d066ec61b534d32a06d7d1819d35ca
2017-08-25 10:39:30 -05:00
Tom Ritter 74d0b2c8b2 Bug 1393528 Add parentheses to a confusing if statement r=jimm
MozReview-Commit-ID: rKnimtw55c

--HG--
extra : rebase_source : 7687a5e38803090ca56c18ffbff106fa50bef1b7
2017-08-24 12:34:09 -05:00
Wes Kocher bd5fb0a92d Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHOFLdPkEou
2017-08-23 18:08:30 -07:00
Makoto Kato 5251e6a945 Bug 1390097 - Revert a part of bug 1354020 changes. r=masayuki
Bug 1354020 causes that IMM-IME on Windows 7 doesn't work with --no-remote.  Although I think that this issue is OS or IME bug, when default window proceduce by RegisterClass is DefaultWindowProcW, Google Japanese IME doesn't work.

I am not sure why this issue occurs when lpfnWndProc is DefWidnowProcW and DDE isn't started.  But for workaround, we should revert a part of bug 1354020 changes.

MozReview-Commit-ID: BkxlZnm8mIh

--HG--
extra : rebase_source : 21c1d86fb5628dbd726a15e5057a536271cfb26d
2017-08-23 12:59:40 +09:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Farmer Tseng 73894c8888 Bug 1382509 - Part2. Remove the code from PDFiumEngineShim that allows for linking PDFium.dll r=jwatt
MozReview-Commit-ID: IAdCznwCWBf

--HG--
extra : rebase_source : 8f0fc1be93fec1a61b732682fbc8449117042ca6
2017-08-20 22:45:17 +08:00
Farmer Tseng 3e79fc2fc8 Bug 1382509 - Part1. Align the calling convention with PDFium in PDFiumEngineShim. r=glandium
MozReview-Commit-ID: GSci8sIHnYE

--HG--
extra : rebase_source : c16704fce19bf4700f9a12f5251c292d8b03db39
2017-08-20 22:45:00 +08:00
Nicholas Nethercote 8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
peter chang b4c4e94ce2 Bug 1382680 Only add extended style WS_EX_COMPOSITED when using OMTC, r=bas,jimm
MozReview-Commit-ID: 3jwGmJxE8zL

--HG--
extra : rebase_source : 7b588a017a85eb47e74a4b3352b95ad07b5084e6
2017-08-16 16:55:15 +08:00
Makoto Kato a9fee9289d Bug 1391164 - Unnecessary to use GetProcAddress for gesture APIs since we already drop XP and Vista. r=jimm
Since our platform requirement is Windows 7+, we don't need GetProcAddress for gesture APIs.  But nsWinGesture still uses GetProcAddress for Win7+ API.

MozReview-Commit-ID: 1COJqM4NJTD

--HG--
extra : rebase_source : d915c1f74f6f3f10287ae6d08892499c3d3e8da6
2017-08-18 09:47:36 +09:00
Farmer Tseng 087ac8f9e7 Bug 1388951 - Add a gtest to compare the EMF output from our version of PDFium, to Chromium's. r=jwatt
Built pdfium_ref_x86.dll and pdfium_ref_x64.dll from google source tree. Use
them to generate an EMF as the reference.

MozReview-Commit-ID: GoaxU6nWXYM

--HG--
extra : rebase_source : 441d72cd409e105337eed7d763a29ef329ba2d58
2017-08-18 10:36:16 +08:00
Masatoshi Kimura 5b97708fef Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot
MozReview-Commit-ID: 81ZkeYdSPVW

--HG--
extra : rebase_source : 2f30565b8d5986ef6265027562f9842d0db2688e
2017-08-06 13:15:31 +09:00
Wes Kocher 936a9461f6 Merge inbound to m-c a=merge
MozReview-Commit-ID: KRQeIGmhAPA
2017-08-10 18:14:34 -07:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Masatoshi Kimura 6815cee2bd Bug 1387790 - Remove [deprecated] decodeImageData from imgITools. r=tnikkel
MozReview-Commit-ID: GZBYTPanHH6

--HG--
extra : rebase_source : f6ccc1a661533f7bdba8bb33bc9a85855b51ffae
2017-08-06 10:54:14 +09:00
Bill McCloskey 81720f1abb Bug 1384336 - Fix to MainThreadInvoker to avoid deadlocks (r=aklotz)
When removing our Windows message loop pumping code in the content
process, a11y code on the MTA thread must have some way to wake up the
main thread. The main thread could be blocked either on a conditional
variable waiting for a Gecko event, or it could be blocked waiting on
a Windows HANDLE in IPC code (doing a sync message send). In the
former case, we wake it up by posting an event to the main thread. In
the latter case, we continue to use the asynchronous procedure call
mechanism.

MozReview-Commit-ID: FN6KWaGo9Zl
2017-08-09 21:24:20 -07:00
Ryan VanderMeulen 6eb7aef00e Merge m-c to autoland. a=merge 2017-08-09 18:51:26 -04:00
Ryan VanderMeulen 2e6670c78e Merge autoland to m-c. a=merge 2017-08-09 18:47:59 -04:00
Brendan Dahl d1dd2ea172 Bug 1387168 - Use custom clipboard constructor instead of singleton. r=jrmuizel
This allows instances of the clipboard to be created (like it
was pre-headless).
2017-08-09 09:46:51 -07:00
Farmer Tseng c7c31e6f60 bug 1358076 - Part2. Enable gtest for PDFViaEMFPrintHelper r=jwatt
MozReview-Commit-ID: BWzuisXJrhV

--HG--
extra : rebase_source : 56a76a6a9eaa6e48d633fd2a2a0a6ef8b818f813
2017-08-09 14:28:16 +08:00
Farmer Tseng 6891586bfd Bug 1358076 - Part1. Add a gtest to verify PDFViaEMFPrintHelper r=jwatt
PrinterTestPage.pdf is from
https://opensource.apple.com/source/cups/cups-136.9/cups/test/testfile.pdf

MozReview-Commit-ID: HSCD80QVQVt

--HG--
extra : rebase_source : f5f044834a369a896452c7731bc91d73c31f6277
2017-08-09 14:28:06 +08:00
Bob Owen 132c433aab Bug 1388048 - Check for failure of ResolveJunctionPointsAndSymLinks in GeckoChildProcessHost::GetPathToBinary. r=jimm
This patch also adds logging into ResolveJunctionPointsAndSymLinks to help diagnose issues that
might arise if the resolution fails or the path is not usable for some reason.
2017-08-07 17:27:10 +01:00
Carsten "Tomcat" Book e02df09b7c Merge mozilla-central to mozilla-inbound 2017-08-08 13:23:59 +02:00
Nicholas Nethercote 1a6f1a62fa Bug 1387381 - Remove nsXPIDLString local variables. r=erahm.
nsXPIDLStrings are marked as VOIDED upon initialization. Most of these local
nsXPIDLString variables are immediately set via getter_Copies(), which will
either assign a string value (using Adopt()) or do SetIsVoid(). These can be
trivially converted to nsString, which will get the same treatment.

The patch suitably converts the remaining nsXPIDLString local variable as well.

--HG--
extra : rebase_source : 5fff9f2c6844559198f601853f8db08564add7d5
2017-08-08 16:07:55 +10:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Manish Goregaokar b74c4d0f69 Bug 1386915 - Add nsLookAndFeel::NativeInit() virtual call for initializing native-side state; r=jfkthame
MozReview-Commit-ID: 8XKSC1AOI0N
2017-08-06 15:41:08 -07:00
Chris Pearce c24490f1a2 Bug 1387219 - Remove code WakeLockListener support on XP and Vista. r=aklotz
billm reports that the runnable in this code is firing a lot, and since we
don't support XP/Vista we're not benefiting from this overhead.

MozReview-Commit-ID: Bpw1E9DxPpD

--HG--
extra : rebase_source : 580ef086e8d9ce12c42724c6671d9de87038beb4
2017-08-04 11:44:29 +12:00
Masatoshi Kimura e1f76e8883 Bug 1387802 - Remove [deprecated] methods from nsITaskbarPreviewController. r=jimm
MozReview-Commit-ID: 25cdKHqVLSh

--HG--
extra : rebase_source : f2dc739ad0f132cb1cc764cfa3ec11e83cbfa0c3
2017-08-06 13:35:02 +09:00
Michael Smith 478c17f71a Bug 1373739 - Hook HeadlessSound and HeadlessScreenHelper into Windows widgets. r=bdahl
MozReview-Commit-ID: 1KOlPyLmJaY

--HG--
extra : rebase_source : 6d87f2bc61b4edf7f55b4cf1eb1b2cff72d878b2
2017-07-11 14:01:00 -07:00
Michael Smith 6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
Masayuki Nakano baead301db Bug 1386556 - TSFTextStore::GetIMENotificationRequests() should always return notification requests for sEnabledTextStore r=m_kato
Currently, TSFTextStore::GetIMENotificationRequests() tries to return notification requests for focused text store.  However, if there is sEnabledTextStore, all notifications will be sent for it.  Therefore, TSFTextStore::GetIMENotificationRequests() should return notifications for sEnabledTextStore without checking focused text store in the thread manager.

For example, we try to keep active composition even if we're being inactivated because Windows steals focus from us when our main process becomes busy but user may want to continue to compose the composition after our process becomes available.

Additionally, if TSFTextStore::GetIMENotificationRequests() doesn't return IMENotificationRequests::NOTIFY_DURING_DEACTIVE, sEnabledTextStore will be broken by NOTIFY_IME_OF_BLUR which will be sent by IMEStateManager::OnChangeFocusInternal().  However, when we're being activated, NOTIFY_IME_OF_FOCUS won't be notified because focused remote process keeps having IMEContentObserver.  Therefore, sEnabledTextStore won't be recreated and IME becomes unavailable.

Therefore, while sEnabledTextStore is not nullptr, TSFTextStore::GetIMENotificationRequests() needs all notifications even if it loses focus in the thread manager.

MozReview-Commit-ID: CC6gJIpHxUO

--HG--
extra : rebase_source : 02559fe8fea81b4247ef27043fc1d995981a9ba4
2017-08-02 18:30:16 +09:00
Jonathan Watt de74546b63 Bug 1384589 - Document where the luminescence calculation for -moz-win-accentcolortext comes from. r=jimm
MozReview-Commit-ID: 51QIKmP8wOs
2017-07-27 09:37:10 +01:00
Masayuki Nakano 3bbd4cc2d5 Bug 1379997 - part2: Remove "intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" pref completely r=m_kato
"intl.tsf.hack.ms_japanese_ime.do_not_associate_imc_on_win10" should be unnecessary anymore because it failed to avoid the crash of MS-IME for Japanese but causing other regression.  Therefore, this patch removes it completely.

MozReview-Commit-ID: 91jjxfIYReW

--HG--
extra : rebase_source : d261f5bf77c14c41562495574d87364a7bb2d4fc
2017-08-01 00:13:57 +09:00
Nicholas Nethercote d4f9aa5530 Bug 1384835 (part 2, attempt 2) - Remove the Preferences::Get*String() variants that return nsAdoptingString. r=froydnj.
--HG--
extra : rebase_source : 6c24fbacb03d4adebe5f22b5e7fc60b069913f20
2017-07-31 14:23:50 +10:00
Nicholas Nethercote 581214bd8b Bug 1384835 (part 1, attempt 2) - Use nsA[C]String references instead of pointers for outparams of Get*String() pref functions. r=froydnj.
--HG--
extra : rebase_source : fe566945a55c281d8290634a5b55bed19415c839
2017-07-31 10:52:51 +10:00
Bill McCloskey c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Makoto Kato dc2ee6bae4 Bug 1383659 - LookAndFeel::GetInt(LookAndFeel::eIntID_CaretBlinkTime) should cache caret blink rate. r=jimm
WebKit's Speedometer benchmark updates textbox to emulate text input. So it also updates caret position with focus.  And, nsCaret always gets current blink time when reseting caret via LookAndFeel.

When profiling speedometer benchmark, GetCaretBlinkTime somestimes show profiling stack.  This API gets data from kernel mode, so this isn't faster.

So, we should cache caret blink rate.

And when changing this rate via control panel, WM_SETTINGCHANGE is posted. So we should update this cache via this message.

MozReview-Commit-ID: IEIi25RvR1g

--HG--
extra : rebase_source : 4bc506acd67f2737cf44dc2a667c938efc7b4024
2017-07-27 18:53:34 +09:00
Bevis Tseng 95b18d794e Bug 1382172 - Name nsITimerCallback instances in native implementation. r=billm
--HG--
extra : rebase_source : 84de1abfcc30a6964144c2e6718a508c71027b65
2017-07-27 02:18:20 +08:00
Milan Sreckovic ebe72eb0d5 Bug 1359416: Allow blocklisting of D3D11 keyed mutex and block it for Intel Gen 6. r=bas,dvander
MozReview-Commit-ID: 2u7N5qhHhD1

--HG--
extra : rebase_source : 3a8ccc658d1b83d470f1bbeef4520779c1766919
2017-07-25 14:02:36 -04:00
Wes Kocher 529c00b394 Backed out changeset 4d83b498dc00 (bug 1359416) for assertions in ServoStyleSet a=backout CLOSED TREE
MozReview-Commit-ID: 6vOIMVR5616
2017-07-21 17:18:20 -07:00
Milan Sreckovic ab1db465bb Bug 1359416: Allow blocklisting of D3D11 keyed mutex and block it for Intel Gen 6. r=bas
MozReview-Commit-ID: 5O5SPvHsT67

--HG--
extra : rebase_source : 42ec8b985a239035b9ca7217e465b5ec9685bfc0
2017-07-21 12:46:40 -04:00
Dão Gottwald f605598222 Bug 1379266 - Tweak -moz-win-accentcolortext formula to better match native title bars. r=jimm
MozReview-Commit-ID: 9unrhFI3sWh

--HG--
extra : rebase_source : 096198d640ee39c87d8495fe6e6e872544aa6478
2017-07-18 13:23:25 +02:00
Samael Wang f41a004bb1 Bug 1350643 - Part 6.2: Get per-monitor dpi in ScreenHelperWin & use the same value in nsWindow::GetDPI. r=jimm
MozReview-Commit-ID: 3oEvQe8zNJ0

--HG--
extra : rebase_source : b4c7d97ec1f701bbd1058ef40994f9874f6117cc
2017-06-16 11:16:47 +08:00
Samael Wang b75d05055a Bug 1350643 - Part 6.1: Extract getting DPI logic from LogToPhysFactor & SystemScaleFactor to provide new functions MonitorDPI & SystemDPI. r=jimm
MozReview-Commit-ID: E9mXvFMM3pA

--HG--
extra : rebase_source : 1cc0f80c41054d6400d03b663f5b0037fbdb4cad
2017-06-16 01:11:41 +08:00
Samael Wang 3810bc3903 Bug 1350643 - Part 3: Add GetDPI to nsIScreen & ScreenDetails. r=kanru
MozReview-Commit-ID: HEFyuYV26Wy

--HG--
extra : rebase_source : fb172f4ba99ab7119036ddf4ec1b3eeeaead186c
2017-06-06 18:09:34 +08:00
Dão Gottwald 4b7389da4e Bug 1379938 - Rename the -moz-windows-accent-color-applies media query and make -moz-win-accentcolor available without it. r=jimm
MozReview-Commit-ID: 9zMr9JwkloF

--HG--
extra : rebase_source : 25e9cfa11dc0c3ff09e4e3aac18a53535cbcc27b
2017-07-19 16:38:49 +02:00
Doug Thayer 7646a8ed3b Bug 1380629 - Check GetTheme result in nsNativeThemeWin r=jimm
The fix for bug 1373079 neglected the detail of OpenThemeData
that it can return null if no match is found for the specified
class name. The set of matching class data sections varies with
the default and the classic theme, and the classic theme doesn't
have matches for a few of the values that we try to get. This
causes us to pass a null theme to subsequent functions, which of
course breaks the layout.

MozReview-Commit-ID: 5LaR0qZlOzd

--HG--
extra : rebase_source : ba97163e5dfdd7127d550be54524e93f12195ffb
2017-07-17 13:55:28 -07:00
Benjamin Smedberg e92ddc293b Bug 1374038 - _exit() can call static destructors on Windows! So replace it with TerminateProcess which can't, r=jimm r=mstange
MozReview-Commit-ID: FSsOU85yA18

--HG--
extra : rebase_source : 7247a9940d7729e003af51c0cc7de15b08aa54d0
2017-07-17 16:06:15 -04:00
David Parks 1dc60d3f88 Bug 1373220 - Use correct window reference when setting parent window in Windows widget. r=jimm
SetParent removes the widget from the old parent widget and then sets its new one.  We were incorrectly using the new parent widget when we needed the old one.
2017-07-12 19:32:48 -07:00
Kris Maglione d60e48a1e8 Bug 1378948: Remove unused layers.popups.compositing.enabled preference. r=trivial
MozReview-Commit-ID: Css0qzakw14
2017-07-15 11:03:07 -07:00
David Anderson 983fda7771 Remove the Intel HD Graphics blocklist entry for Advanced Layers. (bug 1380580, r=milan) 2017-07-14 16:35:10 -07:00
Stephen A Pohl 7d2e9577c2 Bug 1379940 - Fix high memory consumption when hovering links on Windows. r=kmag 2017-07-12 12:06:00 -04:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Dão Gottwald 8f5c440b72 Backed out changeset 5a5d8de65b70 (bug 1379938) on CLOSED TREE 2017-07-13 23:16:12 +02:00
Farmer Tseng 9b1bba24c6 Bug 1380301 - Add windows.h include to nsLookAndFeel.h r=heycam
MozReview-Commit-ID: Js9Kc73VXS1

--HG--
extra : rebase_source : 05b984cc3aa219dddc10faf22de046d03144bf45
2017-07-13 13:36:31 +08:00
Farmer Tseng 225f9a9b82 Bug 1380301 - Add missing "#ifdef MOZ_ENABLE_SKIA_PDF" to nsDeviceContextSpecWin.h r=heycam
MozReview-Commit-ID: YxvOID7Xbp

--HG--
extra : rebase_source : 5e8b4e37e7f74e4f0eecd35b5e5366a7953cb996
2017-07-13 13:07:18 +08:00
Dão Gottwald 0f2337c0c7 Bug 1379938 - Rename the -moz-windows-accent-color-applies media query and make -moz-win-accentcolor available without it. r=jimm
MozReview-Commit-ID: BkDrm6KtiP3

--HG--
extra : rebase_source : 1c0deb5b77e1ce83a8f157c100606c563d61577c
2017-07-13 11:08:27 +02:00
Wes Kocher 1ef5d8834c Merge m-c to autoland, a=merge 2017-07-10 18:51:05 -07:00
Doug Thayer a57fa0349a Bug 1373079 - (3) Special-case min-size cache for buttons r=jimm
Testing for cache differences via assertions on try revealed that
we need to special-case buttons in our cache, since they can have
two different values for aSizeReq. Visual inspection of the code
reveals that this is the only aWidgetType value that has this
problem. I'm not sure how future-proof we want to try to be with
this. If anything else starts varying in this parameter then we
might unwittingly introduce caching problems, but I don't know
how likely that is.

MozReview-Commit-ID: 3kaJ01oJe3

--HG--
extra : rebase_source : 9a9c15f38eee7c59cd73e7fe42a0f581e0adeac5
2017-07-07 10:15:32 -07:00
Doug Thayer e36c93f372 Bug 1373079 - (2) Cache GetMinimumWidgetSize r=jimm
See commit (1) for more detail about the bug.

This patch caches the expensive parts of GetMinimumWidgetSize,
which are when we call GetDC and ReleaseDC. The exits before this
cached section don't have their results cached partly because
they don't seem to show up in profiles, and partly because we
don't necessarily have a theme part at that point, which means
we would need to have a more complicated caching scheme directly
involving the aWidgetType.

MozReview-Commit-ID: 886N4tTHVVk

--HG--
extra : rebase_source : 31c4750088c26d140813419c63277a330472b84e
2017-06-22 16:19:13 -04:00
Doug Thayer 6b1ccd4b56 Bug 1373079 - (1) Cache GetWidgetBorder r=jimm
Both GetWidgetBorder and GetMinimumWidgetSize are showing up
in some profiles (see bug for more details.) This is the first
patch in a series of patches which cache the results of these
functions.

Because aWidgetType can map to multiple theme parts, in order to
cover as much as possible with our cache we decided to cache
based off of the theme class and the theme part, which are derived
from the aWidgetType and misc. other state. (Assumption: the
widget border and minimum widget size should not changed based on
the theme "state" (the value that accompanies the "part".))

The total cache size for these, if we use plain arrays, is 18KB.
We could reduce this by some amount by using a sparse dynamically
sized cache or by just using aWidgetType and discarding the
overloaded values, which are few. I don't have a great intuition
for how much we care about saving a few KB, or how much time this
could cause us to lose on L1 and L2 cache misses. Accordingly it
might be more optimal to go with something else, and I am open to
criticism/suggestions.

MozReview-Commit-ID: 4LG9BnaRG7l

--HG--
extra : rebase_source : 6d3ecf11e02a863f5528fb3ec2417eb1a246574c
2017-06-21 16:43:27 -04:00
Masayuki Nakano 7edb06b6ab Bug 1367482 NativeKey::HandleCharMessage() should treat a WM_CHAR message for '\r' as a Enter key press r=m_kato
Starting from 52, NativeKey::HandleCharMessage() ignores all control characters.  However, some keyboard layout utilities may send WM_CHAR message whose wParam is '\r' for emulating pressing Enter key.  For supporting such utilities, we should dispatch Enter keypress event when HandleCharMessage() receives such event.

Note that this patch does NOT support a pair of WM_KEYDOWN and WM_CHAR whose wParam is '\r' but the WM_KEYDOWN isn't VK_RETURN.  If there is such case, we need to support it too.  However, it needs a lot of code changes.  So, we shouldn't support it until such bug is filed actually.

MozReview-Commit-ID: CWyvBtLmXgg

--HG--
extra : rebase_source : 6e9b27dc2fb9eb75626cdd5ab339d348a7be3040
2017-07-08 03:08:07 +09:00
Wei-Cheng Pan 421c3c6958 Bug 1376760 - Fix race condition for ICustomDestinationList usage. r=jimm
MozReview-Commit-ID: fgZjrHqiek

--HG--
extra : rebase_source : fc4a347bbba68f8927ac3afc85db748ffc03eff1
2017-07-06 14:06:09 +08:00
Carsten "Tomcat" Book f5427a22f2 Merge mozilla-central to autoland 2017-07-07 10:42:39 +02:00
Masayuki Nakano d6e921676c Bug 1377672 - part3: IMEStateManager::NotifyIME() should ignore notifications and requests which comes from unexpected process r=m_kato,smaug
IME should receive notifications and requests only from proper process.  E.g., IME shouldn't commit composition by a request which came from previous focused process.

This patch makes that IMEStateManager::NotifyIME() takes pointer to TabParent optionally.  If the request or notification came from remote process, it should be non-nullptr.  Then, this makes it ignore notifications and requests from unexpected process.

Note that this patch also touches some gfx headers because they use |ipc::| but compiler is confused at the ambiguousness between |mozilla::ipc::| and |mozilla::dom::ipc::|.

Finally, this patch changes the NS_ASSERTION in IMEHandler::OnDestroyWindow() to MOZ_ASSERT because the orange caused by the NS_ASSERTION was not realized since there was already an intermittent orange bug caused by different NS_ASSERTION.

MozReview-Commit-ID: 9CgKXQRJWmN

--HG--
extra : source : f3b5711908870c5e0e852a399a07e0ae721a12f1
2017-07-06 00:47:40 +09:00
Carsten "Tomcat" Book 2178a22de4 Merge mozilla-central to autoland 2017-07-06 11:24:24 +02:00
Carsten "Tomcat" Book 7857fa0a5e merge mozilla-inbound to mozilla-central a=merge 2017-07-06 11:18:05 +02:00
Kartikaya Gupta 4826f32d87 Bug 1377169 - Turn gfxRect into a typedef. r=jrmuizel
One thing to note here is that the Scale function on gfxRect has a
different implementation than that in gfx::Rect which is replacing it.
The former just scales the width/height directly whereas the latter
scales the XMost/YMost and recomputes the width/height.

MozReview-Commit-ID: 5FImdIaNfC3

--HG--
extra : rebase_source : 98662d2a52ff9652ec60b066641a07c6d5ee8e08
2017-07-05 11:22:00 -04:00
Kartikaya Gupta cad9534e69 Bug 1377090 - Turn gfxMatrix into a typedef for MatrixDouble. r=jrmuizel
Most of this patch is updating a few places that use gfxMatrix to use
the equivalent-but-differently-named functions on MatrixDouble:
- Translate/Rotate/Scale get turned into PreTranslate/PreRotate/PreScale
- Transform(Point) gets turned into TransformPoint(Point)
- gfxMatrix::TransformBounds(gfxRect) gets turned into
  gfxRect::TransformBoundsBy(gfxMatrix).
- gfxMatrix::Transform(gfxRect) gets turned into
  gfxRect::TransformBy(gfxMatrix).
The last two functions are added in this patch as convenience wrappers
to gfxRect instead of Matrix.h because we don't want Matrix.h to "know"
about gfxRect (to avoid adding gecko dependencies on Moz2D). Once we
turn gfxRect into a typedef for RectDouble these will be eliminated
anyway.

MozReview-Commit-ID: BnOjHzmOSKn

--HG--
extra : rebase_source : cf1692d1f0d44a4b05d684a66678739181a426d5
2017-07-05 11:18:49 -04:00
Stephen A Pohl ac6efcdfe0 Bug 1356317: Avoid intermittent debug assertions in browser chrome tests when creation of draw targets fails. r=jimm 2017-07-04 13:45:18 -05:00
Stephen A Pohl 448afc7974 Bug 1356317: Enable off-main-thread compositing on Windows when possible. r=kmag 2017-07-04 13:45:18 -05:00