Diff
Modified: trunk/Source/WebCore/ChangeLog (265745 => 265746)
--- trunk/Source/WebCore/ChangeLog 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/ChangeLog 2020-08-17 06:29:54 UTC (rev 265746)
@@ -1,3 +1,32 @@
+2020-08-16 Simon Fraser <[email protected]>
+
+ Fix some spelling and editorial issues
+ https://bugs.webkit.org/show_bug.cgi?id=215553
+
+ Reviewed by Darin Adler.
+
+ "Stretches" has a t in the middle, and "padding" is singular.
+
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::buildRendererHighlight):
+ * layout/FormattingContext.cpp:
+ (WebCore::Layout::FormattingContext::geometryForBox const):
+ * layout/FormattingContext.h:
+ * layout/blockformatting/BlockFormattingContextQuirks.cpp:
+ (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
+ * layout/inlineformatting/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
+ (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
+ * layout/inlineformatting/InlineLineBuilder.cpp:
+ (WebCore::Layout::LineBuilder::adjustBaselineAndLineHeight):
+ * layout/tableformatting/TableFormattingContext.cpp:
+ (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells):
+ * rendering/RenderTable.cpp:
+ (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
+ * rendering/RenderTableCell.cpp:
+ * rendering/RenderTextControlSingleLine.cpp:
+ (WebCore::RenderTextControlSingleLine::layout):
+
2020-08-14 Simon Fraser <[email protected]>
Scrolling sync changes in r261985 regressed CPU usage by ~2 ms/s
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (265745 => 265746)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -154,7 +154,7 @@
} else {
auto& renderInline = downcast<RenderInline>(*renderer);
- // RenderInline's bounding box includes paddings and borders, excludes margins.
+ // RenderInline's bounding box includes padding and borders, excludes margins.
borderBox = renderInline.linesBoundingBox();
paddingBox = LayoutRect(borderBox.x() + renderInline.borderLeft(), borderBox.y() + renderInline.borderTop(),
borderBox.width() - renderInline.borderLeft() - renderInline.borderRight(), borderBox.height() - renderInline.borderTop() - renderInline.borderBottom());
Modified: trunk/Source/WebCore/layout/FormattingContext.cpp (265745 => 265746)
--- trunk/Source/WebCore/layout/FormattingContext.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/FormattingContext.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -183,12 +183,12 @@
return false;
}
- if (*escapeReason == EscapeReason::DocumentBoxStrechesToViewportQuirk) {
+ if (*escapeReason == EscapeReason::DocumentBoxStretchesToViewportQuirk) {
ASSERT(layoutState().inQuirksMode());
return is<InitialContainingBlock>(layoutBox);
}
- if (*escapeReason == EscapeReason::BodyStrechesToViewportQuirk) {
+ if (*escapeReason == EscapeReason::BodyStretchesToViewportQuirk) {
ASSERT(layoutState().inQuirksMode());
return is<InitialContainingBlock>(layoutBox) || layoutBox.isDocumentBox();
Modified: trunk/Source/WebCore/layout/FormattingContext.h (265745 => 265746)
--- trunk/Source/WebCore/layout/FormattingContext.h 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/FormattingContext.h 2020-08-17 06:29:54 UTC (rev 265746)
@@ -74,7 +74,7 @@
struct ConstraintsForOutOfFlowContent {
HorizontalConstraints horizontal;
VerticalConstraints vertical;
- // Borders and paddings are resolved against the containing block's content box as if the box was an in-flow box.
+ // Borders and padding are resolved against the containing block's content box as if the box was an in-flow box.
LayoutUnit borderAndPaddingConstraints;
};
void layoutOutOfFlowContent(InvalidationState&, const ConstraintsForOutOfFlowContent&);
@@ -101,8 +101,8 @@
OutOfFlowBoxNeedsInFlowGeometry,
FloatBoxNeedsToBeInAbsoluteCoordinates,
FindFixedHeightAncestorQuirk,
- DocumentBoxStrechesToViewportQuirk,
- BodyStrechesToViewportQuirk,
+ DocumentBoxStretchesToViewportQuirk,
+ BodyStretchesToViewportQuirk,
StrokeOverflowNeedsViewportGeometry,
TableNeedsAccessToTableWrapper
};
Modified: trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp (265745 => 265746)
--- trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/blockformatting/BlockFormattingContextQuirks.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -64,7 +64,7 @@
if (layoutBox.isDocumentBox()) {
// Let's stretch the inflow document box(<html>) to the height of the initial containing block (view).
- auto documentBoxContentHeight = formattingContext.geometryForBox(layoutBox.initialContainingBlock(), EscapeReason::DocumentBoxStrechesToViewportQuirk).contentBoxHeight();
+ auto documentBoxContentHeight = formattingContext.geometryForBox(layoutBox.initialContainingBlock(), EscapeReason::DocumentBoxStretchesToViewportQuirk).contentBoxHeight();
// Document box's own vertical margin/border/padding values always shrink the content height.
auto& documentBoxGeometry = formattingContext.geometryForBox(layoutBox);
documentBoxContentHeight -= nonCollapsedVerticalMargin + documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
@@ -74,7 +74,7 @@
// Here is the quirky part for body box when it stretches all the way to the ICB even when the document box does not (e.g. out-of-flow positioned).
ASSERT(layoutBox.isBodyBox());
auto& initialContainingBlock = layoutBox.initialContainingBlock();
- auto& initialContainingBlockGeometry = formattingContext.geometryForBox(initialContainingBlock, EscapeReason::BodyStrechesToViewportQuirk);
+ auto& initialContainingBlockGeometry = formattingContext.geometryForBox(initialContainingBlock, EscapeReason::BodyStretchesToViewportQuirk);
// Start the content height with the ICB.
auto bodyBoxContentHeight = initialContainingBlockGeometry.contentBoxHeight();
// Body box's own border and padding shrink the content height.
@@ -88,12 +88,12 @@
bodyBoxContentHeight -= usedVerticalMargin;
// Document box's padding and border also shrink the body box's content height.
auto& documentBox = layoutBox.parent();
- auto& documentBoxGeometry = formattingContext.geometryForBox(documentBox, EscapeReason::BodyStrechesToViewportQuirk);
+ auto& documentBoxGeometry = formattingContext.geometryForBox(documentBox, EscapeReason::BodyStretchesToViewportQuirk);
bodyBoxContentHeight -= documentBoxGeometry.verticalBorder() + documentBoxGeometry.verticalPadding().valueOr(0);
// However the non-in-flow document box's vertical margins are ignored. They don't affect the body box's content height.
if (documentBox.isInFlow()) {
auto geometry = this->geometry();
- auto precomputeDocumentBoxVerticalMargin = geometry.computedVerticalMargin(documentBox, geometry.constraintsForInFlowContent(initialContainingBlock, EscapeReason::BodyStrechesToViewportQuirk).horizontal);
+ auto precomputeDocumentBoxVerticalMargin = geometry.computedVerticalMargin(documentBox, geometry.constraintsForInFlowContent(initialContainingBlock, EscapeReason::BodyStretchesToViewportQuirk).horizontal);
bodyBoxContentHeight -= precomputeDocumentBoxVerticalMargin.before.valueOr(0) + precomputeDocumentBoxVerticalMargin.after.valueOr(0);
}
return std::max(contentHeightAndMargin.contentHeight, bodyBoxContentHeight);
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp (265745 => 265746)
--- trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -83,7 +83,7 @@
invalidateFormattingState(invalidationState);
auto* layoutBox = root().firstInFlowOrFloatingChild();
- // 1. Visit each inline box and partially compute their geometry (margins, paddings and borders).
+ // 1. Visit each inline box and partially compute their geometry (margins, padding and borders).
// 2. Collect the inline items (flatten the the layout tree) and place them on lines in bidirectional order.
while (layoutBox) {
ASSERT(layoutBox->isInlineLevelBox() || layoutBox->isFloatingPositioned());
@@ -113,7 +113,7 @@
} else if (layoutBox->isInlineBox()) {
// Text wrapper boxes (anonymous inline level boxes) and <br>s don't generate display boxes (only display runs).
if (!layoutBox->isInlineTextBox() && !layoutBox->isLineBreakBox()) {
- // Inline boxes (<span>) can't get sized/positioned yet. At this point we can only compute their margins, borders and paddings.
+ // Inline boxes (<span>) can't get sized/positioned yet. At this point we can only compute their margins, borders and padding.
computeBorderAndPadding(*layoutBox, constraints.horizontal);
computeHorizontalMargin(*layoutBox, constraints.horizontal);
formattingState().displayBox(*layoutBox).setVerticalMargin({ });
@@ -203,7 +203,7 @@
Vector<const Box*> formattingContextRootList;
auto horizontalConstraints = HorizontalConstraints { 0_lu, 0_lu };
auto* layoutBox = root().firstInFlowOrFloatingChild();
- // In order to compute the max/min widths, we need to compute margins, borders and paddings for certain inline boxes first.
+ // In order to compute the max/min widths, we need to compute margins, borders and padding for certain inline boxes first.
while (layoutBox) {
if (layoutBox->isInlineTextBox() || layoutBox->isLineBreakBox()) {
layoutBox = nextInlineLevelBoxToLayout(*layoutBox, root());
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp (265745 => 265746)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLineBuilder.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -582,7 +582,7 @@
auto& style = layoutBox.style();
if (run.isContainerStart()) {
// Inline containers stretch the line by their font size.
- // Vertical margins, paddings and borders don't contribute to the line height.
+ // Vertical margins, padding and borders don't contribute to the line height.
auto& fontMetrics = style.fontMetrics();
if (style.verticalAlign() == VerticalAlign::Baseline) {
auto halfLeading = halfLeadingMetrics(fontMetrics, style.computedLineHeight());
Modified: trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp (265745 => 265746)
--- trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/layout/tableformatting/TableFormattingContext.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -119,7 +119,7 @@
// Child boxes (and runs) are always in the coordinate system of the containing block's border box.
// The content box (where the child content lives) is inside the padding box, which is inside the border box.
// In order to compute the child box top/left position, we need to know both the padding and the border offsets.
- // Normally by the time we start positioning the child content, we already have computed borders and paddings for the containing block.
+ // Normally by the time we start positioning the child content, we already have computed borders and padding for the containing block.
// This is different with table cells where the final padding offset depends on the content height as we use
// the padding box to vertically align the table cell content.
auto& formattingState = layoutState().establishedFormattingState(cellBox);
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (265745 => 265746)
--- trunk/Source/WebCore/rendering/RenderTable.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -328,7 +328,7 @@
if (styleLogicalWidth.isIntrinsic())
return computeIntrinsicLogicalWidthUsing(styleLogicalWidth, availableWidth, bordersPaddingAndSpacingInRowDirection());
- // HTML tables' width styles already include borders and paddings, but CSS tables' width styles do not.
+ // HTML tables' width styles already include borders and padding, but CSS tables' width styles do not.
LayoutUnit borders;
bool isCSSTable = !is<HTMLTableElement>(element());
if (isCSSTable && styleLogicalWidth.isSpecified() && styleLogicalWidth.isPositive() && style().boxSizing() == BoxSizing::ContentBox)
Modified: trunk/Source/WebCore/rendering/RenderTableCell.cpp (265745 => 265746)
--- trunk/Source/WebCore/rendering/RenderTableCell.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/rendering/RenderTableCell.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -53,7 +53,7 @@
struct SameSizeAsRenderTableCell : public RenderBlockFlow {
unsigned bitfields;
- LayoutUnit paddings[2];
+ LayoutUnit padding[2];
};
COMPILE_ASSERT(sizeof(RenderTableCell) == sizeof(SameSizeAsRenderTableCell), RenderTableCell_should_stay_small);
Modified: trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (265745 => 265746)
--- trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2020-08-17 01:48:06 UTC (rev 265745)
+++ trunk/Source/WebCore/rendering/RenderTextControlSingleLine.cpp 2020-08-17 06:29:54 UTC (rev 265746)
@@ -96,7 +96,7 @@
// - Make the height of the container element equal to the intrinsic height of
// the inner elements when the field has a strong password button.
//
- // We don't honor paddings and borders for textfields without decorations
+ // We don't honor padding and borders for textfields without decorations
// and type=search if the text height is taller than the contentHeight()
// because of compability.