Bug 1333366 Part 2 - Update legacy NS_SIDE usage and document. r=mats

Delete the "or 0 for no movement in that direction" from the CanAdjustEdges
document in nsMenuPopupFrame.h because the only caller in nsResizerFrame.cpp
never passes 0 to it.

MozReview-Commit-ID: 3A5A8O4MDn1

--HG--
extra : rebase_source : 3a961f9195d7887f8abb5c31ae9ec088f78a2626
This commit is contained in:
Ting-Yu Lin 2017-01-24 18:41:56 +08:00
Родитель 3cfff373f7
Коммит 88f22bd389
5 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -1205,7 +1205,7 @@ public:
/**
* Fill in border radii for this frame. Return whether any are nonzero.
* Indices into aRadii are the enum HalfCorner constants in gfx/2d/Types.h
* aSkipSides is a union of SIDE_BIT_LEFT/RIGHT/TOP/BOTTOM bits that says
* aSkipSides is a union of eSideBitsLeft/Right/Top/Bottom bits that says
* which side(s) to skip.
*
* Note: GetMarginBoxBorderRadii() and GetShapeBoxBorderRadii() work only

Просмотреть файл

@ -2714,7 +2714,7 @@ static_assert(eSideTop == 0 && eSideRight == 1 &&
"box side constants not top/right/bottom/left == 0/1/2/3");
static const nsCSSPropertyID gBorderColorSubpropTable[] = {
// Code relies on these being in top-right-bottom-left order.
// Code relies on these matching the NS_SIDE_* constants.
// Code relies on these matching the enum Side constants.
eCSSProperty_border_top_color,
eCSSProperty_border_right_color,
eCSSProperty_border_bottom_color,

Просмотреть файл

@ -1456,7 +1456,7 @@ void nsTableRowFrame::SetContinuousBCBorderWidth(LogicalSide aForSide,
mIStartContBorderWidth = aPixelValue;
return;
default:
NS_ERROR("invalid NS_SIDE arg");
NS_ERROR("invalid LogicalSide arg");
}
}
#ifdef ACCESSIBILITY

Просмотреть файл

@ -1697,8 +1697,8 @@ nsMenuPopupFrame::GetConstraintRect(const LayoutDeviceIntRect& aAnchorRect,
return screenRectPixels;
}
void nsMenuPopupFrame::CanAdjustEdges(int8_t aHorizontalSide,
int8_t aVerticalSide,
void nsMenuPopupFrame::CanAdjustEdges(Side aHorizontalSide,
Side aVerticalSide,
LayoutDeviceIntPoint& aChange)
{
int8_t popupAlign(mPopupAlignment);

Просмотреть файл

@ -11,6 +11,7 @@
#define nsMenuPopupFrame_h__
#include "mozilla/Attributes.h"
#include "mozilla/gfx/Types.h"
#include "nsIAtom.h"
#include "nsGkAtoms.h"
#include "nsCOMPtr.h"
@ -385,17 +386,16 @@ public:
nsPopupLevel aPopupLevel);
// Determines whether the given edges of the popup may be moved, where
// aHorizontalSide and aVerticalSide are one of the NS_SIDE_* constants, or
// 0 for no movement in that direction. aChange is the distance to move on
// those sides. If will be reset to 0 if the side cannot be adjusted at all
// in that direction. For example, a popup cannot be moved if it is anchored
// on a particular side.
// aHorizontalSide and aVerticalSide are one of the enum Side constants.
// aChange is the distance to move on those sides. If will be reset to 0
// if the side cannot be adjusted at all in that direction. For example, a
// popup cannot be moved if it is anchored on a particular side.
//
// Later, when bug 357725 is implemented, we can make this adjust aChange by
// the amount that the side can be resized, so that minimums and maximums
// can be taken into account.
void CanAdjustEdges(int8_t aHorizontalSide,
int8_t aVerticalSide,
void CanAdjustEdges(mozilla::Side aHorizontalSide,
mozilla::Side aVerticalSide,
mozilla::LayoutDeviceIntPoint& aChange);
// Return true if the popup is positioned relative to an anchor.