mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 919355 - Part 2: Don't #include nsDeviceContext.h in Units.h; r=roc
This commit is contained in:
parent
5dc78a019a
commit
39c223b372
@ -14,6 +14,7 @@
|
||||
#include "nsFontMetrics.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "HyperTextAccessible.h"
|
||||
#include "mozilla/AppUnits.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::a11y;
|
||||
@ -504,7 +505,7 @@ TextAttrsMgr::FontSizeTextAttr::
|
||||
//
|
||||
// XXX todo: consider sharing this code with layout module? (bug 474621)
|
||||
float px =
|
||||
NSAppUnitsToFloatPixels(aValue, nsDeviceContext::AppUnitsPerCSSPixel());
|
||||
NSAppUnitsToFloatPixels(aValue, mozilla::AppUnitsPerCSSPixel());
|
||||
// Each pt is 4/3 of a CSS pixel.
|
||||
int pts = NS_lround(px*3/4);
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "nsPIWindowRoot.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -12,7 +12,8 @@
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsEvent.h"
|
||||
#include "mozilla/dom/UIEventBinding.h"
|
||||
#include "Units.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
class nsDOMUIEvent : public nsDOMEvent,
|
||||
public nsIDOMUIEvent
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsJSUtils.h"
|
||||
#include "mozilla/dom/ScreenBinding.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
namespace mozilla {
|
||||
static int32_t AppUnitsPerCSSPixel() { return 60; }
|
||||
static int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); }
|
||||
inline int32_t AppUnitsPerCSSPixel() { return 60; }
|
||||
inline int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); }
|
||||
}
|
||||
#endif /* _NS_APPUNITS_H_ */
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "nsPrintfCString.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsRegion.h"
|
||||
#include "nsDeviceContext.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "mozilla/gfx/Point.h"
|
||||
#include "mozilla/gfx/Rect.h"
|
||||
#include "mozilla/gfx/ScaleFactor.h"
|
||||
#include "nsDeviceContext.h"
|
||||
#include "nsRect.h"
|
||||
#include "nsMargin.h"
|
||||
#include "mozilla/AppUnits.h"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -24,6 +24,7 @@ class nsIScrollPositionListener;
|
||||
class nsIFrame;
|
||||
class nsPresContext;
|
||||
class nsIContent;
|
||||
class nsRenderingContext;
|
||||
|
||||
/**
|
||||
* Interface for frames that are scrollable. This interface exposes
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "gfxFontConstants.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "imgRequestProxy.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
namespace css = mozilla::css;
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "prtime.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
#include "mozilla/AppUnits.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
@ -1094,7 +1095,7 @@ nsComputedDOMStyle::DoGetTransform()
|
||||
mStyleContextHolder->PresContext(),
|
||||
dummy,
|
||||
bounds,
|
||||
float(nsDeviceContext::AppUnitsPerCSSPixel()));
|
||||
float(mozilla::AppUnitsPerCSSPixel()));
|
||||
|
||||
return MatrixToCSSValue(matrix);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#endif
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsDeviceContext.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "nsMenuPopupFrame.h"
|
||||
#include "nsClientRect.h"
|
||||
#include "nsView.h"
|
||||
#include "mozilla/AppUnits.h"
|
||||
|
||||
class nsPopupBoxObject : public nsBoxObject,
|
||||
public nsIPopupBoxObject
|
||||
@ -363,7 +364,7 @@ nsPopupBoxObject::GetAlignmentOffset(int32_t *aAlignmentOffset)
|
||||
if (!menuPopupFrame)
|
||||
return NS_OK;
|
||||
|
||||
int32_t pp = nsDeviceContext::AppUnitsPerCSSPixel();
|
||||
int32_t pp = mozilla::AppUnitsPerCSSPixel();
|
||||
// Note that the offset might be along either the X or Y axis, but for the
|
||||
// sake of simplicity we use a point with only the X axis set so we can
|
||||
// use ToNearestPixels().
|
||||
|
Loading…
Reference in New Issue
Block a user