summaryrefslogtreecommitdiffstats
path: root/layout
diff options
context:
space:
mode:
Diffstat (limited to 'layout')
-rw-r--r--layout/base/nsArenaMemoryStats.h7
-rw-r--r--layout/base/nsCSSRendering.cpp1
-rw-r--r--layout/base/nsDisplayList.cpp6
-rw-r--r--layout/base/nsDocumentViewer.cpp14
-rw-r--r--layout/base/nsLayoutUtils.cpp4
-rw-r--r--layout/base/nsPresShell.cpp40
-rw-r--r--layout/base/nsRefreshDriver.cpp12
-rw-r--r--layout/forms/nsNumberControlFrame.cpp4
-rw-r--r--layout/generic/ReflowInput.cpp64
-rw-r--r--layout/generic/ReflowInput.h30
-rw-r--r--layout/generic/nsFrame.cpp14
-rw-r--r--layout/generic/nsFrame.h2
-rw-r--r--layout/generic/nsSelection.cpp7
-rw-r--r--layout/reftests/css-grid/grid-auto-min-sizing-definite-001-ref.html47
-rw-r--r--layout/reftests/css-grid/grid-item-sizing-percent-001-ref.html4
-rw-r--r--layout/reftests/css-grid/grid-item-sizing-percent-001.html4
-rw-r--r--layout/reftests/css-grid/grid-item-sizing-px-001.html4
-rw-r--r--layout/reftests/css-grid/reftest.list2
-rw-r--r--layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004-ref.xhtml28
-rw-r--r--layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004.xhtml20
-rw-r--r--layout/style/FontFaceSet.cpp8
-rw-r--r--layout/style/nsFontFaceLoader.cpp1
-rw-r--r--layout/xul/nsScrollbarButtonFrame.cpp3
-rw-r--r--layout/xul/nsSliderFrame.cpp6
24 files changed, 81 insertions, 251 deletions
diff --git a/layout/base/nsArenaMemoryStats.h b/layout/base/nsArenaMemoryStats.h
index ba09baaa4..2a872cfe8 100644
--- a/layout/base/nsArenaMemoryStats.h
+++ b/layout/base/nsArenaMemoryStats.h
@@ -18,7 +18,12 @@ public:
Other // Everything else.
};
- nsTabSizes() { mozilla::PodZero(this); }
+ nsTabSizes()
+ : mDom(0)
+ , mStyle(0)
+ , mOther(0)
+ {
+ }
void add(Kind kind, size_t n)
{
diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp
index 054632ad7..71ebfad22 100644
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -2516,7 +2516,6 @@ nsCSSRendering::PaintGradient(nsPresContext* aPresContext,
PROFILER_LABEL("nsCSSRendering", "PaintGradient",
js::ProfileEntry::Category::GRAPHICS);
- Telemetry::AutoTimer<Telemetry::GRADIENT_DURATION, Telemetry::Microsecond> gradientTimer;
if (aDest.IsEmpty() || aFillArea.IsEmpty()) {
return;
}
diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp
index cb55bb2da..2bf20144a 100644
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -7491,9 +7491,6 @@ PaintTelemetry::AutoRecordPaint::~AutoRecordPaint()
double totalMs = (TimeStamp::Now() - mStart).ToMilliseconds();
- // Record the total time.
- Telemetry::Accumulate(Telemetry::CONTENT_PAINT_TIME, static_cast<uint32_t>(totalMs));
-
// If the total time was >= 16ms, then it's likely we missed a frame due to
// painting. In this case we'll gather some detailed metrics below.
if (totalMs <= 16.0) {
@@ -7504,9 +7501,6 @@ PaintTelemetry::AutoRecordPaint::~AutoRecordPaint()
MOZ_ASSERT(aDurationMs <= totalMs);
uint32_t amount = static_cast<int32_t>((aDurationMs / totalMs) * 100.0);
-
- nsDependentCString key(aKey);
- Telemetry::Accumulate(Telemetry::CONTENT_LARGE_PAINT_PHASE_WEIGHT, key, amount);
};
double dlMs = sMetrics[Metric::DisplayList];
diff --git a/layout/base/nsDocumentViewer.cpp b/layout/base/nsDocumentViewer.cpp
index 7b8734928..5478c61b0 100644
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -1206,11 +1206,8 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt,
nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument);
mInPermitUnload = true;
- {
- Telemetry::AutoTimer<Telemetry::HANDLE_BEFOREUNLOAD_MS> telemetryTimer;
- EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext,
+ EventDispatcher::DispatchDOMEvent(window, nullptr, event, mPresContext,
nullptr);
- }
mInPermitUnload = false;
}
@@ -1275,7 +1272,6 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt,
nsAutoSyncOperation sync(mDocument);
mInPermitUnloadPrompt = true;
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_COUNT, 1);
rv = prompt->ConfirmEx(title, message, buttonFlags,
leaveLabel, stayLabel, nullptr, nullptr,
&dummy, &buttonPressed);
@@ -1290,15 +1286,12 @@ nsDocumentViewer::PermitUnloadInternal(bool *aShouldPrompt,
// XXX: Are there other cases where prompts can abort? Is it ok to
// prevent unloading the page in those cases?
if (NS_FAILED(rv)) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION, 2);
*aPermitUnload = false;
return NS_OK;
}
// Button 0 == leave, button 1 == stay
*aPermitUnload = (buttonPressed == 0);
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::ONBEFOREUNLOAD_PROMPT_ACTION,
- (*aPermitUnload ? 1 : 0));
// If the user decided to go ahead, make sure not to prompt the user again
// by toggling the internal prompting bool to false:
if (*aPermitUnload) {
@@ -1393,10 +1386,7 @@ nsDocumentViewer::PageHide(bool aIsUnload)
nsIDocument::PageUnloadingEventTimeStamp timestamp(mDocument);
- {
- Telemetry::AutoTimer<Telemetry::HANDLE_UNLOAD_MS> telemetryTimer;
- EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
- }
+ EventDispatcher::Dispatch(window, mPresContext, &event, nullptr, &status);
}
#ifdef MOZ_XUL
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp
index 062fbfe15..d0f790a0b 100644
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3569,8 +3569,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
builder.LeavePresShell(aFrame, &list);
- Telemetry::AccumulateTimeDelta(Telemetry::PAINT_BUILD_DISPLAYLIST_TIME,
- startBuildDisplayList);
bool profilerNeedsDisplayList = profiler_feature_active("displaylistdump");
bool consoleNeedsDisplayList = gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint();
@@ -3651,8 +3649,6 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
TimeStamp paintStart = TimeStamp::Now();
RefPtr<LayerManager> layerManager
= list.PaintRoot(&builder, aRenderingContext, flags);
- Telemetry::AccumulateTimeDelta(Telemetry::PAINT_RASTERIZE_TIME,
- paintStart);
if (gfxPrefs::GfxLoggingPaintedPixelCountEnabled()) {
TimeStamp now = TimeStamp::Now();
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp
index 3e5320c22..88539dc4a 100644
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -1114,17 +1114,6 @@ PresShell::Destroy()
if (mPresContext) {
const bool mayFlushUserFontSet = false;
gfxUserFontSet* fs = mPresContext->GetUserFontSet(mayFlushUserFontSet);
- if (fs) {
- uint32_t fontCount;
- uint64_t fontSize;
- fs->GetLoadStatistics(fontCount, fontSize);
- Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, fontCount);
- Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE,
- uint32_t(fontSize/1024));
- } else {
- Telemetry::Accumulate(Telemetry::WEBFONT_PER_PAGE, 0);
- Telemetry::Accumulate(Telemetry::WEBFONT_SIZE_PER_PAGE, 0);
- }
}
#ifdef MOZ_REFLOW_PERF
@@ -2276,8 +2265,6 @@ PresShell::ScrollPage(bool aForward)
nsIScrollableFrame* scrollFrame =
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
if (scrollFrame) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollPage);
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1),
nsIScrollableFrame::PAGES,
nsIScrollableFrame::SMOOTH,
@@ -2294,9 +2281,6 @@ PresShell::ScrollLine(bool aForward)
nsIScrollableFrame* scrollFrame =
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
if (scrollFrame) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollLine);
-
int32_t lineCount = Preferences::GetInt("toolkit.scrollbox.verticalScrollDistance",
NS_DEFAULT_VERTICAL_SCROLL_DISTANCE);
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? lineCount : -lineCount),
@@ -2315,8 +2299,6 @@ PresShell::ScrollCharacter(bool aRight)
nsIScrollableFrame* scrollFrame =
GetFrameToScrollAsScrollable(nsIPresShell::eHorizontal);
if (scrollFrame) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollCharacter);
int32_t h = Preferences::GetInt("toolkit.scrollbox.horizontalScrollDistance",
NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE);
scrollFrame->ScrollBy(nsIntPoint(aRight ? h : -h, 0),
@@ -2335,8 +2317,6 @@ PresShell::CompleteScroll(bool aForward)
nsIScrollableFrame* scrollFrame =
GetFrameToScrollAsScrollable(nsIPresShell::eVertical);
if (scrollFrame) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadCompleteScroll);
scrollFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1),
nsIScrollableFrame::WHOLE,
nsIScrollableFrame::SMOOTH,
@@ -8231,16 +8211,6 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent,
}
}
- if (Telemetry::CanRecordBase() &&
- !aEvent->mTimeStamp.IsNull() &&
- aEvent->AsInputEvent()) {
- double millis = (TimeStamp::Now() - aEvent->mTimeStamp).ToMilliseconds();
- Telemetry::Accumulate(Telemetry::INPUT_EVENT_RESPONSE_MS, millis);
- if (mDocument && mDocument->GetReadyStateEnum() != nsIDocument::READYSTATE_COMPLETE) {
- Telemetry::Accumulate(Telemetry::LOAD_INPUT_EVENT_RESPONSE_MS, millis);
- }
- }
-
return rv;
}
@@ -9522,16 +9492,6 @@ PresShell::ProcessReflowCommands(bool aInterruptible)
UnsuppressAndInvalidate();
}
- if (mDocument->GetRootElement()) {
- TimeDuration elapsed = TimeStamp::Now() - timerStart;
- int32_t intElapsed = int32_t(elapsed.ToMilliseconds());
-
- if (intElapsed > NS_LONG_REFLOW_TIME_MS) {
- Telemetry::Accumulate(Telemetry::LONG_REFLOW_INTERRUPTIBLE,
- aInterruptible ? 1 : 0);
- }
- }
-
return !interrupted;
}
diff --git a/layout/base/nsRefreshDriver.cpp b/layout/base/nsRefreshDriver.cpp
index 6676bea97..bc1a27852 100644
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -526,10 +526,6 @@ private:
if (XRE_IsParentProcess()) {
TimeDuration vsyncLatency = TimeStamp::Now() - aVsyncTimestamp;
uint32_t sample = (uint32_t)vsyncLatency.ToMilliseconds();
- Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_CHROME_FRAME_DELAY_MS,
- sample);
- Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_SYNC_SCROLL_FRAME_DELAY_MS,
- sample);
RecordJank(sample);
} else if (mVsyncRate != TimeDuration::Forever()) {
TimeDuration contentDelay = (TimeStamp::Now() - mLastChildTick) - mVsyncRate;
@@ -539,10 +535,6 @@ private:
contentDelay = TimeDuration::FromMilliseconds(0);
}
uint32_t sample = (uint32_t)contentDelay.ToMilliseconds();
- Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_CONTENT_FRAME_DELAY_MS,
- sample);
- Telemetry::Accumulate(Telemetry::FX_REFRESH_DRIVER_SYNC_SCROLL_FRAME_DELAY_MS,
- sample);
RecordJank(sample);
} else {
// Request the vsync rate from the parent process. Might be a few vsyncs
@@ -2027,10 +2019,6 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
notifyGC = true;
}
-#ifndef ANDROID /* bug 1142079 */
- mozilla::Telemetry::AccumulateTimeDelta(mozilla::Telemetry::REFRESH_DRIVER_TICK, mTickStart);
-#endif
-
nsTObserverArray<nsAPostRefreshObserver*>::ForwardIterator iter(mPostRefreshObservers);
while (iter.HasMore()) {
nsAPostRefreshObserver* observer = iter.GetNext();
diff --git a/layout/forms/nsNumberControlFrame.cpp b/layout/forms/nsNumberControlFrame.cpp
index 74dec2bea..9724109cb 100644
--- a/layout/forms/nsNumberControlFrame.cpp
+++ b/layout/forms/nsNumberControlFrame.cpp
@@ -430,6 +430,8 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
nsContentUtils::AddScriptRunner(focusJob);
}
+ SyncDisabledState();
+
if (StyleDisplay()->mAppearance == NS_THEME_TEXTFIELD) {
// The author has elected to hide the spinner by setting this
// -moz-appearance. We will reframe if it changes.
@@ -461,8 +463,6 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
CSSPseudoElementType::mozNumberSpinDown,
spinBoxCI.mStyleContext);
- SyncDisabledState();
-
return rv;
}
diff --git a/layout/generic/ReflowInput.cpp b/layout/generic/ReflowInput.cpp
index a8756cea2..bbff77ad4 100644
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -154,11 +154,6 @@ FontSizeInflationListMarginAdjustment(const nsIFrame* aFrame)
return 0;
}
-// NOTE: If we ever want to use SizeComputationInput for a flex item or a
-// grid item, we need to make it take the containing-block block-size as
-// well as the inline-size, since flex items and grid items resolve
-// block-direction percent margins and padding against the
-// containing-block block-size, rather than its inline-size.
SizeComputationInput::SizeComputationInput(nsIFrame *aFrame,
nsRenderingContext *aRenderingContext,
WritingMode aContainingBlockWritingMode,
@@ -167,16 +162,9 @@ SizeComputationInput::SizeComputationInput(nsIFrame *aFrame,
, mRenderingContext(aRenderingContext)
, mWritingMode(aFrame->GetWritingMode())
{
- MOZ_ASSERT(!aFrame->IsFlexOrGridItem(),
- "We're about to resolve percent margin & padding "
- "values against CB inline size, which is incorrect for "
- "flex/grid items. "
- "Additionally for grid items, this path doesn't handle baseline "
- "padding contribution - see SizeComputationInput::InitOffsets");
- LogicalSize cbSize(aContainingBlockWritingMode, aContainingBlockISize,
- aContainingBlockISize);
ReflowInputFlags flags;
- InitOffsets(aContainingBlockWritingMode, cbSize, mFrame->GetType(), flags);
+ InitOffsets(aContainingBlockWritingMode, aContainingBlockISize,
+ mFrame->GetType(), flags);
}
// Initialize a reflow state for a child frame's reflow. Some state
@@ -2132,27 +2120,6 @@ IsSideCaption(nsIFrame* aFrame, const nsStyleDisplay* aStyleDisplay,
captionSide == NS_STYLE_CAPTION_SIDE_RIGHT;
}
-// Flex/grid items resolve block-axis percentage margin & padding against the
-// containing block block-size (also for abs/fixed-pos child frames).
-// For everything else: the CSS21 spec requires that margin and padding
-// percentage values are calculated with respect to the inline-size of the
-// containing block, even for margin & padding in the block axis.
-static LogicalSize
-OffsetPercentBasis(const nsIFrame* aFrame,
- WritingMode aWM,
- const LogicalSize& aContainingBlockSize)
-{
- LogicalSize offsetPercentBasis = aContainingBlockSize;
- if (MOZ_LIKELY(!aFrame->GetParent() ||
- !aFrame->GetParent()->IsFlexOrGridContainer())) {
- offsetPercentBasis.BSize(aWM) = offsetPercentBasis.ISize(aWM);
- } else if (offsetPercentBasis.BSize(aWM) == NS_AUTOHEIGHT) {
- offsetPercentBasis.BSize(aWM) = 0;
- }
-
- return offsetPercentBasis;
-}
-
// XXX refactor this code to have methods for each set of properties
// we are computing: width,height,line-height; margin; offsets
@@ -2173,7 +2140,7 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
// height equal to the available space
if (nullptr == mParentReflowInput || mFlags.mDummyParentReflowInput) {
// XXXldb This doesn't mean what it used to!
- InitOffsets(wm, OffsetPercentBasis(mFrame, wm, aContainingBlockSize),
+ InitOffsets(wm, aContainingBlockSize.ISize(wm),
aFrameType, mFlags, aBorder, aPadding);
// Override mComputedMargin since reflow roots start from the
// frame's boundary, which is inside the margin.
@@ -2230,8 +2197,7 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
// For calculating positioning offsets, margins, borders and
// padding, we use the writing mode of the containing block
WritingMode cbwm = cbrs->GetWritingMode();
- InitOffsets(cbwm, OffsetPercentBasis(mFrame, cbwm,
- cbSize.ConvertTo(cbwm, wm)),
+ InitOffsets(cbwm, cbSize.ConvertTo(cbwm, wm).ISize(cbwm),
aFrameType, mFlags, aBorder, aPadding);
// For calculating the size of this box, we use its own writing mode
@@ -2505,7 +2471,7 @@ UpdateProp(FrameProperties& aProps,
void
SizeComputationInput::InitOffsets(WritingMode aWM,
- const LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
nsIAtom* aFrameType,
ReflowInputFlags aFlags,
const nsMargin* aBorder,
@@ -2876,7 +2842,7 @@ ReflowInput::CalcLineHeight(nsIContent* aContent,
bool
SizeComputationInput::ComputeMargin(WritingMode aWM,
- const LogicalSize& aPercentBasis)
+ nscoord aPercentBasis)
{
// SVG text frames have no margin.
if (mFrame->IsSVGText()) {
@@ -2893,17 +2859,17 @@ SizeComputationInput::ComputeMargin(WritingMode aWM,
// (http://dev.w3.org/csswg/css-writing-modes-3/#orthogonal-flows)
LogicalMargin m(aWM);
m.IStart(aWM) = nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.ISize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
styleMargin->mMargin.GetIStart(aWM));
m.IEnd(aWM) = nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.ISize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
styleMargin->mMargin.GetIEnd(aWM));
m.BStart(aWM) = nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.BSize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
styleMargin->mMargin.GetBStart(aWM));
m.BEnd(aWM) = nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.BSize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
styleMargin->mMargin.GetBEnd(aWM));
SetComputedLogicalMargin(aWM, m);
@@ -2924,7 +2890,7 @@ SizeComputationInput::ComputeMargin(WritingMode aWM,
bool
SizeComputationInput::ComputePadding(WritingMode aWM,
- const LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
nsIAtom* aFrameType)
{
// If style can provide us the padding directly, then use it.
@@ -2945,17 +2911,17 @@ SizeComputationInput::ComputePadding(WritingMode aWM,
// clamp negative calc() results to 0
LogicalMargin p(aWM);
p.IStart(aWM) = std::max(0, nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.ISize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
stylePadding->mPadding.GetIStart(aWM)));
p.IEnd(aWM) = std::max(0, nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.ISize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
stylePadding->mPadding.GetIEnd(aWM)));
p.BStart(aWM) = std::max(0, nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.BSize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
stylePadding->mPadding.GetBStart(aWM)));
p.BEnd(aWM) = std::max(0, nsLayoutUtils::
- ComputeCBDependentValue(aPercentBasis.BSize(aWM),
+ ComputeCBDependentValue(aPercentBasis,
stylePadding->mPadding.GetBEnd(aWM)));
SetComputedLogicalPadding(aWM, p);
diff --git a/layout/generic/ReflowInput.h b/layout/generic/ReflowInput.h
index 09c980b72..1d2df6af6 100644
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -245,7 +245,7 @@ public:
static void* DisplayInitOffsetsEnter(
nsIFrame* aFrame,
SizeComputationInput* aState,
- const mozilla::LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
const nsMargin* aBorder,
const nsMargin* aPadding);
static void DisplayInitOffsetsExit(nsIFrame* aFrame,
@@ -260,19 +260,12 @@ private:
*
* @param aWM Writing mode of the containing block
* @param aPercentBasis
- * Logical size in the writing mode of the containing block to use
- * for resolving percentage margin values in the inline and block
- * axes.
- * The inline size is usually the containing block inline-size
- * (width if writing mode is horizontal, and height if vertical).
- * The block size is usually the containing block inline-size, per
- * CSS21 sec 8.3 (read in conjunction with CSS Writing Modes sec
- * 7.2), but may be the containing block block-size, e.g. in CSS3
- * Flexbox and Grid.
+ * Inline size of the containing block (in its own writing mode), to use
+ * for resolving percentage margin values in the inline and block axes.
* @return true if the margin is dependent on the containing block size.
*/
bool ComputeMargin(mozilla::WritingMode aWM,
- const mozilla::LogicalSize& aPercentBasis);
+ nscoord aPercentBasis);
/**
* Computes padding values from the specified padding style information, and
@@ -280,25 +273,18 @@ private:
*
* @param aWM Writing mode of the containing block
* @param aPercentBasis
- * Logical size in the writing mode of the containing block to use
- * for resolving percentage padding values in the inline and block
- * axes.
- * The inline size is usually the containing block inline-size
- * (width if writing mode is horizontal, and height if vertical).
- * The block size is usually the containing block inline-size, per
- * CSS21 sec 8.3 (read in conjunction with CSS Writing Modes sec
- * 7.2), but may be the containing block block-size, e.g. in CSS3
- * Flexbox and Grid.
+ * Inline size of the containing block (in its own writing mode), to use
+ * for resolving percentage padding values in the inline and block axes.
* @return true if the padding is dependent on the containing block size.
*/
bool ComputePadding(mozilla::WritingMode aWM,
- const mozilla::LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
nsIAtom* aFrameType);
protected:
void InitOffsets(mozilla::WritingMode aWM,
- const mozilla::LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
nsIAtom* aFrameType,
ReflowInputFlags aFlags,
const nsMargin* aBorder = nullptr,
diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp
index 418fa16b7..fa5b24d40 100644
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10289,8 +10289,8 @@ DR_init_constraints_cookie::~DR_init_constraints_cookie()
DR_init_offsets_cookie::DR_init_offsets_cookie(
nsIFrame* aFrame,
- SizeComputationInput* aState,
- const LogicalSize& aPercentBasis,
+ SizeComputationInput* aState,
+ nscoord aPercentBasis,
const nsMargin* aMargin,
const nsMargin* aPadding)
: mFrame(aFrame)
@@ -11243,7 +11243,7 @@ ReflowInput::DisplayInitConstraintsExit(nsIFrame* aFrame,
/* static */ void*
SizeComputationInput::DisplayInitOffsetsEnter(nsIFrame* aFrame,
SizeComputationInput* aState,
- const LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
const nsMargin* aBorder,
const nsMargin* aPadding)
{
@@ -11258,12 +11258,10 @@ SizeComputationInput::DisplayInitOffsetsEnter(nsIFrame* aFrame,
if (treeNode && treeNode->mDisplay) {
DR_state->DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
- char horizPctBasisStr[16];
- char vertPctBasisStr[16];
+ char pctBasisStr[16];
WritingMode wm = aState->GetWritingMode();
- DR_state->PrettyUC(aPercentBasis.ISize(wm), horizPctBasisStr, 16);
- DR_state->PrettyUC(aPercentBasis.BSize(wm), vertPctBasisStr, 16);
- printf("InitOffsets pct_basis=%s,%s", horizPctBasisStr, vertPctBasisStr);
+ DR_state->PrettyUC(aPercentBasis, pctBasisStr, 16);
+ printf("InitOffsets pct_basis=%s", pctBasisStr);
DR_state->PrintMargin("b", aBorder);
DR_state->PrintMargin("p", aPadding);
diff --git a/layout/generic/nsFrame.h b/layout/generic/nsFrame.h
index f996f57d7..af1c95ef2 100644
--- a/layout/generic/nsFrame.h
+++ b/layout/generic/nsFrame.h
@@ -845,7 +845,7 @@ public:
struct DR_init_offsets_cookie {
DR_init_offsets_cookie(nsIFrame* aFrame, mozilla::SizeComputationInput* aState,
- const mozilla::LogicalSize& aPercentBasis,
+ nscoord aPercentBasis,
const nsMargin* aBorder,
const nsMargin* aPadding);
~DR_init_offsets_cookie();
diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp
index a2227c39c..ec0fba308 100644
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -2201,8 +2201,6 @@ nsFrameSelection::CommonPageMove(bool aForward,
return;
// scroll one page
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollPage);
aScrollableFrame->ScrollBy(nsIntPoint(0, aForward ? 1 : -1),
nsIScrollableFrame::PAGES,
nsIScrollableFrame::SMOOTH);
@@ -6202,11 +6200,6 @@ Selection::ScrollIntoView(SelectionRegion aRegion,
flags |= nsIPresShell::SCROLL_OVERFLOW_HIDDEN;
}
- if (aFlags & Selection::SCROLL_FOR_CARET_MOVE) {
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollCaretIntoView);
- }
-
presShell->ScrollFrameRectIntoView(frame, rect, aVertical, aHorizontal,
flags);
return NS_OK;
diff --git a/layout/reftests/css-grid/grid-auto-min-sizing-definite-001-ref.html b/layout/reftests/css-grid/grid-auto-min-sizing-definite-001-ref.html
index a0d9180a2..8858b4ea8 100644
--- a/layout/reftests/css-grid/grid-auto-min-sizing-definite-001-ref.html
+++ b/layout/reftests/css-grid/grid-auto-min-sizing-definite-001-ref.html
@@ -62,40 +62,31 @@ b40 {
z-index: 1; position:relative;
}
-w {
- position:absolute;
- background: lime;
- border-width: 1px 0 0 3px;
- border-style: solid;
- height:48px;
- width:75px;
-}
-.v > w {
- border-width: 3px 0 0 1px;
- left:-1px; top:-3px;
- height:53px;
- width:61px;
-}
-.h.r { margin-left:19px; padding: 1px 15px 37px 30px; }
-.v .h > w {
- height:48px;
- width:45px;
-}
-.v.r > w {
- height:53px;
- width:61px;
+.h.r {
+ height: 42px;
+ width: 42px;
+ /* This margin-left is 20% of 98px-wide grid area */
+ margin-left: 19.6px;
+ /* This padding-bottom is 10% of 98px wide grid area */
+ /* This padding-left is 30% of 98px wide grid area */
+ padding: 1px 3px 9.8px 29.4px;
}
-.v .v > w {
- height:41px;
- width:45px;
+.v.r {
+ height: 42px;
+ width: 42px;
+ /* This margin-left is 20% of 54px-wide grid area */
+ margin-left: 10.8px;
+ /* This padding-bottom is 10% of 54px wide grid area */
+ /* This padding-left is 30% of 54px wide grid area */
+ padding: 1px 3px 5.4px 16.2px;
}
.r { position:relative; }
.t6 { width:46px; }
-.t8 { width:118px; }
+.t8 { width:118px; height: 102.5px; }
-xx {
+xx {
display: block;
background: lime;
padding:32px 32px 16px 32px;
@@ -114,7 +105,7 @@ xx {
<div class="grid"><span class="v"><x></x></span></div>
<div class="grid t6"><span class="v bb"><x></x></span></div>
<div class="grid"><span class="v"><x></x></span><span class="v"><x></x></span></div>
-<div class="grid t8"><span class="v r"><w></w><b40></b40></span></div>
+<div class="grid t8"><span class="v r"><b40></b40></span></div>
<div class="grid"><xx class="v"></xx></div>
<div class="grid v"><xx class="h"></xx></div>
diff --git a/layout/reftests/css-grid/grid-item-sizing-percent-001-ref.html b/layout/reftests/css-grid/grid-item-sizing-percent-001-ref.html
index 3a7f2d6bb..4996f8b9c 100644
--- a/layout/reftests/css-grid/grid-item-sizing-percent-001-ref.html
+++ b/layout/reftests/css-grid/grid-item-sizing-percent-001-ref.html
@@ -30,8 +30,8 @@ body,html { color:black; background:white; font-size:16px; padding:0; margin:0;
}
.p { padding:2px 3px; }
.m { margin:2px 3px; }
-.c1.p,.c2.p { padding:5px 9px; }
-.c1.m,.c2.m { margin:5px 9px; }
+.c1.p,.c2.p { padding:6px 9px; }
+.c1.m,.c2.m { margin:6px 9px; }
.b { border:solid black; }
#t1 { width:50px; height: 20px; }
diff --git a/layout/reftests/css-grid/grid-item-sizing-percent-001.html b/layout/reftests/css-grid/grid-item-sizing-percent-001.html
index cc5948968..960247592 100644
--- a/layout/reftests/css-grid/grid-item-sizing-percent-001.html
+++ b/layout/reftests/css-grid/grid-item-sizing-percent-001.html
@@ -48,8 +48,8 @@ body,html { color:black; background:white; font-size:16px; padding:0; margin:0;
box-sizing: border-box;
}
-.p { padding:10% 6%; }
-.m { margin:10% 6%; }
+.p { padding:4% 6%; }
+.m { margin:4% 6%; }
.b { border:solid black; }
</style>
diff --git a/layout/reftests/css-grid/grid-item-sizing-px-001.html b/layout/reftests/css-grid/grid-item-sizing-px-001.html
index a004365fc..7e58d831d 100644
--- a/layout/reftests/css-grid/grid-item-sizing-px-001.html
+++ b/layout/reftests/css-grid/grid-item-sizing-px-001.html
@@ -46,8 +46,8 @@ body,html { color:black; background:white; font-size:16px; padding:0; margin:0;
.p { padding:2px 3px; }
.m { margin:2px 3px; }
-.c1.p,.c2.p { padding:5px 9px; }
-.c1.m,.c2.m { margin:5px 9px; }
+.c1.p,.c2.p { padding:6px 9px; }
+.c1.m,.c2.m { margin:6px 9px; }
.b { border:solid black; }
</style>
diff --git a/layout/reftests/css-grid/reftest.list b/layout/reftests/css-grid/reftest.list
index 093e2faee..c2ee57c1a 100644
--- a/layout/reftests/css-grid/reftest.list
+++ b/layout/reftests/css-grid/reftest.list
@@ -45,7 +45,7 @@ skip-if(Android) fuzzy-if(winWidget,1,32) == grid-placement-auto-implicit-001.ht
== vrl-grid-placement-auto-row-sparse-001.html vrl-grid-placement-auto-row-sparse-001-ref.html
== grid-relpos-items-001.html grid-relpos-items-001-ref.html
== grid-item-sizing-percent-001.html grid-item-sizing-percent-001-ref.html
-== grid-item-sizing-percent-002.html grid-item-sizing-percent-002-ref.html
+fails == grid-item-sizing-percent-002.html grid-item-sizing-percent-002-ref.html # bug 1434397
== grid-item-sizing-percent-003.html grid-item-sizing-percent-003-ref.html
== grid-item-sizing-percent-004.html grid-item-sizing-percent-004-ref.html
== grid-item-sizing-px-001.html grid-item-sizing-percent-001-ref.html
diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004-ref.xhtml b/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004-ref.xhtml
index 00db4823e..beefa0abf 100644
--- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004-ref.xhtml
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004-ref.xhtml
@@ -4,8 +4,7 @@
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Reference case - identical to the testcase, but with with the flex items'
- vertical margin and padding values set to 0 by default, and then set to
- specific pixel values for the items that have a 50px percent-basis.
+ margin and padding values set to explicit pixel values.
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
@@ -21,27 +20,10 @@
}
div.height50 { height: 50px; }
- .marginA { margin: 0 8% 0 4%; }
- .marginB { margin: 0 10% 0 14%; }
- .paddingA { padding: 0 6% 0 2%; }
- .paddingB { padding: 0 8% 0 12%; }
-
- div.height50 > .marginA {
- margin-top: 5px;
- margin-bottom: 3px;
- }
- div.height50 > .marginB {
- margin-top: 4px;
- margin-bottom: 6px;
- }
- div.height50 > .paddingA {
- padding-top: 4px;
- padding-bottom: 2px;
- }
- div.height50 > .paddingB {
- padding-top: 3px;
- padding-bottom: 5px;
- }
+ .marginA { margin: 20px 16px 12px 8px; }
+ .marginB { margin: 16px 20px 24px 28px; }
+ .paddingA { padding: 16px 12px 8px 4px; }
+ .paddingB { padding: 12px 16px 20px 24px; }
div.child1 {
flex: none;
diff --git a/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004.xhtml b/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004.xhtml
index 545e54f71..b513253fd 100644
--- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004.xhtml
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-mbp-horiz-004.xhtml
@@ -3,19 +3,17 @@
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
-<!-- Testcase with percent-valued padding and/or margin on flex items. The spec
- says that percentage values on padding/margin-top and -bottom should be
- resolved against the flex container's height (not its width, as would
- be the case in a block).
+<!-- Testcase with percent-valued padding and/or margin on flex items.
+ The spec allows these to be resolved against the flex container's
+ inline size (regardless of which axis the percent padding/margin is in).
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Testing percent-valued padding and margin on flex items</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
- <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm"/>
+ <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#item-margins"/>
<link rel="match" href="flexbox-mbp-horiz-004-ref.xhtml"/>
<style>
- div { border: 0; }
div.flexbox {
width: 200px;
display: flex;
@@ -52,8 +50,9 @@
</style>
</head>
<body>
- <!-- Flex container is auto-height - vertical margin and padding should
- resolve to 0, since they don't have anything to resolve % against. -->
+ <!-- Flex container is auto-height - this shouldn't impact percent
+ margin/padding resolution, since they resolve against container's
+ inline-size, i.e. its width in this case. -->
<div class="flexbox"
><div class="child1 paddingA"><div class="filler"/></div
><div class="child2 paddingB"><div class="filler"/></div
@@ -61,8 +60,9 @@
><div class="child2 marginB"></div
></div>
- <!-- Flex container has height: 50px - vertical margin and padding should
- resolve % values against that. -->
+ <!-- Flex container has height: 50px - again, this shouldn't impact percent
+ margin/padding resolution, since they resolve against container's
+ inline-size, i.e. its width in this case. -->
<div class="flexbox height50"
><div class="child1 paddingA"><div class="filler"/></div
><div class="child2 paddingB"><div class="filler"/></div
diff --git a/layout/style/FontFaceSet.cpp b/layout/style/FontFaceSet.cpp
index 550a7d71a..1645adfef 100644
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -1762,18 +1762,10 @@ FontFaceSet::UserFontSet::RecordFontLoadDone(uint32_t aFontSize,
{
mDownloadCount++;
mDownloadSize += aFontSize;
- Telemetry::Accumulate(Telemetry::WEBFONT_SIZE, aFontSize / 1024);
if (!mFontFaceSet) {
return;
}
-
- TimeStamp navStart = mFontFaceSet->GetNavigationStartTimeStamp();
- TimeStamp zero;
- if (navStart != zero) {
- Telemetry::AccumulateTimeDelta(Telemetry::WEBFONT_DOWNLOAD_TIME_AFTER_START,
- navStart, aDoneTime);
- }
}
/* virtual */ nsresult
diff --git a/layout/style/nsFontFaceLoader.cpp b/layout/style/nsFontFaceLoader.cpp
index f5a0a9f34..3082bbf87 100644
--- a/layout/style/nsFontFaceLoader.cpp
+++ b/layout/style/nsFontFaceLoader.cpp
@@ -205,7 +205,6 @@ nsFontFaceLoader::OnStreamComplete(nsIStreamLoader* aLoader,
TimeStamp doneTime = TimeStamp::Now();
TimeDuration downloadTime = doneTime - mStartTime;
uint32_t downloadTimeMS = uint32_t(downloadTime.ToMilliseconds());
- Telemetry::Accumulate(Telemetry::WEBFONT_DOWNLOAD_TIME, downloadTimeMS);
if (GetFontDisplay() == NS_FONT_DISPLAY_FALLBACK) {
uint32_t loadTimeout = GetFallbackDelay();
diff --git a/layout/xul/nsScrollbarButtonFrame.cpp b/layout/xul/nsScrollbarButtonFrame.cpp
index 206d9717f..ff757a65f 100644
--- a/layout/xul/nsScrollbarButtonFrame.cpp
+++ b/layout/xul/nsScrollbarButtonFrame.cpp
@@ -171,9 +171,6 @@ nsScrollbarButtonFrame::HandleButtonPress(nsPresContext* aPresContext,
return false;
}
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollbarButtonClick);
-
if (!m) {
sb->MoveToNewPosition();
if (!weakFrame.IsAlive()) {
diff --git a/layout/xul/nsSliderFrame.cpp b/layout/xul/nsSliderFrame.cpp
index 8e083f20c..3c1f9ef91 100644
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -529,9 +529,6 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
return NS_OK;
}
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollbarDrag);
-
// take our current position and subtract the start location
pos -= mDragStart;
bool isMouseOutsideThumb = false;
@@ -598,9 +595,6 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
nsSize thumbSize = thumbFrame->GetSize();
nscoord thumbLength = isHorizontal ? thumbSize.width : thumbSize.height;
- mozilla::Telemetry::Accumulate(mozilla::Telemetry::SCROLL_INPUT_METHODS,
- (uint32_t) ScrollInputMethod::MainThreadScrollbarTrackClick);
-
// set it
nsWeakFrame weakFrame(this);
// should aMaySnap be true here?