It appears that neither Chrome, Safari or Edge support this feature,
and it's causing web-compat issues for us, e.g. bug 1373417.
MozReview-Commit-ID: AP5LMgL6QmR
TSFTextStore::GetIMEOpenState() may be called a lot. Therefore, TSFTextStore should cache the compartment until shutting down.
MozReview-Commit-ID: 2jz8zQMBHRS
--HG--
extra : rebase_source : b322bcae129c73d7fdd1de080d525dbd6f34e6f8
sMessagePump is necessary only when WinUtils::(Get|Peek)Message() retrieves a message from the queue. Therefore, we can put off to initialize it until then.
MozReview-Commit-ID: ByMJk6AIw1r
--HG--
extra : rebase_source : e826fcd6e67b2b1599b31dda44140c1e7218da5a
sKeystrokeMgr is required only when WM_KEYDOWN or WM_KEYUP message are received. So, we can put off to initialize sKeystrokeMgr until then.
MozReview-Commit-ID: JsLeM0SYXG6
--HG--
extra : rebase_source : 766479689ec7739433b146fa5c0d7985fd6fc866
TIP name may be localed on some locales of Windows. Additionally, names may be updated in the future releases. So, it's safer to use GUID rather than name when TSFStaticSink checks active TIP is a specific one.
MozReview-Commit-ID: 6HNePZV7kgJ
--HG--
extra : rebase_source : 9d77c3124fc5ebeb82b9af1c13ae73633d9de4b8
Easy Changjei, a Traditional Chinese IME, isn't available on Firefox because:
* The vendor has gone and nobody keeps maintaining it.
* It crashes at first key press since it was built with older Visual Studio and depends on the version's CRT.
Therefore, we don't need to support it anymore.
MozReview-Commit-ID: LjyAvWsrlJ1
--HG--
extra : rebase_source : 481c4fdd5bbd6ed9984a101226f5232da9705430
Getting all prefs for TSFTextStore during initializing may make damage to start up performance.
So, each one should be retrieved when the one is actually necessary.
This patch creates TSFPrefs (I like better to name it TSFPreferences, but such long name isn't better when calling long name methods.) and implemented by simple macro.
MozReview-Commit-ID: A01LEAW4E7i
--HG--
extra : rebase_source : c471059c486c357eb270a7ea2ed1c5a07dd74e83
Although mChannelData uses infallible array, OOM occurs by AppendElements since clipboard data is too large. So we should use fallible array instead.
MozReview-Commit-ID: KdIWv2jGbDK
--HG--
extra : rebase_source : fe663b7f88d9d20bfb690fe0e17ec3652bd85231
Since committing will do IO on the main thread, it would be better to do it on
an idle thread instead. We have to change JavaScript code too because now the
API is asynchrous.
This patch also updates its xpcshell test.
Now mozilla::widget::AsyncDeleteAllFaviconsFromDisk will get profile directory
on the main thread to prevent it happens on off-main-threads, thus prevents
off-main-thread assertion.
MozReview-Commit-ID: CWcR0B2BC3n
--HG--
extra : rebase_source : 3685a07f9f4476bc94bdf92937734b78fb3fe309
I haven't really tested that this fixes the performance problem observed
in a profile without the patch because the steps to use the Gecko
Profiler on local builds on Windows are rather complicated.
MozReview-Commit-ID: FmGFs2Cvquv
--HG--
extra : transplant_source : %CB%AD%1E%2A%8F%DB%0D%9E%25%08%A82%13fP%BFS%82%BF%FC
The sandbox blocks loading of GMPs when the GMP resides in a directory stored
in a path which contains a symlink or junction point. So resolve GMP paths
fully before instantiating the GMP process.
MozReview-Commit-ID: EvPCpNIDNwg
--HG--
extra : rebase_source : 7df8236c9988a674ae128faf63b949fd711ab4e0
ITfProcessorProfiles are used by a debug method TSFTextStore::CurrentKeyboardLayoutHasIME() and TSFStaticSink (when it's initialized). However, TSFStaticSink isn't necessary until when TSFTextStore needs to hack something for specific IME or notifying IMEHandler of active TIP change. So, we can put off to create the instance of ITfInputProcessorProfiles and TSFStaticSink.
MozReview-Commit-ID: KcrqUbqz1do
--HG--
extra : rebase_source : f1821b782c6cd316a8f234a17ee3c92114547041
Creating them may be expensive due to allocating them in the heap. So, let's put off to create them when first use.
MozReview-Commit-ID: HDgijJo7brU
--HG--
extra : rebase_source : 9e4e68bd048185fe38fd98bef9b5711e86f68999
TIPs (and normal keyboard layouts) don't need IMC on focused window. So, in most environment, it's not necessary to restore default IMC of focused window.
Therefore, this patch makes IMEHandler not restore default IMC unless legacy IMM-IME is active and disassociate IMC from focused window when IMM-IME isn't active.
However, this is risky change. Therefore, the new behavior is disabled in default settings. On the other hand, we need the new behavior only when MS-IME for Japanese is active on Win10. Therefore, this patch adds a pref to enable/disable the hack and make it true in the default settings.
MozReview-Commit-ID: KAVxVT9CrsW
In TSF mode, application should retrieve messages with ITfMessagePump::GetMessage() or ITfMessagePump::PeekMessage() since TSF/TIP may handle the message before or after the host application handles it.
This patch rewrites the API users with WinUtils::(Get|Peek)Message() which use ITfMessagePump if it's available.
MozReview-Commit-ID: LwHIgp7SxLH
--HG--
extra : rebase_source : aa5750af9812f9b107c29546cbee6f9eede6ebfa
This patch does the following renamings, which increase consistency.
- GeckoProfilerInitRAII -> AutoProfilerInit
- GeckoProfilerThread{Sleep,Wake}RAII -> AutoProfilerThread{Sleep,Wake}
- GeckoProfilerTracingRAII -> AutoProfilerTracing
- AutoProfilerRegister -> AutoProfilerRegisterThread
- ProfilerStackFrameRAII -> AutoProfilerLabel
- nsJSUtils::mProfilerRAII -> nsJSUtils::mAutoProfilerLabel
Plus a few other minor ones (e.g. local variables).
The patch also add MOZ_GUARD_OBJECT macros to all the profiler RAII classes
that lack them, and does some minor whitespace reformatting.
--HG--
extra : rebase_source : 47e298fdd6f6b4af70e3357ec0b7b0580c0d0f50
This change changes PDFViaEMFPrintHelper so that instead of loading the entire
contents of a PDF document into memory to pass to PDFium, it now simply passes
PDFium a file system path to load the PDF from. This should help us reduce
memory use (and potentially avoid running out of memory) when larger PDFs are
printed.
MozReview-Commit-ID: GISolZYC2GJ
--HG--
extra : rebase_source : a59925542b6c075cd14c67577653163cc2d49c0f
While initializing or destroying TSFTextStore, each object methods should be
called after the instance is grabbed by local variable since member variable
may be cleared by nested call to destroy a TSFTextStore instance.
MozReview-Commit-ID: CojLasqcDyB
On Windows, when nsWindow is created, IMEHandler::InitInputContext() is called. Then, it calls TSFTextStore::SetInputContext(). However, at least for now, TSFTextStore needs to do nothing until the widget gets focus.
MozReview-Commit-ID: HBafHEUSCtd
--HG--
extra : rebase_source : 5c21e0f81dbc9b644965f7df42da1b6314b58a26
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
This class helps draw a PDF file to a given Windows DC.
MozReview-Commit-ID: IjZAIcN3bND
--HG--
extra : rebase_source : 035dfbf5380316aacae8e1e1591d81971c47b843
This class exposes an interface to PDFium library and takes care of loading and
linking to the appropriate PDFium symbols.
MozReview-Commit-ID: 32jZD6d0KFw
--HG--
extra : rebase_source : 1d0580cbc8dc8687656ce32654d679da54104a33
WindowsEMF could be initialized with the path of a file where the EMF data
should be stored. If pass null point to the constructor that means the EMF data
are store in memory. Consumers can call GetDC() to get a HDC. It can be drawn to
generate the EMF output. After finishing with the HDC, call FinishDocument() to
finish writing the EMF output. Then consumers can call Playback() to play the
EMF's drawing commands onto the given DC. Once consumers don't use WindowsEMF
anymore, call ReleaseEMFHandle() to release object's handle. If the EMF output
is in memory, it is deleted. If it is on disk, it is not.
Consumers also can initialize WindowsEMF with an existing EMF file. They can
only use Playback().
MozReview-Commit-ID: 8hUsx8b2CXz
--HG--
extra : rebase_source : 99e38e61a00bfae45ec9102b3b23a095a7f3af1e
Because ModifierKeyState is in the 'mozilla::widget' namespace, this file uses
it without qualification.
MozReview-Commit-ID: H6t3AqLjRwJ
--HG--
extra : rebase_source : 69b788761ee332cc94acc4be6ae6ce0bb50f0e98
NS_SetCurrentThreadName() is added as an alternative to PR_SetCurrentThreadName()
inside libxul. The thread names are collected in the form of crash annotation to
be processed on socorro.
MozReview-Commit-ID: 4RpAWzTuvPs
We have to use the system scale here for consistency because GetThemePartSize and GetThemeMargins will always assume the system scale and callers of GetGutterSize will adjust the size using GetThemeDpiScaleFactor.
This patch will also fix an existing bug where native-themed elements are not scaled when layout.css.devPixelsPerPx has a non-default value on Windows 7.
MozReview-Commit-ID: ILHiOrkTPoT
--HG--
extra : rebase_source : 130dd313ed478d1fe8a9b88ce2705df985c817c3
Due to Windows doesn't support dnd in the pen message handler, we can't handle and consume WM_POINTER* to fire WidgetMouseEvent. On the other hand, we can't get some pen related attributes from Windows mouse messages. This patch gets and caches the attributes by handling WM_POINTER* but not fire WidgetMouseEvent to support dnd and pen related attributes. When handling the subsequent Windows mouse messages, we use the cached attributes to fire WidgetMouseEvent. Considering we might need to use WM_POINTER* someday, use a preference to control the behavior.
MozReview-Commit-ID: 5E60KO1zo0W
These defines cause include ordering issues that can result in build errors if
WinMessages.h is included before certain Windows headers.
To solve this issue this commit simply removes those defines since nowadays we
require Visua Studio 2015 to build and no longer need them.
MozReview-Commit-ID: GHMU05GUwHM
--HG--
extra : rebase_source : fcaadb93be6ff43f36ba98f164018d93c98a4e22
Needed because LogLevel is in the 'mozilla' namespace, but this file uses it
without qualification.
MozReview-Commit-ID: 5o2KV1GlcqM
--HG--
extra : rebase_source : 2b6bb2b6a6b0464b9c01c055101b23373d386c0f
We need the definition of CompositorWidgetDelegate in order to use
mCompositorWidgetDelegate.
MozReview-Commit-ID: Gr5G0SvCckk
--HG--
extra : rebase_source : 17db54c13bebb97c2d39e2dc0b69b7ad28346385
It is unnecessary to use Vista/7+ API via GetProcAddress
MozReview-Commit-ID: ELxCJev2jaZ
--HG--
extra : rebase_source : e1207ce5416d603090bd572ba745a703dadd93bf
ScreenHelperWin is the platform dependent part of the original
nsScreenManagerWin and nsScreenWin. It listens the WM_DISPLAYCHANGE
message and pushes updates to ScreenManager. See patch part 4. for how
ScreenManager works.
MozReview-Commit-ID: 20A3ZQKmH9a
--HG--
rename : widget/windows/nsScreenManagerWin.cpp => widget/windows/ScreenHelperWin.cpp
rename : widget/windows/nsScreenManagerWin.h => widget/windows/ScreenHelperWin.h
extra : rebase_source : a3058c237d38f72103251802ab5f5bbd672e9b70
This is the most important part of the patch series. It removes the
PScreenManager protocol and use ScreenManager directly in the content
processes.
Initial and subsequent updates are sent via PContent::RefreshScreens.
struct ScreenDetails are kept to serialize Screen over IPC.
nsIScreenManager::ScreenForNativeWidget is removed because
nsIWidget::GetWidgetScreen can replace it. nsIScreen::GetId is removed
because it's not useful for the more general Screen class.
MozReview-Commit-ID: 5dJO3isgBuQ
--HG--
extra : rebase_source : 06aa4e4fd56e2b2af1e7483aee7c0cc7f35bdb97
It's not used anywhere. Remove it will make removing PScreenManager
easier.
MozReview-Commit-ID: 5dn8kDhTZVl
--HG--
extra : rebase_source : 96b8ddb18deee94ca256bfa118b60ceacfd2d677
Updates consumers to the new behavior.
Some consumers are changed to use the "page-icon:" protocol, since it's not
trivial to join the icons table and get a single result out of it. In most cases
the join would return multiple results since a page can have multiple icon payloads.
These consumers for now will return the biggest payload, bug 1347532 will fix
some of them to properly pass a #size=NN fragment.
Note that, even before, these were just "moz-anno:favicon:" uris, and the
payload had to be fetched from the database.
Some other consumers for now just fallback to the largest payload, by passing 0
to GetFaviconURLForPage.
The favicon optimization still happens on the main-thread, bug 1346139 will
handle that problem.
Most of the changes involve handling the modified IconData objects, that now
retain an array of payloads, rather than just one. But note that .ico files are
not yet split into single frames, due to imagelib missing APIs that will be handled
in bug 1337402.
The other changes involve fixing queries to properly join with the new tables.
Finally, note that thanks to the FOREIGN KEYS support, removing from moz_icons or
moz_pages_w_icons will also remove relations from moz_icons_to_pages.
The system only supports square icons, so icons are resized based on their larger side.
This doesn't include new tests, those will be in a following changeset.
MozReview-Commit-ID: JUkpquhpS8y
--HG--
rename : toolkit/components/places/tests/unit/test_svg_favicon.js => toolkit/components/places/tests/favicons/test_svg_favicon.js
extra : rebase_source : fa49c4a81d6ab6b34a2f19ee4175e889a6e9d734