mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 798245. Propagate the zoom from the tab child into the frame metrics. r=cjones
This lets the default zoom make it back to the APZC when the viewport is set.
This commit is contained in:
parent
79fbc905d4
commit
7877c58e7a
@ -291,6 +291,8 @@ public:
|
||||
/** Return the DPI of the widget this TabChild draws to. */
|
||||
void GetDPI(float* aDPI);
|
||||
|
||||
gfxSize GetZoom() { return mLastMetrics.mZoom; }
|
||||
|
||||
void SetBackgroundColor(const nscolor& aColor);
|
||||
|
||||
void NotifyPainted();
|
||||
|
@ -10,6 +10,11 @@
|
||||
* used during painting and hit testing
|
||||
*/
|
||||
|
||||
// include PBrowserChild explicitly because TabChild won't include it
|
||||
// because we're in layout :(
|
||||
#include "mozilla/dom/PBrowserChild.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
|
||||
#include "mozilla/layers/PLayers.h"
|
||||
|
||||
#include "nsDisplayList.h"
|
||||
@ -50,6 +55,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::css;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::dom;
|
||||
typedef FrameMetrics::ViewID ViewID;
|
||||
|
||||
static void AddTransformFunctions(nsCSSValueList* aList,
|
||||
@ -658,6 +664,9 @@ static void RecordFrameMetrics(nsIFrame* aForFrame,
|
||||
metrics.mScrollId = aScrollId;
|
||||
|
||||
nsIPresShell* presShell = presContext->GetPresShell();
|
||||
if (TabChild *tc = GetTabChildFrom(presShell)) {
|
||||
metrics.mZoom = tc->GetZoom();
|
||||
}
|
||||
metrics.mResolution = gfxSize(presShell->GetXResolution(), presShell->GetYResolution());
|
||||
|
||||
metrics.mDevPixelsPerCSSPixel = auPerCSSPixel / auPerDevPixel;
|
||||
|
Loading…
Reference in New Issue
Block a user