mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
6e2582b2b6
- Bug 1117087 Don't reset IM context when nsGtkIMContext receives selection change during dispatching compositionstart r=m_kato (0bbca7a4c) - Bug 1155494 - Add a 'compressall' message flag. f=handyman r=billm (parts of this patch were written by handyman with r=billm) (5bb9ccd32) - Bug 1167882 - Move a couple of static helpers functions higher up in TabChild.cpp. r=kats (75a880959) - Bug 1167882 - Add utility functions MaxScaleRatio() and MinScaleRatio() to Units.h. r=kats (3604aa9e2) - Bug 1167882 - Use the display size (includes scrollbar areas) rather than the root composition bounds (excludes scrollbar areas) to calculate the intrinsic scale. r=kats (8b6f2917c) - Fix a potential null-deref in TabChild::HandlePossibleViewportChange. (bug 1156156, r=kats) (55e5e79f4) - Bug 1164406 - Exclude the scrollbars from the composition bounds in TabChild::HandleCalculateViewportChange() when appropriate. r=kats (28a7efaad) - Bug 1089090, e10s, support custom cursors, r=jmathies (6f005a600) - Bug 1125325 - Make TabParent/TabChild UpdateDimensions messages aware of the display scale. r=kats (07ac774b2) - Bug 1157248 - TabChild should initialize ServiceWorkerManager before starting the first loading, r=nsm (0eb50c148) - Bug 1060643 - Give content the opportunity to block chrome keyhandlers. r=smaug (93cdd9608) - Bug 1137555 - Add implementation of PuppetWidget::GetMaxTouchPoints(). r=smaug, r=jimm (d859fd19a) - Bug 1164763 - Avoid one extra IPC round-trip when compositor-lru-size == 0. r=mattwoodrow,billm (19cfdf029) - bug 1167295 - manage PDocAccessible with PBrowser instead of PContent r=smaug (5787cd60c) - Bug 1161592 - If we don't get a target frame from the touch point try using the root scrollable frame. r=botond (c0d49d85f) - Bug 1162648. When updating layout with the latest async values from the APZC do the scrolling last because it can flush layout. r=botond,kats (f8a354aab) - Bug 1163572 - Modify UpdateRootFrame to automatically compute the nsIContent* and nsIPresShell* from the metrics. r=botond (9d7fda5c8) - Bug 1163572 - Have ChromeProcessController also handle root-frame repaint requests. r=botond (67786ad9f) - Bug 1163572 - Modify UpdateSubFrame to automatically figure out the nsIContent from the scrollId. r=botond (136aff8a1) - Bug 1175383 TabChild should store PuppetWidget as is rather than as nsIWidget r=smaug (3e2bfd3ad) - Bug 1158424 - Expose IsRootContent() in AsyncPanZoomController. r=kats (632ba6051) - Bug 1158424 - Clean up uses of HasNoParentWithSameLayersId() related to zoom constraints. r=kats (c94b5f517) - Bug 1166942 - Add logging code for gfx::Matrix. r=nical (5dc405fa6) - Bug 1055557 - Move storage of ZoomConstraints from RemoteContentController to APZCTreeManager. r=botond (8e1056b71) - Bug 1055557 - Add a ZoomConstraintsClient class to manage pushing zoom constraints updates to the APZ code. r=botond (69f1ae857) - Bug 1055557 - Constify some methods. r=botond (b81ec32f9) - Bug 1055557 - Ensure the right presShell resolution is used in ApplyCallbackTransform for fennec-apz scenarios. r=botond (6df0c30e7) - Bug 1175217 - Fix non-unified (and some unified) builds for nsDisplayListInvalidation.cpp. r=mstange (cd0662dfa) - Bug 1160421 - Replace nsThreadPool with a custom thread pool implementation in DecodePool. r=tn (66ae4fac2) - Bug 1130935 part.1 Add a method to check if current IME supports vertical writing mode r=emk (056232715) - Bug 1130935 part.2 Set proper composition font when writing mode is changed r=emk (e5cc07c43) - Bug 1130935 part.3 Add hack for Japanist because its candidate window is broken with @System font r=emk (4e7587585) - Bug 1130935 part.4 nsIMM32Handler::GetCharacterRectOfSelectedTextAt() should return wrting mode if it's necessary r=emk+smaug (92e76951a) - Bug 1130935 part.5 nsIMM32Handler should compute candidate window position with writing mode r=emk (676e1c274) - Bug 1130935 part.6 Selection change notification should have selection range and writing mode information r=smaug (a0e37af25)
95 lines
3.0 KiB
C++
95 lines
3.0 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
* vim: sw=2 ts=8 et :
|
|
*/
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_WidgetUtils_h
|
|
#define mozilla_WidgetUtils_h
|
|
|
|
#include "mozilla/EventForwards.h"
|
|
#include "mozilla/gfx/Matrix.h"
|
|
#include "nsCOMPtr.h"
|
|
#include "nsIDOMWindow.h"
|
|
#include "nsIWidget.h"
|
|
#include "nsPIDOMWindow.h"
|
|
#include "nsRect.h"
|
|
|
|
namespace mozilla {
|
|
|
|
// NB: these must match up with pseudo-enum in nsIScreen.idl.
|
|
enum ScreenRotation {
|
|
ROTATION_0 = 0,
|
|
ROTATION_90,
|
|
ROTATION_180,
|
|
ROTATION_270,
|
|
|
|
ROTATION_COUNT
|
|
};
|
|
|
|
gfx::Matrix ComputeTransformForRotation(const nsIntRect& aBounds,
|
|
ScreenRotation aRotation);
|
|
|
|
gfx::Matrix ComputeTransformForUnRotation(const nsIntRect& aBounds,
|
|
ScreenRotation aRotation);
|
|
|
|
nsIntRect RotateRect(nsIntRect aRect,
|
|
const nsIntRect& aBounds,
|
|
ScreenRotation aRotation);
|
|
|
|
namespace widget {
|
|
|
|
class WidgetUtils
|
|
{
|
|
public:
|
|
/**
|
|
* Shutdown() is called when "xpcom-will-shutdown" is notified. This is
|
|
* useful when you need to observe the notification in XP level code under
|
|
* widget.
|
|
*/
|
|
static void Shutdown();
|
|
|
|
/**
|
|
* Starting at the docshell item for the passed in DOM window this looks up
|
|
* the docshell tree until it finds a docshell item that has a widget.
|
|
*/
|
|
static already_AddRefed<nsIWidget> DOMWindowToWidget(nsIDOMWindow *aDOMWindow);
|
|
|
|
/**
|
|
* Compute our keyCode value (NS_VK_*) from an ASCII character.
|
|
*/
|
|
static uint32_t ComputeKeyCodeFromChar(uint32_t aCharCode);
|
|
|
|
/**
|
|
* Get unshifted charCode and shifted charCode for aKeyCode if the keyboad
|
|
* layout is a Latin keyboard layout.
|
|
*
|
|
* @param aKeyCode Our keyCode (NS_VK_*).
|
|
* @param aIsCapsLock TRUE if CapsLock is Locked. Otherwise, FALSE.
|
|
* This is used only when aKeyCode is NS_VK_[0-9].
|
|
* @param aUnshiftedCharCode CharCode for aKeyCode without Shift key.
|
|
* This may be zero if aKeyCode key doesn't input
|
|
* a Latin character.
|
|
* Note that must not be nullptr.
|
|
* @param aShiftedCharCode CharCode for aKeyCOde with Shift key.
|
|
* This is always 0 when aKeyCode isn't
|
|
* NS_VK_[A-Z].
|
|
* Note that must not be nullptr.
|
|
*/
|
|
static void GetLatinCharCodeForKeyCode(uint32_t aKeyCode,
|
|
bool aIsCapsLock,
|
|
uint32_t* aUnshiftedCharCode,
|
|
uint32_t* aShiftedCharCode);
|
|
|
|
/**
|
|
* Does device have touch support
|
|
*/
|
|
static uint32_t IsTouchDeviceSupportPresent();
|
|
};
|
|
|
|
} // namespace widget
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_WidgetUtils_h
|