Commit 8d5f6046 authored by Tim Huang's avatar Tim Huang Committed by Georg Koppen
Browse files

Bug 1352305 - Part 1: Making the XULWindow will not be enforecd to be rounded dimensions if it is

a window without a primary content when fingerprinting resistance is enabled. r?ehsan

This patch making the nsXULWindow::ForceRoundedDimensions() will only be called
when this window is a window which has a primary content when fingerprinting
resistance is enabled.

This will fix the problem that dialog windows are incorrectly resized after
fingerprinting resistance is enabled.

MozReview-Commit-ID: 6WD6c38CTPv
parent 71801ed4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1129,8 +1129,13 @@ void nsXULWindow::OnChromeLoaded()

    int32_t specWidth = -1, specHeight = -1;
    bool gotSize = false;
    bool isContent = false;

    if (nsContentUtils::ShouldResistFingerprinting()) {
    GetHasPrimaryContent(&isContent);

    // If this window has a primary content and fingerprinting resistance is
    // enabled, we enforce this window to rounded dimensions.
    if (isContent && nsContentUtils::ShouldResistFingerprinting()) {
      ForceRoundedDimensions();
    } else if (!mIgnoreXULSize) {
      gotSize = LoadSizeFromXUL(specWidth, specHeight);