import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1138356 - Correct the alignment of button contents in vertical-rl writing mode. r=smontagu (386d8e4ef)
- Bug 1138356 - Reftests for button contents alignment in vertical writing modes. r=smontagu (9829a8374)
- Bug 1151905; remove unnecessary gfxVR.h includes; r=ehsan (29092c930)
- Bug 1152171 part 1 - Remove AnimationTimeline IDL tests from dom/animation/tests; r=Ms2ger (47983c273)
- Bug 1145327 Part 1: Skip refresh driver ticks if the timestamp is in the past. r=birtles,vlad (e6dd3e843)
- Bug 1145327 Part 2: Add test to ensure requestAnimationFrame callback timestamps always go forward in time. r=birtles,dholbert (72e835de9)
- Bug 1091307 - Add a configure flag to prevent shipping Mozilla's RIL and Geolocation provider r=hsinyi,mshal (69b8a4baf)
- Bug 1101331: Modify directory structure of B2G.app to conform with Apple's v2 signature requirements. r=rstrong (68d83c82e)
- Bug 1062387 - Part 1. Fix clearing of camera preferences. r=mikeh (24244bd98)
- Bug 1062387 - Part 2. Implement DOM and JavaScript facing components of JS camera driver. r=mikeh r=bz (3eaa8513d)
- Bug 1062387 - Part 3. Implement Gonk wrappers for JS camera driver. r=mikeh (8fd1d8326)
- Bug 1062387 - Part 4. Update test cases to use JS camera driver. r=mikeh (73e2e0f44)
- Bug 1109479 - move tethering related code out of NetworkManager. r=echen (16997c1c8)
- Bug 1043403 - Support clear-key in Mochitest on B2G. r=ted. (99077635c)
- update of Bug 674779 - Per-component CPU monitoring, high-level. (9af8a64d1)
- Bug 1114935 - Part 1: Define new nsIIccService/nsIGonkIccService to replace nsIIccProvider. r=echen (763256430)
- Bug 1114935 - Part 2: Add Gonk Implementation of nsIIccService. r=echen (1621c9f6a)
- Bug 1147793 - Remove unnecessary intr semantic in ipdl file. r=bent (ebb316f08)
This commit is contained in:
2020-05-30 08:55:13 +08:00
parent 017cbb1f8d
commit 19a820a48c
74 changed files with 4699 additions and 3056 deletions
+21 -11
View File
@@ -316,7 +316,8 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
nsReflowStatus contentsReflowStatus;
nsHTMLReflowMetrics contentsDesiredSize(aButtonReflowState);
childPos.B(wm) = focusPadding.BStart(wm) + clbp.BStart(wm);
childPos.B(wm) = 0; // This will be set properly later, after reflowing the
// child to determine its size.
// We just pass 0 for containerWidth here, as the child will be repositioned
// later by FinishReflowChild.
@@ -327,15 +328,15 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
"We gave button-contents frame unconstrained available height, "
"so it should be complete");
// Compute the button's content-box height:
nscoord buttonContentBoxBSize = 0;
// Compute the button's content-box size:
LogicalSize buttonContentBox(wm);
if (aButtonReflowState.ComputedBSize() != NS_INTRINSICSIZE) {
// Button has a fixed block-size -- that's its content-box bSize.
buttonContentBoxBSize = aButtonReflowState.ComputedBSize();
buttonContentBox.BSize(wm) = aButtonReflowState.ComputedBSize();
} else {
// Button is intrinsically sized -- it should shrinkwrap the
// button-contents' bSize, plus any focus-padding space:
buttonContentBoxBSize =
buttonContentBox.BSize(wm) =
contentsDesiredSize.BSize(wm) + focusPadding.BStartEnd(wm);
// Make sure we obey min/max-bSize in the case when we're doing intrinsic
@@ -343,16 +344,26 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// aButtonReflowState.ComputedBSize()). Note that we do this before
// adjusting for borderpadding, since mComputedMaxBSize and
// mComputedMinBSize are content bSizes.
buttonContentBoxBSize =
NS_CSS_MINMAX(buttonContentBoxBSize,
buttonContentBox.BSize(wm) =
NS_CSS_MINMAX(buttonContentBox.BSize(wm),
aButtonReflowState.ComputedMinBSize(),
aButtonReflowState.ComputedMaxBSize());
}
if (aButtonReflowState.ComputedISize() != NS_INTRINSICSIZE) {
buttonContentBox.ISize(wm) = aButtonReflowState.ComputedISize();
} else {
buttonContentBox.ISize(wm) =
contentsDesiredSize.ISize(wm) + focusPadding.IStartEnd(wm);
buttonContentBox.ISize(wm) =
NS_CSS_MINMAX(buttonContentBox.ISize(wm),
aButtonReflowState.ComputedMinISize(),
aButtonReflowState.ComputedMaxISize());
}
// Center child in the block-direction in the button
// (technically, inside of the button's focus-padding area)
nscoord extraSpace =
buttonContentBoxBSize - focusPadding.BStartEnd(wm) -
buttonContentBox.BSize(wm) - focusPadding.BStartEnd(wm) -
contentsDesiredSize.BSize(wm);
childPos.B(wm) = std::max(0, extraSpace / 2);
@@ -361,8 +372,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// its focus-padding rect:
childPos.B(wm) += focusPadding.BStart(wm) + clbp.BStart(wm);
nscoord containerWidth = contentsDesiredSize.Width() +
clbp.LeftRight(wm) + focusPadding.LeftRight(wm);
nscoord containerWidth = buttonContentBox.Width(wm) + clbp.LeftRight(wm);
// Place the child
FinishReflowChild(aFirstKid, aPresContext,
@@ -381,7 +391,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
// * Button's height & width are content-box size + border-box contribution:
aButtonDesiredSize.SetSize(wm,
LogicalSize(wm, aButtonReflowState.ComputedISize() + clbp.IStartEnd(wm),
buttonContentBoxBSize + clbp.BStartEnd(wm)));
buttonContentBox.BSize(wm) + clbp.BStartEnd(wm)));
// * Button's ascent is its child's ascent, plus the child's block-offset
// within our frame... unless it's orthogonal, in which case we'll use the