зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1541913 - Use rust lengths for outline-offset. r=boris
Depends on D26155 Differential Revision: https://phabricator.services.mozilla.com/D26156 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c028706efc
Коммит
e63fdb7c97
|
@ -9086,7 +9086,7 @@ static void ComputeAndIncludeOutlineArea(nsIFrame* aFrame,
|
|||
// Keep this code in sync with GetOutlineInnerRect in nsCSSRendering.cpp.
|
||||
SetOrUpdateRectValuedProperty(aFrame, nsIFrame::OutlineInnerRectProperty(),
|
||||
innerRect);
|
||||
const nscoord offset = outline->mOutlineOffset;
|
||||
const nscoord offset = outline->mOutlineOffset.ToAppUnits();
|
||||
nsRect outerRect(innerRect);
|
||||
bool useOutlineAuto = false;
|
||||
if (nsLayoutUtils::IsOutlineStyleAutoEnabled()) {
|
||||
|
|
|
@ -981,7 +981,7 @@ Maybe<nsCSSBorderRenderer> nsCSSRendering::CreateBorderRendererForOutline(
|
|||
} else {
|
||||
innerRect = GetOutlineInnerRect(aForFrame) + aBorderArea.TopLeft();
|
||||
}
|
||||
nscoord offset = ourOutline->mOutlineOffset;
|
||||
nscoord offset = ourOutline->mOutlineOffset.ToAppUnits();
|
||||
innerRect.Inflate(offset);
|
||||
// If the dirty rect is completely inside the border area (e.g., only the
|
||||
// content is being painted), then we can skip out now
|
||||
|
|
|
@ -4986,7 +4986,7 @@ bool nsDisplayOutline::IsInvisibleInRect(const nsRect& aRect) const {
|
|||
nsRect borderBox(ToReferenceFrame(), mFrame->GetSize());
|
||||
if (borderBox.Contains(aRect) &&
|
||||
!nsLayoutUtils::HasNonZeroCorner(outline->mOutlineRadius)) {
|
||||
if (outline->mOutlineOffset >= 0) {
|
||||
if (outline->mOutlineOffset._0 >= 0.0f) {
|
||||
// aRect is entirely inside the border-rect, and the outline isn't
|
||||
// rendered inside the border-rect, so the outline is not visible.
|
||||
return true;
|
||||
|
|
|
@ -405,7 +405,7 @@ nsChangeHint nsStyleBorder::CalcDifference(
|
|||
nsStyleOutline::nsStyleOutline(const Document& aDocument)
|
||||
: mOutlineRadius(ZeroBorderRadius()),
|
||||
mOutlineWidth(kMediumBorderWidth),
|
||||
mOutlineOffset(0),
|
||||
mOutlineOffset({0.0f}),
|
||||
mOutlineColor(StyleColor::CurrentColor()),
|
||||
mOutlineStyle(StyleOutlineStyle::BorderStyle(StyleBorderStyle::None)),
|
||||
mActualOutlineWidth(0),
|
||||
|
|
|
@ -1054,7 +1054,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStyleOutline {
|
|||
// style struct resolution reasons that we do nsStyleBorder::mBorder;
|
||||
// see that field's comment.)
|
||||
nscoord mOutlineWidth;
|
||||
nscoord mOutlineOffset;
|
||||
mozilla::Length mOutlineOffset;
|
||||
mozilla::StyleColor mOutlineColor;
|
||||
mozilla::StyleOutlineStyle mOutlineStyle;
|
||||
|
||||
|
|
|
@ -1205,7 +1205,6 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
# Types used with predefined_type()-defined properties that we can auto-generate.
|
||||
predefined_types = {
|
||||
"length::NonNegativeLengthPercentageOrNormal": impl_style_coord,
|
||||
"Length": impl_absolute_length,
|
||||
"MozScriptMinSize": impl_absolute_length,
|
||||
"RGBAColor": impl_rgba_color,
|
||||
"SVGLength": impl_svg_length,
|
||||
|
|
Загрузка…
Ссылка в новой задаче