Commit 4a649093 authored by Bogdan Tara's avatar Bogdan Tara
Browse files

Backed out changeset 3e90a3759639 (bug 1679208) for scrollbars-no-margin.html failures CLOSED TREE

parent 5bfd115c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -58,9 +58,7 @@ class IpcResourceUpdateQueue;
 */
class nsITheme : public nsISupports {
 protected:
  using LayoutDeviceMargin = mozilla::LayoutDeviceMargin;
  using LayoutDeviceRect = mozilla::LayoutDeviceRect;
  using LayoutDeviceSize = mozilla::LayoutDeviceSize;
  using LayoutDeviceIntMargin = mozilla::LayoutDeviceIntMargin;
  using StyleAppearance = mozilla::StyleAppearance;

 public:
@@ -97,7 +95,7 @@ class nsITheme : public nsISupports {
  /**
   * Return the border for the widget, in device pixels.
   */
  [[nodiscard]] virtual LayoutDeviceMargin GetWidgetBorder(
  [[nodiscard]] virtual LayoutDeviceIntMargin GetWidgetBorder(
      nsDeviceContext* aContext, nsIFrame* aFrame,
      StyleAppearance aWidgetType) = 0;

@@ -112,7 +110,7 @@ class nsITheme : public nsISupports {
   */
  virtual bool GetWidgetPadding(nsDeviceContext* aContext, nsIFrame* aFrame,
                                StyleAppearance aWidgetType,
                                LayoutDeviceMargin* aResult) = 0;
                                LayoutDeviceIntMargin* aResult) = 0;

  /**
   * On entry, *aResult is positioned at 0,0 and sized to the new size
@@ -142,7 +140,7 @@ class nsITheme : public nsISupports {
   */
  NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
                                  StyleAppearance aWidgetType,
                                  LayoutDeviceSize* aResult,
                                  mozilla::LayoutDeviceIntSize* aResult,
                                  bool* aIsOverridable) = 0;

  enum Transparency { eOpaque = 0, eTransparent, eUnknownTransparency };
+0 −9
Original line number Diff line number Diff line
@@ -501,15 +501,6 @@ struct LayoutDevicePixel {
                    aMargin.bottom * aAppUnitsPerDevPixel,
                    aMargin.left * aAppUnitsPerDevPixel);
  }

  static nsMargin ToAppUnits(const LayoutDeviceMargin& aMargin,
                             nscoord aAppUnitsPerDevPixel) {
    return nsMargin(
        NSFloatPixelsToAppUnits(aMargin.top, aAppUnitsPerDevPixel),
        NSFloatPixelsToAppUnits(aMargin.right, aAppUnitsPerDevPixel),
        NSFloatPixelsToAppUnits(aMargin.bottom, aAppUnitsPerDevPixel),
        NSFloatPixelsToAppUnits(aMargin.left, aAppUnitsPerDevPixel));
  }
};

/*
+1 −1
Original line number Diff line number Diff line
@@ -4669,7 +4669,7 @@ static nscoord AddIntrinsicSizeOffset(

  const nsStyleDisplay* disp = aFrame->StyleDisplay();
  if (aFrame->IsThemed(disp)) {
    LayoutDeviceSize devSize;
    LayoutDeviceIntSize devSize;
    bool canOverride = true;
    nsPresContext* pc = aFrame->PresContext();
    pc->Theme()->GetMinimumWidgetSize(pc, aFrame, disp->EffectiveAppearance(),
+0 −4
Original line number Diff line number Diff line
@@ -599,10 +599,6 @@ class nsPresContext : public nsISupports, public mozilla::SupportsWeakPtr {
    return NSIntPixelsToAppUnits(aPixels, AppUnitsPerDevPixel());
  }

  nscoord DevPixelsToAppUnits(float aPixels) const {
    return NSFloatPixelsToAppUnits(aPixels, AppUnitsPerDevPixel());
  }

  int32_t AppUnitsToDevPixels(nscoord aAppUnits) const {
    return NSAppUnitsToIntPixels(aAppUnits, float(AppUnitsPerDevPixel()));
  }
+1 −1
Original line number Diff line number Diff line
@@ -713,7 +713,7 @@ nscoord nsComboboxControlFrame::DropDownButtonISize() {
    return 0;
  }

  LayoutDeviceSize dropdownButtonSize;
  LayoutDeviceIntSize dropdownButtonSize;
  bool canOverride = true;
  nsPresContext* presContext = PresContext();
  presContext->Theme()->GetMinimumWidgetSize(
Loading