зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1205511 - Give nsPresContext a method that returns the CSS to device pixel scale. r=dbaron
--HG-- extra : source : 50b0470193cef87e4292aee14dc940b39864832d
This commit is contained in:
Родитель
38f11673f3
Коммит
705ac24ef9
|
@ -38,6 +38,7 @@
|
|||
#include "ScrollbarStyles.h"
|
||||
#include "nsIMessageManager.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "Units.h"
|
||||
|
||||
class nsAString;
|
||||
class nsIPrintSettings;
|
||||
|
@ -636,6 +637,12 @@ public:
|
|||
float DevPixelsToFloatCSSPixels(int32_t aPixels)
|
||||
{ return AppUnitsToFloatCSSPixels(DevPixelsToAppUnits(aPixels)); }
|
||||
|
||||
mozilla::CSSToLayoutDeviceScale CSSToDevPixelScale() const
|
||||
{
|
||||
return mozilla::CSSToLayoutDeviceScale(
|
||||
float(AppUnitsPerCSSPixel()) / float(AppUnitsPerDevPixel()));
|
||||
}
|
||||
|
||||
// If there is a remainder, it is rounded to nearest app units.
|
||||
nscoord GfxUnitsToAppUnits(gfxFloat aGfxUnits) const;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче