Rename "Region" to "Fragment" for RenderRegion and associated classes/methods.
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Sep 2017 16:19:08 +0000 (16:19 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Sep 2017 16:19:08 +0000 (16:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177506

Reviewed by Zalan Bujtas.

* WebCore.xcodeproj/project.pbxproj:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BreakInside const):
* css/CSSValueKeywords.in:
* dom/Element.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::computeMarginLogicalSizeForChild):
(WebCore::IndefiniteSizeStrategy::minLogicalWidthForChild const):
(WebCore::DefiniteSizeStrategy::minLogicalWidthForChild const):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
(WebCore::RenderBlock::addOverflowFromChildren):
(WebCore::RenderBlock::clearLayoutOverflow):
(WebCore::RenderBlock::addVisualOverflowFromTheme):
(WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
(WebCore::RenderBlock::layoutPositionedObject):
(WebCore::RenderBlock::selectionGaps):
(WebCore::RenderBlock::logicalLeftOffsetForContent const):
(WebCore::RenderBlock::logicalRightOffsetForContent const):
(WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
(WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
(WebCore::RenderBlock::positionForPointWithInlineChildren):
(WebCore::isChildHitTestCandidate):
(WebCore::RenderBlock::positionForPoint):
(WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
(WebCore::RenderBlock::fragmentAtBlockOffset const):
(WebCore::canComputeFragmentRangeForBox):
(WebCore::RenderBlock::computeFragmentRangeForBoxChild const):
(WebCore::RenderBlock::estimateFragmentRangeForBoxChild const):
(WebCore::RenderBlock::updateFragmentRangeForBoxChild const):
(WebCore::RenderBlock::regionAtBlockOffset const): Deleted.
(WebCore::canComputeRegionRangeForBox): Deleted.
(WebCore::RenderBlock::computeRegionRangeForBoxChild const): Deleted.
(WebCore::RenderBlock::estimateRegionRangeForBoxChild const): Deleted.
(WebCore::RenderBlock::updateRegionRangeForBoxChild const): Deleted.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::availableLogicalWidthForLineInFragment const):
(WebCore::RenderBlock::logicalRightOffsetForLineInFragment const):
(WebCore::RenderBlock::logicalLeftOffsetForLineInFragment const):
(WebCore::RenderBlock::startOffsetForLineInFragment const):
(WebCore::RenderBlock::endOffsetForLineInFragment const):
(WebCore::RenderBlock::availableLogicalWidthForLine const):
(WebCore::RenderBlock::availableLogicalWidthForContent const):
(WebCore::RenderBlock::startOffsetForContent const):
(WebCore::RenderBlock::endOffsetForContent const):
(WebCore::RenderBlock::logicalLeftOffsetForContent const):
(WebCore::RenderBlock::logicalRightOffsetForContent const):
(WebCore::RenderBlock::availableLogicalWidthForLineInRegion const): Deleted.
(WebCore::RenderBlock::logicalRightOffsetForLineInRegion const): Deleted.
(WebCore::RenderBlock::logicalLeftOffsetForLineInRegion const): Deleted.
(WebCore::RenderBlock::startOffsetForLineInRegion const): Deleted.
(WebCore::RenderBlock::endOffsetForLineInRegion const): Deleted.
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::setStaticInlinePositionForChild):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::hasNextPage const):
(WebCore::RenderBlockFlow::adjustForUnsplittableChild):
(WebCore::RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight const):
(WebCore::RenderBlockFlow::positionNewFloats):
(WebCore::RenderBlockFlow::getClearDelta):
(WebCore::RenderBlockFlow::needsLayoutAfterFragmentRangeChange const):
(WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
(WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
(WebCore::RenderBlockFlow::positionForPoint):
(WebCore::RenderBlockFlow::layoutExcludedChildren):
(WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange const): Deleted.
* rendering/RenderBlockFlow.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
(WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
(WebCore::RenderBlockFlow::layoutLineBoxes):
(WebCore::RenderBlockFlow::determineStartPosition):
(WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
(WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const):
(WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
(WebCore::RenderBlockFlow::positionNewFloatOnLine):
(WebCore::RenderBlockFlow::updateFragmentForLine const):
(WebCore::RenderBlockFlow::updateRegionForLine const): Deleted.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::clampToStartAndEndFragments const):
(WebCore::RenderBox::hasFragmentRangeInFlowThread const):
(WebCore::RenderBox::clientBoxRectInFragment const):
(WebCore::RenderBox::borderBoxRectInFragment const):
(WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
(WebCore::RenderBox::nodeAtPoint):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::overflowClipRect):
(WebCore::RenderBox::clipRect):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
(WebCore::RenderBox::containingBlockLogicalWidthForContentInFragment const):
(WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
(WebCore::RenderBox::offsetFromContainer const):
(WebCore::RenderBox::computeRectForRepaint const):
(WebCore::RenderBox::updateLogicalWidth):
(WebCore::RenderBox::computeLogicalWidthInFragment const):
(WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
(WebCore::RenderBox::renderBoxFragmentInfo const):
(WebCore::tableCellShouldHaveZeroInitialSize):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth const):
(WebCore::RenderBox::computePositionedLogicalHeight const):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
(WebCore::RenderBox::positionForPoint):
(WebCore::RenderBox::createsNewFormattingContext const):
(WebCore::RenderBox::addVisualEffectOverflow):
(WebCore::RenderBox::addOverflowFromChild):
(WebCore::RenderBox::clearOverflow):
(WebCore::RenderBox::clampToStartAndEndRegions const): Deleted.
(WebCore::RenderBox::hasRegionRangeInFlowThread const): Deleted.
(WebCore::RenderBox::clientBoxRectInRegion const): Deleted.
(WebCore::RenderBox::borderBoxRectInRegion const): Deleted.
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax const): Deleted.
(WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion const): Deleted.
(WebCore::RenderBox::containingBlockAvailableLineWidthInRegion const): Deleted.
(WebCore::RenderBox::computeLogicalWidthInRegion const): Deleted.
(WebCore::RenderBox::computeLogicalWidthInRegionUsing const): Deleted.
(WebCore::RenderBox::renderBoxRegionInfo const): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::overflowClipRectForChildLayers):
(WebCore::RenderBox::canHaveOutsideFragmentRange const):
(WebCore::RenderBox::needsLayoutAfterFragmentRangeChange const):
(WebCore::RenderBox::canHaveOutsideRegionRange const): Deleted.
(WebCore::RenderBox::needsLayoutAfterRegionRangeChange const): Deleted.
* rendering/RenderBoxFragmentInfo.h: Copied from rendering/RenderBoxRegionInfo.h.
(WebCore::RenderBoxFragmentInfo::RenderBoxFragmentInfo):
(WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): Deleted.
(WebCore::RenderBoxRegionInfo::logicalLeft const): Deleted.
(WebCore::RenderBoxRegionInfo::logicalWidth const): Deleted.
(WebCore::RenderBoxRegionInfo::shiftLogicalLeft): Deleted.
(WebCore::RenderBoxRegionInfo::isShifted const): Deleted.
(WebCore::RenderBoxRegionInfo::createOverflow): Deleted.
(WebCore::RenderBoxRegionInfo::overflow const): Deleted.
(WebCore::RenderBoxRegionInfo::clearOverflow): Deleted.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::canHaveBoxInfoInFragment const):
(WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion const): Deleted.
* rendering/RenderBoxRegionInfo.h: Removed.
* rendering/RenderElement.cpp:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::positionForPoint):
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::styleDidChange):
(WebCore::RenderFlowThread::removeFlowChildInfo):
(WebCore::RenderFlowThread::removeFragmentFromThread):
(WebCore::RenderFlowThread::invalidateFragments):
(WebCore::RenderFlowThread::validateFragments):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::updateLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight const):
(WebCore::RenderFlowThread::repaintRectangleInFragments const):
(WebCore::RenderFlowThread::fragmentAtBlockOffset const):
(WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const):
(WebCore::RenderFlowThread::pageLogicalTopForOffset const):
(WebCore::RenderFlowThread::pageLogicalWidthForOffset const):
(WebCore::RenderFlowThread::pageLogicalHeightForOffset const):
(WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset const):
(WebCore::RenderFlowThread::mapFromFlowToFragment const):
(WebCore::RenderFlowThread::removeRenderBoxFragmentInfo):
(WebCore::RenderFlowThread::removeLineFragmentInfo):
(WebCore::RenderFlowThread::logicalWidthChangedInFragmentsForBlock):
(WebCore::RenderFlowThread::contentLogicalWidthOfFirstFragment const):
(WebCore::RenderFlowThread::contentLogicalHeightOfFirstFragment const):
(WebCore::RenderFlowThread::contentLogicalLeftOfFirstFragment const):
(WebCore::RenderFlowThread::firstFragment const):
(WebCore::RenderFlowThread::lastFragment const):
(WebCore::RenderFlowThread::clearRenderBoxFragmentInfoAndCustomStyle):
(WebCore::RenderFlowThread::setFragmentRangeForBox):
(WebCore::RenderFlowThread::hasCachedFragmentRangeForBox const):
(WebCore::RenderFlowThread::getFragmentRangeForBoxFromCachedInfo const):
(WebCore::RenderFlowThread::getFragmentRangeForBox const):
(WebCore::RenderFlowThread::computedFragmentRangeForBox const):
(WebCore::RenderFlowThread::fragmentInRange const):
(WebCore::RenderFlowThread::objectShouldFragmentInFlowFragment const):
(WebCore::RenderFlowThread::objectInFlowFragment const):
(WebCore::RenderFlowThread::checkLinesConsistency const):
(WebCore::RenderFlowThread::clearLinesToFragmentMap):
(WebCore::RenderFlowThread::deleteLines):
(WebCore::RenderFlowThread::willBeDestroyed):
(WebCore::RenderFlowThread::markFragmentsForOverflowLayoutIfNeeded):
(WebCore::RenderFlowThread::updateFragmentsFlowThreadPortionRect):
(WebCore::RenderFlowThread::addForcedFragmentBreak):
(WebCore::RenderFlowThread::collectLayerFragments):
(WebCore::RenderFlowThread::fragmentsBoundingBox):
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstFragment const):
(WebCore::RenderFlowThread::FragmentSearchAdapter::collectIfNeeded):
(WebCore::RenderFlowThread::mapLocalToContainer const):
(WebCore::RenderFlowThread::addFragmentsVisualEffectOverflow):
(WebCore::RenderFlowThread::addFragmentsVisualOverflowFromTheme):
(WebCore::RenderFlowThread::addFragmentsOverflowFromChild):
(WebCore::RenderFlowThread::addFragmentsLayoutOverflow):
(WebCore::RenderFlowThread::addFragmentsVisualOverflow):
(WebCore::RenderFlowThread::clearFragmentsOverflow):
(WebCore::RenderFlowThread::currentFragment const):
(WebCore::RenderFlowThread::containingFragmentMap):
(WebCore::RenderFlowThread::removeRegionFromThread): Deleted.
(WebCore::RenderFlowThread::invalidateRegions): Deleted.
(WebCore::RenderFlowThread::validateRegions): Deleted.
(WebCore::RenderFlowThread::repaintRectangleInRegions const): Deleted.
(WebCore::RenderFlowThread::regionAtBlockOffset const): Deleted.
(WebCore::RenderFlowThread::mapFromFlowToRegion const): Deleted.
(WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Deleted.
(WebCore::RenderFlowThread::removeLineRegionInfo): Deleted.
(WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Deleted.
(WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion const): Deleted.
(WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion const): Deleted.
(WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion const): Deleted.
(WebCore::RenderFlowThread::firstRegion const): Deleted.
(WebCore::RenderFlowThread::lastRegion const): Deleted.
(WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle): Deleted.
(WebCore::RenderFlowThread::setRegionRangeForBox): Deleted.
(WebCore::RenderFlowThread::hasCachedRegionRangeForBox const): Deleted.
(WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo const): Deleted.
(WebCore::RenderFlowThread::getRegionRangeForBox const): Deleted.
(WebCore::RenderFlowThread::computedRegionRangeForBox const): Deleted.
(WebCore::RenderFlowThread::regionInRange const): Deleted.
(WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion const): Deleted.
(WebCore::RenderFlowThread::objectInFlowRegion const): Deleted.
(WebCore::RenderFlowThread::clearLinesToRegionMap): Deleted.
(WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): Deleted.
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect): Deleted.
(WebCore::RenderFlowThread::addForcedRegionBreak): Deleted.
(WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion const): Deleted.
(WebCore::RenderFlowThread::RegionSearchAdapter::collectIfNeeded): Deleted.
(WebCore::RenderFlowThread::addRegionsVisualEffectOverflow): Deleted.
(WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme): Deleted.
(WebCore::RenderFlowThread::addRegionsOverflowFromChild): Deleted.
(WebCore::RenderFlowThread::addRegionsLayoutOverflow): Deleted.
(WebCore::RenderFlowThread::addRegionsVisualOverflow): Deleted.
(WebCore::RenderFlowThread::clearRegionsOverflow): Deleted.
(WebCore::RenderFlowThread::currentRegion const): Deleted.
(WebCore::RenderFlowThread::containingRegionMap): Deleted.
* rendering/RenderFlowThread.h:
(WTF::ValueToString<WebCore::RenderFragmentContainer::string):
(WTF::ValueToString<WebCore::RenderRegion::string): Deleted.
* rendering/RenderFragmentContainer.cpp: Copied from rendering/RenderRegion.cpp.
(WebCore::RenderFragmentContainer::RenderFragmentContainer):
(WebCore::RenderFragmentContainer::mapFragmentPointIntoFlowThreadCoordinates):
(WebCore::RenderFragmentContainer::positionForPoint):
(WebCore::RenderFragmentContainer::pageLogicalWidth const):
(WebCore::RenderFragmentContainer::pageLogicalHeight const):
(WebCore::RenderFragmentContainer::logicalHeightOfAllFlowThreadContent const):
(WebCore::RenderFragmentContainer::flowThreadPortionOverflowRect):
(WebCore::RenderFragmentContainer::flowThreadPortionLocation const):
(WebCore::RenderFragmentContainer::overflowRectForFlowThreadPortion):
(WebCore::RenderFragmentContainer::pageLogicalTopForOffset const):
(WebCore::RenderFragmentContainer::isFirstFragment const):
(WebCore::RenderFragmentContainer::isLastFragment const):
(WebCore::RenderFragmentContainer::shouldClipFlowThreadContent const):
(WebCore::RenderFragmentContainer::styleDidChange):
(WebCore::RenderFragmentContainer::computeOverflowFromFlowThread):
(WebCore::RenderFragmentContainer::repaintFlowThreadContent):
(WebCore::RenderFragmentContainer::repaintFlowThreadContentRectangle):
(WebCore::RenderFragmentContainer::installFlowThread):
(WebCore::RenderFragmentContainer::attachFragment):
(WebCore::RenderFragmentContainer::detachFragment):
(WebCore::RenderFragmentContainer::renderBoxFragmentInfo const):
(WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo):
(WebCore::RenderFragmentContainer::takeRenderBoxFragmentInfo):
(WebCore::RenderFragmentContainer::removeRenderBoxFragmentInfo):
(WebCore::RenderFragmentContainer::deleteAllRenderBoxFragmentInfo):
(WebCore::RenderFragmentContainer::logicalTopOfFlowThreadContentRect const):
(WebCore::RenderFragmentContainer::logicalBottomOfFlowThreadContentRect const):
(WebCore::RenderFragmentContainer::insertedIntoTree):
(WebCore::RenderFragmentContainer::willBeRemovedFromTree):
(WebCore::RenderFragmentContainer::computeIntrinsicLogicalWidths const):
(WebCore::RenderFragmentContainer::computePreferredLogicalWidths):
(WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFlowThreadPortionRect const):
(WebCore::RenderFragmentContainer::ensureOverflowForBox):
(WebCore::RenderFragmentContainer::rectFlowPortionForBox const):
(WebCore::RenderFragmentContainer::addLayoutOverflowForBox):
(WebCore::RenderFragmentContainer::addVisualOverflowForBox):
(WebCore::RenderFragmentContainer::layoutOverflowRectForBox):
(WebCore::RenderFragmentContainer::visualOverflowRectForBox):
(WebCore::RenderFragmentContainer::layoutOverflowRectForBoxForPropagation):
(WebCore::RenderFragmentContainer::visualOverflowRectForBoxForPropagation):
(WebCore::CurrentRenderFragmentContainerMaintainer::CurrentRenderFragmentContainerMaintainer):
(WebCore::CurrentRenderFragmentContainerMaintainer::~CurrentRenderFragmentContainerMaintainer):
(WebCore::RenderRegion::RenderRegion): Deleted.
(WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Deleted.
(WebCore::RenderRegion::positionForPoint): Deleted.
(WebCore::RenderRegion::pageLogicalWidth const): Deleted.
(WebCore::RenderRegion::pageLogicalHeight const): Deleted.
(WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent const): Deleted.
(WebCore::RenderRegion::flowThreadPortionOverflowRect): Deleted.
(WebCore::RenderRegion::flowThreadPortionLocation const): Deleted.
(WebCore::RenderRegion::overflowRectForFlowThreadPortion): Deleted.
(WebCore::RenderRegion::pageLogicalTopForOffset const): Deleted.
(WebCore::RenderRegion::isFirstRegion const): Deleted.
(WebCore::RenderRegion::isLastRegion const): Deleted.
(WebCore::RenderRegion::shouldClipFlowThreadContent const): Deleted.
(WebCore::RenderRegion::styleDidChange): Deleted.
(WebCore::RenderRegion::computeOverflowFromFlowThread): Deleted.
(WebCore::RenderRegion::repaintFlowThreadContent): Deleted.
(WebCore::RenderRegion::repaintFlowThreadContentRectangle): Deleted.
(WebCore::RenderRegion::installFlowThread): Deleted.
(WebCore::RenderRegion::attachRegion): Deleted.
(WebCore::RenderRegion::detachRegion): Deleted.
(WebCore::RenderRegion::renderBoxRegionInfo const): Deleted.
(WebCore::RenderRegion::setRenderBoxRegionInfo): Deleted.
(WebCore::RenderRegion::takeRenderBoxRegionInfo): Deleted.
(WebCore::RenderRegion::removeRenderBoxRegionInfo): Deleted.
(WebCore::RenderRegion::deleteAllRenderBoxRegionInfo): Deleted.
(WebCore::RenderRegion::logicalTopOfFlowThreadContentRect const): Deleted.
(WebCore::RenderRegion::logicalBottomOfFlowThreadContentRect const): Deleted.
(WebCore::RenderRegion::insertedIntoTree): Deleted.
(WebCore::RenderRegion::willBeRemovedFromTree): Deleted.
(WebCore::RenderRegion::computeIntrinsicLogicalWidths const): Deleted.
(WebCore::RenderRegion::computePreferredLogicalWidths): Deleted.
(WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect const): Deleted.
(WebCore::RenderRegion::ensureOverflowForBox): Deleted.
(WebCore::RenderRegion::rectFlowPortionForBox const): Deleted.
(WebCore::RenderRegion::addLayoutOverflowForBox): Deleted.
(WebCore::RenderRegion::addVisualOverflowForBox): Deleted.
(WebCore::RenderRegion::layoutOverflowRectForBox): Deleted.
(WebCore::RenderRegion::visualOverflowRectForBox): Deleted.
(WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation): Deleted.
(WebCore::RenderRegion::visualOverflowRectForBoxForPropagation): Deleted.
(WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer): Deleted.
(WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer): Deleted.
* rendering/RenderFragmentContainer.h: Copied from rendering/RenderRegion.h.
(WebCore::RenderFragmentContainer::isRenderFragmentContainerSet const):
(WebCore::RenderFragmentContainer::absoluteQuadsForBoxInFragment):
(WebCore::CurrentRenderFragmentContainerMaintainer::fragment const):
(WebCore::RenderRegion::setFlowThreadPortionRect): Deleted.
(WebCore::RenderRegion::flowThreadPortionRect const): Deleted.
(WebCore::RenderRegion::flowThread const): Deleted.
(WebCore::RenderRegion::isValid const): Deleted.
(WebCore::RenderRegion::setIsValid): Deleted.
(WebCore::RenderRegion::logicalTopForFlowThreadContent const): Deleted.
(WebCore::RenderRegion::logicalBottomForFlowThreadContent const): Deleted.
(WebCore::RenderRegion::isRenderRegionSet const): Deleted.
(WebCore::RenderRegion::collectLayerFragments): Deleted.
(WebCore::RenderRegion::absoluteQuadsForBoxInRegion): Deleted.
(WebCore::CurrentRenderRegionMaintainer::region const): Deleted.
* rendering/RenderFragmentContainerSet.cpp: Copied from rendering/RenderRegionSet.cpp.
(WebCore::RenderFragmentContainerSet::RenderFragmentContainerSet):
(WebCore::RenderFragmentContainerSet::installFlowThread):
(WebCore::RenderFragmentContainerSet::expandToEncompassFlowThreadContentsIfNeeded):
(WebCore::RenderRegionSet::RenderRegionSet): Deleted.
(WebCore::RenderRegionSet::installFlowThread): Deleted.
(WebCore::RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded): Deleted.
* rendering/RenderFragmentContainerSet.h: Copied from rendering/RenderRegionSet.h.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeMarginLogicalSizeForChild const):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::positionForPoint):
(WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const):
(WebCore::RenderInline::linesVisualOverflowBoundingBoxInRegion const): Deleted.
* rendering/RenderInline.h:
* rendering/RenderLayer.cpp:
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::calculateClipRects const):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::canBeComposited const):
* rendering/RenderLineBreak.cpp:
(WebCore::RenderLineBreak::positionForPoint):
* rendering/RenderLineBreak.h:
* rendering/RenderMultiColumnFlowThread.cpp:
(WebCore::RenderMultiColumnFlowThread::addFragmentToThread):
(WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree):
(WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
(WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
(WebCore::RenderMultiColumnFlowThread::setPageBreak):
(WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
(WebCore::RenderMultiColumnFlowThread::fragmentAtBlockOffset const):
(WebCore::RenderMultiColumnFlowThread::setFragmentRangeForBox):
(WebCore::RenderMultiColumnFlowThread::addForcedFragmentBreak):
(WebCore::RenderMultiColumnFlowThread::offsetFromContainer const):
(WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint const):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFragmentToFlow const):
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToFragment const):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToFragment const):
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToFragment const):
(WebCore::RenderMultiColumnFlowThread::addRegionToThread): Deleted.
(WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset const): Deleted.
(WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox): Deleted.
(WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow const): Deleted.
(WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion const): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion const): Deleted.
(WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion const): Deleted.
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
(WebCore::RenderMultiColumnSet::beginFlow):
(WebCore::RenderMultiColumnSet::endFlow):
(WebCore::RenderMultiColumnSet::layout):
(WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
(WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
(WebCore::RenderMultiColumnSet::collectLayerFragments):
(WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFlowThreadPortionRect const):
(WebCore::RenderMultiColumnSet::positionForPoint):
(WebCore::RenderMultiColumnSet::translateFragmentPointToFlowThread const):
(WebCore::RenderMultiColumnSet::updateHitTestResult):
(WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect const): Deleted.
(WebCore::RenderMultiColumnSet::translateRegionPointToFlowThread const): Deleted.
* rendering/RenderMultiColumnSet.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containerForRepaint const):
(WebCore::RenderObject::repaintUsingContainer const):
(WebCore::RenderObject::outputRegionsInformation const):
(WebCore::RenderObject::positionForPoint):
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderFragmentContainer const):
(WebCore::RenderObject::isRenderRegion const): Deleted.
* rendering/RenderRegion.cpp: Removed.
* rendering/RenderRegion.h: Removed.
* rendering/RenderRegionSet.cpp: Removed.
* rendering/RenderRegionSet.h: Removed.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::positionForPoint):
* rendering/RenderReplaced.h:
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::overflowClipRect):
* rendering/RenderTable.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint):
* rendering/RenderText.h:
* rendering/RenderTreeAsText.cpp:
* rendering/RenderingAllInOne.cpp:
* rendering/RootInlineBox.cpp:
(WebCore::containingFragmentMap):
(WebCore::RootInlineBox::~RootInlineBox):
(WebCore::RootInlineBox::containingFragment const):
(WebCore::RootInlineBox::clearContainingFragment):
(WebCore::RootInlineBox::setContainingFragment):
(WebCore::containingRegionMap): Deleted.
(WebCore::RootInlineBox::containingRegion const): Deleted.
(WebCore::RootInlineBox::clearContainingRegion): Deleted.
(WebCore::RootInlineBox::setContainingRegion): Deleted.
* rendering/RootInlineBox.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::logicalLeftOffset const):
* rendering/style/RenderStyleConstants.h:
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::positionForPoint):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::positionForPoint):
* rendering/svg/RenderSVGText.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222556 268f45cc-cd09-0410-ab3c-d52691b4dbfc

58 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/dom/Element.cpp
Source/WebCore/rendering/FixedTableLayout.cpp
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBlockFlow.cpp
Source/WebCore/rendering/RenderBlockFlow.h
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderBoxFragmentInfo.h [moved from Source/WebCore/rendering/RenderBoxRegionInfo.h with 93% similarity]
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderBoxModelObject.h
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/RenderFileUploadControl.cpp
Source/WebCore/rendering/RenderFileUploadControl.h
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h
Source/WebCore/rendering/RenderFragmentContainer.cpp [moved from Source/WebCore/rendering/RenderRegion.cpp with 65% similarity]
Source/WebCore/rendering/RenderFragmentContainer.h [moved from Source/WebCore/rendering/RenderRegion.h with 63% similarity]
Source/WebCore/rendering/RenderFragmentContainerSet.cpp [moved from Source/WebCore/rendering/RenderRegionSet.cpp with 87% similarity]
Source/WebCore/rendering/RenderFragmentContainerSet.h [moved from Source/WebCore/rendering/RenderRegionSet.h with 81% similarity]
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderInline.cpp
Source/WebCore/rendering/RenderInline.h
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLineBreak.cpp
Source/WebCore/rendering/RenderLineBreak.h
Source/WebCore/rendering/RenderMultiColumnFlowThread.cpp
Source/WebCore/rendering/RenderMultiColumnFlowThread.h
Source/WebCore/rendering/RenderMultiColumnSet.cpp
Source/WebCore/rendering/RenderMultiColumnSet.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderObject.h
Source/WebCore/rendering/RenderReplaced.cpp
Source/WebCore/rendering/RenderReplaced.h
Source/WebCore/rendering/RenderTable.cpp
Source/WebCore/rendering/RenderTable.h
Source/WebCore/rendering/RenderText.cpp
Source/WebCore/rendering/RenderText.h
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/RenderingAllInOne.cpp
Source/WebCore/rendering/RootInlineBox.cpp
Source/WebCore/rendering/RootInlineBox.h
Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
Source/WebCore/rendering/svg/RenderSVGInlineText.h
Source/WebCore/rendering/svg/RenderSVGText.cpp
Source/WebCore/rendering/svg/RenderSVGText.h

index c087b40..95447d6 100644 (file)
@@ -2674,6 +2674,8 @@ set(WebCore_SOURCES
     rendering/RenderFileUploadControl.cpp
     rendering/RenderFlexibleBox.cpp
     rendering/RenderFlowThread.cpp
+    rendering/RenderFragmentContainer.cpp
+    rendering/RenderFragmentContainerSet.cpp
     rendering/RenderFrame.cpp
     rendering/RenderFrameBase.cpp
     rendering/RenderFrameSet.cpp
@@ -2708,8 +2710,6 @@ set(WebCore_SOURCES
     rendering/RenderObject.cpp
     rendering/RenderProgress.cpp
     rendering/RenderQuote.cpp
-    rendering/RenderRegion.cpp
-    rendering/RenderRegionSet.cpp
     rendering/RenderReplaced.cpp
     rendering/RenderReplica.cpp
     rendering/RenderRuby.cpp
index ce6023b..ff1250d 100644 (file)
-2017-09-27  Antti Koivisto  <antti@apple.com>
+2017-09-27  David Hyatt  <hyatt@apple.com>
 
-        REGRESSION (r222040): Crash navigating out of gfycat.com url
-        https://bugs.webkit.org/show_bug.cgi?id=177531
-        <rdar://problem/34602601>
+        Rename "Region" to "Fragment" for RenderRegion and associated classes/methods.
+        https://bugs.webkit.org/show_bug.cgi?id=177506
 
-        Reviewed by Geoff Garen.
-
-        Animation structures are normally removed when the render tree is torn down.
-        However there are cases where we can instantiate animation without creating a renderer
-        and we need to make sure animations are canceled in these cases too.
-
-        CompositeAnimations should also ref the element but that can be done separately.
-
-        Test: fast/animation/animation-element-removal.html
+        Reviewed by Zalan Bujtas.
 
+        * WebCore.xcodeproj/project.pbxproj:
+        * css/CSSPrimitiveValueMappings.h:
+        (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+        (WebCore::CSSPrimitiveValue::operator BreakInside const):
+        * css/CSSValueKeywords.in:
         * dom/Element.cpp:
-        (WebCore::Element::removedFrom):
-
-            Ensure animations are canceled when element is removed from the tree.
-
-        (WebCore::Element::clearHasPendingResources):
-        (WebCore::Element::hasCSSAnimation const):
-        (WebCore::Element::setHasCSSAnimation):
-        (WebCore::Element::clearHasCSSAnimation):
-
-            Add a bit so we don't need to do hash lookups for every removal.
-
-        * dom/Element.h:
-        * dom/ElementRareData.h:
-        (WebCore::ElementRareData::hasCSSAnimation const):
-        (WebCore::ElementRareData::setHasCSSAnimation):
-        (WebCore::ElementRareData::ElementRareData):
-        * page/animation/CSSAnimationController.cpp:
-        (WebCore::CSSAnimationControllerPrivate::ensureCompositeAnimation):
-
-            Test for the bit.
-
-        (WebCore::CSSAnimationControllerPrivate::clear):
-        (WebCore::CSSAnimationController::cancelAnimations):
-
-2017-09-27  Joanmarie Diggs  <jdiggs@igalia.com>
-
-        [ATK] atk_table_cell_get_position() should return values of aria-rowindex and aria-colindex, if present
-        https://bugs.webkit.org/show_bug.cgi?id=171176
-
-        Reviewed by Chris Fleizach.
-
-        Modify webKitAccessibleTableCellGetPosition() to prefer the ARIA value
-        over the DOM-based value.
-
-        No new tests needed: We have coverage through aria-table-attributes.html.
-        Platform expectations for this test were updated.
-
-        * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
-        (webkitAccessibleTableCellGetPosition):
-
-2017-09-27  Alicia Boya GarcĂ­a  <aboya@igalia.com>
-
-        Add initial experimental support for webm in WebKitGTK+ with VP8, VP9,
-        Vorbis and Opus formats, as long as suitable plugins are installed in
-        GStreamer.
-        https://bugs.webkit.org/show_bug.cgi?id=177355
-
-        Reviewed by Xabier Rodriguez-Calvar.
-
-        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
-        (WebCore::AppendPipeline::AppendPipeline):
-        * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
-
-2017-09-26  Zalan Bujtas  <zalan@apple.com>
-
-        AX: Defer RenderImage's imageChanged event until after layout is done.
-        https://bugs.webkit.org/show_bug.cgi?id=177446
-
-        Reviewed by Dean Jackson.
-
-        This is to avoid unintentional tree mutation during layout.
-
-        Covered by existing tests.
-
-        * rendering/RenderImage.cpp:
-        (WebCore::RenderImage::imageChanged):
-
-2017-09-26  Joanmarie Diggs  <jdiggs@igalia.com>
-
-        AX: Several ARIA roles with presentational children are exposing children
-        https://bugs.webkit.org/show_bug.cgi?id=177502
-
-        Reviewed by Chris Fleizach.
-
-        Add MenuItemCheckboxRole, MenuItemRadioRole, and SplitterRole to the list
-        of AccessibilityRole types which cannot have children. In the case of
-        DocumentMathRole, only treat children as presentational (excluded from the
-        accessibility tree) if the element is not MathML.
-
-        Test: accessibility/presentational-children.html
-
-        * accessibility/AccessibilityNodeObject.cpp:
-        (WebCore::AccessibilityNodeObject::canHaveChildren const):
-
-2017-09-26  Zalan Bujtas  <zalan@apple.com>
-
-        Fall back to normal line layout position, when simple line layout fails to find one.
-        https://bugs.webkit.org/show_bug.cgi?id=176220
-        <rdar://problem/34205774>
-
-        Reviewed by Brent Fulgham.
-
-        In case of empty content, let's just fall back to normal line layout and try to
-        find the visually correct one.
-
-        Test: fast/text/invalid-positionForPoint-offset.html
-
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        * rendering/FixedTableLayout.cpp:
+        (WebCore::FixedTableLayout::calcWidthArray):
+        * rendering/GridTrackSizingAlgorithm.cpp:
+        (WebCore::computeMarginLogicalSizeForChild):
+        (WebCore::IndefiniteSizeStrategy::minLogicalWidthForChild const):
+        (WebCore::DefiniteSizeStrategy::minLogicalWidthForChild const):
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
+        (WebCore::RenderBlock::addOverflowFromChildren):
+        (WebCore::RenderBlock::clearLayoutOverflow):
+        (WebCore::RenderBlock::addVisualOverflowFromTheme):
+        (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
+        (WebCore::RenderBlock::simplifiedLayout):
+        (WebCore::RenderBlock::markFixedPositionObjectForLayoutIfNeeded):
+        (WebCore::RenderBlock::layoutPositionedObject):
+        (WebCore::RenderBlock::selectionGaps):
+        (WebCore::RenderBlock::logicalLeftOffsetForContent const):
+        (WebCore::RenderBlock::logicalRightOffsetForContent const):
+        (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
+        (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
+        (WebCore::RenderBlock::positionForPointWithInlineChildren):
+        (WebCore::isChildHitTestCandidate):
+        (WebCore::RenderBlock::positionForPoint):
+        (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage const):
+        (WebCore::RenderBlock::fragmentAtBlockOffset const):
+        (WebCore::canComputeFragmentRangeForBox):
+        (WebCore::RenderBlock::computeFragmentRangeForBoxChild const):
+        (WebCore::RenderBlock::estimateFragmentRangeForBoxChild const):
+        (WebCore::RenderBlock::updateFragmentRangeForBoxChild const):
+        (WebCore::RenderBlock::regionAtBlockOffset const): Deleted.
+        (WebCore::canComputeRegionRangeForBox): Deleted.
+        (WebCore::RenderBlock::computeRegionRangeForBoxChild const): Deleted.
+        (WebCore::RenderBlock::estimateRegionRangeForBoxChild const): Deleted.
+        (WebCore::RenderBlock::updateRegionRangeForBoxChild const): Deleted.
+        * rendering/RenderBlock.h:
+        (WebCore::RenderBlock::availableLogicalWidthForLineInFragment const):
+        (WebCore::RenderBlock::logicalRightOffsetForLineInFragment const):
+        (WebCore::RenderBlock::logicalLeftOffsetForLineInFragment const):
+        (WebCore::RenderBlock::startOffsetForLineInFragment const):
+        (WebCore::RenderBlock::endOffsetForLineInFragment const):
+        (WebCore::RenderBlock::availableLogicalWidthForLine const):
+        (WebCore::RenderBlock::availableLogicalWidthForContent const):
+        (WebCore::RenderBlock::startOffsetForContent const):
+        (WebCore::RenderBlock::endOffsetForContent const):
+        (WebCore::RenderBlock::logicalLeftOffsetForContent const):
+        (WebCore::RenderBlock::logicalRightOffsetForContent const):
+        (WebCore::RenderBlock::availableLogicalWidthForLineInRegion const): Deleted.
+        (WebCore::RenderBlock::logicalRightOffsetForLineInRegion const): Deleted.
+        (WebCore::RenderBlock::logicalLeftOffsetForLineInRegion const): Deleted.
+        (WebCore::RenderBlock::startOffsetForLineInRegion const): Deleted.
+        (WebCore::RenderBlock::endOffsetForLineInRegion const): Deleted.
+        * rendering/RenderBlockFlow.cpp:
+        (WebCore::RenderBlockFlow::layoutBlock):
+        (WebCore::RenderBlockFlow::layoutBlockChild):
+        (WebCore::RenderBlockFlow::setStaticInlinePositionForChild):
+        (WebCore::RenderBlockFlow::applyBeforeBreak):
+        (WebCore::RenderBlockFlow::applyAfterBreak):
+        (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
+        (WebCore::RenderBlockFlow::hasNextPage const):
+        (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
+        (WebCore::RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight const):
+        (WebCore::RenderBlockFlow::positionNewFloats):
+        (WebCore::RenderBlockFlow::getClearDelta):
+        (WebCore::RenderBlockFlow::needsLayoutAfterFragmentRangeChange const):
+        (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
+        (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
+        (WebCore::RenderBlockFlow::positionForPoint):
+        (WebCore::RenderBlockFlow::layoutExcludedChildren):
+        (WebCore::RenderBlockFlow::needsLayoutAfterRegionRangeChange const): Deleted.
+        * rendering/RenderBlockFlow.h:
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
+        (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
+        (WebCore::RenderBlockFlow::layoutLineBoxes):
+        (WebCore::RenderBlockFlow::determineStartPosition):
+        (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
+        (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const):
+        (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
+        (WebCore::RenderBlockFlow::positionNewFloatOnLine):
+        (WebCore::RenderBlockFlow::updateFragmentForLine const):
+        (WebCore::RenderBlockFlow::updateRegionForLine const): Deleted.
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::clampToStartAndEndFragments const):
+        (WebCore::RenderBox::hasFragmentRangeInFlowThread const):
+        (WebCore::RenderBox::clientBoxRectInFragment const):
+        (WebCore::RenderBox::borderBoxRectInFragment const):
+        (WebCore::RenderBox::constrainLogicalWidthInFragmentByMinMax const):
+        (WebCore::RenderBox::nodeAtPoint):
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::overflowClipRect):
+        (WebCore::RenderBox::clipRect):
+        (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats const):
+        (WebCore::RenderBox::containingBlockLogicalWidthForContentInFragment const):
+        (WebCore::RenderBox::containingBlockAvailableLineWidthInFragment const):
+        (WebCore::RenderBox::offsetFromContainer const):
+        (WebCore::RenderBox::computeRectForRepaint const):
+        (WebCore::RenderBox::updateLogicalWidth):
+        (WebCore::RenderBox::computeLogicalWidthInFragment const):
+        (WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
+        (WebCore::RenderBox::renderBoxFragmentInfo const):
+        (WebCore::tableCellShouldHaveZeroInitialSize):
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
+        (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
+        (WebCore::computeInlineStaticDistance):
+        (WebCore::RenderBox::computePositionedLogicalWidth const):
+        (WebCore::RenderBox::computePositionedLogicalHeight const):
+        (WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
+        (WebCore::RenderBox::positionForPoint):
+        (WebCore::RenderBox::createsNewFormattingContext const):
+        (WebCore::RenderBox::addVisualEffectOverflow):
+        (WebCore::RenderBox::addOverflowFromChild):
+        (WebCore::RenderBox::clearOverflow):
+        (WebCore::RenderBox::clampToStartAndEndRegions const): Deleted.
+        (WebCore::RenderBox::hasRegionRangeInFlowThread const): Deleted.
+        (WebCore::RenderBox::clientBoxRectInRegion const): Deleted.
+        (WebCore::RenderBox::borderBoxRectInRegion const): Deleted.
+        (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax const): Deleted.
+        (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion const): Deleted.
+        (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion const): Deleted.
+        (WebCore::RenderBox::computeLogicalWidthInRegion const): Deleted.
+        (WebCore::RenderBox::computeLogicalWidthInRegionUsing const): Deleted.
+        (WebCore::RenderBox::renderBoxRegionInfo const): Deleted.
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::overflowClipRectForChildLayers):
+        (WebCore::RenderBox::canHaveOutsideFragmentRange const):
+        (WebCore::RenderBox::needsLayoutAfterFragmentRangeChange const):
+        (WebCore::RenderBox::canHaveOutsideRegionRange const): Deleted.
+        (WebCore::RenderBox::needsLayoutAfterRegionRangeChange const): Deleted.
+        * rendering/RenderBoxFragmentInfo.h: Copied from rendering/RenderBoxRegionInfo.h.
+        (WebCore::RenderBoxFragmentInfo::RenderBoxFragmentInfo):
+        (WebCore::RenderBoxRegionInfo::RenderBoxRegionInfo): Deleted.
+        (WebCore::RenderBoxRegionInfo::logicalLeft const): Deleted.
+        (WebCore::RenderBoxRegionInfo::logicalWidth const): Deleted.
+        (WebCore::RenderBoxRegionInfo::shiftLogicalLeft): Deleted.
+        (WebCore::RenderBoxRegionInfo::isShifted const): Deleted.
+        (WebCore::RenderBoxRegionInfo::createOverflow): Deleted.
+        (WebCore::RenderBoxRegionInfo::overflow const): Deleted.
+        (WebCore::RenderBoxRegionInfo::clearOverflow): Deleted.
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
+        (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint const):
+        * rendering/RenderBoxModelObject.h:
+        (WebCore::RenderBoxModelObject::canHaveBoxInfoInFragment const):
+        (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion const): Deleted.
+        * rendering/RenderBoxRegionInfo.h: Removed.
+        * rendering/RenderElement.cpp:
+        * rendering/RenderFileUploadControl.cpp:
+        (WebCore::RenderFileUploadControl::positionForPoint):
+        * rendering/RenderFileUploadControl.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
+        (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::RenderFlowThread):
+        (WebCore::RenderFlowThread::styleDidChange):
+        (WebCore::RenderFlowThread::removeFlowChildInfo):
+        (WebCore::RenderFlowThread::removeFragmentFromThread):
+        (WebCore::RenderFlowThread::invalidateFragments):
+        (WebCore::RenderFlowThread::validateFragments):
+        (WebCore::RenderFlowThread::layout):
+        (WebCore::RenderFlowThread::updateLogicalWidth):
+        (WebCore::RenderFlowThread::computeLogicalHeight const):
+        (WebCore::RenderFlowThread::repaintRectangleInFragments const):
+        (WebCore::RenderFlowThread::fragmentAtBlockOffset const):
+        (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent const):
+        (WebCore::RenderFlowThread::pageLogicalTopForOffset const):
+        (WebCore::RenderFlowThread::pageLogicalWidthForOffset const):
+        (WebCore::RenderFlowThread::pageLogicalHeightForOffset const):
+        (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset const):
+        (WebCore::RenderFlowThread::mapFromFlowToFragment const):
+        (WebCore::RenderFlowThread::removeRenderBoxFragmentInfo):
+        (WebCore::RenderFlowThread::removeLineFragmentInfo):
+        (WebCore::RenderFlowThread::logicalWidthChangedInFragmentsForBlock):
+        (WebCore::RenderFlowThread::contentLogicalWidthOfFirstFragment const):
+        (WebCore::RenderFlowThread::contentLogicalHeightOfFirstFragment const):
+        (WebCore::RenderFlowThread::contentLogicalLeftOfFirstFragment const):
+        (WebCore::RenderFlowThread::firstFragment const):
+        (WebCore::RenderFlowThread::lastFragment const):
+        (WebCore::RenderFlowThread::clearRenderBoxFragmentInfoAndCustomStyle):
+        (WebCore::RenderFlowThread::setFragmentRangeForBox):
+        (WebCore::RenderFlowThread::hasCachedFragmentRangeForBox const):
+        (WebCore::RenderFlowThread::getFragmentRangeForBoxFromCachedInfo const):
+        (WebCore::RenderFlowThread::getFragmentRangeForBox const):
+        (WebCore::RenderFlowThread::computedFragmentRangeForBox const):
+        (WebCore::RenderFlowThread::fragmentInRange const):
+        (WebCore::RenderFlowThread::objectShouldFragmentInFlowFragment const):
+        (WebCore::RenderFlowThread::objectInFlowFragment const):
+        (WebCore::RenderFlowThread::checkLinesConsistency const):
+        (WebCore::RenderFlowThread::clearLinesToFragmentMap):
+        (WebCore::RenderFlowThread::deleteLines):
+        (WebCore::RenderFlowThread::willBeDestroyed):
+        (WebCore::RenderFlowThread::markFragmentsForOverflowLayoutIfNeeded):
+        (WebCore::RenderFlowThread::updateFragmentsFlowThreadPortionRect):
+        (WebCore::RenderFlowThread::addForcedFragmentBreak):
+        (WebCore::RenderFlowThread::collectLayerFragments):
+        (WebCore::RenderFlowThread::fragmentsBoundingBox):
+        (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstFragment const):
+        (WebCore::RenderFlowThread::FragmentSearchAdapter::collectIfNeeded):
+        (WebCore::RenderFlowThread::mapLocalToContainer const):
+        (WebCore::RenderFlowThread::addFragmentsVisualEffectOverflow):
+        (WebCore::RenderFlowThread::addFragmentsVisualOverflowFromTheme):
+        (WebCore::RenderFlowThread::addFragmentsOverflowFromChild):
+        (WebCore::RenderFlowThread::addFragmentsLayoutOverflow):
+        (WebCore::RenderFlowThread::addFragmentsVisualOverflow):
+        (WebCore::RenderFlowThread::clearFragmentsOverflow):
+        (WebCore::RenderFlowThread::currentFragment const):
+        (WebCore::RenderFlowThread::containingFragmentMap):
+        (WebCore::RenderFlowThread::removeRegionFromThread): Deleted.
+        (WebCore::RenderFlowThread::invalidateRegions): Deleted.
+        (WebCore::RenderFlowThread::validateRegions): Deleted.
+        (WebCore::RenderFlowThread::repaintRectangleInRegions const): Deleted.
+        (WebCore::RenderFlowThread::regionAtBlockOffset const): Deleted.
+        (WebCore::RenderFlowThread::mapFromFlowToRegion const): Deleted.
+        (WebCore::RenderFlowThread::removeRenderBoxRegionInfo): Deleted.
+        (WebCore::RenderFlowThread::removeLineRegionInfo): Deleted.
+        (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock): Deleted.
+        (WebCore::RenderFlowThread::contentLogicalWidthOfFirstRegion const): Deleted.
+        (WebCore::RenderFlowThread::contentLogicalHeightOfFirstRegion const): Deleted.
+        (WebCore::RenderFlowThread::contentLogicalLeftOfFirstRegion const): Deleted.
+        (WebCore::RenderFlowThread::firstRegion const): Deleted.
+        (WebCore::RenderFlowThread::lastRegion const): Deleted.
+        (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle): Deleted.
+        (WebCore::RenderFlowThread::setRegionRangeForBox): Deleted.
+        (WebCore::RenderFlowThread::hasCachedRegionRangeForBox const): Deleted.
+        (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo const): Deleted.
+        (WebCore::RenderFlowThread::getRegionRangeForBox const): Deleted.
+        (WebCore::RenderFlowThread::computedRegionRangeForBox const): Deleted.
+        (WebCore::RenderFlowThread::regionInRange const): Deleted.
+        (WebCore::RenderFlowThread::objectShouldFragmentInFlowRegion const): Deleted.
+        (WebCore::RenderFlowThread::objectInFlowRegion const): Deleted.
+        (WebCore::RenderFlowThread::clearLinesToRegionMap): Deleted.
+        (WebCore::RenderFlowThread::markRegionsForOverflowLayoutIfNeeded): Deleted.
+        (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect): Deleted.
+        (WebCore::RenderFlowThread::addForcedRegionBreak): Deleted.
+        (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion const): Deleted.
+        (WebCore::RenderFlowThread::RegionSearchAdapter::collectIfNeeded): Deleted.
+        (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow): Deleted.
+        (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme): Deleted.
+        (WebCore::RenderFlowThread::addRegionsOverflowFromChild): Deleted.
+        (WebCore::RenderFlowThread::addRegionsLayoutOverflow): Deleted.
+        (WebCore::RenderFlowThread::addRegionsVisualOverflow): Deleted.
+        (WebCore::RenderFlowThread::clearRegionsOverflow): Deleted.
+        (WebCore::RenderFlowThread::currentRegion const): Deleted.
+        (WebCore::RenderFlowThread::containingRegionMap): Deleted.
+        * rendering/RenderFlowThread.h:
+        (WTF::ValueToString<WebCore::RenderFragmentContainer::string):
+        (WTF::ValueToString<WebCore::RenderRegion::string): Deleted.
+        * rendering/RenderFragmentContainer.cpp: Copied from rendering/RenderRegion.cpp.
+        (WebCore::RenderFragmentContainer::RenderFragmentContainer):
+        (WebCore::RenderFragmentContainer::mapFragmentPointIntoFlowThreadCoordinates):
+        (WebCore::RenderFragmentContainer::positionForPoint):
+        (WebCore::RenderFragmentContainer::pageLogicalWidth const):
+        (WebCore::RenderFragmentContainer::pageLogicalHeight const):
+        (WebCore::RenderFragmentContainer::logicalHeightOfAllFlowThreadContent const):
+        (WebCore::RenderFragmentContainer::flowThreadPortionOverflowRect):
+        (WebCore::RenderFragmentContainer::flowThreadPortionLocation const):
+        (WebCore::RenderFragmentContainer::overflowRectForFlowThreadPortion):
+        (WebCore::RenderFragmentContainer::pageLogicalTopForOffset const):
+        (WebCore::RenderFragmentContainer::isFirstFragment const):
+        (WebCore::RenderFragmentContainer::isLastFragment const):
+        (WebCore::RenderFragmentContainer::shouldClipFlowThreadContent const):
+        (WebCore::RenderFragmentContainer::styleDidChange):
+        (WebCore::RenderFragmentContainer::computeOverflowFromFlowThread):
+        (WebCore::RenderFragmentContainer::repaintFlowThreadContent):
+        (WebCore::RenderFragmentContainer::repaintFlowThreadContentRectangle):
+        (WebCore::RenderFragmentContainer::installFlowThread):
+        (WebCore::RenderFragmentContainer::attachFragment):
+        (WebCore::RenderFragmentContainer::detachFragment):
+        (WebCore::RenderFragmentContainer::renderBoxFragmentInfo const):
+        (WebCore::RenderFragmentContainer::setRenderBoxFragmentInfo):
+        (WebCore::RenderFragmentContainer::takeRenderBoxFragmentInfo):
+        (WebCore::RenderFragmentContainer::removeRenderBoxFragmentInfo):
+        (WebCore::RenderFragmentContainer::deleteAllRenderBoxFragmentInfo):
+        (WebCore::RenderFragmentContainer::logicalTopOfFlowThreadContentRect const):
+        (WebCore::RenderFragmentContainer::logicalBottomOfFlowThreadContentRect const):
+        (WebCore::RenderFragmentContainer::insertedIntoTree):
+        (WebCore::RenderFragmentContainer::willBeRemovedFromTree):
+        (WebCore::RenderFragmentContainer::computeIntrinsicLogicalWidths const):
+        (WebCore::RenderFragmentContainer::computePreferredLogicalWidths):
+        (WebCore::RenderFragmentContainer::adjustFragmentBoundsFromFlowThreadPortionRect const):
+        (WebCore::RenderFragmentContainer::ensureOverflowForBox):
+        (WebCore::RenderFragmentContainer::rectFlowPortionForBox const):
+        (WebCore::RenderFragmentContainer::addLayoutOverflowForBox):
+        (WebCore::RenderFragmentContainer::addVisualOverflowForBox):
+        (WebCore::RenderFragmentContainer::layoutOverflowRectForBox):
+        (WebCore::RenderFragmentContainer::visualOverflowRectForBox):
+        (WebCore::RenderFragmentContainer::layoutOverflowRectForBoxForPropagation):
+        (WebCore::RenderFragmentContainer::visualOverflowRectForBoxForPropagation):
+        (WebCore::CurrentRenderFragmentContainerMaintainer::CurrentRenderFragmentContainerMaintainer):
+        (WebCore::CurrentRenderFragmentContainerMaintainer::~CurrentRenderFragmentContainerMaintainer):
+        (WebCore::RenderRegion::RenderRegion): Deleted.
+        (WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Deleted.
+        (WebCore::RenderRegion::positionForPoint): Deleted.
+        (WebCore::RenderRegion::pageLogicalWidth const): Deleted.
+        (WebCore::RenderRegion::pageLogicalHeight const): Deleted.
+        (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent const): Deleted.
+        (WebCore::RenderRegion::flowThreadPortionOverflowRect): Deleted.
+        (WebCore::RenderRegion::flowThreadPortionLocation const): Deleted.
+        (WebCore::RenderRegion::overflowRectForFlowThreadPortion): Deleted.
+        (WebCore::RenderRegion::pageLogicalTopForOffset const): Deleted.
+        (WebCore::RenderRegion::isFirstRegion const): Deleted.
+        (WebCore::RenderRegion::isLastRegion const): Deleted.
+        (WebCore::RenderRegion::shouldClipFlowThreadContent const): Deleted.
+        (WebCore::RenderRegion::styleDidChange): Deleted.
+        (WebCore::RenderRegion::computeOverflowFromFlowThread): Deleted.
+        (WebCore::RenderRegion::repaintFlowThreadContent): Deleted.
+        (WebCore::RenderRegion::repaintFlowThreadContentRectangle): Deleted.
+        (WebCore::RenderRegion::installFlowThread): Deleted.
+        (WebCore::RenderRegion::attachRegion): Deleted.
+        (WebCore::RenderRegion::detachRegion): Deleted.
+        (WebCore::RenderRegion::renderBoxRegionInfo const): Deleted.
+        (WebCore::RenderRegion::setRenderBoxRegionInfo): Deleted.
+        (WebCore::RenderRegion::takeRenderBoxRegionInfo): Deleted.
+        (WebCore::RenderRegion::removeRenderBoxRegionInfo): Deleted.
+        (WebCore::RenderRegion::deleteAllRenderBoxRegionInfo): Deleted.
+        (WebCore::RenderRegion::logicalTopOfFlowThreadContentRect const): Deleted.
+        (WebCore::RenderRegion::logicalBottomOfFlowThreadContentRect const): Deleted.
+        (WebCore::RenderRegion::insertedIntoTree): Deleted.
+        (WebCore::RenderRegion::willBeRemovedFromTree): Deleted.
+        (WebCore::RenderRegion::computeIntrinsicLogicalWidths const): Deleted.
+        (WebCore::RenderRegion::computePreferredLogicalWidths): Deleted.
+        (WebCore::RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect const): Deleted.
+        (WebCore::RenderRegion::ensureOverflowForBox): Deleted.
+        (WebCore::RenderRegion::rectFlowPortionForBox const): Deleted.
+        (WebCore::RenderRegion::addLayoutOverflowForBox): Deleted.
+        (WebCore::RenderRegion::addVisualOverflowForBox): Deleted.
+        (WebCore::RenderRegion::layoutOverflowRectForBox): Deleted.
+        (WebCore::RenderRegion::visualOverflowRectForBox): Deleted.
+        (WebCore::RenderRegion::layoutOverflowRectForBoxForPropagation): Deleted.
+        (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation): Deleted.
+        (WebCore::CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer): Deleted.
+        (WebCore::CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer): Deleted.
+        * rendering/RenderFragmentContainer.h: Copied from rendering/RenderRegion.h.
+        (WebCore::RenderFragmentContainer::isRenderFragmentContainerSet const):
+        (WebCore::RenderFragmentContainer::absoluteQuadsForBoxInFragment):
+        (WebCore::CurrentRenderFragmentContainerMaintainer::fragment const):
+        (WebCore::RenderRegion::setFlowThreadPortionRect): Deleted.
+        (WebCore::RenderRegion::flowThreadPortionRect const): Deleted.
+        (WebCore::RenderRegion::flowThread const): Deleted.
+        (WebCore::RenderRegion::isValid const): Deleted.
+        (WebCore::RenderRegion::setIsValid): Deleted.
+        (WebCore::RenderRegion::logicalTopForFlowThreadContent const): Deleted.
+        (WebCore::RenderRegion::logicalBottomForFlowThreadContent const): Deleted.
+        (WebCore::RenderRegion::isRenderRegionSet const): Deleted.
+        (WebCore::RenderRegion::collectLayerFragments): Deleted.
+        (WebCore::RenderRegion::absoluteQuadsForBoxInRegion): Deleted.
+        (WebCore::CurrentRenderRegionMaintainer::region const): Deleted.
+        * rendering/RenderFragmentContainerSet.cpp: Copied from rendering/RenderRegionSet.cpp.
+        (WebCore::RenderFragmentContainerSet::RenderFragmentContainerSet):
+        (WebCore::RenderFragmentContainerSet::installFlowThread):
+        (WebCore::RenderFragmentContainerSet::expandToEncompassFlowThreadContentsIfNeeded):
+        (WebCore::RenderRegionSet::RenderRegionSet): Deleted.
+        (WebCore::RenderRegionSet::installFlowThread): Deleted.
+        (WebCore::RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded): Deleted.
+        * rendering/RenderFragmentContainerSet.h: Copied from rendering/RenderRegionSet.h.
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::computeMarginLogicalSizeForChild const):
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::positionForPoint):
+        (WebCore::RenderInline::linesVisualOverflowBoundingBoxInFragment const):
+        (WebCore::RenderInline::linesVisualOverflowBoundingBoxInRegion const): Deleted.
+        * rendering/RenderInline.h:
+        * rendering/RenderLayer.cpp:
+        (WebCore::accumulateOffsetTowardsAncestor):
+        (WebCore::RenderLayer::calculateClipRects const):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintIntoLayer):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::canBeComposited const):
+        * rendering/RenderLineBreak.cpp:
+        (WebCore::RenderLineBreak::positionForPoint):
+        * rendering/RenderLineBreak.h:
+        * rendering/RenderMultiColumnFlowThread.cpp:
+        (WebCore::RenderMultiColumnFlowThread::addFragmentToThread):
+        (WebCore::RenderMultiColumnFlowThread::willBeRemovedFromTree):
+        (WebCore::RenderMultiColumnFlowThread::processPossibleSpannerDescendant):
+        (WebCore::RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved):
+        (WebCore::RenderMultiColumnFlowThread::setPageBreak):
+        (WebCore::RenderMultiColumnFlowThread::updateMinimumPageHeight):
+        (WebCore::RenderMultiColumnFlowThread::fragmentAtBlockOffset const):
+        (WebCore::RenderMultiColumnFlowThread::setFragmentRangeForBox):
+        (WebCore::RenderMultiColumnFlowThread::addForcedFragmentBreak):
+        (WebCore::RenderMultiColumnFlowThread::offsetFromContainer const):
+        (WebCore::RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint const):
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFragmentToFlow const):
+        (WebCore::RenderMultiColumnFlowThread::mapFromFlowToFragment const):
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToFragment const):
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToFragment const):
+        (WebCore::RenderMultiColumnFlowThread::addRegionToThread): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::regionAtBlockOffset const): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::setRegionRangeForBox): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::addForcedRegionBreak): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow const): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion const): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion const): Deleted.
+        (WebCore::RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion const): Deleted.
+        * rendering/RenderMultiColumnFlowThread.h:
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
+        (WebCore::RenderMultiColumnSet::updateLogicalWidth):
+        (WebCore::RenderMultiColumnSet::beginFlow):
+        (WebCore::RenderMultiColumnSet::endFlow):
+        (WebCore::RenderMultiColumnSet::layout):
+        (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
+        (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
+        (WebCore::RenderMultiColumnSet::collectLayerFragments):
+        (WebCore::RenderMultiColumnSet::adjustFragmentBoundsFromFlowThreadPortionRect const):
+        (WebCore::RenderMultiColumnSet::positionForPoint):
+        (WebCore::RenderMultiColumnSet::translateFragmentPointToFlowThread const):
+        (WebCore::RenderMultiColumnSet::updateHitTestResult):
+        (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect const): Deleted.
+        (WebCore::RenderMultiColumnSet::translateRegionPointToFlowThread const): Deleted.
+        * rendering/RenderMultiColumnSet.h:
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::containerForRepaint const):
+        (WebCore::RenderObject::repaintUsingContainer const):
+        (WebCore::RenderObject::outputRegionsInformation const):
+        (WebCore::RenderObject::positionForPoint):
+        * rendering/RenderObject.h:
+        (WebCore::RenderObject::isRenderFragmentContainer const):
+        (WebCore::RenderObject::isRenderRegion const): Deleted.
+        * rendering/RenderRegion.cpp: Removed.
+        * rendering/RenderRegion.h: Removed.
+        * rendering/RenderRegionSet.cpp: Removed.
+        * rendering/RenderRegionSet.h: Removed.
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::positionForPoint):
+        * rendering/RenderReplaced.h:
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::updateLogicalWidth):
+        (WebCore::RenderTable::overflowClipRect):
+        * rendering/RenderTable.h:
         * rendering/RenderText.cpp:
         (WebCore::RenderText::positionForPoint):
-        * rendering/SimpleLineLayoutResolver.cpp:
-        (WebCore::SimpleLineLayout::RunResolver::runForPoint const):
-
-2017-09-26  Matt Lewis  <jlewis3@apple.com>
-
-        Unreviewed, rolling out r222525.
-
-        This caused a consistent failure in the test
-        inspector/dom/getAccessibilityPropertiesForNode.html .
-
-        Reverted changeset:
-
-        "AX: Several ARIA roles with presentational children are
-        exposing children"
-        https://bugs.webkit.org/show_bug.cgi?id=177502
-        http://trac.webkit.org/changeset/222525
-
-2017-09-26  Daniel Bates  <dabates@apple.com>
-
-        Make fontToUse() a member function of InlineTextBox
-        https://bugs.webkit.org/show_bug.cgi?id=177495
-
-        Reviewed by Myles C. Maxfield.
-
-        Following bug #177493 we can write fontToUse() in terms of InlineTextBox::combinedText().
-
-        No functionality changed. So, no new tests.
-
-        * rendering/InlineTextBox.cpp:
-        (WebCore::InlineTextBox::lineFont const): Added; extracted from fontToUse().
-        (WebCore::InlineTextBox::combinedText const): Mark inline to give a hint to the compiler
-        that this function is small and seems reasonable to inline.
-        (WebCore::InlineTextBox::localSelectionRect const): Modified to call lineFont().
-        (WebCore::InlineTextBox::paint): Ditto.
-        (WebCore::InlineTextBox::offsetForPosition const): Ditto.
-        (WebCore::InlineTextBox::positionForOffset const): Ditto. Remove an extraneous
-        if-statement while I am here.
-        (WebCore::fontToUse): Deleted; moved logic to InlineTextBox::lineFont().
-        * rendering/InlineTextBox.h:
-
-2017-09-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
-
-        Followup (r222427): SynchronizedFixedQueue should not have a public constructor
-        https://bugs.webkit.org/show_bug.cgi?id=177458
-
-        Reviewed by Tim Horton.
-
-        ImageFrameCache::decodingQueue() and frameRequestQueue() should return
-        raw references instead of Ref objects.
-
-        * platform/graphics/ImageFrameCache.cpp:
-        (WebCore::ImageFrameCache::decodingQueue):
-        (WebCore::ImageFrameCache::frameRequestQueue):
-        (WebCore::ImageFrameCache::startAsyncDecodingQueue):
-        * platform/graphics/ImageFrameCache.h:
-
-2017-09-26  Daniel Bates  <dabates@apple.com>
-
-        Extract out combined text query into a member function
-        https://bugs.webkit.org/show_bug.cgi?id=177493
-
-        Reviewed by Zalan Bujtas.
-
-        Towards removing duplication throughout the paint code extract the
-        querying for the combined text of an inline text box into a member
-        function.
-
-        For a similar reason, update functions to query lineStyle() instead
-        of passing this information an argument.
-
-        No functionality changed. So, no new tests.
-
-        * rendering/InlineTextBox.cpp:
-        (WebCore::InlineTextBox::paint): Extract logic to query for combined text
-        from here to InlineTextBox::combinedText() and modify code to call this
-        member function.
-        (WebCore::InlineTextBox::paintTextSubrangeBackground): Query for line style
-        instead of taking it as an argument.
-        (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
-        (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
-        (WebCore::InlineTextBox::paintDecoration): Update code to query combinedText()
-        instead of taking RenderCombineText as an argument. While I am here make use of
-        GraphicsContextStateSaver to save and restore the graphics context state when
-        we have a non-empty clip rect.
-        (WebCore::InlineTextBox::paintDocumentMarker): Query for line style instead of
-        taking it as an argument.
-        (WebCore::InlineTextBox::paintDocumentMarkers): Ditto.
-        (WebCore::InlineTextBox::combinedText const): Added; extracted from InlineTextBox::paint().
-        * rendering/InlineTextBox.h:
-        * rendering/TextPainter.h:
-        (WebCore::TextPainter::setEmphasisMark): Modified to take a const RenderCombineText*
-        as opposed to a pointer to a non-const RenderCombineText.
-
-2017-09-26  Joanmarie Diggs  <jdiggs@igalia.com>
-
-        AX: ARIA grids claim to be multiselectable even with aria-multiselectable is set to false
-        https://bugs.webkit.org/show_bug.cgi?id=177498
-
-        Reviewed by Chris Fleizach.
-
-        AccessibilityARIAGrid::isMultiSelectable() was unconditionally returning
-        true. Modify it to return false if aria-multiselectable has been set to
-        false by the author.
-
-        Test: accessibility/aria-multiselectable-grid.html
-
-        * accessibility/AccessibilityARIAGrid.cpp:
-        (WebCore::AccessibilityARIAGrid::isMultiSelectable const):
-        * accessibility/AccessibilityARIAGrid.h:
-
-2017-09-26  Joanmarie Diggs  <jdiggs@igalia.com>
-
-        AX: Several ARIA roles with presentational children are exposing children
-        https://bugs.webkit.org/show_bug.cgi?id=177502
-
-        Reviewed by Chris Fleizach.
-
-        Add MenuItemCheckboxRole, MenuItemRadioRole, and SplitterRole to the list
-        of AccessibilityRole types which cannot have children. In the case of
-        DocumentMathRole, only treat children as presentational (excluded from the
-        accessibility tree) if the element is not MathML.
-
-        Test: accessibility/presentational-children.html
-
-        * accessibility/AccessibilityNodeObject.cpp:
-        (WebCore::AccessibilityNodeObject::canHaveChildren const):
+        * rendering/RenderText.h:
+        * rendering/RenderTreeAsText.cpp:
+        * rendering/RenderingAllInOne.cpp:
+        * rendering/RootInlineBox.cpp:
+        (WebCore::containingFragmentMap):
+        (WebCore::RootInlineBox::~RootInlineBox):
+        (WebCore::RootInlineBox::containingFragment const):
+        (WebCore::RootInlineBox::clearContainingFragment):
+        (WebCore::RootInlineBox::setContainingFragment):
+        (WebCore::containingRegionMap): Deleted.
+        (WebCore::RootInlineBox::containingRegion const): Deleted.
+        (WebCore::RootInlineBox::clearContainingRegion): Deleted.
+        (WebCore::RootInlineBox::setContainingRegion): Deleted.
+        * rendering/RootInlineBox.h:
+        * rendering/shapes/ShapeOutsideInfo.cpp:
+        (WebCore::ShapeOutsideInfo::logicalLeftOffset const):
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/svg/RenderSVGInlineText.cpp:
+        (WebCore::RenderSVGInlineText::positionForPoint):
+        * rendering/svg/RenderSVGInlineText.h:
+        * rendering/svg/RenderSVGText.cpp:
+        (WebCore::RenderSVGText::positionForPoint):
+        * rendering/svg/RenderSVGText.h:
 
 2017-09-26  Basuke Suzuki  <Basuke.Suzuki@sony.com>
 
index 89c6142..68127d4 100644 (file)
                BCE789861120E7A60060ECE5 /* BidiRun.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE789851120E7A60060ECE5 /* BidiRun.h */; };
                BCE7898B1120E8020060ECE5 /* BidiRun.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE7898A1120E8020060ECE5 /* BidiRun.cpp */; };
                BCE7B1930D4E86960075A539 /* JSHistoryCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */; };
-               BCE93F451517C567008CCF74 /* RenderRegionSet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE93F441517C567008CCF74 /* RenderRegionSet.h */; };
-               BCE93F471517C6D5008CCF74 /* RenderRegionSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE93F461517C6D5008CCF74 /* RenderRegionSet.cpp */; };
+               BCE93F451517C567008CCF74 /* RenderFragmentContainerSet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE93F441517C567008CCF74 /* RenderFragmentContainerSet.h */; };
+               BCE93F471517C6D5008CCF74 /* RenderFragmentContainerSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCE93F461517C6D5008CCF74 /* RenderFragmentContainerSet.cpp */; };
                BCEA478F097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */; };
                BCEA4790097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCEA4852097D93020094C9E4 /* RenderBlockLineLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA4813097D93020094C9E4 /* RenderBlockLineLayout.cpp */; };
                BCEA488C097D93020094C9E4 /* RenderText.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484D097D93020094C9E4 /* RenderText.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCEA488D097D93020094C9E4 /* RenderTextFragment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEA484E097D93020094C9E4 /* RenderTextFragment.cpp */; };
                BCEA488E097D93020094C9E4 /* RenderTextFragment.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA484F097D93020094C9E4 /* RenderTextFragment.h */; };
-               BCEB179C143379F50052EAE9 /* RenderBoxRegionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEB179B143379F50052EAE9 /* RenderBoxRegionInfo.h */; };
+               BCEB179C143379F50052EAE9 /* RenderBoxFragmentInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEB179B143379F50052EAE9 /* RenderBoxFragmentInfo.h */; };
                BCEC01BD0C274DAC009F4EC9 /* Screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */; };
                BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEC01BB0C274DAC009F4EC9 /* Screen.h */; };
                BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */; };
                D6E528A3149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6E528A1149A926D00EFE1F3 /* MutationObserverInterestGroup.cpp */; };
                D6E528A4149A926D00EFE1F3 /* MutationObserverInterestGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = D6E528A2149A926D00EFE1F3 /* MutationObserverInterestGroup.h */; };
                D6F7960D166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D6F7960C166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp */; };
-               D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderRegion.cpp */; };
-               D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderRegion.h */; };
+               D70AD65713E1342B005B50B4 /* RenderFragmentContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D70AD65513E1342B005B50B4 /* RenderFragmentContainer.cpp */; };
+               D70AD65813E1342B005B50B4 /* RenderFragmentContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = D70AD65613E1342B005B50B4 /* RenderFragmentContainer.h */; };
                D8B6152F1032495100C8554A /* Cookie.h in Headers */ = {isa = PBXBuildFile; fileRef = D8B6152E1032495100C8554A /* Cookie.h */; settings = {ATTRIBUTES = (Private, ); }; };
                DAED203016F2442B0070EC0F /* PageConsoleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DAACB3D916F2416400666135 /* PageConsoleClient.cpp */; };
                DAED203116F244480070EC0F /* PageConsoleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = DAACB3DA16F2416400666135 /* PageConsoleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                BCE789851120E7A60060ECE5 /* BidiRun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BidiRun.h; sourceTree = "<group>"; };
                BCE7898A1120E8020060ECE5 /* BidiRun.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BidiRun.cpp; sourceTree = "<group>"; };
                BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHistoryCustom.cpp; sourceTree = "<group>"; };
-               BCE93F441517C567008CCF74 /* RenderRegionSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegionSet.h; sourceTree = "<group>"; };
-               BCE93F461517C6D5008CCF74 /* RenderRegionSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegionSet.cpp; sourceTree = "<group>"; };
+               BCE93F441517C567008CCF74 /* RenderFragmentContainerSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFragmentContainerSet.h; sourceTree = "<group>"; };
+               BCE93F461517C6D5008CCF74 /* RenderFragmentContainerSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFragmentContainerSet.cpp; sourceTree = "<group>"; };
                BCEA477C097CAAC80094C9E4 /* CSSComputedStyleDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSComputedStyleDeclaration.cpp; sourceTree = "<group>"; };
                BCEA477D097CAAC80094C9E4 /* CSSComputedStyleDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSComputedStyleDeclaration.h; sourceTree = "<group>"; };
                BCEA478C097CAAC80094C9E4 /* CSSValueKeywords.in */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSValueKeywords.in; sourceTree = "<group>"; };
                BCEA484D097D93020094C9E4 /* RenderText.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderText.h; sourceTree = "<group>"; };
                BCEA484E097D93020094C9E4 /* RenderTextFragment.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextFragment.cpp; sourceTree = "<group>"; };
                BCEA484F097D93020094C9E4 /* RenderTextFragment.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = RenderTextFragment.h; sourceTree = "<group>"; };
-               BCEB179B143379F50052EAE9 /* RenderBoxRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxRegionInfo.h; sourceTree = "<group>"; };
+               BCEB179B143379F50052EAE9 /* RenderBoxFragmentInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderBoxFragmentInfo.h; sourceTree = "<group>"; };
                BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Screen.cpp; sourceTree = "<group>"; };
                BCEC01BB0C274DAC009F4EC9 /* Screen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Screen.h; sourceTree = "<group>"; };
                BCEC01BC0C274DAC009F4EC9 /* Screen.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Screen.idl; sourceTree = "<group>"; };
                D6EFC0BC1666DF7A003D291E /* HTMLTemplateElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTemplateElement.h; sourceTree = "<group>"; };
                D6EFC0BD1666DF7A003D291E /* HTMLTemplateElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLTemplateElement.idl; sourceTree = "<group>"; };
                D6F7960C166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTemplateElementCustom.cpp; sourceTree = "<group>"; };
-               D70AD65513E1342B005B50B4 /* RenderRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderRegion.cpp; sourceTree = "<group>"; };
-               D70AD65613E1342B005B50B4 /* RenderRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderRegion.h; sourceTree = "<group>"; };
+               D70AD65513E1342B005B50B4 /* RenderFragmentContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderFragmentContainer.cpp; sourceTree = "<group>"; };
+               D70AD65613E1342B005B50B4 /* RenderFragmentContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderFragmentContainer.h; sourceTree = "<group>"; };
                D8B6152E1032495100C8554A /* Cookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cookie.h; sourceTree = "<group>"; };
                DAACB3D916F2416400666135 /* PageConsoleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageConsoleClient.cpp; sourceTree = "<group>"; };
                DAACB3DA16F2416400666135 /* PageConsoleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageConsoleClient.h; sourceTree = "<group>"; };
                                BCEA4823097D93020094C9E4 /* RenderBox.h */,
                                BC96DB450F3A882200573CB3 /* RenderBoxModelObject.cpp */,
                                BC96DB420F3A880E00573CB3 /* RenderBoxModelObject.h */,
-                               BCEB179B143379F50052EAE9 /* RenderBoxRegionInfo.h */,
+                               BCEB179B143379F50052EAE9 /* RenderBoxFragmentInfo.h */,
                                BCEA4826097D93020094C9E4 /* RenderButton.cpp */,
                                BCEA4827097D93020094C9E4 /* RenderButton.h */,
                                B56579B41824D12A00E79F23 /* RenderChildIterator.h */,
                                ADE16736181050C300463A2E /* RenderPtr.h */,
                                5A574F22131DB93900471B88 /* RenderQuote.cpp */,
                                5A574F23131DB93900471B88 /* RenderQuote.h */,
-                               D70AD65513E1342B005B50B4 /* RenderRegion.cpp */,
-                               D70AD65613E1342B005B50B4 /* RenderRegion.h */,
-                               BCE93F461517C6D5008CCF74 /* RenderRegionSet.cpp */,
-                               BCE93F441517C567008CCF74 /* RenderRegionSet.h */,
+                               D70AD65513E1342B005B50B4 /* RenderFragmentContainer.cpp */,
+                               D70AD65613E1342B005B50B4 /* RenderFragmentContainer.h */,
+                               BCE93F461517C6D5008CCF74 /* RenderFragmentContainerSet.cpp */,
+                               BCE93F441517C567008CCF74 /* RenderFragmentContainerSet.h */,
                                A871DFDE0A15376B00B12A68 /* RenderReplaced.cpp */,
                                A871DFDF0A15376B00B12A68 /* RenderReplaced.h */,
                                BCA846D40DC67A350026C309 /* RenderReplica.cpp */,
                                BC10D76817D8EE71005E2626 /* RenderBlockFlow.h in Headers */,
                                BCEA4862097D93020094C9E4 /* RenderBox.h in Headers */,
                                BC96DB430F3A880E00573CB3 /* RenderBoxModelObject.h in Headers */,
-                               BCEB179C143379F50052EAE9 /* RenderBoxRegionInfo.h in Headers */,
+                               BCEB179C143379F50052EAE9 /* RenderBoxFragmentInfo.h in Headers */,
                                BCEA4866097D93020094C9E4 /* RenderButton.h in Headers */,
                                B56579B51824D12A00E79F23 /* RenderChildIterator.h in Headers */,
                                BCE4413412F748E2009B84B8 /* RenderCombineText.h in Headers */,
                                A43BF59D1149292800C643CA /* RenderProgress.h in Headers */,
                                B5B65874186FDE4C009C26E8 /* RenderPtr.h in Headers */,
                                5A574F25131DB93900471B88 /* RenderQuote.h in Headers */,
-                               D70AD65813E1342B005B50B4 /* RenderRegion.h in Headers */,
-                               BCE93F451517C567008CCF74 /* RenderRegionSet.h in Headers */,
+                               D70AD65813E1342B005B50B4 /* RenderFragmentContainer.h in Headers */,
+                               BCE93F451517C567008CCF74 /* RenderFragmentContainerSet.h in Headers */,
                                A871DFE30A15376B00B12A68 /* RenderReplaced.h in Headers */,
                                BCA846D70DC67A350026C309 /* RenderReplica.h in Headers */,
                                1479FAEE109AE37500DED655 /* RenderRuby.h in Headers */,
                                BCEA487F097D93020094C9E4 /* RenderObject.cpp in Sources */,
                                A43BF59C1149292800C643CA /* RenderProgress.cpp in Sources */,
                                5A574F24131DB93900471B88 /* RenderQuote.cpp in Sources */,
-                               D70AD65713E1342B005B50B4 /* RenderRegion.cpp in Sources */,
-                               BCE93F471517C6D5008CCF74 /* RenderRegionSet.cpp in Sources */,
+                               D70AD65713E1342B005B50B4 /* RenderFragmentContainer.cpp in Sources */,
+                               BCE93F471517C6D5008CCF74 /* RenderFragmentContainerSet.cpp in Sources */,
                                A871DFE20A15376B00B12A68 /* RenderReplaced.cpp in Sources */,
                                BCA846D60DC67A350026C309 /* RenderReplica.cpp in Sources */,
                                1479FAED109AE37500DED655 /* RenderRuby.cpp in Sources */,
index 49253af..fa1040f 100644 (file)
@@ -2285,9 +2285,6 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(BreakInside e)
     case AvoidPageBreakInside:
         m_value.valueID = CSSValueAvoidPage;
         break;
-    case AvoidRegionBreakInside:
-        m_value.valueID = CSSValueAvoidRegion;
-        break;
     }
 }
 
@@ -2304,8 +2301,6 @@ template<> inline CSSPrimitiveValue::operator BreakInside() const
         return AvoidColumnBreakInside;
     case CSSValueAvoidPage:
         return AvoidPageBreakInside;
-    case CSSValueAvoidRegion:
-        return AvoidRegionBreakInside;
     default:
         break;
     }
index c76ea7a..92b97fa 100644 (file)
@@ -857,7 +857,6 @@ env
 //
 avoid-column
 avoid-page
-avoid-region
 page
 recto
 region
@@ -1098,8 +1097,6 @@ x
 y
 #endif
 
-// -webkit-region-fragment
-// auto
 break
 
 wrap
index 5142195..de7eb60 100644 (file)
@@ -79,9 +79,9 @@
 #include "NodeRenderStyle.h"
 #include "PlatformWheelEvent.h"
 #include "PointerLockController.h"
+#include "RenderFragmentContainer.h"
 #include "RenderLayer.h"
 #include "RenderListBox.h"
-#include "RenderRegion.h"
 #include "RenderTheme.h"
 #include "RenderTreeUpdater.h"
 #include "RenderView.h"
index 61f9578..b980e10 100644 (file)
@@ -140,7 +140,7 @@ float FixedTableLayout::calcWidthArray()
         unsigned span = cell->colSpan();
         float fixedBorderBoxLogicalWidth = 0;
         // FIXME: Support other length types. If the width is non-auto, it should probably just use
-        // RenderBox::computeLogicalWidthInRegionUsing to compute the width.
+        // RenderBox::computeLogicalWidthInFragmentUsing to compute the width.
         if (logicalWidth.isFixed() && logicalWidth.isPositive()) {
             fixedBorderBoxLogicalWidth = cell->adjustBorderBoxLogicalWidthForBoxSizing(logicalWidth.value());
             logicalWidth.setValue(Fixed, fixedBorderBoxLogicalWidth);
index ffef9ab..391402f 100644 (file)
@@ -129,7 +129,7 @@ static LayoutUnit computeMarginLogicalSizeForChild(GridTrackSizingDirection dire
     LayoutUnit marginStart;
     LayoutUnit marginEnd;
     if (direction == ForColumns)
-        child.computeInlineDirectionMargins(renderGrid, child.containingBlockLogicalWidthForContentInRegion(nullptr), child.logicalWidth(), marginStart, marginEnd);
+        child.computeInlineDirectionMargins(renderGrid, child.containingBlockLogicalWidthForContentInFragment(nullptr), child.logicalWidth(), marginStart, marginEnd);
     else
         child.computeBlockDirectionMargins(renderGrid, marginStart, marginEnd);
 
@@ -824,7 +824,7 @@ private:
 
 LayoutUnit IndefiniteSizeStrategy::minLogicalWidthForChild(RenderBox& child, Length childMinSize, GridTrackSizingDirection childInlineDirection) const
 {
-    return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, overrideContainingBlockContentSizeForChild(child, childInlineDirection).value_or(0), *renderGrid(), nullptr) + marginIntrinsicLogicalWidthForChild(renderGrid(), child);
+    return child.computeLogicalWidthInFragmentUsing(MinSize, childMinSize, overrideContainingBlockContentSizeForChild(child, childInlineDirection).value_or(0), *renderGrid(), nullptr) + marginIntrinsicLogicalWidthForChild(renderGrid(), child);
 }
 
 void IndefiniteSizeStrategy::layoutGridItemForMinSizeComputation(RenderBox& child, bool overrideSizeHasChanged) const
@@ -923,7 +923,7 @@ LayoutUnit DefiniteSizeStrategy::minLogicalWidthForChild(RenderBox& child, Lengt
 {
     LayoutUnit marginLogicalWidth =
         computeMarginLogicalSizeForChild(childInlineDirection, *renderGrid(), child);
-    return child.computeLogicalWidthInRegionUsing(MinSize, childMinSize, overrideContainingBlockContentSizeForChild(child, childInlineDirection).value_or(0), *renderGrid(), nullptr) + marginLogicalWidth;
+    return child.computeLogicalWidthInFragmentUsing(MinSize, childMinSize, overrideContainingBlockContentSizeForChild(child, childInlineDirection).value_or(0), *renderGrid(), nullptr) + marginLogicalWidth;
 }
 
 void DefiniteSizeStrategy::maximizeTracks(Vector<GridTrack>& tracks, std::optional<LayoutUnit>& freeSpace)
index 48aa111..91226df 100644 (file)
 #include "Page.h"
 #include "PaintInfo.h"
 #include "RenderBlockFlow.h"
-#include "RenderBoxRegionInfo.h"
+#include "RenderBoxFragmentInfo.h"
 #include "RenderButton.h"
 #include "RenderChildIterator.h"
 #include "RenderCombineText.h"
 #include "RenderDeprecatedFlexibleBox.h"
 #include "RenderFlexibleBox.h"
+#include "RenderFragmentContainer.h"
 #include "RenderInline.h"
 #include "RenderIterator.h"
 #include "RenderLayer.h"
 #include "RenderListMarker.h"
 #include "RenderMenuList.h"
-#include "RenderRegion.h"
 #include "RenderSVGResourceClipper.h"
 #include "RenderTableCell.h"
 #include "RenderTextFragment.h"
@@ -1090,10 +1090,10 @@ static RenderBlockRareData& ensureBlockRareData(const RenderBlock& block)
 
 void RenderBlock::preparePaginationBeforeBlockLayout(bool& relayoutChildren)
 {
-    // Regions changing widths can force us to relayout our children.
+    // Fragments changing widths can force us to relayout our children.
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread)
-        flowThread->logicalWidthChangedInRegionsForBlock(this, relayoutChildren);
+        flowThread->logicalWidthChangedInFragmentsForBlock(this, relayoutChildren);
 }
 
 bool RenderBlock::recomputeLogicalWidth()
@@ -1121,10 +1121,10 @@ void RenderBlock::addOverflowFromChildren()
     else
         addOverflowFromBlockChildren();
     
-    // If this block is flowed inside a flow thread, make sure its overflow is propagated to the containing regions.
+    // If this block is flowed inside a flow thread, make sure its overflow is propagated to the containing fragments.
     if (m_overflow) {
         if (RenderFlowThread* containingFlowThread = flowThreadContainingBlock())
-            containingFlowThread->addRegionsVisualOverflow(this, m_overflow->visualOverflowRect());
+            containingFlowThread->addFragmentsVisualOverflow(this, m_overflow->visualOverflowRect());
     }
 }
 
@@ -1165,7 +1165,7 @@ void RenderBlock::clearLayoutOverflow()
         return;
     
     if (visualOverflowRect() == borderBoxRect()) {
-        // FIXME: Implement complete solution for regions overflow.
+        // FIXME: Implement complete solution for fragments overflow.
         clearOverflow();
         return;
     }
@@ -1206,22 +1206,22 @@ void RenderBlock::addVisualOverflowFromTheme()
     addVisualOverflow(snappedIntRect(LayoutRect(inflatedRect)));
 
     if (RenderFlowThread* flowThread = flowThreadContainingBlock())
-        flowThread->addRegionsVisualOverflowFromTheme(this);
+        flowThread->addFragmentsVisualOverflowFromTheme(this);
 }
 
-LayoutUnit RenderBlock::computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderRegion* region)
+LayoutUnit RenderBlock::computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderFragmentContainer* fragment)
 {
-    LayoutUnit startPosition = startOffsetForContent(region);
+    LayoutUnit startPosition = startOffsetForContent(fragment);
 
     // Add in our start margin.
     LayoutUnit oldPosition = startPosition + childMarginStart;
     LayoutUnit newPosition = oldPosition;
 
     LayoutUnit blockOffset = logicalTopForChild(child);
-    if (region)
-        blockOffset = std::max(blockOffset, blockOffset + (region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage()));
+    if (fragment)
+        blockOffset = std::max(blockOffset, blockOffset + (fragment->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage()));
 
-    LayoutUnit startOff = startOffsetForLineInRegion(blockOffset, DoNotIndentText, region, logicalHeightForChild(child));
+    LayoutUnit startOff = startOffsetForLineInFragment(blockOffset, DoNotIndentText, fragment, logicalHeightForChild(child));
 
     if (style().textAlign() != WEBKIT_CENTER && !child.style().marginStartUsing(&style()).isAuto()) {
         if (childMarginStart < 0)
@@ -1355,7 +1355,7 @@ bool RenderBlock::simplifiedLayout()
         simplifiedNormalFlowLayout();
 
     // Make sure a forced break is applied after the content if we are a flow thread in a simplified layout.
-    // This ensures the size information is correctly computed for the last auto-height region receiving content.
+    // This ensures the size information is correctly computed for the last auto-height fragment receiving content.
     if (is<RenderFlowThread>(*this))
         downcast<RenderFlowThread>(*this).applyBreakAfterContent(clientLogicalBottom());
 
@@ -1406,7 +1406,7 @@ void RenderBlock::markFixedPositionObjectForLayoutIfNeeded(RenderBox& positioned
 
     if (hasStaticInlinePosition) {
         LogicalExtentComputedValues computedValues;
-        positionedChild.computeLogicalWidthInRegion(computedValues);
+        positionedChild.computeLogicalWidthInFragment(computedValues);
         LayoutUnit newLeft = computedValues.m_position;
         if (newLeft != positionedChild.logicalLeft())
             positionedChild.setChildNeedsLayout(MarkOnlyThis);
@@ -1435,7 +1435,7 @@ LayoutUnit RenderBlock::marginIntrinsicLogicalWidthForChild(RenderBox& child) co
 
 void RenderBlock::layoutPositionedObject(RenderBox& r, bool relayoutChildren, bool fixedPositionObjectsOnly)
 {
-    estimateRegionRangeForBoxChild(r);
+    estimateFragmentRangeForBoxChild(r);
 
     // A fixed position element with an absolute positioned ancestor has no way of knowing if the latter has changed position. So
     // if this is a fixed position element, mark it for layout if it has an abspos ancestor and needs to move with that ancestor, i.e. 
@@ -1494,7 +1494,7 @@ void RenderBlock::layoutPositionedObject(RenderBox& r, bool relayoutChildren, bo
         r.layoutIfNeeded();
     }
 
-    if (updateRegionRangeForBoxChild(r)) {
+    if (updateFragmentRangeForBoxChild(r)) {
         r.setNeedsLayout(MarkOnlyThis);
         r.layoutIfNeeded();
     }
@@ -1974,7 +1974,7 @@ GapRects RenderBlock::selectionGaps(RenderBlock& rootBlock, const LayoutPoint& r
         clipOutFloatingObjects(rootBlock, paintInfo, rootBlockPhysicalPosition, offsetFromRootBlock);
     }
 
-    // FIXME: overflow: auto/scroll regions need more math here, since painting in the border box is different from painting in the padding box (one is scrolled, the other is
+    // FIXME: overflow: auto/scroll fragments need more math here, since painting in the border box is different from painting in the padding box (one is scrolled, the other is
     // fixed).
     GapRects result;
     if (!isRenderBlockFlow()) // FIXME: Make multi-column selection gap filling work someday.
@@ -2307,26 +2307,26 @@ LayoutUnit RenderBlock::textIndentOffset() const
     return minimumValueForLength(style().textIndent(), cw);
 }
 
-LayoutUnit RenderBlock::logicalLeftOffsetForContent(RenderRegion* region) const
+LayoutUnit RenderBlock::logicalLeftOffsetForContent(RenderFragmentContainer* fragment) const
 {
     LayoutUnit logicalLeftOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
     if (shouldPlaceBlockDirectionScrollbarOnLeft())
         logicalLeftOffset += verticalScrollbarWidth();
-    if (!region)
+    if (!fragment)
         return logicalLeftOffset;
-    LayoutRect boxRect = borderBoxRectInRegion(region);
+    LayoutRect boxRect = borderBoxRectInFragment(fragment);
     return logicalLeftOffset + (isHorizontalWritingMode() ? boxRect.x() : boxRect.y());
 }
 
-LayoutUnit RenderBlock::logicalRightOffsetForContent(RenderRegion* region) const
+LayoutUnit RenderBlock::logicalRightOffsetForContent(RenderFragmentContainer* fragment) const
 {
     LayoutUnit logicalRightOffset = style().isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop();
     if (shouldPlaceBlockDirectionScrollbarOnLeft())
         logicalRightOffset += verticalScrollbarWidth();
     logicalRightOffset += availableLogicalWidth();
-    if (!region)
+    if (!fragment)
         return logicalRightOffset;
-    LayoutRect boxRect = borderBoxRectInRegion(region);
+    LayoutRect boxRect = borderBoxRectInFragment(fragment);
     return logicalRightOffset - (logicalWidth() - (isHorizontalWritingMode() ? boxRect.maxX() : boxRect.maxY()));
 }
 
@@ -2361,7 +2361,7 @@ LayoutUnit RenderBlock::adjustLogicalLeftOffsetForLine(LayoutUnit offsetFromFloa
     // FIXME: Should be patched when subpixel layout lands, since this calculation doesn't have to pixel snap
     // any more (https://bugs.webkit.org/show_bug.cgi?id=79946).
     // FIXME: This is wrong for RTL (https://bugs.webkit.org/show_bug.cgi?id=79945).
-    // FIXME: This doesn't work with columns or regions (https://bugs.webkit.org/show_bug.cgi?id=79942).
+    // FIXME: This doesn't work with columns or fragments (https://bugs.webkit.org/show_bug.cgi?id=79942).
     // FIXME: This doesn't work when the inline position of the object isn't set ahead of time.
     // FIXME: Dynamic changes to the font or to the inline position need to result in a deep relayout.
     // (https://bugs.webkit.org/show_bug.cgi?id=79944)
@@ -2401,7 +2401,7 @@ LayoutUnit RenderBlock::adjustLogicalRightOffsetForLine(LayoutUnit offsetFromFlo
     // FIXME: Should be patched when subpixel layout lands, since this calculation doesn't have to pixel snap
     // any more (https://bugs.webkit.org/show_bug.cgi?id=79946).
     // FIXME: This is wrong for RTL (https://bugs.webkit.org/show_bug.cgi?id=79945).
-    // FIXME: This doesn't work with columns or regions (https://bugs.webkit.org/show_bug.cgi?id=79942).
+    // FIXME: This doesn't work with columns or fragments (https://bugs.webkit.org/show_bug.cgi?id=79942).
     // FIXME: This doesn't work when the inline position of the object isn't set ahead of time.
     // FIXME: Dynamic changes to the font or to the inline position need to result in a deep relayout.
     // (https://bugs.webkit.org/show_bug.cgi?id=79944)
@@ -2594,7 +2594,7 @@ VisiblePosition positionForPointRespectingEditingBoundaries(RenderBlock& parent,
     return ancestor->createVisiblePosition(childElement->computeNodeIndex() + 1, UPSTREAM);
 }
 
-VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint&, const RenderRegion*)
+VisiblePosition RenderBlock::positionForPointWithInlineChildren(const LayoutPoint&, const RenderFragmentContainer*)
 {
     ASSERT_NOT_REACHED();
     return VisiblePosition();
@@ -2605,21 +2605,21 @@ static inline bool isChildHitTestCandidate(const RenderBox& box)
     return box.height() && box.style().visibility() == VISIBLE && !box.isOutOfFlowPositioned() && !box.isInFlowRenderFlowThread();
 }
 
-// Valid candidates in a FlowThread must be rendered by the region.
-static inline bool isChildHitTestCandidate(const RenderBox& box, const RenderRegion* region, const LayoutPoint& point)
+// Valid candidates in a FlowThread must be rendered by the fragment.
+static inline bool isChildHitTestCandidate(const RenderBox& box, const RenderFragmentContainer* fragment, const LayoutPoint& point)
 {
     if (!isChildHitTestCandidate(box))
         return false;
-    if (!region)
+    if (!fragment)
         return true;
     const RenderBlock& block = is<RenderBlock>(box) ? downcast<RenderBlock>(box) : *box.containingBlock();
-    return block.regionAtBlockOffset(point.y()) == region;
+    return block.fragmentAtBlockOffset(point.y()) == fragment;
 }
 
-VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point, const RenderRegion* region)
+VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point, const RenderFragmentContainer* fragment)
 {
     if (isTable())
-        return RenderBox::positionForPoint(point, region);
+        return RenderBox::positionForPoint(point, fragment);
 
     if (isReplaced()) {
         // FIXME: This seems wrong when the object's writing-mode doesn't match the line's writing-mode.
@@ -2639,14 +2639,14 @@ VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point, const Re
         pointInLogicalContents = pointInLogicalContents.transposedPoint();
 
     if (childrenInline())
-        return positionForPointWithInlineChildren(pointInLogicalContents, region);
+        return positionForPointWithInlineChildren(pointInLogicalContents, fragment);
 
     RenderBox* lastCandidateBox = lastChildBox();
 
-    if (!region)
-        region = regionAtBlockOffset(pointInLogicalContents.y());
+    if (!fragment)
+        fragment = fragmentAtBlockOffset(pointInLogicalContents.y());
 
-    while (lastCandidateBox && !isChildHitTestCandidate(*lastCandidateBox, region, pointInLogicalContents))
+    while (lastCandidateBox && !isChildHitTestCandidate(*lastCandidateBox, fragment, pointInLogicalContents))
         lastCandidateBox = lastCandidateBox->previousSiblingBox();
 
     bool blocksAreFlipped = style().isFlippedBlocksWritingMode();
@@ -2656,20 +2656,20 @@ VisiblePosition RenderBlock::positionForPoint(const LayoutPoint& point, const Re
             return positionForPointRespectingEditingBoundaries(*this, *lastCandidateBox, pointInContents);
 
         for (auto* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
-            if (!isChildHitTestCandidate(*childBox, region, pointInLogicalContents))
+            if (!isChildHitTestCandidate(*childBox, fragment, pointInLogicalContents))
                 continue;
             LayoutUnit childLogicalBottom = logicalTopForChild(*childBox) + logicalHeightForChild(*childBox);
             if (is<RenderBlockFlow>(childBox))
                 childLogicalBottom += downcast<RenderBlockFlow>(childBox)->lowestFloatLogicalBottom();
             // We hit child if our click is above the bottom of its padding box (like IE6/7 and FF3).
-            if (isChildHitTestCandidate(*childBox, region, pointInLogicalContents) && (pointInLogicalContents.y() < childLogicalBottom
+            if (isChildHitTestCandidate(*childBox, fragment, pointInLogicalContents) && (pointInLogicalContents.y() < childLogicalBottom
                 || (blocksAreFlipped && pointInLogicalContents.y() == childLogicalBottom)))
                 return positionForPointRespectingEditingBoundaries(*this, *childBox, pointInContents);
         }
     }
 
     // We only get here if there are no hit test candidate children below the click.
-    return RenderBox::positionForPoint(point, region);
+    return RenderBox::positionForPoint(point, fragment);
 }
 
 void RenderBlock::offsetForContents(LayoutPoint& offset) const
@@ -3361,7 +3361,7 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
 
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread)
-        return flowThread->offsetFromLogicalTopOfFirstRegion(this);
+        return flowThread->offsetFromLogicalTopOfFirstFragment(this);
 
     if (layoutState) {
         ASSERT(layoutState->m_renderer == this);
@@ -3374,27 +3374,27 @@ LayoutUnit RenderBlock::offsetFromLogicalTopOfFirstPage() const
     return 0;
 }
 
-RenderRegion* RenderBlock::regionAtBlockOffset(LayoutUnit blockOffset) const
+RenderFragmentContainer* RenderBlock::fragmentAtBlockOffset(LayoutUnit blockOffset) const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (!flowThread || !flowThread->hasValidRegionInfo())
+    if (!flowThread || !flowThread->hasValidFragmentInfo())
         return 0;
 
-    return flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstPage() + blockOffset, true);
+    return flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstPage() + blockOffset, true);
 }
 
-static bool canComputeRegionRangeForBox(const RenderBlock& parentBlock, const RenderBox& childBox, const RenderFlowThread* flowThreadContainingBlock)
+static bool canComputeFragmentRangeForBox(const RenderBlock& parentBlock, const RenderBox& childBox, const RenderFlowThread* flowThreadContainingBlock)
 {
     if (!flowThreadContainingBlock)
         return false;
 
-    if (!flowThreadContainingBlock->hasRegions())
+    if (!flowThreadContainingBlock->hasFragments())
         return false;
 
-    if (!childBox.canHaveOutsideRegionRange())
+    if (!childBox.canHaveOutsideFragmentRange())
         return false;
 
-    return flowThreadContainingBlock->hasCachedRegionRangeForBox(parentBlock);
+    return flowThreadContainingBlock->hasCachedFragmentRangeForBox(parentBlock);
 }
 
 bool RenderBlock::childBoxIsUnsplittableForFragmentation(const RenderBox& child) const
@@ -3407,67 +3407,67 @@ bool RenderBlock::childBoxIsUnsplittableForFragmentation(const RenderBox& child)
         || (checkPageBreaks && child.style().breakInside() == AvoidPageBreakInside);
 }
 
-void RenderBlock::computeRegionRangeForBoxChild(const RenderBox& box) const
+void RenderBlock::computeFragmentRangeForBoxChild(const RenderBox& box) const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    ASSERT(canComputeRegionRangeForBox(*this, box, flowThread));
+    ASSERT(canComputeFragmentRangeForBox(*this, box, flowThread));
 
-    RenderRegion* startRegion;
-    RenderRegion* endRegion;
-    LayoutUnit offsetFromLogicalTopOfFirstRegion = box.offsetFromLogicalTopOfFirstPage();
+    RenderFragmentContainer* startFragment;
+    RenderFragmentContainer* endFragment;
+    LayoutUnit offsetFromLogicalTopOfFirstFragment = box.offsetFromLogicalTopOfFirstPage();
     if (childBoxIsUnsplittableForFragmentation(box))
-        startRegion = endRegion = flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstRegion, true);
+        startFragment = endFragment = flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstFragment, true);
     else {
-        startRegion = flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstRegion, true);
-        endRegion = flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstRegion + logicalHeightForChild(box), true);
+        startFragment = flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstFragment, true);
+        endFragment = flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstFragment + logicalHeightForChild(box), true);
     }
 
-    flowThread->setRegionRangeForBox(box, startRegion, endRegion);
+    flowThread->setFragmentRangeForBox(box, startFragment, endFragment);
 }
 
-void RenderBlock::estimateRegionRangeForBoxChild(const RenderBox& box) const
+void RenderBlock::estimateFragmentRangeForBoxChild(const RenderBox& box) const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (!canComputeRegionRangeForBox(*this, box, flowThread))
+    if (!canComputeFragmentRangeForBox(*this, box, flowThread))
         return;
 
     if (childBoxIsUnsplittableForFragmentation(box)) {
-        computeRegionRangeForBoxChild(box);
+        computeFragmentRangeForBoxChild(box);
         return;
     }
 
     auto estimatedValues = box.computeLogicalHeight(RenderFlowThread::maxLogicalHeight(), logicalTopForChild(box));
-    LayoutUnit offsetFromLogicalTopOfFirstRegion = box.offsetFromLogicalTopOfFirstPage();
-    RenderRegion* startRegion = flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstRegion, true);
-    RenderRegion* endRegion = flowThread->regionAtBlockOffset(this, offsetFromLogicalTopOfFirstRegion + estimatedValues.m_extent, true);
+    LayoutUnit offsetFromLogicalTopOfFirstFragment = box.offsetFromLogicalTopOfFirstPage();
+    RenderFragmentContainer* startFragment = flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstFragment, true);
+    RenderFragmentContainer* endFragment = flowThread->fragmentAtBlockOffset(this, offsetFromLogicalTopOfFirstFragment + estimatedValues.m_extent, true);
 
-    flowThread->setRegionRangeForBox(box, startRegion, endRegion);
+    flowThread->setFragmentRangeForBox(box, startFragment, endFragment);
 }
 
-bool RenderBlock::updateRegionRangeForBoxChild(const RenderBox& box) const
+bool RenderBlock::updateFragmentRangeForBoxChild(const RenderBox& box) const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (!canComputeRegionRangeForBox(*this, box, flowThread))
+    if (!canComputeFragmentRangeForBox(*this, box, flowThread))
         return false;
 
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    flowThread->getRegionRangeForBox(&box, startRegion, endRegion);
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    flowThread->getFragmentRangeForBox(&box, startFragment, endFragment);
 
-    computeRegionRangeForBoxChild(box);
+    computeFragmentRangeForBoxChild(box);
 
-    RenderRegion* newStartRegion = nullptr;
-    RenderRegion* newEndRegion = nullptr;
-    flowThread->getRegionRangeForBox(&box, newStartRegion, newEndRegion);
+    RenderFragmentContainer* newStartFragment = nullptr;
+    RenderFragmentContainer* newEndFragment = nullptr;
+    flowThread->getFragmentRangeForBox(&box, newStartFragment, newEndFragment);
 
 
-    // Changing the start region means we shift everything and a relayout is needed.
-    if (newStartRegion != startRegion)
+    // Changing the start fragment means we shift everything and a relayout is needed.
+    if (newStartFragment != startFragment)
         return true;
 
-    // The region range of the box has changed. Some boxes (e.g floats) may have been positioned assuming
+    // The fragment range of the box has changed. Some boxes (e.g floats) may have been positioned assuming
     // a different range.
-    if (box.needsLayoutAfterRegionRangeChange() && newEndRegion != endRegion)
+    if (box.needsLayoutAfterFragmentRangeChange() && newEndFragment != endFragment)
         return true;
 
     return false;
index dee53d3..5b823a0 100644 (file)
@@ -122,35 +122,35 @@ public:
     // FIXME-BLOCKFLOW: Remove virtualizaion when all of the line layout code has been moved out of RenderBlock
     virtual bool containsFloats() const { return false; }
 
-    // Versions that can compute line offsets with the region and page offset passed in. Used for speed to avoid having to
-    // compute the region all over again when you already know it.
-    LayoutUnit availableLogicalWidthForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
+    // Versions that can compute line offsets with the fragment and page offset passed in. Used for speed to avoid having to
+    // compute the fragment all over again when you already know it.
+    LayoutUnit availableLogicalWidthForLineInFragment(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderFragmentContainer* fragment, LayoutUnit logicalHeight = 0) const
     {
-        return std::max<LayoutUnit>(0, logicalRightOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight)
-            - logicalLeftOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight));
+        return std::max<LayoutUnit>(0, logicalRightOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight)
+            - logicalLeftOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight));
     }
-    LayoutUnit logicalRightOffsetForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
+    LayoutUnit logicalRightOffsetForLineInFragment(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderFragmentContainer* fragment, LayoutUnit logicalHeight = 0) const
     {
-        return logicalRightOffsetForLine(position, logicalRightOffsetForContent(region), shouldIndentText, logicalHeight);
+        return logicalRightOffsetForLine(position, logicalRightOffsetForContent(fragment), shouldIndentText, logicalHeight);
     }
-    LayoutUnit logicalLeftOffsetForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
+    LayoutUnit logicalLeftOffsetForLineInFragment(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderFragmentContainer* fragment, LayoutUnit logicalHeight = 0) const
     {
-        return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(region), shouldIndentText, logicalHeight);
+        return logicalLeftOffsetForLine(position, logicalLeftOffsetForContent(fragment), shouldIndentText, logicalHeight);
     }
-    LayoutUnit startOffsetForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
+    LayoutUnit startOffsetForLineInFragment(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderFragmentContainer* fragment, LayoutUnit logicalHeight = 0) const
     {
-        return style().isLeftToRightDirection() ? logicalLeftOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight)
-            : logicalWidth() - logicalRightOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight);
+        return style().isLeftToRightDirection() ? logicalLeftOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight)
+            : logicalWidth() - logicalRightOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight);
     }
-    LayoutUnit endOffsetForLineInRegion(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderRegion* region, LayoutUnit logicalHeight = 0) const
+    LayoutUnit endOffsetForLineInFragment(LayoutUnit position, IndentTextOrNot shouldIndentText, RenderFragmentContainer* fragment, LayoutUnit logicalHeight = 0) const
     {
-        return !style().isLeftToRightDirection() ? logicalLeftOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight)
-            : logicalWidth() - logicalRightOffsetForLineInRegion(position, shouldIndentText, region, logicalHeight);
+        return !style().isLeftToRightDirection() ? logicalLeftOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight)
+            : logicalWidth() - logicalRightOffsetForLineInFragment(position, shouldIndentText, fragment, logicalHeight);
     }
 
     LayoutUnit availableLogicalWidthForLine(LayoutUnit position, IndentTextOrNot shouldIndentText, LayoutUnit logicalHeight = 0) const
     {
-        return availableLogicalWidthForLineInRegion(position, shouldIndentText, regionAtBlockOffset(position), logicalHeight);
+        return availableLogicalWidthForLineInFragment(position, shouldIndentText, fragmentAtBlockOffset(position), logicalHeight);
     }
     LayoutUnit logicalRightOffsetForLine(LayoutUnit position, IndentTextOrNot shouldIndentText, LayoutUnit logicalHeight = 0) const
     {
@@ -173,7 +173,7 @@ public:
 
     LayoutUnit textIndentOffset() const;
 
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
 
     GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintContainer);
     LayoutRect logicalLeftSelectionGap(RenderBlock& rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
@@ -267,39 +267,39 @@ public:
 
     virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*verticalScrollbarChanged*/) { }
 
-    LayoutUnit logicalLeftOffsetForContent(RenderRegion*) const;
-    LayoutUnit logicalRightOffsetForContent(RenderRegion*) const;
-    LayoutUnit availableLogicalWidthForContent(RenderRegion* region) const
+    LayoutUnit logicalLeftOffsetForContent(RenderFragmentContainer*) const;
+    LayoutUnit logicalRightOffsetForContent(RenderFragmentContainer*) const;
+    LayoutUnit availableLogicalWidthForContent(RenderFragmentContainer* fragment) const
     { 
-        return std::max<LayoutUnit>(0, logicalRightOffsetForContent(region) - logicalLeftOffsetForContent(region));
+        return std::max<LayoutUnit>(0, logicalRightOffsetForContent(fragment) - logicalLeftOffsetForContent(fragment));
     }
-    LayoutUnit startOffsetForContent(RenderRegion* region) const
+    LayoutUnit startOffsetForContent(RenderFragmentContainer* fragment) const
     {
-        return style().isLeftToRightDirection() ? logicalLeftOffsetForContent(region) : logicalWidth() - logicalRightOffsetForContent(region);
+        return style().isLeftToRightDirection() ? logicalLeftOffsetForContent(fragment) : logicalWidth() - logicalRightOffsetForContent(fragment);
     }
-    LayoutUnit endOffsetForContent(RenderRegion* region) const
+    LayoutUnit endOffsetForContent(RenderFragmentContainer* fragment) const
     {
-        return !style().isLeftToRightDirection() ? logicalLeftOffsetForContent(region) : logicalWidth() - logicalRightOffsetForContent(region);
+        return !style().isLeftToRightDirection() ? logicalLeftOffsetForContent(fragment) : logicalWidth() - logicalRightOffsetForContent(fragment);
     }
     LayoutUnit logicalLeftOffsetForContent(LayoutUnit blockOffset) const
     {
-        return logicalLeftOffsetForContent(regionAtBlockOffset(blockOffset));
+        return logicalLeftOffsetForContent(fragmentAtBlockOffset(blockOffset));
     }
     LayoutUnit logicalRightOffsetForContent(LayoutUnit blockOffset) const
     {
-        return logicalRightOffsetForContent(regionAtBlockOffset(blockOffset));
+        return logicalRightOffsetForContent(fragmentAtBlockOffset(blockOffset));
     }
     LayoutUnit availableLogicalWidthForContent(LayoutUnit blockOffset) const
     {
-        return availableLogicalWidthForContent(regionAtBlockOffset(blockOffset));
+        return availableLogicalWidthForContent(fragmentAtBlockOffset(blockOffset));
     }
     LayoutUnit startOffsetForContent(LayoutUnit blockOffset) const
     {
-        return startOffsetForContent(regionAtBlockOffset(blockOffset));
+        return startOffsetForContent(fragmentAtBlockOffset(blockOffset));
     }
     LayoutUnit endOffsetForContent(LayoutUnit blockOffset) const
     {
-        return endOffsetForContent(regionAtBlockOffset(blockOffset));
+        return endOffsetForContent(fragmentAtBlockOffset(blockOffset));
     }
     LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
     LayoutUnit logicalRightOffsetForContent() const { return logicalLeftOffsetForContent() + availableLogicalWidth(); }
@@ -309,7 +309,7 @@ public:
     LayoutUnit logicalLeftSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
     LayoutUnit logicalRightSelectionOffset(RenderBlock& rootBlock, LayoutUnit position, const LogicalSelectionOffsetCaches&);
 
-    LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderRegion* = 0);
+    LayoutUnit computeStartPositionDeltaForChildAvoidingFloats(const RenderBox& child, LayoutUnit childMarginStart, RenderFragmentContainer* = 0);
 
 #ifndef NDEBUG
     void checkPositionedObjectsNeedLayout();
@@ -414,10 +414,10 @@ protected:
     void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) override;
     virtual void addFocusRingRectsForInlineChildren(Vector<LayoutRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer);
 
-    void computeRegionRangeForBoxChild(const RenderBox&) const;
+    void computeFragmentRangeForBoxChild(const RenderBox&) const;
 
-    void estimateRegionRangeForBoxChild(const RenderBox&) const;
-    bool updateRegionRangeForBoxChild(const RenderBox&) const;
+    void estimateFragmentRangeForBoxChild(const RenderBox&) const;
+    bool updateFragmentRangeForBoxChild(const RenderBox&) const;
 
     void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox&);
 
@@ -506,7 +506,7 @@ private:
     LayoutRect localCaretRect(InlineBox*, unsigned caretOffset, LayoutUnit* extraWidthToEndOfLine = 0) final;
     
     // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBlockFlow
-    virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint&, const RenderRegion*);
+    virtual VisiblePosition positionForPointWithInlineChildren(const LayoutPoint&, const RenderFragmentContainer*);
 
     RenderPtr<RenderBlock> clone() const;
     RenderBlock* continuationBefore(RenderObject* beforeChild);
@@ -526,7 +526,7 @@ protected:
     
 public:
     LayoutUnit offsetFromLogicalTopOfFirstPage() const override;
-    RenderRegion* regionAtBlockOffset(LayoutUnit) const;
+    RenderFragmentContainer* fragmentAtBlockOffset(LayoutUnit) const;
 
     // FIXME: This is temporary to allow us to move code from RenderBlock into RenderBlockFlow that accesses member variables that we haven't moved out of
     // RenderBlock yet.
index c5c6d6c..c21be25 100644 (file)
@@ -536,7 +536,7 @@ void RenderBlockFlow::layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalH
     LayoutUnit oldClientAfterEdge = clientLogicalBottom();
 
     // Before updating the final size of the flow thread make sure a forced break is applied after the content.
-    // This ensures the size information is correctly computed for the last auto-height region receiving content.
+    // This ensures the size information is correctly computed for the last auto-height fragment receiving content.
     if (is<RenderFlowThread>(*this))
         downcast<RenderFlowThread>(*this).applyBreakAfterContent(oldClientAfterEdge);
 
@@ -709,7 +709,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
 #endif
     // Position the child as though it didn't collapse with the top.
     setLogicalTopForChild(child, logicalTopEstimate, ApplyLayoutDelta);
-    estimateRegionRangeForBoxChild(child);
+    estimateFragmentRangeForBoxChild(child);
 
     RenderBlockFlow* childBlockFlow = is<RenderBlockFlow>(child) ? &downcast<RenderBlockFlow>(child) : nullptr;
     bool markDescendantsWithFloats = false;
@@ -776,7 +776,7 @@ void RenderBlockFlow::layoutBlockChild(RenderBox& child, MarginInfo& marginInfo,
         }
     }
 
-    if (updateRegionRangeForBoxChild(child))
+    if (updateFragmentRangeForBoxChild(child))
         child.setNeedsLayout(MarkOnlyThis);
 
     // In case our guess was wrong, relayout the child.
@@ -913,7 +913,7 @@ void RenderBlockFlow::updateStaticInlinePositionForChild(RenderBox& child, Layou
 void RenderBlockFlow::setStaticInlinePositionForChild(RenderBox& child, LayoutUnit blockOffset, LayoutUnit inlinePosition)
 {
     if (flowThreadContainingBlock()) {
-        // Shift the inline position to exclude the region offset.
+        // Shift the inline position to exclude the fragment offset.
         inlinePosition += startOffsetForContent() - startOffsetForContent(blockOffset);
     }
     child.layer()->setStaticInlinePosition(inlinePosition);
@@ -1511,17 +1511,17 @@ LayoutUnit RenderBlockFlow::applyBeforeBreak(RenderBox& child, LayoutUnit logica
     bool isInsideMulticolFlowThread = flowThread;
     bool checkColumnBreaks = flowThread && flowThread->shouldCheckColumnBreaks();
     bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
-    bool checkRegionBreaks = false;
+    bool checkFragmentBreaks = false;
     bool checkBeforeAlways = (checkColumnBreaks && child.style().breakBefore() == ColumnBreakBetween)
         || (checkPageBreaks && alwaysPageBreak(child.style().breakBefore()));
     if (checkBeforeAlways && inNormalFlow(child) && hasNextPage(logicalOffset, IncludePageBoundary)) {
         if (checkColumnBreaks) {
             if (isInsideMulticolFlowThread)
-                checkRegionBreaks = true;
+                checkFragmentBreaks = true;
         }
-        if (checkRegionBreaks) {
+        if (checkFragmentBreaks) {
             LayoutUnit offsetBreakAdjustment = 0;
-            if (flowThread->addForcedRegionBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset, &child, true, &offsetBreakAdjustment))
+            if (flowThread->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset, &child, true, &offsetBreakAdjustment))
                 return logicalOffset + offsetBreakAdjustment;
         }
         return nextPageLogicalTop(logicalOffset, IncludePageBoundary);
@@ -1536,7 +1536,7 @@ LayoutUnit RenderBlockFlow::applyAfterBreak(RenderBox& child, LayoutUnit logical
     bool isInsideMulticolFlowThread = flowThread;
     bool checkColumnBreaks = flowThread && flowThread->shouldCheckColumnBreaks();
     bool checkPageBreaks = !checkColumnBreaks && view().layoutState()->m_pageLogicalHeight; // FIXME: Once columns can print we have to check this.
-    bool checkRegionBreaks = false;
+    bool checkFragmentBreaks = false;
     bool checkAfterAlways = (checkColumnBreaks && child.style().breakAfter() == ColumnBreakBetween)
         || (checkPageBreaks && alwaysPageBreak(child.style().breakAfter()));
     if (checkAfterAlways && inNormalFlow(child) && hasNextPage(logicalOffset, IncludePageBoundary)) {
@@ -1547,11 +1547,11 @@ LayoutUnit RenderBlockFlow::applyAfterBreak(RenderBox& child, LayoutUnit logical
 
         if (checkColumnBreaks) {
             if (isInsideMulticolFlowThread)
-                checkRegionBreaks = true;
+                checkFragmentBreaks = true;
         }
-        if (checkRegionBreaks) {
+        if (checkFragmentBreaks) {
             LayoutUnit offsetBreakAdjustment = 0;
-            if (flowThread->addForcedRegionBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, &child, false, &offsetBreakAdjustment))
+            if (flowThread->addForcedFragmentBreak(this, offsetFromLogicalTopOfFirstPage() + logicalOffset + marginOffset, &child, false, &offsetBreakAdjustment))
                 return logicalOffset + marginOffset + offsetBreakAdjustment;
         }
         return nextPageLogicalTop(logicalOffset, IncludePageBoundary);
@@ -1676,7 +1676,7 @@ static void clearShouldBreakAtLineToAvoidWidowIfNeeded(RenderBlockFlow& blockFlo
     blockFlow.setDidBreakAtLineToAvoidWidow();
 }
 
-void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta, bool& overflowsRegion, RenderFlowThread* flowThread)
+void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, LayoutUnit& delta, bool& overflowsFragment, RenderFlowThread* flowThread)
 {
     // FIXME: For now we paginate using line overflow. This ensures that lines don't overlap at all when we
     // put a strut between them for pagination purposes. However, this really isn't the desired rendering, since
@@ -1697,7 +1697,7 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
     // FIXME: Another problem with simply moving lines is that the available line width may change (because of floats).
     // Technically if the location we move the line to has a different line width than our old position, then we need to dirty the
     // line and all following lines.
-    overflowsRegion = false;
+    overflowsFragment = false;
     LayoutRect logicalVisualOverflow = lineBox->logicalVisualOverflowRect(lineBox->lineTop(), lineBox->lineBottom());
     LayoutUnit logicalOffset = std::min(lineBox->lineTopWithLeading(), logicalVisualOverflow.y());
     LayoutUnit logicalBottom = std::max(lineBox->lineBottomWithLeading(), logicalVisualOverflow.maxY());
@@ -1707,7 +1707,7 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
     lineBox->setPaginationStrut(0);
     lineBox->setIsFirstAfterPageBreak(false);
     LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
-    bool hasUniformPageLogicalHeight = !flowThread || flowThread->regionsHaveUniformLogicalHeight();
+    bool hasUniformPageLogicalHeight = !flowThread || flowThread->fragmentsHaveUniformLogicalHeight();
     // If lineHeight is greater than pageLogicalHeight, but logicalVisualOverflow.height() still fits, we are
     // still going to add a strut, so that the visible overflow fits on a single page.
     if (!pageLogicalHeight || !hasNextPage(logicalOffset)) {
@@ -1736,7 +1736,7 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
     }
     
     LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary);
-    overflowsRegion = (lineHeight > remainingLogicalHeight);
+    overflowsFragment = (lineHeight > remainingLogicalHeight);
 
     int lineIndex = lineCount(lineBox);
     if (remainingLogicalHeight < lineHeight || (shouldBreakAtLineToAvoidWidow() && lineBreakToAvoidWidow() == lineIndex)) {
@@ -1750,7 +1750,7 @@ void RenderBlockFlow::adjustLinePositionForPagination(RootInlineBox* lineBox, La
             remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox->lineTopWithLeading()));
         }
         LayoutUnit remainingLogicalHeightAtNewOffset = pageRemainingLogicalHeightForOffset(logicalOffset + remainingLogicalHeight, ExcludePageBoundary);
-        overflowsRegion = (lineHeight > remainingLogicalHeightAtNewOffset);
+        overflowsFragment = (lineHeight > remainingLogicalHeightAtNewOffset);
         LayoutUnit totalLogicalHeight = lineHeight + std::max<LayoutUnit>(0, logicalOffset);
         LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
         setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
@@ -1828,20 +1828,19 @@ bool RenderBlockFlow::hasNextPage(LayoutUnit logicalOffset, PageBoundaryRule pag
     if (!flowThread)
         return true; // Printing and multi-column both make new pages to accommodate content.
 
-    // See if we're in the last region.
+    // See if we're in the last fragment.
     LayoutUnit pageOffset = offsetFromLogicalTopOfFirstPage() + logicalOffset;
-    RenderRegion* region = flowThread->regionAtBlockOffset(this, pageOffset, true);
-    if (!region)
+    RenderFragmentContainer* fragment = flowThread->fragmentAtBlockOffset(this, pageOffset, true);
+    if (!fragment)
         return false;
 
-    if (region->isLastRegion())
-        return region->isRenderRegionSet()
-            || (pageBoundaryRule == IncludePageBoundary && pageOffset == region->logicalTopForFlowThreadContent());
+    if (fragment->isLastFragment())
+        return fragment->isRenderFragmentContainerSet() || (pageBoundaryRule == IncludePageBoundary && pageOffset == fragment->logicalTopForFlowThreadContent());
 
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    flowThread->getRegionRangeForBox(this, startRegion, endRegion);
-    return (endRegion && region != endRegion);
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    flowThread->getFragmentRangeForBox(this, startFragment, endFragment);
+    return (endFragment && fragment != endFragment);
 }
 
 LayoutUnit RenderBlockFlow::adjustForUnsplittableChild(RenderBox& child, LayoutUnit logicalOffset, LayoutUnit childBeforeMargin, LayoutUnit childAfterMargin)
@@ -1856,7 +1855,7 @@ LayoutUnit RenderBlockFlow::adjustForUnsplittableChild(RenderBox& child, LayoutU
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     LayoutUnit childLogicalHeight = logicalHeightForChild(child) + childBeforeMargin + childAfterMargin;
     LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
-    bool hasUniformPageLogicalHeight = !flowThread || flowThread->regionsHaveUniformLogicalHeight();
+    bool hasUniformPageLogicalHeight = !flowThread || flowThread->fragmentsHaveUniformLogicalHeight();
     if (isUnsplittable)
         updateMinimumPageHeight(logicalOffset, childLogicalHeight);
     if (!pageLogicalHeight || (hasUniformPageLogicalHeight && childLogicalHeight > pageLogicalHeight)
@@ -1880,7 +1879,7 @@ LayoutUnit RenderBlockFlow::adjustForUnsplittableChild(RenderBox& child, LayoutU
 
 bool RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight(LayoutUnit& adjustment, LayoutUnit logicalOffset, LayoutUnit minimumLogicalHeight) const
 {
-    bool checkRegion = false;
+    bool checkFragment = false;
     for (LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset + adjustment); pageLogicalHeight;
         pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset + adjustment)) {
         if (minimumLogicalHeight <= pageLogicalHeight)
@@ -1888,9 +1887,9 @@ bool RenderBlockFlow::pushToNextPageWithMinimumLogicalHeight(LayoutUnit& adjustm
         if (!hasNextPage(logicalOffset + adjustment))
             return false;
         adjustment += pageLogicalHeight;
-        checkRegion = true;
+        checkFragment = true;
     }
-    return !checkRegion;
+    return !checkFragment;
 }
 
 void RenderBlockFlow::setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage)
@@ -2511,7 +2510,7 @@ bool RenderBlockFlow::positionNewFloats()
         computeLogicalLocationForFloat(floatingObject, logicalTop);
         LayoutUnit childLogicalTop = logicalTopForChild(childBox);
 
-        estimateRegionRangeForBoxChild(childBox);
+        estimateFragmentRangeForBoxChild(childBox);
 
         childBox.markForPaginationRelayoutIfNeeded();
         childBox.layoutIfNeeded();
@@ -2541,7 +2540,7 @@ bool RenderBlockFlow::positionNewFloats()
                 logicalTop = newLogicalTop;
             }
 
-            if (updateRegionRangeForBoxChild(childBox)) {
+            if (updateFragmentRangeForBoxChild(childBox)) {
                 childBox.setNeedsLayout(MarkOnlyThis);
                 childBox.layoutIfNeeded();
             }
@@ -2851,8 +2850,8 @@ LayoutUnit RenderBlockFlow::getClearDelta(RenderBox& child, LayoutUnit logicalTo
             if (availableLogicalWidthAtNewLogicalTopOffset == availableLogicalWidthForContent(newLogicalTop))
                 return newLogicalTop - logicalTop;
 
-            RenderRegion* region = regionAtBlockOffset(logicalTopForChild(child));
-            LayoutRect borderBox = child.borderBoxRectInRegion(region, DoNotCacheRenderBoxRegionInfo);
+            RenderFragmentContainer* fragment = fragmentAtBlockOffset(logicalTopForChild(child));
+            LayoutRect borderBox = child.borderBoxRectInFragment(fragment, DoNotCacheRenderBoxFragmentInfo);
             LayoutUnit childLogicalWidthAtOldLogicalTopOffset = isHorizontalWritingMode() ? borderBox.width() : borderBox.height();
 
             // FIXME: None of this is right for perpendicular writing-mode children.
@@ -2863,8 +2862,8 @@ LayoutUnit RenderBlockFlow::getClearDelta(RenderBox& child, LayoutUnit logicalTo
 
             child.setLogicalTop(newLogicalTop);
             child.updateLogicalWidth();
-            region = regionAtBlockOffset(logicalTopForChild(child));
-            borderBox = child.borderBoxRectInRegion(region, DoNotCacheRenderBoxRegionInfo);
+            fragment = fragmentAtBlockOffset(logicalTopForChild(child));
+            borderBox = child.borderBoxRectInFragment(fragment, DoNotCacheRenderBoxFragmentInfo);
             LayoutUnit childLogicalWidthAtNewLogicalTopOffset = isHorizontalWritingMode() ? borderBox.width() : borderBox.height();
 
             child.setLogicalTop(childOldLogicalTop);
@@ -3141,11 +3140,11 @@ GapRects RenderBlockFlow::inlineSelectionGaps(RenderBlock& rootBlock, const Layo
     return result;
 }
 
-bool RenderBlockFlow::needsLayoutAfterRegionRangeChange() const
+bool RenderBlockFlow::needsLayoutAfterFragmentRangeChange() const
 {
     // A block without floats or that expands to enclose them won't need a relayout
-    // after a region range change. There is no overflow content needing relayout
-    // in the region chain because the region range can only shrink after the estimation.
+    // after a fragment range change. There is no overflow content needing relayout
+    // in the fragment chain because the fragment range can only shrink after the estimation.
     if (!containsFloats() || createsNewFormattingContext())
         return false;
 
@@ -3360,7 +3359,7 @@ RenderText* RenderBlockFlow::findClosestTextAtAbsolutePoint(const FloatPoint& po
     
     // Only check the gaps between the root line boxes. We deliberately ignore overflow because
     // experience has shown that hit tests on an exploded text node can fail when within the
-    // overflow region.
+    // overflow fragment.
     for (RootInlineBox* current = blockFlow.firstRootBox(); current && current != blockFlow.lastRootBox(); current = current->nextRootBox()) {
         float currentBottom = current->y() + current->logicalHeight();
         if (localPoint.y() < currentBottom)
@@ -3377,7 +3376,7 @@ RenderText* RenderBlockFlow::findClosestTextAtAbsolutePoint(const FloatPoint& po
     return nullptr;
 }
 
-VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderRegion* region)
+VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderFragmentContainer* fragment)
 {
     ASSERT(childrenInline());
 
@@ -3394,7 +3393,7 @@ VisiblePosition RenderBlockFlow::positionForPointWithInlineChildren(const Layout
     RootInlineBox* firstRootBoxWithChildren = 0;
     RootInlineBox* lastRootBoxWithChildren = 0;
     for (RootInlineBox* root = firstRootBox(); root; root = root->nextRootBox()) {
-        if (region && root->containingRegion() != region)
+        if (fragment && root->containingFragment() != fragment)
             continue;
 
         if (!root->firstLeafChild())
@@ -3478,7 +3477,7 @@ Position RenderBlockFlow::positionForPoint(const LayoutPoint& point)
     return downcast<RenderText>(*firstChild()).positionForPoint(point);
 }
 
-VisiblePosition RenderBlockFlow::positionForPoint(const LayoutPoint& point, const RenderRegion*)
+VisiblePosition RenderBlockFlow::positionForPoint(const LayoutPoint& point, const RenderFragmentContainer*)
 {
     return RenderBlock::positionForPoint(point, nullptr);
 }
@@ -3819,7 +3818,7 @@ void RenderBlockFlow::layoutExcludedChildren(bool relayoutChildren)
         for (RenderMultiColumnSet* columnSet = flowThread->firstMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet())
             columnSet->prepareForLayout(!flowThread->inBalancingPass());
 
-        flowThread->invalidateRegions(MarkOnlyThis);
+        flowThread->invalidateFragments(MarkOnlyThis);
         flowThread->setNeedsHeightsRecalculation(true);
         flowThread->layout();
     } else {
index 58be813..63c4b1d 100644 (file)
@@ -282,7 +282,7 @@ public:
     void deleteLines() override;
     void computeOverflow(LayoutUnit oldClientAfterEdge, bool recomputeFloats = false) override;
     Position positionForPoint(const LayoutPoint&) override;
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
 
     LayoutUnit lowestFloatLogicalBottom(FloatingObject::Type = FloatingObject::FloatLeftRight) const;
 
@@ -388,7 +388,7 @@ public:
     void updateColumnProgressionFromStyle(RenderStyle&);
     void updateStylesForColumnChildren();
 
-    bool needsLayoutAfterRegionRangeChange() const override;
+    bool needsLayoutAfterFragmentRangeChange() const override;
     WEBCORE_EXPORT RenderText* findClosestTextAtAbsolutePoint(const FloatPoint&);
 
     // A page break is required at some offset due to space shortage in the current fragmentainer.
@@ -528,7 +528,7 @@ private:
         LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& lastLogicalRight, const LogicalSelectionOffsetCaches&, const PaintInfo*) override;
     
     Position positionForBox(InlineBox*, bool start = true) const;
-    VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderRegion*) override;
+    VisiblePosition positionForPointWithInlineChildren(const LayoutPoint& pointInLogicalContents, const RenderFragmentContainer*) override;
     void addFocusRingRectsForInlineChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, const RenderLayerModelObject*) override;
 
 // FIXME-BLOCKFLOW: These methods have implementations in
@@ -580,7 +580,7 @@ private:
     // have to move to the next page/column.
     bool positionNewFloatOnLine(const FloatingObject& newFloat, FloatingObject* lastFloatFromPreviousLine, LineInfo&, LineWidth&);
     // This function is called to test a line box that has moved in the block direction to see if it has ended up in a new
-    // region/page/column that has a different available line width than the old one. Used to know when you have to dirty a
+    // page/column that has a different available line width than the old one. Used to know when you have to dirty a
     // line, i.e., that it can't be re-used.
     bool lineWidthForPaginatedLineChanged(RootInlineBox*, LayoutUnit lineDelta, RenderFlowThread*) const;
     void updateLogicalWidthForAlignment(const ETextAlign&, const RootInlineBox*, BidiRun* trailingSpaceRun, float& logicalLeft, float& totalLogicalWidth, float& availableLogicalWidth, int expansionOpportunityCount);
@@ -600,8 +600,8 @@ private:
 
 public:
     // FIXME-BLOCKFLOW: These can be made protected again once all callers have been moved here.
-    void adjustLinePositionForPagination(RootInlineBox*, LayoutUnit& deltaOffset, bool& overflowsRegion, RenderFlowThread*); // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page.
-    void updateRegionForLine(RootInlineBox*) const;
+    void adjustLinePositionForPagination(RootInlineBox*, LayoutUnit& deltaOffset, bool& overflowsFragment, RenderFlowThread*); // Computes a deltaOffset value that put a line at the top of the next page if it doesn't fit on the current page.
+    void updateFragmentForLine(RootInlineBox*) const;
 
     // Pagination routines.
     bool relayoutForPagination(LayoutStateMaintainer&);
index 0ce5eca..025c769 100644 (file)
@@ -36,8 +36,8 @@
 #include "Logging.h"
 #include "RenderBlockFlow.h"
 #include "RenderFlowThread.h"
+#include "RenderFragmentContainer.h"
 #include "RenderLineBreak.h"
-#include "RenderRegion.h"
 #include "RenderRubyBase.h"
 #include "RenderRubyText.h"
 #include "RenderView.h"
@@ -1418,12 +1418,12 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
                     layoutState.updateRepaintRangeFromBox(lineBox);
                 
                 LayoutUnit adjustment = 0;
-                bool overflowsRegion = false;
+                bool overflowsFragment = false;
                 
                 layoutState.marginInfo().setAtBeforeSideOfBlock(false);
 
                 if (paginated)
-                    adjustLinePositionForPagination(lineBox, adjustment, overflowsRegion, layoutState.flowThread());
+                    adjustLinePositionForPagination(lineBox, adjustment, overflowsFragment, layoutState.flowThread());
                 if (adjustment) {
                     IndentTextOrNot shouldIndentText = layoutState.lineInfo().isFirstLine() ? IndentText : DoNotIndentText;
                     LayoutUnit oldLineWidth = availableLogicalWidthForLine(oldLogicalHeight, shouldIndentText);
@@ -1443,7 +1443,7 @@ void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
                     
                 if (paginated) {
                     if (layoutState.flowThread())
-                        updateRegionForLine(lineBox);
+                        updateFragmentForLine(lineBox);
                 }
             }
         }
@@ -1576,15 +1576,15 @@ void RenderBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState)
                 line->attachLine();
                 if (paginated) {
                     delta -= line->paginationStrut();
-                    bool overflowsRegion;
-                    adjustLinePositionForPagination(line, delta, overflowsRegion, layoutState.flowThread());
+                    bool overflowsFragment;
+                    adjustLinePositionForPagination(line, delta, overflowsFragment, layoutState.flowThread());
                 }
                 if (delta) {
                     layoutState.updateRepaintRangeFromBox(line, delta);
                     line->adjustBlockDirectionPosition(delta);
                 }
                 if (layoutState.flowThread())
-                    updateRegionForLine(line);
+                    updateFragmentForLine(line);
                 reattachCleanLineFloats(*line, delta, line == firstCleanLine);
             }
             setLogicalHeight(lastRootBox()->lineBottomWithLeading());
@@ -1615,7 +1615,7 @@ void RenderBlockFlow::linkToEndLineIfNeeded(LineLayoutState& layoutState)
             LayoutRect logicalVisualOverflow(0, blockLogicalHeight, 1, bottomVisualOverflow - blockLogicalHeight);
             trailingFloatsLineBox->setOverflowFromLogicalRects(logicalLayoutOverflow, logicalVisualOverflow, trailingFloatsLineBox->lineTop(), trailingFloatsLineBox->lineBottom());
             if (layoutState.flowThread())
-                updateRegionForLine(trailingFloatsLineBox);
+                updateFragmentForLine(trailingFloatsLineBox);
         }
 
         const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
@@ -1644,7 +1644,7 @@ void RenderBlockFlow::layoutLineBoxes(bool relayoutChildren, LayoutUnit& repaint
         layoutLineGridBox();
 
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    bool clearLinesForPagination = firstRootBox() && flowThread && !flowThread->hasRegions();
+    bool clearLinesForPagination = firstRootBox() && flowThread && !flowThread->hasFragments();
 
     // Figure out if we should clear out our line boxes.
     // FIXME: Handle resize eventually!
@@ -1801,8 +1801,8 @@ RootInlineBox* RenderBlockFlow::determineStartPosition(LineLayoutState& layoutSt
                     break;
                 }
                 paginationDelta -= currentLine->paginationStrut();
-                bool overflowsRegion;
-                adjustLinePositionForPagination(currentLine, paginationDelta, overflowsRegion, layoutState.flowThread());
+                bool overflowsFragment;
+                adjustLinePositionForPagination(currentLine, paginationDelta, overflowsFragment, layoutState.flowThread());
                 if (paginationDelta) {
                     if (containsFloats() || !floats.isEmpty()) {
                         // FIXME: Do better eventually.  For now if we ever shift because of pagination and floats are present just go to a full layout.
@@ -1814,7 +1814,7 @@ RootInlineBox* RenderBlockFlow::determineStartPosition(LineLayoutState& layoutSt
                     currentLine->adjustBlockDirectionPosition(paginationDelta);
                 }
                 if (layoutState.flowThread())
-                    updateRegionForLine(currentLine);
+                    updateFragmentForLine(currentLine);
             }
 
             if (auto* cleanLineFloats = currentLine->floatsPtr()) {
@@ -1966,9 +1966,9 @@ bool RenderBlockFlow::checkPaginationAndFloatsAtEndLine(LineLayoutState& layoutS
                 // This isn't the real move we're going to do, so don't update the line box's pagination
                 // strut yet.
                 LayoutUnit oldPaginationStrut = lineBox->paginationStrut();
-                bool overflowsRegion;
+                bool overflowsFragment;
                 lineDelta -= oldPaginationStrut;
-                adjustLinePositionForPagination(lineBox, lineDelta, overflowsRegion, layoutState.flowThread());
+                adjustLinePositionForPagination(lineBox, lineDelta, overflowsFragment, layoutState.flowThread());
                 lineBox->setPaginationStrut(oldPaginationStrut);
             }
             if (lineWidthForPaginatedLineChanged(lineBox, lineDelta, layoutState.flowThread()))
@@ -2004,11 +2004,11 @@ bool RenderBlockFlow::lineWidthForPaginatedLineChanged(RootInlineBox* rootBox, L
     if (!flowThread)
         return false;
 
-    RenderRegion* currentRegion = regionAtBlockOffset(rootBox->lineTopWithLeading() + lineDelta);
-    // Just bail if the region didn't change.
-    if (rootBox->containingRegion() == currentRegion)
+    RenderFragmentContainer* currentFragment = fragmentAtBlockOffset(rootBox->lineTopWithLeading() + lineDelta);
+    // Just bail if the fragment didn't change.
+    if (rootBox->containingFragment() == currentFragment)
         return false;
-    return rootBox->paginatedLineWidth() != availableLogicalWidthForContent(currentRegion);
+    return rootBox->paginatedLineWidth() != availableLogicalWidthForContent(currentFragment);
 }
 
 bool RenderBlockFlow::matchedEndLine(LineLayoutState& layoutState, const InlineBidiResolver& resolver, const InlineIterator& endLineStart, const BidiStatus& endLineStatus)
@@ -2072,14 +2072,14 @@ void RenderBlockFlow::addOverflowFromInlineChildren()
         endPadding = 1;
     for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox()) {
         addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding));
-        RenderRegion* region = flowThreadContainingBlock() ? curr->containingRegion() : nullptr;
-        if (region)
-            region->addLayoutOverflowForBox(this, curr->paddedLayoutOverflowRect(endPadding));
+        RenderFragmentContainer* fragment = flowThreadContainingBlock() ? curr->containingFragment() : nullptr;
+        if (fragment)
+            fragment->addLayoutOverflowForBox(this, curr->paddedLayoutOverflowRect(endPadding));
         if (!hasOverflowClip()) {
             LayoutRect childVisualOverflowRect = curr->visualOverflowRect(curr->lineTop(), curr->lineBottom());
             addVisualOverflow(childVisualOverflowRect);
-            if (region)
-                region->addVisualOverflowForBox(this, childVisualOverflowRect);
+            if (fragment)
+                fragment->addVisualOverflowForBox(this, childVisualOverflowRect);
         }
     }
 }
@@ -2188,7 +2188,7 @@ bool RenderBlockFlow::positionNewFloatOnLine(const FloatingObject& newFloat, Flo
             RenderBox& floatBox = floatingObject.renderer();
             setLogicalTopForChild(floatBox, logicalTopForChild(floatBox) + marginBeforeForChild(floatBox) + paginationStrut);
 
-            if (updateRegionRangeForBoxChild(floatBox))
+            if (updateFragmentRangeForBoxChild(floatBox))
                 floatBox.setNeedsLayout(MarkOnlyThis);
             else if (is<RenderBlock>(floatBox))
                 downcast<RenderBlock>(floatBox).setChildNeedsLayout(MarkOnlyThis);
@@ -2248,17 +2248,17 @@ LayoutUnit RenderBlockFlow::startAlignedOffsetForLine(LayoutUnit position, Inden
     return logicalLeft;
 }
 
-void RenderBlockFlow::updateRegionForLine(RootInlineBox* lineBox) const
+void RenderBlockFlow::updateFragmentForLine(RootInlineBox* lineBox) const
 {
     ASSERT(lineBox);
 
-    if (!hasRegionRangeInFlowThread())
-        lineBox->clearContainingRegion();
+    if (!hasFragmentRangeInFlowThread())
+        lineBox->clearContainingFragment();
     else {
-        if (auto containingRegion = regionAtBlockOffset(lineBox->lineTopWithLeading()))
-            lineBox->setContainingRegion(*containingRegion);
+        if (auto containingFragment = fragmentAtBlockOffset(lineBox->lineTopWithLeading()))
+            lineBox->setContainingFragment(*containingFragment);
         else
-            lineBox->clearContainingRegion();
+            lineBox->clearContainingFragment();
     }
 
     RootInlineBox* prevLineBox = lineBox->prevRootBox();
@@ -2268,7 +2268,7 @@ void RenderBlockFlow::updateRegionForLine(RootInlineBox* lineBox) const
     // This check is more accurate than the one in |adjustLinePositionForPagination| because it takes into
     // account just the container changes between lines. The before mentioned function doesn't set the flag
     // correctly if the line is positioned at the top of the last fragment container.
-    if (lineBox->containingRegion() != prevLineBox->containingRegion())
+    if (lineBox->containingFragment() != prevLineBox->containingFragment())
         lineBox->setIsFirstAfterPageBreak(true);
 }
 
index 39bdac4..5a74058 100644 (file)
 #include "MainFrame.h"
 #include "Page.h"
 #include "PaintInfo.h"
-#include "RenderBoxRegionInfo.h"
+#include "RenderBoxFragmentInfo.h"
 #include "RenderChildIterator.h"
 #include "RenderDeprecatedFlexibleBox.h"
 #include "RenderFlexibleBox.h"
+#include "RenderFragmentContainer.h"
 #include "RenderGeometryMap.h"
 #include "RenderInline.h"
 #include "RenderIterator.h"
 #include "RenderLayer.h"
 #include "RenderLayerCompositor.h"
 #include "RenderMultiColumnFlowThread.h"
-#include "RenderRegion.h"
 #include "RenderTableCell.h"
 #include "RenderTheme.h"
 #include "RenderView.h"
@@ -164,53 +164,53 @@ void RenderBox::willBeDestroyed()
     RenderBoxModelObject::willBeDestroyed();
 }
 
-RenderRegion* RenderBox::clampToStartAndEndRegions(RenderRegion* region) const
+RenderFragmentContainer* RenderBox::clampToStartAndEndFragments(RenderFragmentContainer* fragment) const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
 
-    ASSERT(isRenderView() || (region && flowThread));
+    ASSERT(isRenderView() || (fragment && flowThread));
     if (isRenderView())
-        return region;
+        return fragment;
 
     // We need to clamp to the block, since we want any lines or blocks that overflow out of the
     // logical top or logical bottom of the block to size as though the border box in the first and
-    // last regions extended infinitely. Otherwise the lines are going to size according to the regions
-    // they overflow into, which makes no sense when this block doesn't exist in |region| at all.
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!flowThread->getRegionRangeForBox(this, startRegion, endRegion))
-        return region;
+    // last fragments extended infinitely. Otherwise the lines are going to size according to the fragments
+    // they overflow into, which makes no sense when this block doesn't exist in |fragment| at all.
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!flowThread->getFragmentRangeForBox(this, startFragment, endFragment))
+        return fragment;
 
-    if (region->logicalTopForFlowThreadContent() < startRegion->logicalTopForFlowThreadContent())
-        return startRegion;
-    if (region->logicalTopForFlowThreadContent() > endRegion->logicalTopForFlowThreadContent())
-        return endRegion;
+    if (fragment->logicalTopForFlowThreadContent() < startFragment->logicalTopForFlowThreadContent())
+        return startFragment;
+    if (fragment->logicalTopForFlowThreadContent() > endFragment->logicalTopForFlowThreadContent())
+        return endFragment;
 
-    return region;
+    return fragment;
 }
 
-bool RenderBox::hasRegionRangeInFlowThread() const
+bool RenderBox::hasFragmentRangeInFlowThread() const
 {
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (!flowThread || !flowThread->hasValidRegionInfo())
+    if (!flowThread || !flowThread->hasValidFragmentInfo())
         return false;
 
-    return flowThread->hasCachedRegionRangeForBox(*this);
+    return flowThread->hasCachedFragmentRangeForBox(*this);
 }
 
-LayoutRect RenderBox::clientBoxRectInRegion(RenderRegion* region) const
+LayoutRect RenderBox::clientBoxRectInFragment(RenderFragmentContainer* fragment) const
 {
-    if (!region)
+    if (!fragment)
         return clientBoxRect();
 
-    LayoutRect clientBox = borderBoxRectInRegion(region);
+    LayoutRect clientBox = borderBoxRectInFragment(fragment);
     clientBox.setLocation(clientBox.location() + LayoutSize(borderLeft(), borderTop()));
     clientBox.setSize(clientBox.size() - LayoutSize(borderLeft() + borderRight() + verticalScrollbarWidth(), borderTop() + borderBottom() + horizontalScrollbarHeight()));
 
     return clientBox;
 }
 
-LayoutRect RenderBox::borderBoxRectInRegion(RenderRegion*, RenderBoxRegionInfoFlags) const
+LayoutRect RenderBox::borderBoxRectInFragment(RenderFragmentContainer*, RenderBoxFragmentInfoFlags) const
 {
     return borderBoxRect();
 }
@@ -621,12 +621,12 @@ void RenderBox::updateLayerTransform()
         layer()->updateTransform();
 }
 
-LayoutUnit RenderBox::constrainLogicalWidthInRegionByMinMax(LayoutUnit logicalWidth, LayoutUnit availableWidth, RenderBlock& cb, RenderRegion* region) const
+LayoutUnit RenderBox::constrainLogicalWidthInFragmentByMinMax(LayoutUnit logicalWidth, LayoutUnit availableWidth, RenderBlock& cb, RenderFragmentContainer* fragment) const
 {
     const RenderStyle& styleToUse = style();
     if (!styleToUse.logicalMaxWidth().isUndefined())
-        logicalWidth = std::min(logicalWidth, computeLogicalWidthInRegionUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb, region));
-    return std::max(logicalWidth, computeLogicalWidthInRegionUsing(MinSize, styleToUse.logicalMinWidth(), availableWidth, cb, region));
+        logicalWidth = std::min(logicalWidth, computeLogicalWidthInFragmentUsing(MaxSize, styleToUse.logicalMaxWidth(), availableWidth, cb, fragment));
+    return std::max(logicalWidth, computeLogicalWidthInFragmentUsing(MinSize, styleToUse.logicalMinWidth(), availableWidth, cb, fragment));
 }
 
 LayoutUnit RenderBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, std::optional<LayoutUnit> intrinsicContentHeight) const
@@ -1177,7 +1177,7 @@ bool RenderBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result
 
     // Check our bounds next. For this purpose always assume that we can only be hit in the
     // foreground phase (which is true for replaced elements like images).
-    LayoutRect boundsRect = borderBoxRectInRegion(nullptr);
+    LayoutRect boundsRect = borderBoxRectInFragment(nullptr);
     boundsRect.moveBy(adjustedLocation);
     if (visibleToHitTesting() && action == HitTestForeground && locationInContainer.intersects(boundsRect)) {
         updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation));
@@ -1245,7 +1245,7 @@ void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, const LayoutPoint& pai
     if (!paintInfo.shouldPaintWithinRoot(*this))
         return;
 
-    LayoutRect paintRect = borderBoxRectInRegion(nullptr);
+    LayoutRect paintRect = borderBoxRectInFragment(nullptr);
     paintRect.moveBy(paintOffset);
     adjustBorderBoxRectForPainting(paintRect);
 
@@ -1753,11 +1753,11 @@ void RenderBox::popContentsClip(PaintInfo& paintInfo, PaintPhase originalPhase,
         paintInfo.phase = originalPhase;
 }
 
-LayoutRect RenderBox::overflowClipRect(const LayoutPoint& location, RenderRegion* region, OverlayScrollbarSizeRelevancy relevancy, PaintPhase)
+LayoutRect RenderBox::overflowClipRect(const LayoutPoint& location, RenderFragmentContainer* fragment, OverlayScrollbarSizeRelevancy relevancy, PaintPhase)
 {
     // FIXME: When overflow-clip (CSS3) is implemented, we'll obtain the property
     // here.
-    LayoutRect clipRect = borderBoxRectInRegion(region);
+    LayoutRect clipRect = borderBoxRectInFragment(fragment);
     clipRect.setLocation(location + clipRect.location() + LayoutSize(borderLeft(), borderTop()));
     clipRect.setSize(clipRect.size() - LayoutSize(borderLeft() + borderRight(), borderTop() + borderBottom()));
 
@@ -1771,9 +1771,9 @@ LayoutRect RenderBox::overflowClipRect(const LayoutPoint& location, RenderRegion
     return clipRect;
 }
 
-LayoutRect RenderBox::clipRect(const LayoutPoint& location, RenderRegion* region)
+LayoutRect RenderBox::clipRect(const LayoutPoint& location, RenderFragmentContainer* fragment)
 {
-    LayoutRect borderBoxRect = borderBoxRectInRegion(region);
+    LayoutRect borderBoxRect = borderBoxRectInFragment(fragment);
     LayoutRect clipRect = LayoutRect(borderBoxRect.location() + location, borderBoxRect.size());
 
     if (!style().clipLeft().isAuto()) {
@@ -1782,7 +1782,7 @@ LayoutRect RenderBox::clipRect(const LayoutPoint& location, RenderRegion* region
         clipRect.contract(c, 0);
     }
 
-    // We don't use the region-specific border box's width and height since clip offsets are (stupidly) specified
+    // We don't use the fragment-specific border box's width and height since clip offsets are (stupidly) specified
     // from the left and top edges. Therefore it's better to avoid constraining to smaller widths and heights.
 
     if (!style().clipRight().isAuto())
@@ -1800,18 +1800,18 @@ LayoutRect RenderBox::clipRect(const LayoutPoint& location, RenderRegion* region
     return clipRect;
 }
 
-LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock& cb, RenderRegion* region) const
+LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock& cb, RenderFragmentContainer* fragment) const
 {    
-    RenderRegion* containingBlockRegion = nullptr;
+    RenderFragmentContainer* containingBlockFragment = nullptr;
     LayoutUnit logicalTopPosition = logicalTop();
-    if (region) {
-        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
-        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
-        containingBlockRegion = cb.clampToStartAndEndRegions(region);
+    if (fragment) {
+        LayoutUnit offsetFromLogicalTopOfFragment = fragment ? fragment->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
+        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfFragment);
+        containingBlockFragment = cb.clampToStartAndEndFragments(fragment);
     }
 
     LayoutUnit logicalHeight = cb.logicalHeightForChild(*this);
-    LayoutUnit result = cb.availableLogicalWidthForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight) - childMarginStart - childMarginEnd;
+    LayoutUnit result = cb.availableLogicalWidthForLineInFragment(logicalTopPosition, DoNotIndentText, containingBlockFragment, logicalHeight) - childMarginStart - childMarginEnd;
 
     // We need to see if margins on either the start side or the end side can contain the floats in question. If they can,
     // then just using the line width is inaccurate. In the case where a float completely fits, we don't need to use the line
@@ -1819,9 +1819,9 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
     // doesn't fit, we can use the line offset, but we need to grow it by the margin to reflect the fact that the margin was
     // "consumed" by the float. Negative margins aren't consumed by the float, and so we ignore them.
     if (childMarginStart > 0) {
-        LayoutUnit startContentSide = cb.startOffsetForContent(containingBlockRegion);
+        LayoutUnit startContentSide = cb.startOffsetForContent(containingBlockFragment);
         LayoutUnit startContentSideWithMargin = startContentSide + childMarginStart;
-        LayoutUnit startOffset = cb.startOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
+        LayoutUnit startOffset = cb.startOffsetForLineInFragment(logicalTopPosition, DoNotIndentText, containingBlockFragment, logicalHeight);
         if (startOffset > startContentSideWithMargin)
             result += childMarginStart;
         else
@@ -1829,9 +1829,9 @@ LayoutUnit RenderBox::shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStar
     }
     
     if (childMarginEnd > 0) {
-        LayoutUnit endContentSide = cb.endOffsetForContent(containingBlockRegion);
+        LayoutUnit endContentSide = cb.endOffsetForContent(containingBlockFragment);
         LayoutUnit endContentSideWithMargin = endContentSide + childMarginEnd;
-        LayoutUnit endOffset = cb.endOffsetForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, logicalHeight);
+        LayoutUnit endOffset = cb.endOffsetForLineInFragment(logicalTopPosition, DoNotIndentText, containingBlockFragment, logicalHeight);
         if (endOffset > endContentSideWithMargin)
             result += childMarginEnd;
         else
@@ -1865,33 +1865,33 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForContent(AvailableLogicalHei
     return LayoutUnit();
 }
 
-LayoutUnit RenderBox::containingBlockLogicalWidthForContentInRegion(RenderRegion* region) const
+LayoutUnit RenderBox::containingBlockLogicalWidthForContentInFragment(RenderFragmentContainer* fragment) const
 {
-    if (!region)
+    if (!fragment)
         return containingBlockLogicalWidthForContent();
 
     RenderBlock* cb = containingBlock();
-    RenderRegion* containingBlockRegion = cb->clampToStartAndEndRegions(region);
-    // FIXME: It's unclear if a region's content should use the containing block's override logical width.
+    RenderFragmentContainer* containingBlockFragment = cb->clampToStartAndEndFragments(fragment);
+    // FIXME: It's unclear if a fragment's content should use the containing block's override logical width.
     // If it should, the following line should call containingBlockLogicalWidthForContent.
     LayoutUnit result = cb->availableLogicalWidth();
-    RenderBoxRegionInfo* boxInfo = cb->renderBoxRegionInfo(containingBlockRegion);
+    RenderBoxFragmentInfo* boxInfo = cb->renderBoxFragmentInfo(containingBlockFragment);
     if (!boxInfo)
         return result;
     return std::max<LayoutUnit>(0, result - (cb->logicalWidth() - boxInfo->logicalWidth()));
 }
 
-LayoutUnit RenderBox::containingBlockAvailableLineWidthInRegion(RenderRegion* region) const
+LayoutUnit RenderBox::containingBlockAvailableLineWidthInFragment(RenderFragmentContainer* fragment) const
 {
     RenderBlock* cb = containingBlock();
-    RenderRegion* containingBlockRegion = nullptr;
+    RenderFragmentContainer* containingBlockFragment = nullptr;
     LayoutUnit logicalTopPosition = logicalTop();
-    if (region) {
-        LayoutUnit offsetFromLogicalTopOfRegion = region ? region->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
-        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfRegion);
-        containingBlockRegion = cb->clampToStartAndEndRegions(region);
+    if (fragment) {
+        LayoutUnit offsetFromLogicalTopOfFragment = fragment ? fragment->logicalTopForFlowThreadContent() - offsetFromLogicalTopOfFirstPage() : LayoutUnit();
+        logicalTopPosition = std::max(logicalTopPosition, logicalTopPosition + offsetFromLogicalTopOfFragment);
+        containingBlockFragment = cb->clampToStartAndEndFragments(fragment);
     }
-    return cb->availableLogicalWidthForLineInRegion(logicalTopPosition, DoNotIndentText, containingBlockRegion, availableLogicalHeight(IncludeMarginBorderPadding));
+    return cb->availableLogicalWidthForLineInFragment(logicalTopPosition, DoNotIndentText, containingBlockFragment, availableLogicalHeight(IncludeMarginBorderPadding));
 }
 
 LayoutUnit RenderBox::perpendicularContainingBlockLogicalHeight() const
@@ -2024,8 +2024,8 @@ void RenderBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState
 
 LayoutSize RenderBox::offsetFromContainer(RenderElement& renderer, const LayoutPoint&, bool* offsetDependsOnPoint) const
 {
-    // A region "has" boxes inside it without being their container. 
-    ASSERT(&renderer == container() || is<RenderRegion>(renderer));
+    // A fragment "has" boxes inside it without being their container. 
+    ASSERT(&renderer == container() || is<RenderFragmentContainer>(renderer));
 
     LayoutSize offset;    
     if (isInFlowPositioned())
@@ -2174,18 +2174,18 @@ LayoutRect RenderBox::computeRectForRepaint(const LayoutRect& rect, const Render
         return adjustedRect;
     
     // This code isn't necessary for in-flow RenderFlowThreads.
-    // Don't add the location of the region in the flow thread for absolute positioned
+    // Don't add the location of the fragment in the flow thread for absolute positioned
     // elements because their absolute position already pushes them down through
-    // the regions so adding this here and then adding the topLeft again would cause
+    // the fragments so adding this here and then adding the topLeft again would cause
     // us to add the height twice.
     // The same logic applies for elements flowed directly into the flow thread. Their topLeft member
-    // will already contain the portion rect of the region.
+    // will already contain the portion rect of the fragment.
     EPosition position = styleToUse.position();
     if (container->isOutOfFlowRenderFlowThread() && position != AbsolutePosition && containingBlock() != flowThreadContainingBlock()) {
-        RenderRegion* firstRegion = nullptr;
-        RenderRegion* lastRegion = nullptr;
-        if (downcast<RenderFlowThread>(*container).getRegionRangeForBox(this, firstRegion, lastRegion))
-            adjustedRect.moveBy(firstRegion->flowThreadPortionRect().location());
+        RenderFragmentContainer* firstFragment = nullptr;
+        RenderFragmentContainer* lastFragment = nullptr;
+        if (downcast<RenderFlowThread>(*container).getFragmentRangeForBox(this, firstFragment, lastFragment))
+            adjustedRect.moveBy(firstFragment->flowThreadPortionRect().location());
     }
 
     if (isWritingModeRoot()) {
@@ -2211,9 +2211,9 @@ LayoutRect RenderBox::computeRectForRepaint(const LayoutRect& rect, const Render
         // FIXME: Just as with offsetFromContainer, we aren't really handling objects that span
         // multiple columns properly.
         LayoutPoint physicalPoint(flipForWritingMode(adjustedRect.location()));
-        if (auto* region = downcast<RenderMultiColumnFlowThread>(*this).physicalTranslationFromFlowToRegion((physicalPoint))) {
-            adjustedRect.setLocation(region->flipForWritingMode(physicalPoint));
-            return region->computeRectForRepaint(adjustedRect, repaintContainer, context);
+        if (auto* fragment = downcast<RenderMultiColumnFlowThread>(*this).physicalTranslationFromFlowToFragment((physicalPoint))) {
+            adjustedRect.setLocation(fragment->flipForWritingMode(physicalPoint));
+            return fragment->computeRectForRepaint(adjustedRect, repaintContainer, context);
         }
     }
 
@@ -2283,7 +2283,7 @@ void RenderBox::repaintOverhangingFloats(bool)
 void RenderBox::updateLogicalWidth()
 {
     LogicalExtentComputedValues computedValues;
-    computeLogicalWidthInRegion(computedValues);
+    computeLogicalWidthInFragment(computedValues);
 
     setLogicalWidth(computedValues.m_extent);
     setLogicalLeft(computedValues.m_position);
@@ -2291,7 +2291,7 @@ void RenderBox::updateLogicalWidth()
     setMarginEnd(computedValues.m_margins.m_end);
 }
 
-void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& computedValues, RenderRegion* region) const
+void RenderBox::computeLogicalWidthInFragment(LogicalExtentComputedValues& computedValues, RenderFragmentContainer* fragment) const
 {
     computedValues.m_extent = logicalWidth();
     computedValues.m_position = logicalLeft();
@@ -2301,7 +2301,7 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
     if (isOutOfFlowPositioned()) {
         // FIXME: This calculation is not patched for block-flow yet.
         // https://bugs.webkit.org/show_bug.cgi?id=46500
-        computePositionedLogicalWidth(computedValues, region);
+        computePositionedLogicalWidth(computedValues, fragment);
         return;
     }
 
@@ -2331,7 +2331,7 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
     Length logicalWidthLength = treatAsReplaced ? Length(computeReplacedLogicalWidth(), Fixed) : styleToUse.logicalWidth();
 
     RenderBlock& cb = *containingBlock();
-    LayoutUnit containerLogicalWidth = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContentInRegion(region));
+    LayoutUnit containerLogicalWidth = std::max<LayoutUnit>(0, containingBlockLogicalWidthForContentInFragment(fragment));
     bool hasPerpendicularContainingBlock = cb.isHorizontalWritingMode() != isHorizontalWritingMode();
 
     if (isInline() && !isInlineBlockOrInlineTable()) {
@@ -2351,8 +2351,8 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
     if (treatAsReplaced) {
         computedValues.m_extent = logicalWidthLength.value() + borderAndPaddingLogicalWidth();
     } else {
-        LayoutUnit preferredWidth = computeLogicalWidthInRegionUsing(MainOrPreferredSize, styleToUse.logicalWidth(), containerWidthInInlineDirection, cb, region);
-        computedValues.m_extent = constrainLogicalWidthInRegionByMinMax(preferredWidth, containerWidthInInlineDirection, cb, region);
+        LayoutUnit preferredWidth = computeLogicalWidthInFragmentUsing(MainOrPreferredSize, styleToUse.logicalWidth(), containerWidthInInlineDirection, cb, fragment);
+        computedValues.m_extent = constrainLogicalWidthInFragmentByMinMax(preferredWidth, containerWidthInInlineDirection, cb, fragment);
     }
 
     // Margin calculations.
@@ -2362,7 +2362,7 @@ void RenderBox::computeLogicalWidthInRegion(LogicalExtentComputedValues& compute
     } else {
         LayoutUnit containerLogicalWidthForAutoMargins = containerLogicalWidth;
         if (avoidsFloats() && cb.containsFloats())
-            containerLogicalWidthForAutoMargins = containingBlockAvailableLineWidthInRegion(region);
+            containerLogicalWidthForAutoMargins = containingBlockAvailableLineWidthInFragment(fragment);
         bool hasInvertedDirection = cb.style().isLeftToRightDirection() != style().isLeftToRightDirection();
         computeInlineDirectionMargins(cb, containerLogicalWidthForAutoMargins, computedValues.m_extent,
             hasInvertedDirection ? computedValues.m_margins.m_end : computedValues.m_margins.m_start,
@@ -2425,8 +2425,8 @@ LayoutUnit RenderBox::computeIntrinsicLogicalWidthUsing(Length logicalWidthLengt
     return 0;
 }
 
-LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Length logicalWidth, LayoutUnit availableLogicalWidth,
-    const RenderBlock& cb, RenderRegion* region) const
+LayoutUnit RenderBox::computeLogicalWidthInFragmentUsing(SizeType widthType, Length logicalWidth, LayoutUnit availableLogicalWidth,
+    const RenderBlock& cb, RenderFragmentContainer* fragment) const
 {
     ASSERT(widthType == MinSize || widthType == MainOrPreferredSize || !logicalWidth.isAuto());
     if (widthType == MinSize && logicalWidth.isAuto())
@@ -2445,7 +2445,7 @@ LayoutUnit RenderBox::computeLogicalWidthInRegionUsing(SizeType widthType, Lengt
     LayoutUnit logicalWidthResult = fillAvailableMeasure(availableLogicalWidth, marginStart, marginEnd);
 
     if (shrinkToAvoidFloats() && cb.containsFloats())
-        logicalWidthResult = std::min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, region));
+        logicalWidthResult = std::min(logicalWidthResult, shrinkLogicalWidthToAvoidFloats(marginStart, marginEnd, cb, fragment));
 
     if (widthType == MainOrPreferredSize && sizesLogicalWidthToFitContent(widthType))
         return std::max(minPreferredLogicalWidth(), std::min(maxPreferredLogicalWidth(), logicalWidthResult));
@@ -2613,16 +2613,16 @@ void RenderBox::computeInlineDirectionMargins(const RenderBlock& containingBlock
     marginEnd = minimumValueForLength(marginEndLength, containerWidth);
 }
 
-RenderBoxRegionInfo* RenderBox::renderBoxRegionInfo(RenderRegion* region, RenderBoxRegionInfoFlags cacheFlag) const
+RenderBoxFragmentInfo* RenderBox::renderBoxFragmentInfo(RenderFragmentContainer* fragment, RenderBoxFragmentInfoFlags cacheFlag) const
 {
-    // Make sure nobody is trying to call this with a null region.
-    if (!region)
+    // Make sure nobody is trying to call this with a null fragment.
+    if (!fragment)
         return nullptr;
 
-    // If we have computed our width in this region already, it will be cached, and we can
+    // If we have computed our width in this fragment already, it will be cached, and we can
     // just return it.
-    RenderBoxRegionInfo* boxInfo = region->renderBoxRegionInfo(this);
-    if (boxInfo && cacheFlag == CacheRenderBoxRegionInfo)
+    RenderBoxFragmentInfo* boxInfo = fragment->renderBoxFragmentInfo(this);
+    if (boxInfo && cacheFlag == CacheRenderBoxFragmentInfo)
         return boxInfo;
 
     return nullptr;
@@ -2875,7 +2875,7 @@ bool RenderBox::shouldTreatChildAsReplacedInTableCells() const
 static bool tableCellShouldHaveZeroInitialSize(const RenderBlock& block, const RenderBox& child, bool scrollsOverflowY)
 {
     // Normally we would let the cell size intrinsically, but scrolling overflow has to be
-    // treated differently, since WinIE lets scrolled overflow regions shrink as needed.
+    // treated differently, since WinIE lets scrolled overflow fragments shrink as needed.
     // While we can't get all cases right, we can at least detect when the cell has a specified
     // height or when the table has a specified height. In these cases we want to initially have
     // no size and allow the flexing of the table or the cell to its specified height to cause us
@@ -3203,7 +3203,7 @@ void RenderBox::computeAndSetBlockDirectionMargins(const RenderBlock& containing
     containingBlock.setMarginAfterForChild(*this, marginAfter);
 }
 
-LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject& containingBlock, RenderRegion* region, bool checkForPerpendicularWritingMode) const
+LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject& containingBlock, RenderFragmentContainer* fragment, bool checkForPerpendicularWritingMode) const
 {
     if (checkForPerpendicularWritingMode && containingBlock.isHorizontalWritingMode() != isHorizontalWritingMode())
         return containingBlockLogicalHeightForPositioned(containingBlock, false);
@@ -3228,19 +3228,19 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo
             return downcast<RenderBox>(containingBlock).clientLogicalWidth();
 
         const RenderBlock& cb = downcast<RenderBlock>(containingBlock);
-        RenderBoxRegionInfo* boxInfo = nullptr;
-        if (!region) {
+        RenderBoxFragmentInfo* boxInfo = nullptr;
+        if (!fragment) {
             if (is<RenderFlowThread>(containingBlock) && !checkForPerpendicularWritingMode)
-                return downcast<RenderFlowThread>(containingBlock).contentLogicalWidthOfFirstRegion();
+                return downcast<RenderFlowThread>(containingBlock).contentLogicalWidthOfFirstFragment();
             if (isWritingModeRoot()) {
                 LayoutUnit cbPageOffset = cb.offsetFromLogicalTopOfFirstPage();
-                RenderRegion* cbRegion = cb.regionAtBlockOffset(cbPageOffset);
-                if (cbRegion)
-                    boxInfo = cb.renderBoxRegionInfo(cbRegion);
+                RenderFragmentContainer* cbFragment = cb.fragmentAtBlockOffset(cbPageOffset);
+                if (cbFragment)
+                    boxInfo = cb.renderBoxFragmentInfo(cbFragment);
             }
         } else if (flowThread->isHorizontalWritingMode() == containingBlock.isHorizontalWritingMode()) {
-            RenderRegion* containingBlockRegion = cb.clampToStartAndEndRegions(region);
-            boxInfo = cb.renderBoxRegionInfo(containingBlockRegion);
+            RenderFragmentContainer* containingBlockFragment = cb.clampToStartAndEndFragments(fragment);
+            boxInfo = cb.renderBoxFragmentInfo(containingBlockFragment);
         }
         return (boxInfo) ? std::max<LayoutUnit>(0, cb.clientLogicalWidth() - (cb.logicalWidth() - boxInfo->logicalWidth())) : cb.clientLogicalWidth();
     }
@@ -3288,7 +3288,7 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM
         LayoutUnit result = cb.clientLogicalHeight();
         RenderFlowThread* flowThread = flowThreadContainingBlock();
         if (flowThread && is<RenderFlowThread>(containingBlock) && flowThread->isHorizontalWritingMode() == containingBlock.isHorizontalWritingMode())
-            return downcast<RenderFlowThread>(containingBlock).contentLogicalHeightOfFirstRegion();
+            return downcast<RenderFlowThread>(containingBlock).contentLogicalHeightOfFirstFragment();
         return result;
     }
         
@@ -3312,7 +3312,7 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM
     return heightResult;
 }
 
-static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRight, const RenderBox* child, const RenderBoxModelObject& containerBlock, LayoutUnit containerLogicalWidth, RenderRegion* region)
+static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRight, const RenderBox* child, const RenderBoxModelObject& containerBlock, LayoutUnit containerLogicalWidth, RenderFragmentContainer* fragment)
 {
     if (!logicalLeft.isAuto() || !logicalRight.isAuto())
         return;
@@ -3342,10 +3342,10 @@ static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRigh
             staticPosition += renderBox.logicalLeft();
             if (renderBox.isInFlowPositioned())
                 staticPosition += renderBox.isHorizontalWritingMode() ? renderBox.offsetForInFlowPosition().width() : renderBox.offsetForInFlowPosition().height();
-            if (region && is<RenderBlock>(*current)) {
+            if (fragment && is<RenderBlock>(*current)) {
                 const RenderBlock& currentBlock = downcast<RenderBlock>(*current);
-                region = currentBlock.clampToStartAndEndRegions(region);
-                RenderBoxRegionInfo* boxInfo = currentBlock.renderBoxRegionInfo(region);
+                fragment = currentBlock.clampToStartAndEndFragments(fragment);
+                RenderBoxFragmentInfo* boxInfo = currentBlock.renderBoxFragmentInfo(fragment);
                 if (boxInfo)
                     staticPosition += boxInfo->logicalLeft();
             }
@@ -3370,10 +3370,10 @@ static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRigh
                 if (renderBox.isInFlowPositioned())
                     staticPosition -= renderBox.isHorizontalWritingMode() ? renderBox.offsetForInFlowPosition().width() : renderBox.offsetForInFlowPosition().height();
             }
-            if (region && is<RenderBlock>(*current)) {
+            if (fragment && is<RenderBlock>(*current)) {
                 auto& currentBlock = downcast<RenderBlock>(*current);
-                region = currentBlock.clampToStartAndEndRegions(region);
-                RenderBoxRegionInfo* boxInfo = currentBlock.renderBoxRegionInfo(region);
+                fragment = currentBlock.clampToStartAndEndFragments(fragment);
+                RenderBoxFragmentInfo* boxInfo = currentBlock.renderBoxFragmentInfo(fragment);
                 if (boxInfo) {
                     if (current != &containerBlock)
                         staticPosition -= currentBlock.logicalWidth() - (boxInfo->logicalLeft() + boxInfo->logicalWidth());
@@ -3388,11 +3388,11 @@ static void computeInlineStaticDistance(Length& logicalLeft, Length& logicalRigh
     }
 }
 
-void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& computedValues, RenderRegion* region) const
+void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& computedValues, RenderFragmentContainer* fragment) const
 {
     if (isReplaced()) {
         // FIXME: Positioned replaced elements inside a flow thread are not working properly
-        // with variable width regions (see https://bugs.webkit.org/show_bug.cgi?id=69896 ).
+        // with variable width fragments (see https://bugs.webkit.org/show_bug.cgi?id=69896 ).
         computePositionedLogicalWidthReplaced(computedValues);
         return;
     }
@@ -3417,7 +3417,7 @@ void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& compu
     // relative positioned inline.
     const RenderBoxModelObject& containerBlock = downcast<RenderBoxModelObject>(*container());
     
-    const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, region);
+    const LayoutUnit containerLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, fragment);
 
     // Use the container block's direction except when calculating the static distance
     // This conforms with the reference results for abspos-replaced-width-margin-000.htm
@@ -3458,7 +3458,7 @@ void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& compu
 
     // see FIXME 1
     // Calculate the static distance if needed.
-    computeInlineStaticDistance(logicalLeftLength, logicalRightLength, this, containerBlock, containerLogicalWidth, region);
+    computeInlineStaticDistance(logicalLeftLength, logicalRightLength, this, containerBlock, containerLogicalWidth, fragment);
     
     // Calculate constraint equation values for 'width' case.
     computePositionedLogicalWidthUsing(MainOrPreferredSize, style().logicalWidth(), containerBlock, containerDirection,
@@ -3507,17 +3507,17 @@ void RenderBox::computePositionedLogicalWidth(LogicalExtentComputedValues& compu
             computedValues.m_position += containingBox.verticalScrollbarWidth();
     }
     
-    // Adjust logicalLeft if we need to for the flipped version of our writing mode in regions.
+    // Adjust logicalLeft if we need to for the flipped version of our writing mode in fragments.
     // FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
     RenderFlowThread* flowThread = flowThreadContainingBlock();
-    if (flowThread && !region && isWritingModeRoot() && isHorizontalWritingMode() == containerBlock.isHorizontalWritingMode() && is<RenderBlock>(containerBlock)) {
-        ASSERT(containerBlock.canHaveBoxInfoInRegion());
+    if (flowThread && !fragment && isWritingModeRoot() && isHorizontalWritingMode() == containerBlock.isHorizontalWritingMode() && is<RenderBlock>(containerBlock)) {
+        ASSERT(containerBlock.canHaveBoxInfoInFragment());
         LayoutUnit logicalLeftPos = computedValues.m_position;
         const RenderBlock& renderBlock = downcast<RenderBlock>(containerBlock);
         LayoutUnit cbPageOffset = renderBlock.offsetFromLogicalTopOfFirstPage();
-        RenderRegion* cbRegion = renderBlock.regionAtBlockOffset(cbPageOffset);
-        if (cbRegion) {
-            RenderBoxRegionInfo* boxInfo = renderBlock.renderBoxRegionInfo(cbRegion);
+        RenderFragmentContainer* cbFragment = renderBlock.fragmentAtBlockOffset(cbPageOffset);
+        if (cbFragment) {
+            RenderBoxFragmentInfo* boxInfo = renderBlock.renderBoxFragmentInfo(cbFragment);
             if (boxInfo) {
                 logicalLeftPos += boxInfo->logicalLeft();
                 computedValues.m_position = logicalLeftPos;
@@ -3832,17 +3832,17 @@ void RenderBox::computePositionedLogicalHeight(LogicalExtentComputedValues& comp
     // Set final height value.
     computedValues.m_extent += bordersPlusPadding;
     
-    // Adjust logicalTop if we need to for perpendicular writing modes in regions.
+    // Adjust logicalTop if we need to for perpendicular writing modes in fragments.
     // FIXME: Add support for other types of objects as containerBlock, not only RenderBlock.
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread && isHorizontalWritingMode() != containerBlock.isHorizontalWritingMode() && is<RenderBlock>(containerBlock)) {
-        ASSERT(containerBlock.canHaveBoxInfoInRegion());
+        ASSERT(containerBlock.canHaveBoxInfoInFragment());
         LayoutUnit logicalTopPos = computedValues.m_position;
         const RenderBlock& renderBox = downcast<RenderBlock>(containerBlock);
         LayoutUnit cbPageOffset = renderBox.offsetFromLogicalTopOfFirstPage() - logicalLeft();
-        RenderRegion* cbRegion = renderBox.regionAtBlockOffset(cbPageOffset);
-        if (cbRegion) {
-            RenderBoxRegionInfo* boxInfo = renderBox.renderBoxRegionInfo(cbRegion);
+        RenderFragmentContainer* cbFragment = renderBox.fragmentAtBlockOffset(cbPageOffset);
+        if (cbFragment) {
+            RenderBoxFragmentInfo* boxInfo = renderBox.renderBoxFragmentInfo(cbFragment);
             if (boxInfo) {
                 logicalTopPos += boxInfo->logicalLeft();
                 computedValues.m_position = logicalTopPos;
@@ -4052,7 +4052,7 @@ void RenderBox::computePositionedLogicalWidthReplaced(LogicalExtentComputedValue
      *    else if 'direction' is 'rtl', set 'right' to the static position.
     \*-----------------------------------------------------------------------*/
     // see FIXME 1
-    computeInlineStaticDistance(logicalLeft, logicalRight, this, containerBlock, containerLogicalWidth, nullptr); // FIXME: Pass the region.
+    computeInlineStaticDistance(logicalLeft, logicalRight, this, containerBlock, containerLogicalWidth, nullptr); // FIXME: Pass the fragment.
 
     /*-----------------------------------------------------------------------*\
      * 3. If 'left' or 'right' are 'auto', replace any 'auto' on 'margin-left'
@@ -4357,7 +4357,7 @@ LayoutRect RenderBox::localCaretRect(InlineBox* box, unsigned caretOffset, Layou
     return rect;
 }
 
-VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const RenderRegion* region)
+VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const RenderFragmentContainer* fragment)
 {
     // no children...return this render object's element, if there is one, and offset 0
     if (!firstChild())
@@ -4383,8 +4383,8 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const Rend
 
     for (auto& renderer : childrenOfType<RenderBox>(*this)) {
         if (is<RenderFlowThread>(*this)) {
-            ASSERT(region);
-            if (!downcast<RenderFlowThread>(*this).objectShouldFragmentInFlowRegion(&renderer, region))
+            ASSERT(fragment);
+            if (!downcast<RenderFlowThread>(*this).objectShouldFragmentInFlowFragment(&renderer, fragment))
                 continue;
         }
 
@@ -4399,8 +4399,8 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const Rend
         
         if (point.x() <= right && point.x() >= left && point.y() <= top && point.y() >= bottom) {
             if (is<RenderTableRow>(renderer))
-                return renderer.positionForPoint(point + adjustedPoint - renderer.locationOffset(), region);
-            return renderer.positionForPoint(point - renderer.locationOffset(), region);
+                return renderer.positionForPoint(point + adjustedPoint - renderer.locationOffset(), fragment);
+            return renderer.positionForPoint(point - renderer.locationOffset(), fragment);
         }
 
         // Find the distance from (x, y) to the box.  Split the space around the box into 8 pieces
@@ -4437,7 +4437,7 @@ VisiblePosition RenderBox::positionForPoint(const LayoutPoint& point, const Rend
     }
     
     if (closestRenderer)
-        return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset(), region);
+        return closestRenderer->positionForPoint(adjustedPoint - closestRenderer->locationOffset(), fragment);
     
     return createVisiblePosition(firstPositionInOrBeforeNode(nonPseudoElement()));
 }
@@ -4455,7 +4455,7 @@ bool RenderBox::shrinkToAvoidFloats() const
 bool RenderBox::createsNewFormattingContext() const
 {
     return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasOverflowClip() || isFlexItemIncludingDeprecated()
-        || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFlowThread() || isRenderRegion()
+        || isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFlowThread() || isRenderFragmentContainer()
         || isGridItem() || style().specifiesColumns() || style().columnSpan();
 }
 
@@ -4473,7 +4473,7 @@ void RenderBox::addVisualEffectOverflow()
 
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread)
-        flowThread->addRegionsVisualEffectOverflow(this);
+        flowThread->addFragmentsVisualEffectOverflow(this);
 }
 
 LayoutRect RenderBox::applyVisualEffectOverflow(const LayoutRect& borderBox) const
@@ -4532,7 +4532,7 @@ void RenderBox::addOverflowFromChild(const RenderBox* child, const LayoutSize& d
 
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread)
-        flowThread->addRegionsOverflowFromChild(this, child, delta);
+        flowThread->addFragmentsOverflowFromChild(this, child, delta);
 
     // Only propagate layout overflow from the child if the child isn't clipping its overflow.  If it is, then
     // its overflow is internal to it, and we don't care about it.  layoutOverflowRectForPropagation takes care of this
@@ -4604,7 +4604,7 @@ void RenderBox::clearOverflow()
     m_overflow = nullptr;
     RenderFlowThread* flowThread = flowThreadContainingBlock();
     if (flowThread)
-        flowThread->clearRegionsOverflow(this);
+        flowThread->clearFragmentsOverflow(this);
 }
     
 bool RenderBox::percentageLogicalHeightIsResolvable() const
index 6eb2f3b..1c7fffe 100644 (file)
@@ -32,8 +32,8 @@ namespace WebCore {
 
 class InlineElementBox;
 class RenderBlockFlow;
-class RenderBoxRegionInfo;
-class RenderRegion;
+class RenderBoxFragmentInfo;
+class RenderFragmentContainer;
 struct PaintInfo;
 
 enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
@@ -86,7 +86,7 @@ public:
     LayoutUnit logicalWidth() const { return style().isHorizontalWritingMode() ? width() : height(); }
     LayoutUnit logicalHeight() const { return style().isHorizontalWritingMode() ? height() : width(); }
 
-    LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock&, RenderRegion* = nullptr) const;
+    LayoutUnit constrainLogicalWidthInFragmentByMinMax(LayoutUnit, LayoutUnit, RenderBlock&, RenderFragmentContainer* = nullptr) const;
     LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, std::optional<LayoutUnit> intrinsicContentHeight) const;
     LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight, std::optional<LayoutUnit> intrinsicContentHeight) const;
 
@@ -348,11 +348,11 @@ public:
     void computeBlockDirectionMargins(const RenderBlock& containingBlock, LayoutUnit& marginBefore, LayoutUnit& marginAfter) const;
     void computeAndSetBlockDirectionMargins(const RenderBlock& containingBlock);
 
-    enum RenderBoxRegionInfoFlags { CacheRenderBoxRegionInfo, DoNotCacheRenderBoxRegionInfo };
-    LayoutRect borderBoxRectInRegion(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
-    LayoutRect clientBoxRectInRegion(RenderRegion*) const;
-    RenderRegion* clampToStartAndEndRegions(RenderRegion*) const;
-    bool hasRegionRangeInFlowThread() const;
+    enum RenderBoxFragmentInfoFlags { CacheRenderBoxFragmentInfo, DoNotCacheRenderBoxFragmentInfo };
+    LayoutRect borderBoxRectInFragment(RenderFragmentContainer*, RenderBoxFragmentInfoFlags = CacheRenderBoxFragmentInfo) const;
+    LayoutRect clientBoxRectInFragment(RenderFragmentContainer*) const;
+    RenderFragmentContainer* clampToStartAndEndFragments(RenderFragmentContainer*) const;
+    bool hasFragmentRangeInFlowThread() const;
     virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const;
     
     void positionLineBox(InlineElementBox&);
@@ -375,8 +375,8 @@ public:
     LayoutUnit containingBlockLogicalWidthForContent() const override;
     LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType) const;
 
-    LayoutUnit containingBlockLogicalWidthForContentInRegion(RenderRegion*) const;
-    LayoutUnit containingBlockAvailableLineWidthInRegion(RenderRegion*) const;
+    LayoutUnit containingBlockLogicalWidthForContentInFragment(RenderFragmentContainer*) const;
+    LayoutUnit containingBlockAvailableLineWidthInFragment(RenderFragmentContainer*) const;
     LayoutUnit perpendicularContainingBlockLogicalHeight() const;
 
     virtual void updateLogicalWidth();
@@ -393,8 +393,8 @@ public:
     // zero (and returns just border + padding).
     LayoutUnit computeLogicalHeightWithoutLayout() const;
 
-    RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const;
-    void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = nullptr) const;
+    RenderBoxFragmentInfo* renderBoxFragmentInfo(RenderFragmentContainer*, RenderBoxFragmentInfoFlags = CacheRenderBoxFragmentInfo) const;
+    void computeLogicalWidthInFragment(LogicalExtentComputedValues&, RenderFragmentContainer* = nullptr) const;
 
     bool stretchesToViewport() const
     {
@@ -413,9 +413,9 @@ public:
     bool isStretchingColumnFlexItem() const;
     bool columnFlexItemHasStretchAlignment() const;
     
-    LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock& cb, RenderRegion*) const;
+    LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock& cb, RenderFragmentContainer*) const;
 
-    LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock& containingBlock, RenderRegion*) const;
+    LayoutUnit computeLogicalWidthInFragmentUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock& containingBlock, RenderFragmentContainer*) const;
     std::optional<LayoutUnit> computeLogicalHeightUsing(SizeType, const Length& height, std::optional<LayoutUnit> intrinsicContentHeight) const;
     std::optional<LayoutUnit> computeContentLogicalHeight(SizeType, const Length& height, std::optional<LayoutUnit> intrinsicContentHeight) const;
     std::optional<LayoutUnit> computeContentAndScrollbarLogicalHeightUsing(SizeType, const Length& height, std::optional<LayoutUnit> intrinsicContentHeight) const;
@@ -477,9 +477,9 @@ public:
     
     LayoutRect localCaretRect(InlineBox*, unsigned caretOffset, LayoutUnit* extraWidthToEndOfLine = nullptr) override;
 
-    virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegion* = nullptr, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, PaintPhase = PaintPhaseBlockBackground);
-    virtual LayoutRect overflowClipRectForChildLayers(const LayoutPoint& location, RenderRegion* region, OverlayScrollbarSizeRelevancy relevancy) { return overflowClipRect(location, region, relevancy); }
-    LayoutRect clipRect(const LayoutPoint& location, RenderRegion*);
+    virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderFragmentContainer* = nullptr, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize, PaintPhase = PaintPhaseBlockBackground);
+    virtual LayoutRect overflowClipRectForChildLayers(const LayoutPoint& location, RenderFragmentContainer* fragment, OverlayScrollbarSizeRelevancy relevancy) { return overflowClipRect(location, fragment, relevancy); }
+    LayoutRect clipRect(const LayoutPoint& location, RenderFragmentContainer*);
     virtual bool hasControlClip() const { return false; }
     virtual LayoutRect controlClipRect(const LayoutPoint&) const { return LayoutRect(); }
     bool pushContentsClip(PaintInfo&, const LayoutPoint& accumulatedOffset);
@@ -506,7 +506,7 @@ public:
 
     LayoutRect maskClipRect(const LayoutPoint& paintOffset);
 
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
 
     void removeFloatingOrPositionedChildFromBlockLists();
     
@@ -610,8 +610,8 @@ public:
     }
 
     // True if this box can have a range in an outside fragmentation context.
-    bool canHaveOutsideRegionRange() const { return !isInFlowRenderFlowThread(); }
-    virtual bool needsLayoutAfterRegionRangeChange() const { return false; }
+    bool canHaveOutsideFragmentRange() const { return !isInFlowRenderFlowThread(); }
+    virtual bool needsLayoutAfterFragmentRangeChange() const { return false; }
 
     const RenderBox* findEnclosingScrollableContainer() const;
     
@@ -650,7 +650,7 @@ protected:
     BackgroundBleedAvoidance determineBackgroundBleedAvoidance(GraphicsContext&) const;
     bool backgroundHasOpaqueTopLayer() const;
 
-    void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = nullptr) const;
+    void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderFragmentContainer* = nullptr) const;
 
     LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
     virtual std::optional<LayoutUnit> computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, std::optional<LayoutUnit> intrinsicContentHeight, LayoutUnit borderAndPadding) const;
@@ -686,7 +686,7 @@ private:
     // Returns true if we did a full repaint.
     bool repaintLayerRectsForImage(WrappedImagePtr, const FillLayer& layers, bool drawingBackground);
 
-    LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject& containingBlock, RenderRegion* = nullptr, bool checkForPerpendicularWritingMode = true) const;
+    LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject& containingBlock, RenderFragmentContainer* = nullptr, bool checkForPerpendicularWritingMode = true) const;
     LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject& containingBlock, bool checkForPerpendicularWritingMode = true) const;
 
     void computePositionedLogicalHeight(LogicalExtentComputedValues&) const;
 
 namespace WebCore {
 
-class RenderBoxRegionInfo {
+class RenderBoxFragmentInfo {
     WTF_MAKE_FAST_ALLOCATED;
-    WTF_MAKE_NONCOPYABLE(RenderBoxRegionInfo);
+    WTF_MAKE_NONCOPYABLE(RenderBoxFragmentInfo);
 public:
-    RenderBoxRegionInfo(LayoutUnit logicalLeft, LayoutUnit logicalWidth, bool isShifted)
+    RenderBoxFragmentInfo(LayoutUnit logicalLeft, LayoutUnit logicalWidth, bool isShifted)
         : m_logicalLeft(logicalLeft)
         , m_logicalWidth(logicalWidth)
         , m_isShifted(isShifted)
index a370d1f..276daba 100644 (file)
 #include "Path.h"
 #include "RenderBlock.h"
 #include "RenderFlexibleBox.h"
+#include "RenderFragmentContainer.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
 #include "RenderLayerBacking.h"
 #include "RenderLayerCompositor.h"
 #include "RenderMultiColumnFlowThread.h"
-#include "RenderRegion.h"
 #include "RenderTable.h"
 #include "RenderTableRow.h"
 #include "RenderText.h"
@@ -414,9 +414,9 @@ LayoutPoint RenderBoxModelObject::adjustedPositionRelativeToOffsetParent(const L
                 
                 if (is<RenderMultiColumnFlowThread>(*ancestor)) {
                     // We need to apply a translation based off what region we are inside.
-                    RenderRegion* region = downcast<RenderMultiColumnFlowThread>(*ancestor).physicalTranslationFromFlowToRegion(referencePoint);
-                    if (region)
-                        referencePoint.moveBy(region->topLeftLocation());
+                    RenderFragmentContainer* fragment = downcast<RenderMultiColumnFlowThread>(*ancestor).physicalTranslationFromFlowToFragment(referencePoint);
+                    if (fragment)
+                        referencePoint.moveBy(fragment->topLeftLocation());
                 } else if (!isOutOfFlowPositioned()) {
                     if (is<RenderBox>(*ancestor) && !is<RenderTableRow>(*ancestor))
                         referencePoint.moveBy(downcast<RenderBox>(*ancestor).topLeftLocation());
@@ -2563,10 +2563,10 @@ void RenderBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, Tra
     // The point inside a box that's inside a region has its coordinates relative to the region,
     // not the FlowThread that is its container in the RenderObject tree.
     if (is<RenderBox>(*this) && container->isOutOfFlowRenderFlowThread()) {
-        RenderRegion* startRegion = nullptr;
-        RenderRegion* endRegion = nullptr;
-        if (downcast<RenderFlowThread>(*container).getRegionRangeForBox(downcast<RenderBox>(this), startRegion, endRegion))
-            container = startRegion;
+        RenderFragmentContainer* startFragment = nullptr;
+        RenderFragmentContainer* endFragment = nullptr;
+        if (downcast<RenderFlowThread>(*container).getFragmentRangeForBox(downcast<RenderBox>(this), startFragment, endFragment))
+            container = startFragment;
     }
 
     container->mapAbsoluteToLocalPoint(mode, transformState);
index 2d41b23..ff07211 100644 (file)
@@ -218,7 +218,7 @@ public:
 
     void setSelectionState(SelectionState) override;
 
-    bool canHaveBoxInfoInRegion() const { return !isFloating() && !isReplaced() && !isInline() && !isTableCell() && isRenderBlock() && !isRenderSVGBlock(); }
+    bool canHaveBoxInfoInFragment() const { return !isFloating() && !isReplaced() && !isInline() && !isTableCell() && isRenderBlock() && !isRenderSVGBlock(); }
 
     void getGeometryForBackgroundImage(const RenderLayerModelObject* paintContainer, const LayoutPoint& paintOffset, FloatRect& destRect, FloatSize& phase, FloatSize& tileSize) const;
     void contentChanged(ContentChangeType);
index c8c0b4d..da5dd8b 100644 (file)
@@ -59,7 +59,7 @@
 #if !ASSERT_DISABLED
 #include "RenderListMarker.h"
 #endif
-#include "RenderRegion.h"
+#include "RenderFragmentContainer.h"
 #include "RenderTableCaption.h"
 #include "RenderTableCell.h"
 #include "RenderTableCol.h"
index ae250f4..25f695b 100644 (file)
@@ -241,7 +241,7 @@ void RenderFileUploadControl::computePreferredLogicalWidths()
     setPreferredLogicalWidthsDirty(false);
 }
 
-VisiblePosition RenderFileUploadControl::positionForPoint(const LayoutPoint&, const RenderRegion*)
+VisiblePosition RenderFileUploadControl::positionForPoint(const LayoutPoint&, const RenderFragmentContainer*)
 {
     return VisiblePosition();
 }
index 910a8a0..f26a1cb 100644 (file)
@@ -54,7 +54,7 @@ private:
 
     int maxFilenameWidth() const;
     
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
 
     HTMLInputElement* uploadButton() const;
 
index 8885242..e98a3ef 100644 (file)
@@ -552,8 +552,8 @@ std::optional<LayoutUnit> RenderFlexibleBox::computeMainAxisExtentForChild(const
     }
     
     // FIXME: Figure out how this should work for regions and pass in the appropriate values.
-    RenderRegion* region = nullptr;
-    return child.computeLogicalWidthInRegionUsing(sizeType, size, contentLogicalWidth(), *this, region) - borderAndPadding;
+    RenderFragmentContainer* fragment = nullptr;
+    return child.computeLogicalWidthInFragmentUsing(sizeType, size, contentLogicalWidth(), *this, fragment) - borderAndPadding;
 }
 
     
@@ -1826,7 +1826,7 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni
         }
     } else if (hasOrthogonalFlow(child) && child.style().logicalWidth().isAuto()) {
         LayoutUnit childWidth = std::max(LayoutUnit(), lineCrossAxisExtent - crossAxisMarginExtentForChild(child));
-        childWidth = child.constrainLogicalWidthInRegionByMinMax(childWidth, crossAxisContentExtent(), *this, nullptr);
+        childWidth = child.constrainLogicalWidthInFragmentByMinMax(childWidth, crossAxisContentExtent(), *this, nullptr);
         
         if (childWidth != child.logicalWidth()) {
             child.setOverrideLogicalContentWidth(childWidth - child.borderAndPaddingLogicalWidth());
index db81599..23480cd 100644 (file)
 #include "InlineElementBox.h"
 #include "Node.h"
 #include "PODIntervalTree.h"
-#include "RenderBoxRegionInfo.h"
+#include "RenderBoxFragmentInfo.h"
+#include "RenderFragmentContainer.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
 #include "RenderLayerCompositor.h"
-#include "RenderRegion.h"
 #include "RenderTableCell.h"
 #include "RenderTableSection.h"
 #include "RenderTheme.h"
@@ -51,10 +51,10 @@ namespace WebCore {
 
 RenderFlowThread::RenderFlowThread(Document& document, RenderStyle&& style)
     : RenderBlockFlow(document, WTFMove(style))
-    , m_currentRegionMaintainer(nullptr)
-    , m_regionsInvalidated(false)
-    , m_regionsHaveUniformLogicalWidth(true)
-    , m_regionsHaveUniformLogicalHeight(true)
+    , m_currentFragmentMaintainer(nullptr)
+    , m_fragmentsInvalidated(false)
+    , m_fragmentsHaveUniformLogicalWidth(true)
+    , m_fragmentsHaveUniformLogicalHeight(true)
     , m_pageLogicalSizeChanged(false)
 {
     setIsRenderFlowThread(true);
@@ -80,87 +80,87 @@ void RenderFlowThread::styleDidChange(StyleDifference diff, const RenderStyle* o
     RenderBlockFlow::styleDidChange(diff, oldStyle);
 
     if (oldStyle && oldStyle->writingMode() != style().writingMode())
-        invalidateRegions();
+        invalidateFragments();
 }
 
 void RenderFlowThread::removeFlowChildInfo(RenderElement& child)
 {
     if (is<RenderBlockFlow>(child))
-        removeLineRegionInfo(downcast<RenderBlockFlow>(child));
+        removeLineFragmentInfo(downcast<RenderBlockFlow>(child));
     if (is<RenderBox>(child))
-        removeRenderBoxRegionInfo(downcast<RenderBox>(child));
+        removeRenderBoxFragmentInfo(downcast<RenderBox>(child));
 }
 
-void RenderFlowThread::removeRegionFromThread(RenderRegion* renderRegion)
+void RenderFlowThread::removeFragmentFromThread(RenderFragmentContainer* RenderFragmentContainer)
 {
-    ASSERT(renderRegion);
-    m_regionList.remove(renderRegion);
+    ASSERT(RenderFragmentContainer);
+    m_fragmentList.remove(RenderFragmentContainer);
 }
 
-void RenderFlowThread::invalidateRegions(MarkingBehavior markingParents)
+void RenderFlowThread::invalidateFragments(MarkingBehavior markingParents)
 {
-    if (m_regionsInvalidated) {
+    if (m_fragmentsInvalidated) {
         ASSERT(selfNeedsLayout());
         return;
     }
 
-    m_regionRangeMap.clear();
-    m_breakBeforeToRegionMap.clear();
-    m_breakAfterToRegionMap.clear();
-    if (m_lineToRegionMap)
-        m_lineToRegionMap->clear();
+    m_fragmentRangeMap.clear();
+    m_breakBeforeToFragmentMap.clear();
+    m_breakAfterToFragmentMap.clear();
+    if (m_lineToFragmentMap)
+        m_lineToFragmentMap->clear();
     setNeedsLayout(markingParents);
 
-    m_regionsInvalidated = true;
+    m_fragmentsInvalidated = true;
 }
 
-void RenderFlowThread::validateRegions()
+void RenderFlowThread::validateFragments()
 {
-    if (m_regionsInvalidated) {
-        m_regionsInvalidated = false;
-        m_regionsHaveUniformLogicalWidth = true;
-        m_regionsHaveUniformLogicalHeight = true;
-
-        if (hasRegions()) {
-            LayoutUnit previousRegionLogicalWidth = 0;
-            LayoutUnit previousRegionLogicalHeight = 0;
-            bool firstRegionVisited = false;
+    if (m_fragmentsInvalidated) {
+        m_fragmentsInvalidated = false;
+        m_fragmentsHaveUniformLogicalWidth = true;
+        m_fragmentsHaveUniformLogicalHeight = true;
+
+        if (hasFragments()) {
+            LayoutUnit previousFragmentLogicalWidth = 0;
+            LayoutUnit previousFragmentLogicalHeight = 0;
+            bool firstFragmentVisited = false;
             
-            for (auto& region : m_regionList) {
-                ASSERT(!region->needsLayout() || region->isRenderRegionSet());
+            for (auto& fragment : m_fragmentList) {
+                ASSERT(!fragment->needsLayout() || fragment->isRenderFragmentContainerSet());
 
-                region->deleteAllRenderBoxRegionInfo();
+                fragment->deleteAllRenderBoxFragmentInfo();
 
-                LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
-                LayoutUnit regionLogicalHeight = region->pageLogicalHeight();
+                LayoutUnit fragmentLogicalWidth = fragment->pageLogicalWidth();
+                LayoutUnit fragmentLogicalHeight = fragment->pageLogicalHeight();
 
-                if (!firstRegionVisited)
-                    firstRegionVisited = true;
+                if (!firstFragmentVisited)
+                    firstFragmentVisited = true;
                 else {
-                    if (m_regionsHaveUniformLogicalWidth && previousRegionLogicalWidth != regionLogicalWidth)
-                        m_regionsHaveUniformLogicalWidth = false;
-                    if (m_regionsHaveUniformLogicalHeight && previousRegionLogicalHeight != regionLogicalHeight)
-                        m_regionsHaveUniformLogicalHeight = false;
+                    if (m_fragmentsHaveUniformLogicalWidth && previousFragmentLogicalWidth != fragmentLogicalWidth)
+                        m_fragmentsHaveUniformLogicalWidth = false;
+                    if (m_fragmentsHaveUniformLogicalHeight && previousFragmentLogicalHeight != fragmentLogicalHeight)
+                        m_fragmentsHaveUniformLogicalHeight = false;
                 }
 
-                previousRegionLogicalWidth = regionLogicalWidth;
+                previousFragmentLogicalWidth = fragmentLogicalWidth;
             }
 
-            setRegionRangeForBox(*this, m_regionList.first(), m_regionList.last());
+            setFragmentRangeForBox(*this, m_fragmentList.first(), m_fragmentList.last());
         }
     }
 
-    updateLogicalWidth(); // Called to get the maximum logical width for the region.
-    updateRegionsFlowThreadPortionRect();
+    updateLogicalWidth(); // Called to get the maximum logical width for the fragment.
+    updateFragmentsFlowThreadPortionRect();
 }
 
 void RenderFlowThread::layout()
 {
     StackStats::LayoutCheckPoint layoutCheckPoint;
 
-    m_pageLogicalSizeChanged = m_regionsInvalidated && everHadLayout();
+    m_pageLogicalSizeChanged = m_fragmentsInvalidated && everHadLayout();
 
-    validateRegions();
+    validateFragments();
 
     RenderBlockFlow::layout();
 
@@ -170,17 +170,17 @@ void RenderFlowThread::layout()
 void RenderFlowThread::updateLogicalWidth()
 {
     LayoutUnit logicalWidth = initialLogicalWidth();
-    for (auto& region : m_regionList) {
-        ASSERT(!region->needsLayout() || region->isRenderRegionSet());
-        logicalWidth = std::max(region->pageLogicalWidth(), logicalWidth);
+    for (auto& fragment : m_fragmentList) {
+        ASSERT(!fragment->needsLayout() || fragment->isRenderFragmentContainerSet());
+        logicalWidth = std::max(fragment->pageLogicalWidth(), logicalWidth);
     }
     setLogicalWidth(logicalWidth);
 
-    // If the regions have non-uniform logical widths, then insert inset information for the RenderFlowThread.
-    for (auto& region : m_regionList) {
-        LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
-        LayoutUnit logicalLeft = style().direction() == LTR ? LayoutUnit() : logicalWidth - regionLogicalWidth;
-        region->setRenderBoxRegionInfo(this, logicalLeft, regionLogicalWidth, false);
+    // If the fragments have non-uniform logical widths, then insert inset information for the RenderFlowThread.
+    for (auto& fragment : m_fragmentList) {
+        LayoutUnit fragmentLogicalWidth = fragment->pageLogicalWidth();
+        LayoutUnit logicalLeft = style().direction() == LTR ? LayoutUnit() : logicalWidth - fragmentLogicalWidth;
+        fragment->setRenderBoxFragmentInfo(this, logicalLeft, fragmentLogicalWidth, false);
     }
 }
 
@@ -191,11 +191,11 @@ RenderBox::LogicalExtentComputedValues RenderFlowThread::computeLogicalHeight(La
     computedValues.m_extent = 0;
 
     const LayoutUnit maxFlowSize = RenderFlowThread::maxLogicalHeight();
-    for (auto& region : m_regionList) {
-        ASSERT(!region->needsLayout() || region->isRenderRegionSet());
+    for (auto& fragment : m_fragmentList) {
+        ASSERT(!fragment->needsLayout() || fragment->isRenderFragmentContainerSet());
 
         LayoutUnit distanceToMaxSize = maxFlowSize - computedValues.m_extent;
-        computedValues.m_extent += std::min(distanceToMaxSize, region->logicalHeightOfAllFlowThreadContent());
+        computedValues.m_extent += std::min(distanceToMaxSize, fragment->logicalHeightOfAllFlowThreadContent());
 
         // If we reached the maximum size there's no point in going further.
         if (computedValues.m_extent == maxFlowSize)
@@ -219,42 +219,42 @@ bool RenderFlowThread::shouldRepaint(const LayoutRect& r) const
     return true;
 }
 
-void RenderFlowThread::repaintRectangleInRegions(const LayoutRect& repaintRect) const
+void RenderFlowThread::repaintRectangleInFragments(const LayoutRect& repaintRect) const
 {
-    if (!shouldRepaint(repaintRect) || !hasValidRegionInfo())
+    if (!shouldRepaint(repaintRect) || !hasValidFragmentInfo())
         return;
 
-    LayoutStateDisabler layoutStateDisabler(view()); // We can't use layout state to repaint, since the regions are somewhere else.
+    LayoutStateDisabler layoutStateDisabler(view()); // We can't use layout state to repaint, since the fragments are somewhere else.
 
-    for (auto& region : m_regionList)
-        region->repaintFlowThreadContent(repaintRect);
+    for (auto& fragment : m_fragmentList)
+        fragment->repaintFlowThreadContent(repaintRect);
 }
 
-RenderRegion* RenderFlowThread::regionAtBlockOffset(const RenderBox* clampBox, LayoutUnit offset, bool extendLastRegion) const
+RenderFragmentContainer* RenderFlowThread::fragmentAtBlockOffset(const RenderBox* clampBox, LayoutUnit offset, bool extendLastFragment) const
 {
-    ASSERT(!m_regionsInvalidated);
+    ASSERT(!m_fragmentsInvalidated);
 
-    if (m_regionList.isEmpty())
+    if (m_fragmentList.isEmpty())
         return nullptr;
 
-    if (m_regionList.size() == 1 && extendLastRegion)
-        return m_regionList.first();
+    if (m_fragmentList.size() == 1 && extendLastFragment)
+        return m_fragmentList.first();
 
     if (offset <= 0)
-        return clampBox ? clampBox->clampToStartAndEndRegions(m_regionList.first()) : m_regionList.first();
+        return clampBox ? clampBox->clampToStartAndEndFragments(m_fragmentList.first()) : m_fragmentList.first();
 
-    RegionSearchAdapter adapter(offset);
-    m_regionIntervalTree.allOverlapsWithAdapter<RegionSearchAdapter>(adapter);
+    FragmentSearchAdapter adapter(offset);
+    m_fragmentIntervalTree.allOverlapsWithAdapter<FragmentSearchAdapter>(adapter);
 
-    // If no region was found, the offset is in the flow thread overflow.
-    // The last region will contain the offset if extendLastRegion is set or if the last region is a set.
-    if (!adapter.result() && (extendLastRegion || m_regionList.last()->isRenderRegionSet()))
-        return clampBox ? clampBox->clampToStartAndEndRegions(m_regionList.last()) : m_regionList.last();
+    // If no fragment was found, the offset is in the flow thread overflow.
+    // The last fragment will contain the offset if extendLastFragment is set or if the last fragment is a set.
+    if (!adapter.result() && (extendLastFragment || m_fragmentList.last()->isRenderFragmentContainerSet()))
+        return clampBox ? clampBox->clampToStartAndEndFragments(m_fragmentList.last()) : m_fragmentList.last();
 
-    RenderRegion* region = adapter.result();
+    RenderFragmentContainer* fragment = adapter.result();
     if (!clampBox)
-        return region;
-    return region ? clampBox->clampToStartAndEndRegions(region) : nullptr;
+        return fragment;
+    return fragment ? clampBox->clampToStartAndEndFragments(fragment) : nullptr;
 }
 
 LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const RenderBoxModelObject& boxModelObject, const LayoutPoint& startPoint) const
@@ -263,42 +263,42 @@ LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const Rende
     
     const RenderBlock* objContainingBlock = boxModelObject.containingBlock();
     // FIXME: This needs to be adapted for different writing modes inside the flow thread.
-    RenderRegion* startRegion = regionAtBlockOffset(objContainingBlock, referencePoint.y());
-    if (startRegion) {
-        // Take into account the offset coordinates of the region.
-        RenderBoxModelObject* startRegionBox = startRegion;
-        RenderBoxModelObject* currObject = startRegionBox;
+    RenderFragmentContainer* startFragment = fragmentAtBlockOffset(objContainingBlock, referencePoint.y());
+    if (startFragment) {
+        // Take into account the offset coordinates of the fragment.
+        RenderBoxModelObject* startFragmentBox = startFragment;
+        RenderBoxModelObject* currObject = startFragmentBox;
         RenderBoxModelObject* currOffsetParent;
         while ((currOffsetParent = currObject->offsetParent())) {
             referencePoint.move(currObject->offsetLeft(), currObject->offsetTop());
             
             // Since we're looking for the offset relative to the body, we must also
-            // take into consideration the borders of the region's offsetParent.
+            // take into consideration the borders of the fragment's offsetParent.
             if (is<RenderBox>(*currOffsetParent) && !currOffsetParent->isBody())
                 referencePoint.move(downcast<RenderBox>(*currOffsetParent).borderLeft(), downcast<RenderBox>(*currOffsetParent).borderTop());
             
             currObject = currOffsetParent;
         }
         
-        // We need to check if any of this box's containing blocks start in a different region
+        // We need to check if any of this box's containing blocks start in a different fragment
         // and if so, drop the object's top position (which was computed relative to its containing block
-        // and is no longer valid) and recompute it using the region in which it flows as reference.
-        bool wasComputedRelativeToOtherRegion = false;
+        // and is no longer valid) and recompute it using the fragment in which it flows as reference.
+        bool wasComputedRelativeToOtherFragment = false;
         while (objContainingBlock && !is<RenderView>(*objContainingBlock)) {
-            // Check if this object is in a different region.
-            RenderRegion* parentStartRegion = nullptr;
-            RenderRegion* parentEndRegion = nullptr;
-            if (getRegionRangeForBox(objContainingBlock, parentStartRegion, parentEndRegion) && parentStartRegion != startRegion) {
-                wasComputedRelativeToOtherRegion = true;
+            // Check if this object is in a different fragment.
+            RenderFragmentContainer* parentStartFragment = nullptr;
+            RenderFragmentContainer* parentEndFragment = nullptr;
+            if (getFragmentRangeForBox(objContainingBlock, parentStartFragment, parentEndFragment) && parentStartFragment != startFragment) {
+                wasComputedRelativeToOtherFragment = true;
                 break;
             }
             objContainingBlock = objContainingBlock->containingBlock();
         }
         
-        if (wasComputedRelativeToOtherRegion) {
+        if (wasComputedRelativeToOtherFragment) {
             if (is<RenderBox>(boxModelObject)) {
-                // Use borderBoxRectInRegion to account for variations such as percentage margins.
-                LayoutRect borderBoxRect = downcast<RenderBox>(boxModelObject).borderBoxRectInRegion(startRegion, RenderBox::DoNotCacheRenderBoxRegionInfo);
+                // Use borderBoxRectInFragment to account for variations such as percentage margins.
+                LayoutRect borderBoxRect = downcast<RenderBox>(boxModelObject).borderBoxRectInFragment(startFragment, RenderBox::DoNotCacheRenderBoxFragmentInfo);
                 referencePoint.move(borderBoxRect.location().x(), 0);
             }
             
@@ -316,11 +316,11 @@ LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const Rende
                     top -= downcast<RenderInline>(boxModelObject).borderTop();
             }
             
-            // Get the logical top of the region this object starts in
-            // and compute the object's top, relative to the region's top.
-            LayoutUnit regionLogicalTop = startRegion->pageLogicalTopForOffset(top);
-            LayoutUnit topRelativeToRegion = top - regionLogicalTop;
-            referencePoint.setY(startRegionBox->offsetTop() + topRelativeToRegion);
+            // Get the logical top of the fragment this object starts in
+            // and compute the object's top, relative to the fragment's top.
+            LayoutUnit fragmentLogicalTop = startFragment->pageLogicalTopForOffset(top);
+            LayoutUnit topRelativeToFragment = top - fragmentLogicalTop;
+            referencePoint.setY(startFragmentBox->offsetTop() + topRelativeToFragment);
             
             // Since the top has been overriden, check if the
             // relative/sticky positioning must be reconsidered.
@@ -331,8 +331,8 @@ LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const Rende
         }
         
         // Since we're looking for the offset relative to the body, we must also
-        // take into consideration the borders of the region.
-        referencePoint.move(startRegionBox->borderLeft(), startRegionBox->borderTop());
+        // take into consideration the borders of the fragment.
+        referencePoint.move(startFragmentBox->borderLeft(), startFragmentBox->borderTop());
     }
     
     return referencePoint;
@@ -340,119 +340,119 @@ LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const Rende
 
 LayoutUnit RenderFlowThread::pageLogicalTopForOffset(LayoutUnit offset) const
 {
-    RenderRegion* region = regionAtBlockOffset(0, offset, false);
-    return region ? region->pageLogicalTopForOffset(offset) : LayoutUnit();
+    RenderFragmentContainer* fragment = fragmentAtBlockOffset(0, offset, false);
+    return fragment ? fragment->pageLogicalTopForOffset(offset) : LayoutUnit();
 }
 
 LayoutUnit RenderFlowThread::pageLogicalWidthForOffset(LayoutUnit offset) const
 {
-    RenderRegion* region = regionAtBlockOffset(0, offset, true);
-    return region ? region->pageLogicalWidth() : contentLogicalWidth();
+    RenderFragmentContainer* fragment = fragmentAtBlockOffset(0, offset, true);
+    return fragment ? fragment->pageLogicalWidth() : contentLogicalWidth();
 }
 
 LayoutUnit RenderFlowThread::pageLogicalHeightForOffset(LayoutUnit offset) const
 {
-    RenderRegion* region = regionAtBlockOffset(0, offset, false);
-    if (!region)
+    RenderFragmentContainer* fragment = fragmentAtBlockOffset(0, offset, false);
+    if (!fragment)
         return 0;
 
-    return region->pageLogicalHeight();
+    return fragment->pageLogicalHeight();
 }
 
 LayoutUnit RenderFlowThread::pageRemainingLogicalHeightForOffset(LayoutUnit offset, PageBoundaryRule pageBoundaryRule) const
 {
-    RenderRegion* region = regionAtBlockOffset(0, offset, false);
-    if (!region)
+    RenderFragmentContainer* fragment = fragmentAtBlockOffset(0, offset, false);
+    if (!fragment)
         return 0;
 
-    LayoutUnit pageLogicalTop = region->pageLogicalTopForOffset(offset);
-    LayoutUnit pageLogicalHeight = region->pageLogicalHeight();
+    LayoutUnit pageLogicalTop = fragment->pageLogicalTopForOffset(offset);
+    LayoutUnit pageLogicalHeight = fragment->pageLogicalHeight();
     LayoutUnit pageLogicalBottom = pageLogicalTop + pageLogicalHeight;
     LayoutUnit remainingHeight = pageLogicalBottom - offset;
     if (pageBoundaryRule == IncludePageBoundary) {
         // If IncludePageBoundary is set, the line exactly on the top edge of a
-        // region will act as being part of the previous region.
+        // fragment will act as being part of the previous fragment.
         remainingHeight = intMod(remainingHeight, pageLogicalHeight);
     }
     return remainingHeight;
 }
 
-RenderRegion* RenderFlowThread::mapFromFlowToRegion(TransformState& transformState) const
+RenderFragmentContainer* RenderFlowThread::mapFromFlowToFragment(TransformState& transformState) const
 {
-    if (!hasValidRegionInfo())
+    if (!hasValidFragmentInfo())
         return nullptr;
 
-    RenderRegion* renderRegion = currentRegion();
-    if (!renderRegion) {
+    RenderFragmentContainer* RenderFragmentContainer = currentFragment();
+    if (!RenderFragmentContainer) {
         LayoutRect boxRect = transformState.mappedQuad().enclosingBoundingBox();
         flipForWritingMode(boxRect);
 
         LayoutPoint center = boxRect.center();
-        renderRegion = regionAtBlockOffset(this, isHorizontalWritingMode() ? center.y() : center.x(), true);
-        if (!renderRegion)
+        RenderFragmentContainer = fragmentAtBlockOffset(this, isHorizontalWritingMode() ? center.y() : center.x(), true);
+        if (!RenderFragmentContainer)
             return nullptr;
     }
 
-    LayoutRect flippedRegionRect(renderRegion->flowThreadPortionRect());
-    flipForWritingMode(flippedRegionRect);
+    LayoutRect flippedFragmentRect(RenderFragmentContainer->flowThreadPortionRect());
+    flipForWritingMode(flippedFragmentRect);
 
-    transformState.move(renderRegion->contentBoxRect().location() - flippedRegionRect.location());
+    transformState.move(RenderFragmentContainer->contentBoxRect().location() - flippedFragmentRect.location());
 
-    return renderRegion;
+    return RenderFragmentContainer;
 }
 
-void RenderFlowThread::removeRenderBoxRegionInfo(RenderBox& box)
+void RenderFlowThread::removeRenderBoxFragmentInfo(RenderBox& box)
 {
-    if (!hasRegions())
+    if (!hasFragments())
         return;
 
-    // If the region chain was invalidated the next layout will clear the box information from all the regions.
-    if (m_regionsInvalidated) {
+    // If the fragment chain was invalidated the next layout will clear the box information from all the fragments.
+    if (m_fragmentsInvalidated) {
         ASSERT(selfNeedsLayout());
         return;
     }
 
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (getRegionRangeForBox(&box, startRegion, endRegion)) {
-        for (auto it = m_regionList.find(startRegion), end = m_regionList.end(); it != end; ++it) {
-            RenderRegion* region = *it;
-            region->removeRenderBoxRegionInfo(box);
-            if (region == endRegion)
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (getFragmentRangeForBox(&box, startFragment, endFragment)) {
+        for (auto it = m_fragmentList.find(startFragment), end = m_fragmentList.end(); it != end; ++it) {
+            RenderFragmentContainer* fragment = *it;
+            fragment->removeRenderBoxFragmentInfo(box);
+            if (fragment == endFragment)
                 break;
         }
     }
 
 #ifndef NDEBUG
-    // We have to make sure we did not leave any RenderBoxRegionInfo attached.
-    for (auto& region : m_regionList)
-        ASSERT(!region->renderBoxRegionInfo(&box));
+    // We have to make sure we did not leave any RenderBoxFragmentInfo attached.
+    for (auto& fragment : m_fragmentList)
+        ASSERT(!fragment->renderBoxFragmentInfo(&box));
 #endif
 
-    m_regionRangeMap.remove(&box);
+    m_fragmentRangeMap.remove(&box);
 }
 
-void RenderFlowThread::removeLineRegionInfo(const RenderBlockFlow& blockFlow)
+void RenderFlowThread::removeLineFragmentInfo(const RenderBlockFlow& blockFlow)
 {
-    if (!m_lineToRegionMap || blockFlow.lineLayoutPath() == SimpleLinesPath)
+    if (!m_lineToFragmentMap || blockFlow.lineLayoutPath() == SimpleLinesPath)
         return;
 
     for (auto* curr = blockFlow.firstRootBox(); curr; curr = curr->nextRootBox())
-        m_lineToRegionMap->remove(curr);
+        m_lineToFragmentMap->remove(curr);
 
     ASSERT_WITH_SECURITY_IMPLICATION(checkLinesConsistency(blockFlow));
 }
 
-void RenderFlowThread::logicalWidthChangedInRegionsForBlock(const RenderBlock* block, bool& relayoutChildren)
+void RenderFlowThread::logicalWidthChangedInFragmentsForBlock(const RenderBlock* block, bool& relayoutChildren)
 {
-    if (!hasValidRegionInfo())
+    if (!hasValidFragmentInfo())
         return;
 
-    auto it = m_regionRangeMap.find(block);
-    if (it == m_regionRangeMap.end())
+    auto it = m_fragmentRangeMap.find(block);
+    if (it == m_fragmentRangeMap.end())
         return;
 
-    RenderRegionRange& range = it->value;
+    RenderFragmentContainerRange& range = it->value;
     bool rangeInvalidated = range.rangeInvalidated();
     range.clearRangeInvalidated();
 
@@ -462,198 +462,198 @@ void RenderFlowThread::logicalWidthChangedInRegionsForBlock(const RenderBlock* b
         return;
 
     // Not necessary for the flow thread, since we already computed the correct info for it.
-    // If the regions have changed invalidate the children.
+    // If the fragments have changed invalidate the children.
     if (block == this) {
         relayoutChildren = m_pageLogicalSizeChanged;
         return;
     }
 
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(block, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(block, startFragment, endFragment))
         return;
 
-    for (auto it = m_regionList.find(startRegion), end = m_regionList.end(); it != end; ++it) {
-        RenderRegion* region = *it;
-        ASSERT(!region->needsLayout() || region->isRenderRegionSet());
+    for (auto it = m_fragmentList.find(startFragment), end = m_fragmentList.end(); it != end; ++it) {
+        RenderFragmentContainer* fragment = *it;
+        ASSERT(!fragment->needsLayout() || fragment->isRenderFragmentContainerSet());
 
-        // We have no information computed for this region so we need to do it.
-        std::unique_ptr<RenderBoxRegionInfo> oldInfo = region->takeRenderBoxRegionInfo(block);
+        // We have no information computed for this fragment so we need to do it.
+        std::unique_ptr<RenderBoxFragmentInfo> oldInfo = fragment->takeRenderBoxFragmentInfo(block);
         if (!oldInfo) {
             relayoutChildren = rangeInvalidated;
             return;
         }
 
         LayoutUnit oldLogicalWidth = oldInfo->logicalWidth();
-        RenderBoxRegionInfo* newInfo = block->renderBoxRegionInfo(region);
+        RenderBoxFragmentInfo* newInfo = block->renderBoxFragmentInfo(fragment);
         if (!newInfo || newInfo->logicalWidth() != oldLogicalWidth) {
             relayoutChildren = true;
             return;
         }
 
-        if (region == endRegion)
+        if (fragment == endFragment)
             break;
     }
 }
 
-LayoutUnit RenderFlowThread::contentLogicalWidthOfFirstRegion() const
+LayoutUnit RenderFlowThread::contentLogicalWidthOfFirstFragment() const
 {
-    RenderRegion* firstValidRegionInFlow = firstRegion();
-    if (!firstValidRegionInFlow)
+    RenderFragmentContainer* firstValidFragmentInFlow = firstFragment();
+    if (!firstValidFragmentInFlow)
         return 0;
-    return isHorizontalWritingMode() ? firstValidRegionInFlow->contentWidth() : firstValidRegionInFlow->contentHeight();
+    return isHorizontalWritingMode() ? firstValidFragmentInFlow->contentWidth() : firstValidFragmentInFlow->contentHeight();
 }
 
-LayoutUnit RenderFlowThread::contentLogicalHeightOfFirstRegion() const
+LayoutUnit RenderFlowThread::contentLogicalHeightOfFirstFragment() const
 {
-    RenderRegion* firstValidRegionInFlow = firstRegion();
-    if (!firstValidRegionInFlow)
+    RenderFragmentContainer* firstValidFragmentInFlow = firstFragment();
+    if (!firstValidFragmentInFlow)
         return 0;
-    return isHorizontalWritingMode() ? firstValidRegionInFlow->contentHeight() : firstValidRegionInFlow->contentWidth();
+    return isHorizontalWritingMode() ? firstValidFragmentInFlow->contentHeight() : firstValidFragmentInFlow->contentWidth();
 }
 
-LayoutUnit RenderFlowThread::contentLogicalLeftOfFirstRegion() const
+LayoutUnit RenderFlowThread::contentLogicalLeftOfFirstFragment() const
 {
-    RenderRegion* firstValidRegionInFlow = firstRegion();
-    if (!firstValidRegionInFlow)
+    RenderFragmentContainer* firstValidFragmentInFlow = firstFragment();
+    if (!firstValidFragmentInFlow)
         return 0;
-    return isHorizontalWritingMode() ? firstValidRegionInFlow->flowThreadPortionRect().x() : firstValidRegionInFlow->flowThreadPortionRect().y();
+    return isHorizontalWritingMode() ? firstValidFragmentInFlow->flowThreadPortionRect().x() : firstValidFragmentInFlow->flowThreadPortionRect().y();
 }
 
-RenderRegion* RenderFlowThread::firstRegion() const
+RenderFragmentContainer* RenderFlowThread::firstFragment() const
 {
-    if (!hasRegions())
+    if (!hasFragments())
         return nullptr;
-    return m_regionList.first();
+    return m_fragmentList.first();
 }
 
-RenderRegion* RenderFlowThread::lastRegion() const
+RenderFragmentContainer* RenderFlowThread::lastFragment() const
 {
-    if (!hasRegions())
+    if (!hasFragments())
         return nullptr;
-    return m_regionList.last();
+    return m_fragmentList.last();
 }
 
-void RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle(const RenderBox& box,
-    const RenderRegion* newStartRegion, const RenderRegion* newEndRegion,
-    const RenderRegion* oldStartRegion, const RenderRegion* oldEndRegion)
+void RenderFlowThread::clearRenderBoxFragmentInfoAndCustomStyle(const RenderBox& box,
+    const RenderFragmentContainer* newStartFragment, const RenderFragmentContainer* newEndFragment,
+    const RenderFragmentContainer* oldStartFragment, const RenderFragmentContainer* oldEndFragment)
 {
-    ASSERT(newStartRegion && newEndRegion && oldStartRegion && oldEndRegion);
-
-    bool insideOldRegionRange = false;
-    bool insideNewRegionRange = false;
-    for (auto& region : m_regionList) {
-        if (oldStartRegion == region)
-            insideOldRegionRange = true;
-        if (newStartRegion == region)
-            insideNewRegionRange = true;
-
-        if (!(insideOldRegionRange && insideNewRegionRange)) {
-            if (region->renderBoxRegionInfo(&box))
-                region->removeRenderBoxRegionInfo(box);
+    ASSERT(newStartFragment && newEndFragment && oldStartFragment && oldEndFragment);
+
+    bool insideOldFragmentRange = false;
+    bool insideNewFragmentRange = false;
+    for (auto& fragment : m_fragmentList) {
+        if (oldStartFragment == fragment)
+            insideOldFragmentRange = true;
+        if (newStartFragment == fragment)
+            insideNewFragmentRange = true;
+
+        if (!(insideOldFragmentRange && insideNewFragmentRange)) {
+            if (fragment->renderBoxFragmentInfo(&box))
+                fragment->removeRenderBoxFragmentInfo(box);
         }
 
-        if (oldEndRegion == region)
-            insideOldRegionRange = false;
-        if (newEndRegion == region)
-            insideNewRegionRange = false;
+        if (oldEndFragment == fragment)
+            insideOldFragmentRange = false;
+        if (newEndFragment == fragment)
+            insideNewFragmentRange = false;
     }
 }
 
-void RenderFlowThread::setRegionRangeForBox(const RenderBox& box, RenderRegion* startRegion, RenderRegion* endRegion)
+void RenderFlowThread::setFragmentRangeForBox(const RenderBox& box, RenderFragmentContainer* startFragment, RenderFragmentContainer* endFragment)
 {
-    ASSERT(hasRegions());
-    ASSERT(startRegion && endRegion && startRegion->flowThread() == this && endRegion->flowThread() == this);
+    ASSERT(hasFragments());
+    ASSERT(startFragment && endFragment && startFragment->flowThread() == this && endFragment->flowThread() == this);
 
-    auto it = m_regionRangeMap.find(&box);
-    if (it == m_regionRangeMap.end()) {
-        m_regionRangeMap.set(&box, RenderRegionRange(startRegion, endRegion));
+    auto it = m_fragmentRangeMap.find(&box);
+    if (it == m_fragmentRangeMap.end()) {
+        m_fragmentRangeMap.set(&box, RenderFragmentContainerRange(startFragment, endFragment));
         return;
     }
 
     // If nothing changed, just bail.
-    RenderRegionRange& range = it->value;
-    if (range.startRegion() == startRegion && range.endRegion() == endRegion)
+    RenderFragmentContainerRange& range = it->value;
+    if (range.startFragment() == startFragment && range.endFragment() == endFragment)
         return;
 
-    clearRenderBoxRegionInfoAndCustomStyle(box, startRegion, endRegion, range.startRegion(), range.endRegion());
-    range.setRange(startRegion, endRegion);
+    clearRenderBoxFragmentInfoAndCustomStyle(box, startFragment, endFragment, range.startFragment(), range.endFragment());
+    range.setRange(startFragment, endFragment);
 }
 
-bool RenderFlowThread::hasCachedRegionRangeForBox(const RenderBox& box) const
+bool RenderFlowThread::hasCachedFragmentRangeForBox(const RenderBox& box) const
 {
-    return m_regionRangeMap.contains(&box);
+    return m_fragmentRangeMap.contains(&box);
 }
 
-bool RenderFlowThread::getRegionRangeForBoxFromCachedInfo(const RenderBox* box, RenderRegion*& startRegion, RenderRegion*& endRegion) const
+bool RenderFlowThread::getFragmentRangeForBoxFromCachedInfo(const RenderBox* box, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const
 {
     ASSERT(box);
-    ASSERT(hasValidRegionInfo());
-    ASSERT((startRegion == nullptr) && (endRegion == nullptr));
-
-    auto it = m_regionRangeMap.find(box);
-    if (it != m_regionRangeMap.end()) {
-        const RenderRegionRange& range = it->value;
-        startRegion = range.startRegion();
-        endRegion = range.endRegion();
-        ASSERT(m_regionList.contains(startRegion) && m_regionList.contains(endRegion));
+    ASSERT(hasValidFragmentInfo());
+    ASSERT((startFragment == nullptr) && (endFragment == nullptr));
+
+    auto it = m_fragmentRangeMap.find(box);
+    if (it != m_fragmentRangeMap.end()) {
+        const RenderFragmentContainerRange& range = it->value;
+        startFragment = range.startFragment();
+        endFragment = range.endFragment();
+        ASSERT(m_fragmentList.contains(startFragment) && m_fragmentList.contains(endFragment));
         return true;
     }
 
     return false;
 }
 
-bool RenderFlowThread::getRegionRangeForBox(const RenderBox* box, RenderRegion*& startRegion, RenderRegion*& endRegion) const
+bool RenderFlowThread::getFragmentRangeForBox(const RenderBox* box, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const
 {
     ASSERT(box);
 
-    startRegion = endRegion = nullptr;
-    if (!hasValidRegionInfo()) // We clear the ranges when we invalidate the regions.
+    startFragment = endFragment = nullptr;
+    if (!hasValidFragmentInfo()) // We clear the ranges when we invalidate the fragments.
         return false;
 
-    if (m_regionList.size() == 1) {
-        startRegion = endRegion = m_regionList.first();
+    if (m_fragmentList.size() == 1) {
+        startFragment = endFragment = m_fragmentList.first();
         return true;
     }
 
-    if (getRegionRangeForBoxFromCachedInfo(box, startRegion, endRegion))
+    if (getFragmentRangeForBoxFromCachedInfo(box, startFragment, endFragment))
         return true;
 
     return false;
 }
 
-bool RenderFlowThread::computedRegionRangeForBox(const RenderBox* box, RenderRegion*& startRegion, RenderRegion*& endRegion) const
+bool RenderFlowThread::computedFragmentRangeForBox(const RenderBox* box, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const
 {
     ASSERT(box);
 
-    startRegion = endRegion = nullptr;
-    if (!hasValidRegionInfo()) // We clear the ranges when we invalidate the regions.
+    startFragment = endFragment = nullptr;
+    if (!hasValidFragmentInfo()) // We clear the ranges when we invalidate the fragments.
         return false;
 
-    if (getRegionRangeForBox(box, startRegion, endRegion))
+    if (getFragmentRangeForBox(box, startFragment, endFragment))
         return true;
 
-    // Search the region range using the information provided by the containing block chain.
+    // Search the fragment range using the information provided by the containing block chain.
     auto* containingBlock = const_cast<RenderBox*>(box);
     while (!containingBlock->isRenderFlowThread()) {
         InlineElementBox* boxWrapper = containingBlock->inlineBoxWrapper();
-        if (boxWrapper && boxWrapper->root().containingRegion()) {
-            startRegion = endRegion = boxWrapper->root().containingRegion();
-            ASSERT(m_regionList.contains(startRegion));
+        if (boxWrapper && boxWrapper->root().containingFragment()) {
+            startFragment = endFragment = boxWrapper->root().containingFragment();
+            ASSERT(m_fragmentList.contains(startFragment));
             return true;
         }
 
-        // FIXME: Use the containingBlock() value once we patch all the layout systems to be region range aware
+        // FIXME: Use the containingBlock() value once we patch all the layout systems to be fragment range aware
         // (e.g. if we use containingBlock() the shadow controls of a video element won't get the range from the
         // video box because it's not a block; they need to be patched separately).
         ASSERT(containingBlock->parent());
         containingBlock = &containingBlock->parent()->enclosingBox();
         ASSERT(containingBlock);
 
-        // If a box doesn't have a cached region range it usually means the box belongs to a line so startRegion should be equal with endRegion.
-        // FIXME: Find the cases when this startRegion should not be equal with endRegion and make sure these boxes have cached region ranges.
-        if (containingBlock && hasCachedRegionRangeForBox(*containingBlock)) {
-            startRegion = endRegion = regionAtBlockOffset(containingBlock, containingBlock->offsetFromLogicalTopOfFirstPage(), true);
+        // If a box doesn't have a cached fragment range it usually means the box belongs to a line so startFragment should be equal with endFragment.
+        // FIXME: Find the cases when this startFragment should not be equal with endFragment and make sure these boxes have cached fragment ranges.
+        if (containingBlock && hasCachedFragmentRangeForBox(*containingBlock)) {
+            startFragment = endFragment = fragmentAtBlockOffset(containingBlock, containingBlock->offsetFromLogicalTopOfFirstPage(), true);
             return true;
         }
     }
@@ -661,62 +661,62 @@ bool RenderFlowThread::computedRegionRangeForBox(const RenderBox* box, RenderReg
     return false;
 }
 
-bool RenderFlowThread::regionInRange(const RenderRegion* targetRegion, const RenderRegion* startRegion, const RenderRegion* endRegion) const
+bool RenderFlowThread::fragmentInRange(const RenderFragmentContainer* targetFragment, const RenderFragmentContainer* startFragment, const RenderFragmentContainer* endFragment) const
 {
-    ASSERT(targetRegion);
+    ASSERT(targetFragment);
 
-    for (auto it = m_regionList.find(const_cast<RenderRegion*>(startRegion)), end = m_regionList.end(); it != end; ++it) {
-        const RenderRegion* currRegion = *it;
-        if (targetRegion == currRegion)
+    for (auto it = m_fragmentList.find(const_cast<RenderFragmentContainer*>(startFragment)), end = m_fragmentList.end(); it != end; ++it) {
+        const RenderFragmentContainer* currFragment = *it;
+        if (targetFragment == currFragment)
             return true;
-        if (currRegion == endRegion)
+        if (currFragment == endFragment)
             break;
     }
 
     return false;
 }
 
-bool RenderFlowThread::objectShouldFragmentInFlowRegion(const RenderObject* object, const RenderRegion* region) const
+bool RenderFlowThread::objectShouldFragmentInFlowFragment(const RenderObject* object, const RenderFragmentContainer* fragment) const
 {
     ASSERT(object);
-    ASSERT(region);
+    ASSERT(fragment);
     
     RenderFlowThread* flowThread = object->flowThreadContainingBlock();
     if (flowThread != this)
         return false;
 
-    if (!m_regionList.contains(const_cast<RenderRegion*>(region)))
+    if (!m_fragmentList.contains(const_cast<RenderFragmentContainer*>(fragment)))
         return false;
     
-    RenderRegion* enclosingBoxStartRegion = nullptr;
-    RenderRegion* enclosingBoxEndRegion = nullptr;
-    // If the box has no range, do not check regionInRange. Boxes inside inlines do not get ranges.
-    // Instead, the containing RootInlineBox will abort when trying to paint inside the wrong region.
-    if (computedRegionRangeForBox(&object->enclosingBox(), enclosingBoxStartRegion, enclosingBoxEndRegion)
-        && !regionInRange(region, enclosingBoxStartRegion, enclosingBoxEndRegion))
+    RenderFragmentContainer* enclosingBoxStartFragment = nullptr;
+    RenderFragmentContainer* enclosingBoxEndFragment = nullptr;
+    // If the box has no range, do not check fragmentInRange. Boxes inside inlines do not get ranges.
+    // Instead, the containing RootInlineBox will abort when trying to paint inside the wrong fragment.
+    if (computedFragmentRangeForBox(&object->enclosingBox(), enclosingBoxStartFragment, enclosingBoxEndFragment)
+        && !fragmentInRange(fragment, enclosingBoxStartFragment, enclosingBoxEndFragment))
         return false;
     
     return object->isBox() || object->isRenderInline();
 }
 
-bool RenderFlowThread::objectInFlowRegion(const RenderObject* object, const RenderRegion* region) const
+bool RenderFlowThread::objectInFlowFragment(const RenderObject* object, const RenderFragmentContainer* fragment) const
 {
     ASSERT(object);
-    ASSERT(region);
+    ASSERT(fragment);
 
     RenderFlowThread* flowThread = object->flowThreadContainingBlock();
     if (flowThread != this)
         return false;
 
-    if (!m_regionList.contains(const_cast<RenderRegion*>(region)))
+    if (!m_fragmentList.contains(const_cast<RenderFragmentContainer*>(fragment)))
         return false;
 
-    RenderRegion* enclosingBoxStartRegion = nullptr;
-    RenderRegion* enclosingBoxEndRegion = nullptr;
-    if (!getRegionRangeForBox(&object->enclosingBox(), enclosingBoxStartRegion, enclosingBoxEndRegion))
+    RenderFragmentContainer* enclosingBoxStartFragment = nullptr;
+    RenderFragmentContainer* enclosingBoxEndFragment = nullptr;
+    if (!getFragmentRangeForBox(&object->enclosingBox(), enclosingBoxStartFragment, enclosingBoxEndFragment))
         return false;
 
-    if (!regionInRange(region, enclosingBoxStartRegion, enclosingBoxEndRegion))
+    if (!fragmentInRange(fragment, enclosingBoxStartFragment, enclosingBoxEndFragment))
         return false;
 
     if (object->isBox())
@@ -727,17 +727,17 @@ bool RenderFlowThread::objectInFlowRegion(const RenderObject* object, const Rend
         objectABBRect.setWidth(1);
     if (!objectABBRect.height())
         objectABBRect.setHeight(1); 
-    if (objectABBRect.intersects(region->absoluteBoundingBoxRect(true)))
+    if (objectABBRect.intersects(fragment->absoluteBoundingBoxRect(true)))
         return true;
 
-    if (region == lastRegion()) {
-        // If the object does not intersect any of the enclosing box regions
-        // then the object is in last region.
-        for (auto it = m_regionList.find(enclosingBoxStartRegion), end = m_regionList.end(); it != end; ++it) {
-            const RenderRegion* currRegion = *it;
-            if (currRegion == region)
+    if (fragment == lastFragment()) {
+        // If the object does not intersect any of the enclosing box fragments
+        // then the object is in last fragment.
+        for (auto it = m_fragmentList.find(enclosingBoxStartFragment), end = m_fragmentList.end(); it != end; ++it) {
+            const RenderFragmentContainer* currFragment = *it;
+            if (currFragment == fragment)
                 break;
-            if (objectABBRect.intersects(currRegion->absoluteBoundingBoxRect(true)))
+            if (objectABBRect.intersects(currFragment->absoluteBoundingBoxRect(true)))
                 return false;
         }
         return true;
@@ -749,17 +749,17 @@ bool RenderFlowThread::objectInFlowRegion(const RenderObject* object, const Rend
 #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
 bool RenderFlowThread::checkLinesConsistency(const RenderBlockFlow& removedBlock) const
 {
-    if (!m_lineToRegionMap)
+    if (!m_lineToFragmentMap)
         return true;
 
-    for (auto& linePair : *m_lineToRegionMap.get()) {
+    for (auto& linePair : *m_lineToFragmentMap.get()) {
         const RootInlineBox* line = linePair.key;
-        RenderRegion* region = linePair.value;
+        RenderFragmentContainer* fragment = linePair.value;
         if (&line->blockFlow() == &removedBlock)
             return false;
         if (line->blockFlow().flowThreadState() == NotInsideFlowThread)
             return false;
-        if (!m_regionList.contains(region))
+        if (!m_fragmentList.contains(fragment))
             return false;
     }
 
@@ -767,93 +767,93 @@ bool RenderFlowThread::checkLinesConsistency(const RenderBlockFlow& removedBlock
 }
 #endif
 
-void RenderFlowThread::clearLinesToRegionMap()
+void RenderFlowThread::clearLinesToFragmentMap()
 {
-    if (m_lineToRegionMap)
-        m_lineToRegionMap->clear();
+    if (m_lineToFragmentMap)
+        m_lineToFragmentMap->clear();
 }
 
 void RenderFlowThread::deleteLines()
 {
-    clearLinesToRegionMap();
+    clearLinesToFragmentMap();
     RenderBlockFlow::deleteLines();
 }
 
 void RenderFlowThread::willBeDestroyed()
 {
-    clearLinesToRegionMap();
+    clearLinesToFragmentMap();
     RenderBlockFlow::willBeDestroyed();
 }
 
-void RenderFlowThread::markRegionsForOverflowLayoutIfNeeded()
+void RenderFlowThread::markFragmentsForOverflowLayoutIfNeeded()
 {
-    if (!hasRegions())
+    if (!hasFragments())
         return;
 
-    for (auto& region : m_regionList)
-        region->setNeedsSimplifiedNormalFlowLayout();
+    for (auto& fragment : m_fragmentList)
+        fragment->setNeedsSimplifiedNormalFlowLayout();
 }
 
-void RenderFlowThread::updateRegionsFlowThreadPortionRect()
+void RenderFlowThread::updateFragmentsFlowThreadPortionRect()
 {
     LayoutUnit logicalHeight = 0;
     // FIXME: Optimize not to clear the interval all the time. This implies manually managing the tree nodes lifecycle.
-    m_regionIntervalTree.clear();
-    for (auto& region : m_regionList) {
-        LayoutUnit regionLogicalWidth = region->pageLogicalWidth();
-        LayoutUnit regionLogicalHeight = std::min<LayoutUnit>(RenderFlowThread::maxLogicalHeight() - logicalHeight, region->logicalHeightOfAllFlowThreadContent());
+    m_fragmentIntervalTree.clear();
+    for (auto& fragment : m_fragmentList) {
+        LayoutUnit fragmentLogicalWidth = fragment->pageLogicalWidth();
+        LayoutUnit fragmentLogicalHeight = std::min<LayoutUnit>(RenderFlowThread::maxLogicalHeight() - logicalHeight, fragment->logicalHeightOfAllFlowThreadContent());
 
-        LayoutRect regionRect(style().direction() == LTR ? LayoutUnit() : logicalWidth() - regionLogicalWidth, logicalHeight, regionLogicalWidth, regionLogicalHeight);
+        LayoutRect fragmentRect(style().direction() == LTR ? LayoutUnit() : logicalWidth() - fragmentLogicalWidth, logicalHeight, fragmentLogicalWidth, fragmentLogicalHeight);
 
-        region->setFlowThreadPortionRect(isHorizontalWritingMode() ? regionRect : regionRect.transposedRect());
+        fragment->setFlowThreadPortionRect(isHorizontalWritingMode() ? fragmentRect : fragmentRect.transposedRect());
 
-        m_regionIntervalTree.add(RegionIntervalTree::createInterval(logicalHeight, logicalHeight + regionLogicalHeight, region));
+        m_fragmentIntervalTree.add(FragmentIntervalTree::createInterval(logicalHeight, logicalHeight + fragmentLogicalHeight, fragment));
 
-        logicalHeight += regionLogicalHeight;
+        logicalHeight += fragmentLogicalHeight;
     }
 }
 
-// Even if we require the break to occur at offsetBreakInFlowThread, because regions may have min/max-height values,
+// Even if we require the break to occur at offsetBreakInFlowThread, because fragments may have min/max-height values,
 // it is possible that the break will occur at a different offset than the original one required.
 // offsetBreakAdjustment measures the different between the requested break offset and the current break offset.
-bool RenderFlowThread::addForcedRegionBreak(const RenderBlock* block, LayoutUnit offsetBreakInFlowThread, RenderBox*, bool, LayoutUnit* offsetBreakAdjustment)
+bool RenderFlowThread::addForcedFragmentBreak(const RenderBlock* block, LayoutUnit offsetBreakInFlowThread, RenderBox*, bool, LayoutUnit* offsetBreakAdjustment)
 {
-    // We need to update the regions flow thread portion rect because we are going to process
-    // a break on these regions.
-    updateRegionsFlowThreadPortionRect();
-
-    // Simulate a region break at offsetBreakInFlowThread. If it points inside an auto logical height region,
-    // then it determines the region computed auto height.
-    RenderRegion* region = regionAtBlockOffset(block, offsetBreakInFlowThread);
-    if (!region)
+    // We need to update the fragments flow thread portion rect because we are going to process
+    // a break on these fragments.
+    updateFragmentsFlowThreadPortionRect();
+
+    // Simulate a fragment break at offsetBreakInFlowThread. If it points inside an auto logical height fragment,
+    // then it determines the fragment computed auto height.
+    RenderFragmentContainer* fragment = fragmentAtBlockOffset(block, offsetBreakInFlowThread);
+    if (!fragment)
         return false;
 
-    LayoutUnit currentRegionOffsetInFlowThread = isHorizontalWritingMode() ? region->flowThreadPortionRect().y() : region->flowThreadPortionRect().x();
+    LayoutUnit currentFragmentOffsetInFlowThread = isHorizontalWritingMode() ? fragment->flowThreadPortionRect().y() : fragment->flowThreadPortionRect().x();
 
-    currentRegionOffsetInFlowThread += isHorizontalWritingMode() ? region->flowThreadPortionRect().height() : region->flowThreadPortionRect().width();
+    currentFragmentOffsetInFlowThread += isHorizontalWritingMode() ? fragment->flowThreadPortionRect().height() : fragment->flowThreadPortionRect().width();
 
     if (offsetBreakAdjustment)
-        *offsetBreakAdjustment = std::max<LayoutUnit>(0, currentRegionOffsetInFlowThread - offsetBreakInFlowThread);
+        *offsetBreakAdjustment = std::max<LayoutUnit>(0, currentFragmentOffsetInFlowThread - offsetBreakInFlowThread);
 
     return false;
 }
 
 void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect)
 {
-    ASSERT(!m_regionsInvalidated);
+    ASSERT(!m_fragmentsInvalidated);
     
-    for (auto& region : m_regionList)
-        region->collectLayerFragments(layerFragments, layerBoundingBox, dirtyRect);
+    for (auto& fragment : m_fragmentList)
+        fragment->collectLayerFragments(layerFragments, layerBoundingBox, dirtyRect);
 }
 
 LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundingBox)
 {
-    ASSERT(!m_regionsInvalidated);
+    ASSERT(!m_fragmentsInvalidated);
     
     LayoutRect result;
-    for (auto& region : m_regionList) {
+    for (auto& fragment : m_fragmentList) {
         LayerFragments fragments;
-        region->collectLayerFragments(fragments, layerBoundingBox, LayoutRect::infiniteRect());
+        fragment->collectLayerFragments(fragments, layerBoundingBox, LayoutRect::infiniteRect());
         for (const auto& fragment : fragments) {
             LayoutRect fragmentRect(layerBoundingBox);
             fragmentRect.intersect(fragment.paginationClip);
@@ -865,7 +865,7 @@ LayoutRect RenderFlowThread::fragmentsBoundingBox(const LayoutRect& layerBoundin
     return result;
 }
 
-LayoutUnit RenderFlowThread::offsetFromLogicalTopOfFirstRegion(const RenderBlock* currentBlock) const
+LayoutUnit RenderFlowThread::offsetFromLogicalTopOfFirstFragment(const RenderBlock* currentBlock) const
 {
     // As a last resort, take the slow path.
     LayoutRect blockRect(0, 0, currentBlock->width(), currentBlock->height());
@@ -898,7 +898,7 @@ LayoutUnit RenderFlowThread::offsetFromLogicalTopOfFirstRegion(const RenderBlock
     return currentBlock->isHorizontalWritingMode() ? blockRect.y() : blockRect.x();
 }
 
-void RenderFlowThread::RegionSearchAdapter::collectIfNeeded(const RegionInterval& interval)
+void RenderFlowThread::FragmentSearchAdapter::collectIfNeeded(const FragmentInterval& interval)
 {
     if (m_result)
         return;
@@ -911,29 +911,29 @@ void RenderFlowThread::mapLocalToContainer(const RenderLayerModelObject* repaint
     if (this == repaintContainer)
         return;
 
-    if (RenderRegion* region = mapFromFlowToRegion(transformState)) {
+    if (RenderFragmentContainer* fragment = mapFromFlowToFragment(transformState)) {
         // FIXME: The cast below is probably not the best solution, we may need to find a better way.
-        const RenderObject* regionObject = static_cast<const RenderObject*>(region);
+        const RenderObject* fragmentObject = static_cast<const RenderObject*>(fragment);
 
         // If the repaint container is nullptr, we have to climb up to the RenderView, otherwise swap
-        // it with the region's repaint container.
-        repaintContainer = repaintContainer ? region->containerForRepaint() : nullptr;
-
-        if (RenderFlowThread* regionFlowThread = region->flowThreadContainingBlock()) {
-            RenderRegion* startRegion = nullptr;
-            RenderRegion* endRegion = nullptr;
-            if (regionFlowThread->getRegionRangeForBox(region, startRegion, endRegion)) {
-                CurrentRenderRegionMaintainer regionMaintainer(*startRegion);
-                regionObject->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
+        // it with the fragment's repaint container.
+        repaintContainer = repaintContainer ? fragment->containerForRepaint() : nullptr;
+
+        if (RenderFlowThread* fragmentFlowThread = fragment->flowThreadContainingBlock()) {
+            RenderFragmentContainer* startFragment = nullptr;
+            RenderFragmentContainer* endFragment = nullptr;
+            if (fragmentFlowThread->getFragmentRangeForBox(fragment, startFragment, endFragment)) {
+                CurrentRenderFragmentContainerMaintainer fragmentMaintainer(*startFragment);
+                fragmentObject->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
                 return;
             }
         }
 
-        regionObject->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
+        fragmentObject->mapLocalToContainer(repaintContainer, transformState, mode, wasFixed);
     }
 }
 
-// FIXME: Make this function faster. Walking the render tree is slow, better use a caching mechanism (e.g. |cachedOffsetFromLogicalTopOfFirstRegion|).
+// FIXME: Make this function faster. Walking the render tree is slow, better use a caching mechanism (e.g. |cachedOffsetFromLogicalTopOfFirstFragment|).
 LayoutRect RenderFlowThread::mapFromLocalToFlowThread(const RenderBox* box, const LayoutRect& localRect) const
 {
     LayoutRect boxRect = localRect;
@@ -955,7 +955,7 @@ LayoutRect RenderFlowThread::mapFromLocalToFlowThread(const RenderBox* box, cons
     return boxRect;
 }
 
-// FIXME: Make this function faster. Walking the render tree is slow, better use a caching mechanism (e.g. |cachedOffsetFromLogicalTopOfFirstRegion|).
+// FIXME: Make this function faster. Walking the render tree is slow, better use a caching mechanism (e.g. |cachedOffsetFromLogicalTopOfFirstFragment|).
 LayoutRect RenderFlowThread::mapFromFlowThreadToLocal(const RenderBox* box, const LayoutRect& rect) const
 {
     LayoutRect localRect = rect;
@@ -988,152 +988,152 @@ void RenderFlowThread::flipForWritingModeLocalCoordinates(LayoutRect& rect) cons
         rect.setX(0 - rect.maxX());
 }
 
-void RenderFlowThread::addRegionsVisualEffectOverflow(const RenderBox* box)
+void RenderFlowThread::addFragmentsVisualEffectOverflow(const RenderBox* box)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(box, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(box, startFragment, endFragment))
         return;
 
-    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
-        RenderRegion* region = *iter;
+    for (auto iter = m_fragmentList.find(startFragment), end = m_fragmentList.end(); iter != end; ++iter) {
+        RenderFragmentContainer* fragment = *iter;
 
-        LayoutRect borderBox = box->borderBoxRectInRegion(region);
+        LayoutRect borderBox = box->borderBoxRectInFragment(fragment);
         borderBox = box->applyVisualEffectOverflow(borderBox);
-        borderBox = region->rectFlowPortionForBox(box, borderBox);
+        borderBox = fragment->rectFlowPortionForBox(box, borderBox);
 
-        region->addVisualOverflowForBox(box, borderBox);
-        if (region == endRegion)
+        fragment->addVisualOverflowForBox(box, borderBox);
+        if (fragment == endFragment)
             break;
     }
 }
 
-void RenderFlowThread::addRegionsVisualOverflowFromTheme(const RenderBlock* block)
+void RenderFlowThread::addFragmentsVisualOverflowFromTheme(const RenderBlock* block)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(block, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(block, startFragment, endFragment))
         return;
 
-    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
-        RenderRegion* region = *iter;
+    for (auto iter = m_fragmentList.find(startFragment), end = m_fragmentList.end(); iter != end; ++iter) {
+        RenderFragmentContainer* fragment = *iter;
 
-        LayoutRect borderBox = block->borderBoxRectInRegion(region);
-        borderBox = region->rectFlowPortionForBox(block, borderBox);
+        LayoutRect borderBox = block->borderBoxRectInFragment(fragment);
+        borderBox = fragment->rectFlowPortionForBox(block, borderBox);
 
         FloatRect inflatedRect = borderBox;
         block->theme().adjustRepaintRect(*block, inflatedRect);
 
-        region->addVisualOverflowForBox(block, snappedIntRect(LayoutRect(inflatedRect)));
-        if (region == endRegion)
+        fragment->addVisualOverflowForBox(block, snappedIntRect(LayoutRect(inflatedRect)));
+        if (fragment == endFragment)
             break;
     }
 }
 
-void RenderFlowThread::addRegionsOverflowFromChild(const RenderBox* box, const RenderBox* child, const LayoutSize& delta)
+void RenderFlowThread::addFragmentsOverflowFromChild(const RenderBox* box, const RenderBox* child, const LayoutSize& delta)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(child, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(child, startFragment, endFragment))
         return;
 
-    RenderRegion* containerStartRegion = nullptr;
-    RenderRegion* containerEndRegion = nullptr;
-    if (!getRegionRangeForBox(box, containerStartRegion, containerEndRegion))
+    RenderFragmentContainer* containerStartFragment = nullptr;
+    RenderFragmentContainer* containerEndFragment = nullptr;
+    if (!getFragmentRangeForBox(box, containerStartFragment, containerEndFragment))
         return;
 
-    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
-        RenderRegion* region = *iter;
-        if (!regionInRange(region, containerStartRegion, containerEndRegion)) {
-            if (region == endRegion)
+    for (auto iter = m_fragmentList.find(startFragment), end = m_fragmentList.end(); iter != end; ++iter) {
+        RenderFragmentContainer* fragment = *iter;
+        if (!fragmentInRange(fragment, containerStartFragment, containerEndFragment)) {
+            if (fragment == endFragment)
                 break;
             continue;
         }
 
-        LayoutRect childLayoutOverflowRect = region->layoutOverflowRectForBoxForPropagation(child);
+        LayoutRect childLayoutOverflowRect = fragment->layoutOverflowRectForBoxForPropagation(child);
         childLayoutOverflowRect.move(delta);
         
-        region->addLayoutOverflowForBox(box, childLayoutOverflowRect);
+        fragment->addLayoutOverflowForBox(box, childLayoutOverflowRect);
 
         if (child->hasSelfPaintingLayer() || box->hasOverflowClip()) {
-            if (region == endRegion)
+            if (fragment == endFragment)
                 break;
             continue;
         }
-        LayoutRect childVisualOverflowRect = region->visualOverflowRectForBoxForPropagation(*child);
+        LayoutRect childVisualOverflowRect = fragment->visualOverflowRectForBoxForPropagation(*child);
         childVisualOverflowRect.move(delta);
-        region->addVisualOverflowForBox(box, childVisualOverflowRect);
+        fragment->addVisualOverflowForBox(box, childVisualOverflowRect);
 
-        if (region == endRegion)
+        if (fragment == endFragment)
             break;
     }
 }
     
-void RenderFlowThread::addRegionsLayoutOverflow(const RenderBox* box, const LayoutRect& layoutOverflow)
+void RenderFlowThread::addFragmentsLayoutOverflow(const RenderBox* box, const LayoutRect& layoutOverflow)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(box, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(box, startFragment, endFragment))
         return;
 
-    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
-        RenderRegion* region = *iter;
-        LayoutRect layoutOverflowInRegion = region->rectFlowPortionForBox(box, layoutOverflow);
+    for (auto iter = m_fragmentList.find(startFragment), end = m_fragmentList.end(); iter != end; ++iter) {
+        RenderFragmentContainer* fragment = *iter;
+        LayoutRect layoutOverflowInFragment = fragment->rectFlowPortionForBox(box, layoutOverflow);
 
-        region->addLayoutOverflowForBox(box, layoutOverflowInRegion);
+        fragment->addLayoutOverflowForBox(box, layoutOverflowInFragment);
 
-        if (region == endRegion)
+        if (fragment == endFragment)
             break;
     }
 }
 
-void RenderFlowThread::addRegionsVisualOverflow(const RenderBox* box, const LayoutRect& visualOverflow)
+void RenderFlowThread::addFragmentsVisualOverflow(const RenderBox* box, const LayoutRect& visualOverflow)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(box, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(box, startFragment, endFragment))
         return;
     
-    for (RenderRegionList::iterator iter = m_regionList.find(startRegion); iter != m_regionList.end(); ++iter) {
-        RenderRegion* region = *iter;
-        LayoutRect visualOverflowInRegion = region->rectFlowPortionForBox(box, visualOverflow);
+    for (RenderFragmentContainerList::iterator iter = m_fragmentList.find(startFragment); iter != m_fragmentList.end(); ++iter) {
+        RenderFragmentContainer* fragment = *iter;
+        LayoutRect visualOverflowInFragment = fragment->rectFlowPortionForBox(box, visualOverflow);
         
-        region->addVisualOverflowForBox(box, visualOverflowInRegion);
+        fragment->addVisualOverflowForBox(box, visualOverflowInFragment);
         
-        if (region == endRegion)
+        if (fragment == endFragment)
             break;
     }
 }
 
-void RenderFlowThread::clearRegionsOverflow(const RenderBox* box)
+void RenderFlowThread::clearFragmentsOverflow(const RenderBox* box)
 {
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (!getRegionRangeForBox(box, startRegion, endRegion))
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (!getFragmentRangeForBox(box, startFragment, endFragment))
         return;
 
-    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
-        RenderRegion* region = *iter;
-        RenderBoxRegionInfo* boxInfo = region->renderBoxRegionInfo(box);
+    for (auto iter = m_fragmentList.find(startFragment), end = m_fragmentList.end(); iter != end; ++iter) {
+        RenderFragmentContainer* fragment = *iter;
+        RenderBoxFragmentInfo* boxInfo = fragment->renderBoxFragmentInfo(box);
         if (boxInfo && boxInfo->overflow())
             boxInfo->clearOverflow();
 
-        if (region == endRegion)
+        if (fragment == endFragment)
             break;
     }
 }
 
-RenderRegion* RenderFlowThread::currentRegion() const
+RenderFragmentContainer* RenderFlowThread::currentFragment() const
 {
-    return m_currentRegionMaintainer ? &m_currentRegionMaintainer->region() : nullptr;
+    return m_currentFragmentMaintainer ? &m_currentFragmentMaintainer->fragment() : nullptr;
 }
 
-ContainingRegionMap& RenderFlowThread::containingRegionMap()
+ContainingFragmentMap& RenderFlowThread::containingFragmentMap()
 {
-    if (!m_lineToRegionMap)
-        m_lineToRegionMap = std::make_unique<ContainingRegionMap>();
+    if (!m_lineToFragmentMap)
+        m_lineToFragmentMap = std::make_unique<ContainingFragmentMap>();
 
-    return *m_lineToRegionMap.get();
+    return *m_lineToFragmentMap.get();
 }
 
 
index 4356a43..2c53c55 100644 (file)
 
 namespace WebCore {
 
-class CurrentRenderRegionMaintainer;
+class CurrentRenderFragmentContainerMaintainer;
 class RenderFlowThread;
 class RenderStyle;
-class RenderRegion;
+class RenderFragmentContainer;
 class RootInlineBox;
 
-typedef ListHashSet<RenderRegion*> RenderRegionList;
+typedef ListHashSet<RenderFragmentContainer*> RenderFragmentContainerList;
 typedef Vector<RenderLayer*> RenderLayerList;
-typedef HashMap<const RootInlineBox*, RenderRegion*> ContainingRegionMap;
+typedef HashMap<const RootInlineBox*, RenderFragmentContainer*> ContainingFragmentMap;
 
 // RenderFlowThread is used to collect all the render objects that participate in a
 // flow thread. It will also help in doing the layout. However, it will not render
-// directly to screen. Instead, RenderRegion objects will redirect their paint 
-// and nodeAtPoint methods to this object. Each RenderRegion will actually be a viewPort
+// directly to screen. Instead, RenderFragmentContainer objects will redirect their paint 
+// and nodeAtPoint methods to this object. Each RenderFragmentContainer will actually be a viewPort
 // of the RenderFlowThread.
 
 class RenderFlowThread: public RenderBlockFlow {
@@ -57,7 +57,7 @@ public:
 
     virtual void removeFlowChildInfo(RenderElement&);
 #ifndef NDEBUG
-    bool hasChildInfo(RenderObject* child) const { return is<RenderBox>(child) && m_regionRangeMap.contains(downcast<RenderBox>(child)); }
+    bool hasChildInfo(RenderObject* child) const { return is<RenderBox>(child) && m_fragmentRangeMap.contains(downcast<RenderBox>(child)); }
 #endif
 
 #if !ASSERT_WITH_SECURITY_IMPLICATION_DISABLED
@@ -66,21 +66,21 @@ public:
     
     void deleteLines() override;
 
-    virtual void addRegionToThread(RenderRegion*) = 0;
-    virtual void removeRegionFromThread(RenderRegion*);
-    const RenderRegionList& renderRegionList() const { return m_regionList; }
+    virtual void addFragmentToThread(RenderFragmentContainer*) = 0;
+    virtual void removeFragmentFromThread(RenderFragmentContainer*);
+    const RenderFragmentContainerList& renderFragmentContainerList() const { return m_fragmentList; }
 
     void updateLogicalWidth() final;
     LogicalExtentComputedValues computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop) const override;
 
     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
 
-    bool hasRegions() const { return m_regionList.size(); }
-    virtual void regionChangedWritingMode(RenderRegion*) { }
+    bool hasFragments() const { return m_fragmentList.size(); }
+    virtual void fragmentChangedWritingMode(RenderFragmentContainer*) { }
 
-    void validateRegions();
-    void invalidateRegions(MarkingBehavior = MarkContainingBlockChain);
-    bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionList.isEmpty(); }
+    void validateFragments();
+    void invalidateFragments(MarkingBehavior = MarkContainingBlockChain);
+    bool hasValidFragmentInfo() const { return !m_fragmentsInvalidated && !m_fragmentList.isEmpty(); }
 
     // Some renderers (column spanners) are moved out of the flow thread to live among column
     // sets. If |child| is such a renderer, resolve it to the placeholder that lives at the original
@@ -97,7 +97,7 @@ public:
 
     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
 
-    void repaintRectangleInRegions(const LayoutRect&) const;
+    void repaintRectangleInFragments(const LayoutRect&) const;
     
     LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObject&, const LayoutPoint&) const;
 
@@ -109,36 +109,36 @@ public:
     virtual void setPageBreak(const RenderBlock*, LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*/) { }
     virtual void updateMinimumPageHeight(const RenderBlock*, LayoutUnit /*offset*/, LayoutUnit /*minHeight*/) { }
 
-    virtual RenderRegion* regionAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastRegion = false) const;
+    virtual RenderFragmentContainer* fragmentAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastFragment = false) const;
 
-    bool regionsHaveUniformLogicalWidth() const { return m_regionsHaveUniformLogicalWidth; }
-    bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLogicalHeight; }
+    bool fragmentsHaveUniformLogicalWidth() const { return m_fragmentsHaveUniformLogicalWidth; }
+    bool fragmentsHaveUniformLogicalHeight() const { return m_fragmentsHaveUniformLogicalHeight; }
 
-    virtual RenderRegion* mapFromFlowToRegion(TransformState&) const;
+    virtual RenderFragmentContainer* mapFromFlowToFragment(TransformState&) const;
 
-    void logicalWidthChangedInRegionsForBlock(const RenderBlock*, bool&);
+    void logicalWidthChangedInFragmentsForBlock(const RenderBlock*, bool&);
 
-    LayoutUnit contentLogicalWidthOfFirstRegion() const;
-    LayoutUnit contentLogicalHeightOfFirstRegion() const;
-    LayoutUnit contentLogicalLeftOfFirstRegion() const;
+    LayoutUnit contentLogicalWidthOfFirstFragment() const;
+    LayoutUnit contentLogicalHeightOfFirstFragment() const;
+    LayoutUnit contentLogicalLeftOfFirstFragment() const;
     
-    RenderRegion* firstRegion() const;
-    RenderRegion* lastRegion() const;
+    RenderFragmentContainer* firstFragment() const;
+    RenderFragmentContainer* lastFragment() const;
 
-    virtual void setRegionRangeForBox(const RenderBox&, RenderRegion*, RenderRegion*);
-    bool getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, RenderRegion*& endRegion) const;
-    bool computedRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, RenderRegion*& endRegion) const;
-    bool hasCachedRegionRangeForBox(const RenderBox&) const;
+    virtual void setFragmentRangeForBox(const RenderBox&, RenderFragmentContainer*, RenderFragmentContainer*);
+    bool getFragmentRangeForBox(const RenderBox*, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const;
+    bool computedFragmentRangeForBox(const RenderBox*, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const;
+    bool hasCachedFragmentRangeForBox(const RenderBox&) const;
 
-    // Check if the object is in region and the region is part of this flow thread.
-    bool objectInFlowRegion(const RenderObject*, const RenderRegion*) const;
+    // Check if the object is in fragment and the fragment is part of this flow thread.
+    bool objectInFlowFragment(const RenderObject*, const RenderFragmentContainer*) const;
     
-    // Check if the object should be painted in this region and if the region is part of this flow thread.
-    bool objectShouldFragmentInFlowRegion(const RenderObject*, const RenderRegion*) const;
+    // Check if the object should be painted in this fragment and if the fragment is part of this flow thread.
+    bool objectShouldFragmentInFlowFragment(const RenderObject*, const RenderFragmentContainer*) const;
 
-    void markRegionsForOverflowLayoutIfNeeded();
+    void markFragmentsForOverflowLayoutIfNeeded();
 
-    virtual bool addForcedRegionBreak(const RenderBlock*, LayoutUnit, RenderBox* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0);
+    virtual bool addForcedFragmentBreak(const RenderBlock*, LayoutUnit, RenderBox* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0);
     virtual void applyBreakAfterContent(LayoutUnit) { }
 
     virtual bool isPageLogicalHeightKnown() const { return true; }
@@ -147,15 +147,15 @@ public:
     void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect);
     LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox);
 
-    LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const;
-    void clearRenderBoxRegionInfoAndCustomStyle(const RenderBox&, const RenderRegion*, const RenderRegion*, const RenderRegion*, const RenderRegion*);
+    LayoutUnit offsetFromLogicalTopOfFirstFragment(const RenderBlock*) const;
+    void clearRenderBoxFragmentInfoAndCustomStyle(const RenderBox&, const RenderFragmentContainer*, const RenderFragmentContainer*, const RenderFragmentContainer*, const RenderFragmentContainer*);
 
-    void addRegionsVisualEffectOverflow(const RenderBox*);
-    void addRegionsVisualOverflowFromTheme(const RenderBlock*);
-    void addRegionsOverflowFromChild(const RenderBox*, const RenderBox*, const LayoutSize&);
-    void addRegionsLayoutOverflow(const RenderBox*, const LayoutRect&);
-    void addRegionsVisualOverflow(const RenderBox*, const LayoutRect&);
-    void clearRegionsOverflow(const RenderBox*);
+    void addFragmentsVisualEffectOverflow(const RenderBox*);
+    void addFragmentsVisualOverflowFromTheme(const RenderBlock*);
+    void addFragmentsOverflowFromChild(const RenderBox*, const RenderBox*, const LayoutSize&);
+    void addFragmentsLayoutOverflow(const RenderBox*, const LayoutRect&);
+    void addFragmentsVisualOverflow(const RenderBox*, const LayoutRect&);
+    void clearFragmentsOverflow(const RenderBox*);
 
     LayoutRect mapFromFlowThreadToLocal(const RenderBox*, const LayoutRect&) const;
     LayoutRect mapFromLocalToFlowThread(const RenderBox*, const LayoutRect&) const;
@@ -165,20 +165,20 @@ public:
     // Used to estimate the maximum height of the flow thread.
     static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; }
 
-    bool regionInRange(const RenderRegion* targetRegion, const RenderRegion* startRegion, const RenderRegion* endRegion) const;
+    bool fragmentInRange(const RenderFragmentContainer* targetFragment, const RenderFragmentContainer* startFragment, const RenderFragmentContainer* endFragment) const;
 
     virtual bool absoluteQuadsForBox(Vector<FloatQuad>&, bool*, const RenderBox*, float, float) const { return false; }
 
     void layout() override;
 
-    void setCurrentRegionMaintainer(CurrentRenderRegionMaintainer* currentRegionMaintainer) { m_currentRegionMaintainer = currentRegionMaintainer; }
-    RenderRegion* currentRegion() const;
+    void setCurrentFragmentMaintainer(CurrentRenderFragmentContainerMaintainer* currentFragmentMaintainer) { m_currentFragmentMaintainer = currentFragmentMaintainer; }
+    RenderFragmentContainer* currentFragment() const;
 
-    ContainingRegionMap& containingRegionMap();
+    ContainingFragmentMap& containingFragmentMap();
 
     bool cachedFlowThreadContainingBlockNeedsUpdate() const override { return false; }
 
-    // FIXME: Eventually as column and region flow threads start nesting, this may end up changing.
+    // FIXME: Eventually as column and fragment flow threads start nesting, this may end up changing.
     virtual bool shouldCheckColumnBreaks() const { return false; }
 
 private:
@@ -194,60 +194,60 @@ protected:
     const char* renderName() const override = 0;
 
     // Overridden by columns/pages to set up an initial logical width of the page width even when
-    // no regions have been generated yet.
+    // no fragments have been generated yet.
     virtual LayoutUnit initialLogicalWidth() const { return 0; };
     
-    void clearLinesToRegionMap();
+    void clearLinesToFragmentMap();
     void willBeDestroyed() override;
 
     void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
 
-    void updateRegionsFlowThreadPortionRect();
+    void updateFragmentsFlowThreadPortionRect();
     bool shouldRepaint(const LayoutRect&) const;
 
-    bool getRegionRangeForBoxFromCachedInfo(const RenderBox*, RenderRegion*& startRegion, RenderRegion*& endRegion) const;
+    bool getFragmentRangeForBoxFromCachedInfo(const RenderBox*, RenderFragmentContainer*& startFragment, RenderFragmentContainer*& endFragment) const;
 
-    void removeRenderBoxRegionInfo(RenderBox&);
-    void removeLineRegionInfo(const RenderBlockFlow&);
+    void removeRenderBoxFragmentInfo(RenderBox&);
+    void removeLineFragmentInfo(const RenderBlockFlow&);
 
-    RenderRegionList m_regionList;
+    RenderFragmentContainerList m_fragmentList;
 
-    class RenderRegionRange {
+    class RenderFragmentContainerRange {
     public:
-        RenderRegionRange()
+        RenderFragmentContainerRange()
         {
             setRange(nullptr, nullptr);
         }
 
-        RenderRegionRange(RenderRegion* start, RenderRegion* end)
+        RenderFragmentContainerRange(RenderFragmentContainer* start, RenderFragmentContainer* end)
         {
             setRange(start, end);
         }
         
-        void setRange(RenderRegion* start, RenderRegion* end)
+        void setRange(RenderFragmentContainer* start, RenderFragmentContainer* end)
         {
-            m_startRegion = start;
-            m_endRegion = end;
+            m_startFragment = start;
+            m_endFragment = end;
             m_rangeInvalidated = true;
         }
 
-        RenderRegion* startRegion() const { return m_startRegion; }
-        RenderRegion* endRegion() const { return m_endRegion; }
+        RenderFragmentContainer* startFragment() const { return m_startFragment; }
+        RenderFragmentContainer* endFragment() const { return m_endFragment; }
         bool rangeInvalidated() const { return m_rangeInvalidated; }
         void clearRangeInvalidated() { m_rangeInvalidated = false; }
 
     private:
-        RenderRegion* m_startRegion;
-        RenderRegion* m_endRegion;
+        RenderFragmentContainer* m_startFragment;
+        RenderFragmentContainer* m_endFragment;
         bool m_rangeInvalidated;
     };
 
-    typedef PODInterval<LayoutUnit, RenderRegion*> RegionInterval;
-    typedef PODIntervalTree<LayoutUnit, RenderRegion*> RegionIntervalTree;
+    typedef PODInterval<LayoutUnit, RenderFragmentContainer*> FragmentInterval;
+    typedef PODIntervalTree<LayoutUnit, RenderFragmentContainer*> FragmentIntervalTree;
 
-    class RegionSearchAdapter {
+    class FragmentSearchAdapter {
     public:
-        RegionSearchAdapter(LayoutUnit offset)
+        FragmentSearchAdapter(LayoutUnit offset)
             : m_offset(offset)
             , m_result(nullptr)
         {
@@ -255,34 +255,34 @@ protected:
         
         const LayoutUnit& lowValue() const { return m_offset; }
         const LayoutUnit& highValue() const { return m_offset; }
-        void collectIfNeeded(const RegionInterval&);
+        void collectIfNeeded(const FragmentInterval&);
 
-        RenderRegion* result() const { return m_result; }
+        RenderFragmentContainer* result() const { return m_result; }
 
     private:
         LayoutUnit m_offset;
-        RenderRegion* m_result;
+        RenderFragmentContainer* m_result;
     };
 
-    // Map a line to its containing region.
-    std::unique_ptr<ContainingRegionMap> m_lineToRegionMap;
+    // Map a line to its containing fragment.
+    std::unique_ptr<ContainingFragmentMap> m_lineToFragmentMap;
 
-    // Map a box to the list of regions in which the box is rendered.
-    typedef HashMap<const RenderBox*, RenderRegionRange> RenderRegionRangeMap;
-    RenderRegionRangeMap m_regionRangeMap;
+    // Map a box to the list of fragments in which the box is rendered.
+    typedef HashMap<const RenderBox*, RenderFragmentContainerRange> RenderFragmentContainerRangeMap;
+    RenderFragmentContainerRangeMap m_fragmentRangeMap;
 
-    // Map a box with a region break to the auto height region affected by that break. 
-    typedef HashMap<RenderBox*, RenderRegion*> RenderBoxToRegionMap;
-    RenderBoxToRegionMap m_breakBeforeToRegionMap;
-    RenderBoxToRegionMap m_breakAfterToRegionMap;
+    // Map a box with a fragment break to the auto height fragment affected by that break. 
+    typedef HashMap<RenderBox*, RenderFragmentContainer*> RenderBoxToFragmentMap;
+    RenderBoxToFragmentMap m_breakBeforeToFragmentMap;
+    RenderBoxToFragmentMap m_breakAfterToFragmentMap;
 
-    RegionIntervalTree m_regionIntervalTree;
+    FragmentIntervalTree m_fragmentIntervalTree;
 
-    CurrentRenderRegionMaintainer* m_currentRegionMaintainer;
+    CurrentRenderFragmentContainerMaintainer* m_currentFragmentMaintainer;
 
-    bool m_regionsInvalidated : 1;
-    bool m_regionsHaveUniformLogicalWidth : 1;
-    bool m_regionsHaveUniformLogicalHeight : 1;
+    bool m_fragmentsInvalidated : 1;
+    bool m_fragmentsHaveUniformLogicalWidth : 1;
+    bool m_fragmentsHaveUniformLogicalHeight : 1;
     bool m_pageLogicalSizeChanged : 1;
 };
 
@@ -292,8 +292,8 @@ protected:
 #ifndef NDEBUG
 namespace WTF {
 
-template <> struct ValueToString<WebCore::RenderRegion*> {
-    static String string(const WebCore::RenderRegion* value) { return String::format("%p", value); }
+template <> struct ValueToString<WebCore::RenderFragmentContainer*> {
+    static String string(const WebCore::RenderFragmentContainer* value) { return String::format("%p", value); }
 };
 
 } // namespace WTF
  */
 
 #include "config.h"
-#include "RenderRegion.h"
+#include "RenderFragmentContainer.h"
 
 #include "GraphicsContext.h"
 #include "HitTestResult.h"
 #include "IntRect.h"
 #include "LayoutRepainter.h"
 #include "Range.h"
-#include "RenderBoxRegionInfo.h"
+#include "RenderBoxFragmentInfo.h"
 #include "RenderFlowThread.h"
 #include "RenderInline.h"
 #include "RenderIterator.h"
 
 namespace WebCore {
 
-RenderRegion::RenderRegion(Element& element, RenderStyle&& style, RenderFlowThread* flowThread)
+RenderFragmentContainer::RenderFragmentContainer(Element& element, RenderStyle&& style, RenderFlowThread* flowThread)
     : RenderBlockFlow(element, WTFMove(style))
     , m_flowThread(flowThread)
     , m_isValid(false)
 {
 }
 
-RenderRegion::RenderRegion(Document& document, RenderStyle&& style, RenderFlowThread* flowThread)
+RenderFragmentContainer::RenderFragmentContainer(Document& document, RenderStyle&& style, RenderFlowThread* flowThread)
     : RenderBlockFlow(document, WTFMove(style))
     , m_flowThread(flowThread)
     , m_isValid(false)
 {
 }
 
-LayoutPoint RenderRegion::mapRegionPointIntoFlowThreadCoordinates(const LayoutPoint& point)
+LayoutPoint RenderFragmentContainer::mapFragmentPointIntoFlowThreadCoordinates(const LayoutPoint& point)
 {
-    // Assuming the point is relative to the region block, 3 cases will be considered:
+    // Assuming the point is relative to the fragment block, 3 cases will be considered:
     // a) top margin, padding or border.
     // b) bottom margin, padding or border.
-    // c) non-content region area.
+    // c) non-content fragment area.
 
     LayoutUnit pointLogicalTop(isHorizontalWritingMode() ? point.y() : point.x());
     LayoutUnit pointLogicalLeft(isHorizontalWritingMode() ? point.x() : point.y());
@@ -99,37 +99,37 @@ LayoutPoint RenderRegion::mapRegionPointIntoFlowThreadCoordinates(const LayoutPo
     return isHorizontalWritingMode() ? pointInThread : pointInThread.transposedPoint();
 }
 
-VisiblePosition RenderRegion::positionForPoint(const LayoutPoint& point, const RenderRegion* region)
+VisiblePosition RenderFragmentContainer::positionForPoint(const LayoutPoint& point, const RenderFragmentContainer* fragment)
 {
-    if (!isValid() || !m_flowThread->firstChild()) // checking for empty region blocks.
-        return RenderBlock::positionForPoint(point, region);
+    if (!isValid() || !m_flowThread->firstChild()) // checking for empty fragment blocks.
+        return RenderBlock::positionForPoint(point, fragment);
 
-    return m_flowThread->positionForPoint(mapRegionPointIntoFlowThreadCoordinates(point), this);
+    return m_flowThread->positionForPoint(mapFragmentPointIntoFlowThreadCoordinates(point), this);
 }
 
-LayoutUnit RenderRegion::pageLogicalWidth() const
+LayoutUnit RenderFragmentContainer::pageLogicalWidth() const
 {
     ASSERT(isValid());
     return m_flowThread->isHorizontalWritingMode() ? contentWidth() : contentHeight();
 }
 
-LayoutUnit RenderRegion::pageLogicalHeight() const
+LayoutUnit RenderFragmentContainer::pageLogicalHeight() const
 {
     ASSERT(isValid());
     return m_flowThread->isHorizontalWritingMode() ? contentHeight() : contentWidth();
 }
 
-LayoutUnit RenderRegion::logicalHeightOfAllFlowThreadContent() const
+LayoutUnit RenderFragmentContainer::logicalHeightOfAllFlowThreadContent() const
 {
     return pageLogicalHeight();
 }
 
-LayoutRect RenderRegion::flowThreadPortionOverflowRect()
+LayoutRect RenderFragmentContainer::flowThreadPortionOverflowRect()
 {
-    return overflowRectForFlowThreadPortion(flowThreadPortionRect(), isFirstRegion(), isLastRegion(), VisualOverflow);
+    return overflowRectForFlowThreadPortion(flowThreadPortionRect(), isFirstFragment(), isLastFragment(), VisualOverflow);
 }
 
-LayoutPoint RenderRegion::flowThreadPortionLocation() const
+LayoutPoint RenderFragmentContainer::flowThreadPortionLocation() const
 {
     LayoutPoint portionLocation;
     LayoutRect portionRect = flowThreadPortionRect();
@@ -144,7 +144,7 @@ LayoutPoint RenderRegion::flowThreadPortionLocation() const
     return portionLocation;
 }
 
-LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType overflowType)
+LayoutRect RenderFragmentContainer::overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType overflowType)
 {
     ASSERT(isValid());
     if (shouldClipFlowThreadContent())
@@ -170,31 +170,31 @@ LayoutRect RenderRegion::overflowRectForFlowThreadPortion(const LayoutRect& flow
     return clipRect;
 }
 
-LayoutUnit RenderRegion::pageLogicalTopForOffset(LayoutUnit /* offset */) const
+LayoutUnit RenderFragmentContainer::pageLogicalTopForOffset(LayoutUnit /* offset */) const
 {
     return flowThread()->isHorizontalWritingMode() ? flowThreadPortionRect().y() : flowThreadPortionRect().x();
 }
 
-bool RenderRegion::isFirstRegion() const
+bool RenderFragmentContainer::isFirstFragment() const
 {
     ASSERT(isValid());
 
-    return m_flowThread->firstRegion() == this;
+    return m_flowThread->firstFragment() == this;
 }
 
-bool RenderRegion::isLastRegion() const
+bool RenderFragmentContainer::isLastFragment() const
 {
     ASSERT(isValid());
 
-    return m_flowThread->lastRegion() == this;
+    return m_flowThread->lastFragment() == this;
 }
 
-bool RenderRegion::shouldClipFlowThreadContent() const
+bool RenderFragmentContainer::shouldClipFlowThreadContent() const
 {
     return hasOverflowClip();
 }
 
-void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+void RenderFragmentContainer::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
 {
     RenderBlockFlow::styleDidChange(diff, oldStyle);
 
@@ -202,10 +202,10 @@ void RenderRegion::styleDidChange(StyleDifference diff, const RenderStyle* oldSt
         return;
 
     if (oldStyle && oldStyle->writingMode() != style().writingMode())
-        m_flowThread->regionChangedWritingMode(this);
+        m_flowThread->fragmentChangedWritingMode(this);
 }
 
-void RenderRegion::computeOverflowFromFlowThread()
+void RenderFragmentContainer::computeOverflowFromFlowThread()
 {
     ASSERT(isValid());
 
@@ -216,22 +216,22 @@ void RenderRegion::computeOverflowFromFlowThread()
     addLayoutOverflow(layoutRect);
     RenderFlowThread* enclosingRenderFlowThread = flowThreadContainingBlock();
     if (enclosingRenderFlowThread)
-        enclosingRenderFlowThread->addRegionsLayoutOverflow(this, layoutRect);
+        enclosingRenderFlowThread->addFragmentsLayoutOverflow(this, layoutRect);
 
     updateLayerTransform();
     updateScrollInfoAfterLayout();
 }
 
-void RenderRegion::repaintFlowThreadContent(const LayoutRect& repaintRect)
+void RenderFragmentContainer::repaintFlowThreadContent(const LayoutRect& repaintRect)
 {
     repaintFlowThreadContentRectangle(repaintRect, flowThreadPortionRect(), contentBoxRect().location());
 }
 
-void RenderRegion::repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const LayoutRect& flowThreadPortionRect, const LayoutPoint& regionLocation, const LayoutRect* flowThreadPortionClipRect)
+void RenderFragmentContainer::repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const LayoutRect& flowThreadPortionRect, const LayoutPoint& fragmentLocation, const LayoutRect* flowThreadPortionClipRect)
 {
     ASSERT(isValid());
 
-    // We only have to issue a repaint in this region if the region rect intersects the repaint rect.
+    // We only have to issue a repaint in this fragment if the fragment rect intersects the repaint rect.
     LayoutRect clippedRect(repaintRect);
 
     if (flowThreadPortionClipRect) {
@@ -244,107 +244,107 @@ void RenderRegion::repaintFlowThreadContentRectangle(const LayoutRect& repaintRe
         return;
 
     LayoutRect flippedFlowThreadPortionRect(flowThreadPortionRect);
-    flowThread()->flipForWritingMode(flippedFlowThreadPortionRect); // Put the region rects into physical coordinates.
+    flowThread()->flipForWritingMode(flippedFlowThreadPortionRect); // Put the fragment rects into physical coordinates.
 
-    // Put the region rect into the region's physical coordinate space.
-    clippedRect.setLocation(regionLocation + (clippedRect.location() - flippedFlowThreadPortionRect.location()));
+    // Put the fragment rect into the fragment's physical coordinate space.
+    clippedRect.setLocation(fragmentLocation + (clippedRect.location() - flippedFlowThreadPortionRect.location()));
 
-    // Now switch to the region's writing mode coordinate space and let it repaint itself.
+    // Now switch to the fragment's writing mode coordinate space and let it repaint itself.
     flipForWritingMode(clippedRect);
     
     // Issue the repaint.
     repaintRectangle(clippedRect);
 }
 
-void RenderRegion::installFlowThread()
+void RenderFragmentContainer::installFlowThread()
 {
     ASSERT_NOT_REACHED();
 }
 
-void RenderRegion::attachRegion()
+void RenderFragmentContainer::attachFragment()
 {
     if (renderTreeBeingDestroyed())
         return;
     
-    // A region starts off invalid.
+    // A fragment starts off invalid.
     setIsValid(false);
 
     // Initialize the flow thread reference and create the flow thread object if needed.
-    // The flow thread lifetime is influenced by the number of regions attached to it,
-    // and we are attaching the region to the flow thread.
+    // The flow thread lifetime is influenced by the number of fragments attached to it,
+    // and we are attaching the fragment to the flow thread.
     installFlowThread();
     
     if (!m_flowThread)
         return;
 
-    // Only after adding the region to the thread, the region is marked to be valid.
-    m_flowThread->addRegionToThread(this);
+    // Only after adding the fragment to the thread, the fragment is marked to be valid.
+    m_flowThread->addFragmentToThread(this);
 }
 
-void RenderRegion::detachRegion()
+void RenderFragmentContainer::detachFragment()
 {
     if (m_flowThread)
-        m_flowThread->removeRegionFromThread(this);
+        m_flowThread->removeFragmentFromThread(this);
     m_flowThread = nullptr;
 }
 
-RenderBoxRegionInfo* RenderRegion::renderBoxRegionInfo(const RenderBox* box) const
+RenderBoxFragmentInfo* RenderFragmentContainer::renderBoxFragmentInfo(const RenderBox* box) const
 {
     ASSERT(isValid());
-    return m_renderBoxRegionInfo.get(box);
+    return m_renderBoxFragmentInfo.get(box);
 }
 
-RenderBoxRegionInfo* RenderRegion::setRenderBoxRegionInfo(const RenderBox* box, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset,
+RenderBoxFragmentInfo* RenderFragmentContainer::setRenderBoxFragmentInfo(const RenderBox* box, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset,
     bool containingBlockChainIsInset)
 {
     ASSERT(isValid());
 
-    std::unique_ptr<RenderBoxRegionInfo>& boxInfo = m_renderBoxRegionInfo.add(box, std::make_unique<RenderBoxRegionInfo>(logicalLeftInset, logicalRightInset, containingBlockChainIsInset)).iterator->value;
+    std::unique_ptr<RenderBoxFragmentInfo>& boxInfo = m_renderBoxFragmentInfo.add(box, std::make_unique<RenderBoxFragmentInfo>(logicalLeftInset, logicalRightInset, containingBlockChainIsInset)).iterator->value;
     return boxInfo.get();
 }
 
-std::unique_ptr<RenderBoxRegionInfo> RenderRegion::takeRenderBoxRegionInfo(const RenderBox* box)
+std::unique_ptr<RenderBoxFragmentInfo> RenderFragmentContainer::takeRenderBoxFragmentInfo(const RenderBox* box)
 {
-    return m_renderBoxRegionInfo.take(box);
+    return m_renderBoxFragmentInfo.take(box);
 }
 
-void RenderRegion::removeRenderBoxRegionInfo(const RenderBox& box)
+void RenderFragmentContainer::removeRenderBoxFragmentInfo(const RenderBox& box)
 {
-    m_renderBoxRegionInfo.remove(&box);
+    m_renderBoxFragmentInfo.remove(&box);
 }
 
-void RenderRegion::deleteAllRenderBoxRegionInfo()
+void RenderFragmentContainer::deleteAllRenderBoxFragmentInfo()
 {
-    m_renderBoxRegionInfo.clear();
+    m_renderBoxFragmentInfo.clear();
 }
 
-LayoutUnit RenderRegion::logicalTopOfFlowThreadContentRect(const LayoutRect& rect) const
+LayoutUnit RenderFragmentContainer::logicalTopOfFlowThreadContentRect(const LayoutRect& rect) const
 {
     ASSERT(isValid());
     return flowThread()->isHorizontalWritingMode() ? rect.y() : rect.x();
 }
 
-LayoutUnit RenderRegion::logicalBottomOfFlowThreadContentRect(const LayoutRect& rect) const
+LayoutUnit RenderFragmentContainer::logicalBottomOfFlowThreadContentRect(const LayoutRect& rect) const
 {
     ASSERT(isValid());
     return flowThread()->isHorizontalWritingMode() ? rect.maxY() : rect.maxX();
 }
 
-void RenderRegion::insertedIntoTree()
+void RenderFragmentContainer::insertedIntoTree()
 {
-    attachRegion();
+    attachFragment();
     if (isValid())
         RenderBlockFlow::insertedIntoTree();
 }
 
-void RenderRegion::willBeRemovedFromTree()
+void RenderFragmentContainer::willBeRemovedFromTree()
 {
     RenderBlockFlow::willBeRemovedFromTree();
 
-    detachRegion();
+    detachFragment();
 }
 
-void RenderRegion::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const
+void RenderFragmentContainer::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const
 {
     if (!isValid()) {
         RenderBlockFlow::computeIntrinsicLogicalWidths(minLogicalWidth, maxLogicalWidth);
@@ -355,7 +355,7 @@ void RenderRegion::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, La
     maxLogicalWidth = m_flowThread->maxPreferredLogicalWidth();
 }
 
-void RenderRegion::computePreferredLogicalWidths()
+void RenderFragmentContainer::computePreferredLogicalWidths()
 {
     ASSERT(preferredLogicalWidthsDirty());
 
@@ -390,19 +390,19 @@ void RenderRegion::computePreferredLogicalWidths()
     setPreferredLogicalWidthsDirty(false);
 }
 
-void RenderRegion::adjustRegionBoundsFromFlowThreadPortionRect(LayoutRect& regionBounds) const
+void RenderFragmentContainer::adjustFragmentBoundsFromFlowThreadPortionRect(LayoutRect& fragmentBounds) const
 {
     LayoutRect flippedFlowThreadPortionRect = flowThreadPortionRect();
     flowThread()->flipForWritingMode(flippedFlowThreadPortionRect);
-    regionBounds.moveBy(flippedFlowThreadPortionRect.location());
+    fragmentBounds.moveBy(flippedFlowThreadPortionRect.location());
 }
 
-void RenderRegion::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverflow>& overflow, bool forceCreation)
+void RenderFragmentContainer::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverflow>& overflow, bool forceCreation)
 {
-    ASSERT(m_flowThread->renderRegionList().contains(this));
+    ASSERT(m_flowThread->renderFragmentContainerList().contains(this));
     ASSERT(isValid());
 
-    RenderBoxRegionInfo* boxInfo = renderBoxRegionInfo(box);
+    RenderBoxFragmentInfo* boxInfo = renderBoxFragmentInfo(box);
     if (!boxInfo && !forceCreation)
         return;
 
@@ -411,14 +411,14 @@ void RenderRegion::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverf
         return;
     }
     
-    LayoutRect borderBox = box->borderBoxRectInRegion(this);
+    LayoutRect borderBox = box->borderBoxRectInFragment(this);
     LayoutRect clientBox;
-    ASSERT(m_flowThread->objectShouldFragmentInFlowRegion(box, this));
+    ASSERT(m_flowThread->objectShouldFragmentInFlowFragment(box, this));
 
     if (!borderBox.isEmpty()) {
         borderBox = rectFlowPortionForBox(box, borderBox);
         
-        clientBox = box->clientBoxRectInRegion(this);
+        clientBox = box->clientBoxRectInFragment(this);
         clientBox = rectFlowPortionForBox(box, clientBox);
         
         m_flowThread->flipForWritingModeLocalCoordinates(borderBox);
@@ -432,22 +432,22 @@ void RenderRegion::ensureOverflowForBox(const RenderBox* box, RefPtr<RenderOverf
         overflow = adoptRef(new RenderOverflow(clientBox, borderBox));
 }
 
-LayoutRect RenderRegion::rectFlowPortionForBox(const RenderBox* box, const LayoutRect& rect) const
+LayoutRect RenderFragmentContainer::rectFlowPortionForBox(const RenderBox* box, const LayoutRect& rect) const
 {
     LayoutRect mappedRect = m_flowThread->mapFromLocalToFlowThread(box, rect);
 
-    RenderRegion* startRegion = nullptr;
-    RenderRegion* endRegion = nullptr;
-    if (m_flowThread->getRegionRangeForBox(box, startRegion, endRegion)) {
+    RenderFragmentContainer* startFragment = nullptr;
+    RenderFragmentContainer* endFragment = nullptr;
+    if (m_flowThread->getFragmentRangeForBox(box, startFragment, endFragment)) {
         if (flowThread()->isHorizontalWritingMode()) {
-            if (this != startRegion)
+            if (this != startFragment)
                 mappedRect.shiftYEdgeTo(std::max<LayoutUnit>(logicalTopForFlowThreadContent(), mappedRect.y()));
-            if (this != endRegion)
+            if (this != endFragment)
                 mappedRect.setHeight(std::max<LayoutUnit>(0, std::min<LayoutUnit>(logicalBottomForFlowThreadContent() - mappedRect.y(), mappedRect.height())));
         } else {
-            if (this != startRegion)
+            if (this != startFragment)
                 mappedRect.shiftXEdgeTo(std::max<LayoutUnit>(logicalTopForFlowThreadContent(), mappedRect.x()));
-            if (this != endRegion)
+            if (this != endFragment)
                 mappedRect.setWidth(std::max<LayoutUnit>(0, std::min<LayoutUnit>(logicalBottomForFlowThreadContent() - mappedRect.x(), mappedRect.width())));
         }
     }
@@ -455,37 +455,37 @@ LayoutRect RenderRegion::rectFlowPortionForBox(const RenderBox* box, const Layou
     return m_flowThread->mapFromFlowThreadToLocal(box, mappedRect);
 }
 
-void RenderRegion::addLayoutOverflowForBox(const RenderBox* box, const LayoutRect& rect)
+void RenderFragmentContainer::addLayoutOverflowForBox(const RenderBox* box, const LayoutRect& rect)
 {
     if (rect.isEmpty())
         return;
 
-    RefPtr<RenderOverflow> regionOverflow;
-    ensureOverflowForBox(box, regionOverflow, false);
+    RefPtr<RenderOverflow> fragmentOverflow;
+    ensureOverflowForBox(box, fragmentOverflow, false);
 
-    if (!regionOverflow)
+    if (!fragmentOverflow)
         return;
 
-    regionOverflow->addLayoutOverflow(rect);
+    fragmentOverflow->addLayoutOverflow(rect);
 }
 
-void RenderRegion::addVisualOverflowForBox(const RenderBox* box, const LayoutRect& rect)
+void RenderFragmentContainer::addVisualOverflowForBox(const RenderBox* box, const LayoutRect& rect)
 {
     if (rect.isEmpty())
         return;
 
-    RefPtr<RenderOverflow> regionOverflow;
-    ensureOverflowForBox(box, regionOverflow, false);
+    RefPtr<RenderOverflow> fragmentOverflow;
+    ensureOverflowForBox(box, fragmentOverflow, false);
 
-    if (!regionOverflow)
+    if (!fragmentOverflow)
         return;
 
     LayoutRect flippedRect = rect;
     flowThread()->flipForWritingModeLocalCoordinates(flippedRect);
-    regionOverflow->addVisualOverflow(flippedRect);
+    fragmentOverflow->addVisualOverflow(flippedRect);
 }
 
-LayoutRect RenderRegion::layoutOverflowRectForBox(const RenderBox* box)
+LayoutRect RenderFragmentContainer::layoutOverflowRectForBox(const RenderBox* box)
 {
     RefPtr<RenderOverflow> overflow;
     ensureOverflowForBox(box, overflow, true);
@@ -494,11 +494,11 @@ LayoutRect RenderRegion::layoutOverflowRectForBox(const RenderBox* box)
     return overflow->layoutOverflowRect();
 }
 
-LayoutRect RenderRegion::visualOverflowRectForBox(const RenderBoxModelObject& box)
+LayoutRect RenderFragmentContainer::visualOverflowRectForBox(const RenderBoxModelObject& box)
 {
     if (is<RenderInline>(box)) {
         const RenderInline& inlineBox = downcast<RenderInline>(box);
-        return inlineBox.linesVisualOverflowBoundingBoxInRegion(this);
+        return inlineBox.linesVisualOverflowBoundingBoxInFragment(this);
     }
 
     if (is<RenderBox>(box)) {
@@ -514,10 +514,10 @@ LayoutRect RenderRegion::visualOverflowRectForBox(const RenderBoxModelObject& bo
 }
 
 // FIXME: This doesn't work for writing modes.
-LayoutRect RenderRegion::layoutOverflowRectForBoxForPropagation(const RenderBox* box)
+LayoutRect RenderFragmentContainer::layoutOverflowRectForBoxForPropagation(const RenderBox* box)
 {
     // Only propagate interior layout overflow if we don't clip it.
-    LayoutRect rect = box->borderBoxRectInRegion(this);
+    LayoutRect rect = box->borderBoxRectInFragment(this);
     rect = rectFlowPortionForBox(box, rect);
     if (!box->hasOverflowClip())
         rect.unite(layoutOverflowRectForBox(box));
@@ -534,7 +534,7 @@ LayoutRect RenderRegion::layoutOverflowRectForBoxForPropagation(const RenderBox*
     return rect;
 }
 
-LayoutRect RenderRegion::visualOverflowRectForBoxForPropagation(const RenderBoxModelObject& box)
+LayoutRect RenderFragmentContainer::visualOverflowRectForBoxForPropagation(const RenderBoxModelObject& box)
 {
     LayoutRect rect = visualOverflowRectForBox(box);
     flowThread()->flipForWritingModeLocalCoordinates(rect);
@@ -542,19 +542,19 @@ LayoutRect RenderRegion::visualOverflowRectForBoxForPropagation(const RenderBoxM
     return rect;
 }
 
-CurrentRenderRegionMaintainer::CurrentRenderRegionMaintainer(RenderRegion& region)
-    : m_region(region)
+CurrentRenderFragmentContainerMaintainer::CurrentRenderFragmentContainerMaintainer(RenderFragmentContainer& fragment)
+    : m_fragment(fragment)
 {
-    RenderFlowThread* flowThread = region.flowThread();
-    // A flow thread can have only one current region.
-    ASSERT(!flowThread->currentRegion());
-    flowThread->setCurrentRegionMaintainer(this);
+    RenderFlowThread* flowThread = fragment.flowThread();
+    // A flow thread can have only one current fragment.
+    ASSERT(!flowThread->currentFragment());
+    flowThread->setCurrentFragmentMaintainer(this);
 }
 
-CurrentRenderRegionMaintainer::~CurrentRenderRegionMaintainer()
+CurrentRenderFragmentContainerMaintainer::~CurrentRenderFragmentContainerMaintainer()
 {
-    RenderFlowThread* flowThread = m_region.flowThread();
-    flowThread->setCurrentRegionMaintainer(nullptr);
+    RenderFlowThread* flowThread = m_fragment.flowThread();
+    flowThread->setCurrentFragmentMaintainer(nullptr);
 }
 
 } // namespace WebCore
similarity index 63%
rename from Source/WebCore/rendering/RenderRegion.h
rename to Source/WebCore/rendering/RenderFragmentContainer.h
index 3fc02ae..901de0e 100644 (file)
@@ -38,10 +38,10 @@ namespace WebCore {
 
 class Element;
 class RenderBox;
-class RenderBoxRegionInfo;
+class RenderBoxFragmentInfo;
 class RenderFlowThread;
 
-class RenderRegion : public RenderBlockFlow {
+class RenderFragmentContainer : public RenderBlockFlow {
 public:
     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
 
@@ -51,29 +51,29 @@ public:
 
     LayoutPoint flowThreadPortionLocation() const;
 
-    virtual void attachRegion();
-    virtual void detachRegion();
+    virtual void attachFragment();
+    virtual void detachFragment();
 
     RenderFlowThread* flowThread() const { return m_flowThread; }
 
-    // Valid regions do not create circular dependencies with other flows.
+    // Valid fragments do not create circular dependencies with other flows.
     bool isValid() const { return m_isValid; }
     void setIsValid(bool valid) { m_isValid = valid; }
 
-    RenderBoxRegionInfo* renderBoxRegionInfo(const RenderBox*) const;
-    RenderBoxRegionInfo* setRenderBoxRegionInfo(const RenderBox*, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset,
+    RenderBoxFragmentInfo* renderBoxFragmentInfo(const RenderBox*) const;
+    RenderBoxFragmentInfo* setRenderBoxFragmentInfo(const RenderBox*, LayoutUnit logicalLeftInset, LayoutUnit logicalRightInset,
         bool containingBlockChainIsInset);
-    std::unique_ptr<RenderBoxRegionInfo> takeRenderBoxRegionInfo(const RenderBox*);
-    void removeRenderBoxRegionInfo(const RenderBox&);
+    std::unique_ptr<RenderBoxFragmentInfo> takeRenderBoxFragmentInfo(const RenderBox*);
+    void removeRenderBoxFragmentInfo(const RenderBox&);
 
-    void deleteAllRenderBoxRegionInfo();
+    void deleteAllRenderBoxFragmentInfo();
 
-    bool isFirstRegion() const;
-    bool isLastRegion() const;
+    bool isFirstFragment() const;
+    bool isLastFragment() const;
     virtual bool shouldClipFlowThreadContent() const;
 
-    // These methods represent the width and height of a "page" and for a RenderRegion they are just the
-    // content width and content height of a region. For RenderRegionSets, however, they will be the width and
+    // These methods represent the width and height of a "page" and for a RenderFragmentContainer they are just the
+    // content width and content height of a fragment. For RenderFragmentContainerSets, however, they will be the width and
     // height of a single column or page in the set.
     virtual LayoutUnit pageLogicalWidth() const;
     virtual LayoutUnit pageLogicalHeight() const;
@@ -83,24 +83,24 @@ public:
     LayoutUnit logicalTopForFlowThreadContent() const { return logicalTopOfFlowThreadContentRect(flowThreadPortionRect()); };
     LayoutUnit logicalBottomForFlowThreadContent() const { return logicalBottomOfFlowThreadContentRect(flowThreadPortionRect()); };
 
-    // This method represents the logical height of the entire flow thread portion used by the region or set.
-    // For RenderRegions it matches logicalPaginationHeight(), but for sets it is the height of all the pages
+    // This method represents the logical height of the entire flow thread portion used by the fragment or set.
+    // For RenderFragmentContainers it matches logicalPaginationHeight(), but for sets it is the height of all the pages
     // or columns added together.
     virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const;
 
-    // The top of the nearest page inside the region. For RenderRegions, this is just the logical top of the
+    // The top of the nearest page inside the fragment. For RenderFragmentContainers, this is just the logical top of the
     // flow thread portion we contain. For sets, we have to figure out the top of the nearest column or
     // page.
     virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
 
-    // Whether or not this region is a set.
-    virtual bool isRenderRegionSet() const { return false; }
+    // Whether or not this fragment is a set.
+    virtual bool isRenderFragmentContainerSet() const { return false; }
     
     virtual void repaintFlowThreadContent(const LayoutRect& repaintRect);
 
     virtual void collectLayerFragments(LayerFragments&, const LayoutRect&, const LayoutRect&) { }
 
-    virtual void adjustRegionBoundsFromFlowThreadPortionRect(LayoutRect& regionBounds) const;
+    virtual void adjustFragmentBoundsFromFlowThreadPortionRect(LayoutRect& fragmentBounds) const;
 
     void addLayoutOverflowForBox(const RenderBox*, const LayoutRect&);
     void addVisualOverflowForBox(const RenderBox*, const LayoutRect&);
@@ -111,18 +111,18 @@ public:
 
     LayoutRect rectFlowPortionForBox(const RenderBox*, const LayoutRect&) const;
     
-    void setRegionObjectsRegionStyle();
-    void restoreRegionObjectsOriginalStyle();
+    void setFragmentObjectsFragmentStyle();
+    void restoreFragmentObjectsOriginalStyle();
 
     bool canHaveChildren() const override { return false; }
     bool canHaveGeneratedChildren() const override { return true; }
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
 
-    virtual void absoluteQuadsForBoxInRegion(Vector<FloatQuad>&, bool*, const RenderBox*, float, float) { }
+    virtual void absoluteQuadsForBoxInFragment(Vector<FloatQuad>&, bool*, const RenderBox*, float, float) { }
 
 protected:
-    RenderRegion(Element&, RenderStyle&&, RenderFlowThread*);
-    RenderRegion(Document&, RenderStyle&&, RenderFlowThread*);
+    RenderFragmentContainer(Element&, RenderStyle&&, RenderFlowThread*);
+    RenderFragmentContainer(Document&, RenderStyle&&, RenderFlowThread*);
 
     void ensureOverflowForBox(const RenderBox*, RefPtr<RenderOverflow>&, bool);
 
@@ -135,20 +135,20 @@ protected:
     };
 
     LayoutRect overflowRectForFlowThreadPortion(const LayoutRect& flowThreadPortionRect, bool isFirstPortion, bool isLastPortion, OverflowType);
-    void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const LayoutRect& flowThreadPortionRect, const LayoutPoint& regionLocation, const LayoutRect* flowThreadPortionClipRect = 0);
+    void repaintFlowThreadContentRectangle(const LayoutRect& repaintRect, const LayoutRect& flowThreadPortionRect, const LayoutPoint& fragmentLocation, const LayoutRect* flowThreadPortionClipRect = 0);
 
     void computeOverflowFromFlowThread();
 
 private:
-    bool isRenderRegion() const final { return true; }
-    const char* renderName() const override { return "RenderRegion"; }
+    bool isRenderFragmentContainer() const final { return true; }
+    const char* renderName() const override { return "RenderFragmentContainer"; }
 
     void insertedIntoTree() override;
     void willBeRemovedFromTree() override;
 
     virtual void installFlowThread();
 
-    LayoutPoint mapRegionPointIntoFlowThreadCoordinates(const LayoutPoint&);
+    LayoutPoint mapFragmentPointIntoFlowThreadCoordinates(const LayoutPoint&);
 
 protected:
     RenderFlowThread* m_flowThread;
@@ -156,27 +156,27 @@ protected:
 private:
     LayoutRect m_flowThreadPortionRect;
 
-    // This map holds unique information about a block that is split across regions.
-    // A RenderBoxRegionInfo* tells us about any layout information for a RenderBox that
-    // is unique to the region. For now it just holds logical width information for RenderBlocks, but eventually
-    // it will also hold a custom style for any box (for region styling).
-    typedef HashMap<const RenderBox*, std::unique_ptr<RenderBoxRegionInfo>> RenderBoxRegionInfoMap;
-    RenderBoxRegionInfoMap m_renderBoxRegionInfo;
+    // This map holds unique information about a block that is split across fragments.
+    // A RenderBoxFragmentInfo* tells us about any layout information for a RenderBox that
+    // is unique to the fragment. For now it just holds logical width information for RenderBlocks, but eventually
+    // it will also hold a custom style for any box (for fragment styling).
+    typedef HashMap<const RenderBox*, std::unique_ptr<RenderBoxFragmentInfo>> RenderBoxFragmentInfoMap;
+    RenderBoxFragmentInfoMap m_renderBoxFragmentInfo;
 
     bool m_isValid : 1;
 };
 
-class CurrentRenderRegionMaintainer {
-    WTF_MAKE_NONCOPYABLE(CurrentRenderRegionMaintainer);
+class CurrentRenderFragmentContainerMaintainer {
+    WTF_MAKE_NONCOPYABLE(CurrentRenderFragmentContainerMaintainer);
 public:
-    CurrentRenderRegionMaintainer(RenderRegion&);
-    ~CurrentRenderRegionMaintainer();
+    CurrentRenderFragmentContainerMaintainer(RenderFragmentContainer&);
+    ~CurrentRenderFragmentContainerMaintainer();
 
-    RenderRegion& region() const { return m_region; }
+    RenderFragmentContainer& fragment() const { return m_fragment; }
 private:
-    RenderRegion& m_region;
+    RenderFragmentContainer& m_fragment;
 };
 
 } // namespace WebCore
 
-SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderRegion, isRenderRegion())
+SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderFragmentContainer, isRenderFragmentContainer())
  */
 
 #include "config.h"
-#include "RenderRegionSet.h"
+#include "RenderFragmentContainerSet.h"
 
-#include "RenderBoxRegionInfo.h"
+#include "RenderBoxFragmentInfo.h"
 #include "RenderFlowThread.h"
 
 namespace WebCore {
 
-RenderRegionSet::RenderRegionSet(Document& document, RenderStyle&& style, RenderFlowThread& flowThread)
-    : RenderRegion(document, WTFMove(style), &flowThread)
+RenderFragmentContainerSet::RenderFragmentContainerSet(Document& document, RenderStyle&& style, RenderFlowThread& flowThread)
+    : RenderFragmentContainer(document, WTFMove(style), &flowThread)
 {
 }
 
-void RenderRegionSet::installFlowThread()
+void RenderFragmentContainerSet::installFlowThread()
 {
     // We don't have to do anything, since we were able to connect the flow thread
     // in the constructor.
 }
 
-void RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded()
+void RenderFragmentContainerSet::expandToEncompassFlowThreadContentsIfNeeded()
 {
     // Whenever the last region is a set, it always expands its region rect to consume all
     // of the flow thread content. This is because it is always capable of generating an
 
 #pragma once
 
-#include "RenderRegion.h"
+#include "RenderFragmentContainer.h"
 
 namespace WebCore {
 
 class RenderFlowThread;
 
-// RenderRegionSet represents a set of regions that all have the same width and height. It is a "composite region box" that
+// RenderFragmentContainerSet represents a set of regions that all have the same width and height. It is a "composite region box" that
 // can be used to represent a single run of contiguous regions.
 //
 // By combining runs of same-size columns or pages into a single object, we significantly reduce the number of unique RenderObjects
@@ -40,21 +40,21 @@ class RenderFlowThread;
 // This class is abstract and is only intended for use by renderers that generate anonymous runs of identical regions, i.e.,
 // columns and printing. RenderMultiColumnSet and RenderPageSet represent runs of columns and pages respectively.
 //
-// FIXME: For now we derive from RenderRegion, but this may change at some point.
+// FIXME: For now we derive from RenderFragmentContainer, but this may change at some point.
 
-class RenderRegionSet : public RenderRegion {
+class RenderFragmentContainerSet : public RenderFragmentContainer {
 public:
     void expandToEncompassFlowThreadContentsIfNeeded();
 
 protected:
-    RenderRegionSet(Document&, RenderStyle&&, RenderFlowThread&);
+    RenderFragmentContainerSet(Document&, RenderStyle&&, RenderFlowThread&);
 
 private:
     void installFlowThread() final;
 
     const char* renderName() const override = 0;
     
-    bool isRenderRegionSet() const final { return true; }
+    bool isRenderFragmentContainerSet() const final { return true; }
 };
 
 } // namespace WebCore
index e437ad7..2faa9ed 100644 (file)
@@ -1154,7 +1154,7 @@ LayoutUnit RenderGrid::computeMarginLogicalSizeForChild(GridTrackSizingDirection
     LayoutUnit marginStart;
     LayoutUnit marginEnd;
     if (direction == ForColumns)
-        child.computeInlineDirectionMargins(*this, child.containingBlockLogicalWidthForContentInRegion(nullptr), child.logicalWidth(), marginStart, marginEnd);
+        child.computeInlineDirectionMargins(*this, child.containingBlockLogicalWidthForContentInFragment(nullptr), child.logicalWidth(), marginStart, marginEnd);
     else
         child.computeBlockDirectionMargins(*this, marginStart, marginEnd);
 
index c0aa460..1b26667 100644 (file)
@@ -904,14 +904,14 @@ bool RenderInline::hitTestCulledInline(const HitTestRequest& request, HitTestRes
     return false;
 }
 
-VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point, const RenderRegion* region)
+VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point, const RenderFragmentContainer* fragment)
 {
     // FIXME: Does not deal with relative or sticky positioned inlines (should it?)
     RenderBlock& containingBlock = *this->containingBlock();
     if (firstLineBox()) {
         // This inline actually has a line box.  We must have clicked in the border/padding of one of these boxes.  We
         // should try to find a result by asking our containing block.
-        return containingBlock.positionForPoint(point, region);
+        return containingBlock.positionForPoint(point, fragment);
     }
 
     // Translate the coords from the pre-anonymous block to the post-anonymous block.
@@ -920,11 +920,11 @@ VisiblePosition RenderInline::positionForPoint(const LayoutPoint& point, const R
     while (continuation) {
         RenderBlock* currentBlock = continuation->isInline() ? continuation->containingBlock() : downcast<RenderBlock>(continuation);
         if (continuation->isInline() || continuation->firstChild())
-            return continuation->positionForPoint(parentBlockPoint - currentBlock->locationOffset(), region);
+            return continuation->positionForPoint(parentBlockPoint - currentBlock->locationOffset(), fragment);
         continuation = downcast<RenderBlock>(*continuation).inlineElementContinuation();
     }
     
-    return RenderBoxModelObject::positionForPoint(point, region);
+    return RenderBoxModelObject::positionForPoint(point, fragment);
 }
 
 namespace {
@@ -1110,10 +1110,10 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBox() const
     return rect;
 }
 
-LayoutRect RenderInline::linesVisualOverflowBoundingBoxInRegion(const RenderRegion* region) const
+LayoutRect RenderInline::linesVisualOverflowBoundingBoxInFragment(const RenderFragmentContainer* fragment) const
 {
     ASSERT(alwaysCreateLineBoxes());
-    ASSERT(region);
+    ASSERT(fragment);
 
     if (!firstLineBox() || !lastLineBox())
         return LayoutRect();
@@ -1123,28 +1123,28 @@ LayoutRect RenderInline::linesVisualOverflowBoundingBoxInRegion(const RenderRegi
     LayoutUnit logicalRightSide = LayoutUnit::min();
     LayoutUnit logicalTop;
     LayoutUnit logicalHeight;
-    InlineFlowBox* lastInlineInRegion = 0;
+    InlineFlowBox* lastInlineInFragment = 0;
     for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox()) {
         const RootInlineBox& root = curr->root();
-        if (root.containingRegion() != region) {
-            if (lastInlineInRegion)
+        if (root.containingFragment() != fragment) {
+            if (lastInlineInFragment)
                 break;
             continue;
         }
 
-        if (!lastInlineInRegion)
+        if (!lastInlineInFragment)
             logicalTop = curr->logicalTopVisualOverflow(root.lineTop());
 
-        lastInlineInRegion = curr;
+        lastInlineInFragment = curr;
 
         logicalLeftSide = std::min(logicalLeftSide, curr->logicalLeftVisualOverflow());
         logicalRightSide = std::max(logicalRightSide, curr->logicalRightVisualOverflow());
     }
 
-    if (!lastInlineInRegion)
+    if (!lastInlineInFragment)
         return LayoutRect();
 
-    logicalHeight = lastInlineInRegion->logicalBottomVisualOverflow(lastInlineInRegion->root().lineBottom()) - logicalTop;
+    logicalHeight = lastInlineInFragment->logicalBottomVisualOverflow(lastInlineInFragment->root().lineBottom()) - logicalTop;
     
     LayoutUnit logicalWidth = logicalRightSide - logicalLeftSide;
     
index bb26cf0..7904e2f 100644 (file)
@@ -29,7 +29,7 @@
 namespace WebCore {
 
 class Position;
-class RenderRegion;
+class RenderFragmentContainer;
 
 class RenderInline : public RenderBoxModelObject {
 public:
@@ -59,7 +59,7 @@ public:
 
     WEBCORE_EXPORT IntRect linesBoundingBox() const;
     LayoutRect linesVisualOverflowBoundingBox() const;
-    LayoutRect linesVisualOverflowBoundingBoxInRegion(const RenderRegion*) const;
+    LayoutRect linesVisualOverflowBoundingBoxInFragment(const RenderFragmentContainer*) const;
 
     InlineFlowBox* createAndAppendInlineFlowBox();
 
@@ -149,7 +149,7 @@ private:
     void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags, bool* wasFixed) const override;
     const RenderObject* pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&) const override;
 
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) final;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) final;
 
     LayoutRect frameRectForStickyPositioning() const final { return linesBoundingBox(); }
 
index 8cd72af..8f204b4 100644 (file)
@@ -87,6 +87,7 @@
 #include "PlatformMouseEvent.h"
 #include "RenderFlexibleBox.h"
 #include "RenderFlowThread.h"
+#include "RenderFragmentContainer.h"
 #include "RenderGeometryMap.h"
 #include "RenderImage.h"
 #include "RenderInline.h"
@@ -96,7 +97,6 @@
 #include "RenderLayerFilterInfo.h"
 #include "RenderMarquee.h"
 #include "RenderMultiColumnFlowThread.h"
-#include "RenderRegion.h"
 #include "RenderReplica.h"
 #include "RenderSVGResourceClipper.h"
 #include "RenderScrollbar.h"
@@ -2092,9 +2092,9 @@ static inline const RenderLayer* accumulateOffsetTowardsAncestor(const RenderLay
     if (adjustForColumns == RenderLayer::AdjustForColumns) {
         if (RenderLayer* parentLayer = layer->parent()) {
             if (is<RenderMultiColumnFlowThread>(parentLayer->renderer())) {
-                RenderRegion* region = downcast<RenderMultiColumnFlowThread>(parentLayer->renderer()).physicalTranslationFromFlowToRegion(location);
-                if (region)
-                    location.moveBy(region->topLeftLocation() + -parentLayer->renderBox()->topLeftLocation());
+                RenderFragmentContainer* fragment = downcast<RenderMultiColumnFlowThread>(parentLayer->renderer()).physicalTranslationFromFlowToFragment(location);
+                if (fragment)
+                    location.moveBy(fragment->topLeftLocation() + -parentLayer->renderBox()->topLeftLocation());
             }
         }
     }
@@ -5529,7 +5529,7 @@ void RenderLayer::calculateRects(const ClipRectsContext& clipRectsContext, const
                 backgroundRect.intersect(layerBoundsWithVisualOverflow);
         } else {
             // Shift the bounds to be for our region only.
-            LayoutRect bounds = renderBox()->borderBoxRectInRegion(nullptr);
+            LayoutRect bounds = renderBox()->borderBoxRectInFragment(nullptr);
 
             bounds.move(offsetFromRootLocal);
             if (this != clipRectsContext.rootLayer || clipRectsContext.respectOverflowClip == RespectOverflowClip)
index 72589e3..ad5e3ca 100644 (file)
 #include "PluginViewBase.h"
 #include "ProgressTracker.h"
 #include "RenderFlowThread.h"
+#include "RenderFragmentContainer.h"
 #include "RenderHTMLCanvas.h"
 #include "RenderIFrame.h"
 #include "RenderImage.h"
 #include "RenderLayerCompositor.h"
 #include "RenderEmbeddedObject.h"
 #include "RenderMedia.h"
-#include "RenderRegion.h"
 #include "RenderVideo.h"
 #include "RenderView.h"
 #include "ScrollingCoordinator.h"
@@ -2506,7 +2506,7 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap
     if (m_owningLayer.isRenderViewLayer())
         renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState);
 
-    // FIXME: GraphicsLayers need a way to split for RenderRegions.
+    // FIXME: GraphicsLayers need a way to split for RenderFragmentContainers.
     RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer);
     m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags);
 
index 83b3cfb..43604c8 100644 (file)
@@ -2076,7 +2076,7 @@ bool RenderLayerCompositor::canBeComposited(const RenderLayer& layer) const
         if (!layer.isInsideFlowThread())
             return true;
 
-        // CSS Regions flow threads do not need to be composited as we use composited RenderRegions
+        // CSS Regions flow threads do not need to be composited as we use composited RenderFragmentContainers
         // to render the background of the RenderFlowThread.
         if (layer.isRenderFlowThread())
             return false;
index 058b0fc..9a97a3a 100644 (file)
@@ -151,7 +151,7 @@ bool RenderLineBreak::canBeSelectionLeaf() const
     return true;
 }
 
-VisiblePosition RenderLineBreak::positionForPoint(const LayoutPoint&, const RenderRegion*)
+VisiblePosition RenderLineBreak::positionForPoint(const LayoutPoint&, const RenderFragmentContainer*)
 {
     ensureLineBoxes();
     return createVisiblePosition(0, DOWNSTREAM);
index dd79c41..7deefb8 100644 (file)
@@ -62,7 +62,7 @@ private:
     bool canHaveChildren() const override { return false; }
     void paint(PaintInfo&, const LayoutPoint&) override { }
 
-    VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override;
+    VisiblePosition positionForPoint(const LayoutPoint&, const RenderFragmentContainer*) override;
     int caretMinOffset() const override;
     int caretMaxOffset() const override;
     bool canBeSelectionLeaf() const override;
index f1d8ebe..ad17a53 100644 (file)
@@ -201,16 +201,16 @@ void RenderMultiColumnFlowThread::evacuateAndDestroy()
     destroy();
 }
 
-void RenderMultiColumnFlowThread::addRegionToThread(RenderRegion* renderRegion)
+void RenderMultiColumnFlowThread::addFragmentToThread(RenderFragmentContainer* RenderFragmentContainer)
 {
-    auto* columnSet = downcast<RenderMultiColumnSet>(renderRegion);
+    auto* columnSet = downcast<RenderMultiColumnSet>(RenderFragmentContainer);
     if (RenderMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet()) {
-        RenderRegionList::iterator it = m_regionList.find(nextSet);
-        ASSERT(it != m_regionList.end());
-        m_regionList.insertBefore(it, columnSet);
+        RenderFragmentContainerList::iterator it = m_fragmentList.find(nextSet);
+        ASSERT(it != m_fragmentList.end());
+        m_fragmentList.insertBefore(it, columnSet);
     } else
-        m_regionList.add(columnSet);
-    renderRegion->setIsValid(true);
+        m_fragmentList.add(columnSet);
+    RenderFragmentContainer->setIsValid(true);
 }
 
 void RenderMultiColumnFlowThread::willBeRemovedFromTree()
@@ -219,7 +219,7 @@ void RenderMultiColumnFlowThread::willBeRemovedFromTree()
     // are siblings of this object, and there may be pointers to this object's sibling somewhere
     // further up on the call stack.
     for (RenderMultiColumnSet* columnSet = firstMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet())
-        columnSet->detachRegion();
+        columnSet->detachFragment();
     multiColumnBlockFlow()->setMultiColumnFlowThread(nullptr);
     RenderFlowThread::willBeRemovedFromTree();
 }
@@ -392,7 +392,7 @@ RenderObject* RenderMultiColumnFlowThread::processPossibleSpannerDescendant(Rend
     RenderMultiColumnSet* newSet = new RenderMultiColumnSet(*this, RenderStyle::createAnonymousStyleWithDisplay(multicolContainer->style(), BLOCK));
     newSet->initializeStyle();
     multicolContainer->RenderBlock::addChild(newSet, insertBeforeMulticolChild);
-    invalidateRegions();
+    invalidateFragments();
 
     // We cannot handle immediate column set siblings at the moment (and there's no need for
     // it, either). There has to be at least one spanner separating them.
@@ -469,7 +469,7 @@ void RenderMultiColumnFlowThread::flowThreadRelativeWillBeRemoved(RenderObject&
 {
     if (m_beingEvacuated)
         return;
-    invalidateRegions();
+    invalidateFragments();
     if (is<RenderMultiColumnSpannerPlaceholder>(relative)) {
         // Remove the map entry for this spanner, but leave the actual spanner renderer alone. Also
         // keep the reference to the spanner, since the placeholder may be about to be re-inserted
@@ -525,28 +525,28 @@ LayoutUnit RenderMultiColumnFlowThread::initialLogicalWidth() const
 
 void RenderMultiColumnFlowThread::setPageBreak(const RenderBlock* block, LayoutUnit offset, LayoutUnit spaceShortage)
 {
-    if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset)))
+    if (auto* multicolSet = downcast<RenderMultiColumnSet>(fragmentAtBlockOffset(block, offset)))
         multicolSet->recordSpaceShortage(spaceShortage);
 }
 
 void RenderMultiColumnFlowThread::updateMinimumPageHeight(const RenderBlock* block, LayoutUnit offset, LayoutUnit minHeight)
 {
-    if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset)))
+    if (auto* multicolSet = downcast<RenderMultiColumnSet>(fragmentAtBlockOffset(block, offset)))
         multicolSet->updateMinimumColumnHeight(minHeight);
 }
 
-RenderRegion* RenderMultiColumnFlowThread::regionAtBlockOffset(const RenderBox* box, LayoutUnit offset, bool extendLastRegion) const
+RenderFragmentContainer* RenderMultiColumnFlowThread::fragmentAtBlockOffset(const RenderBox* box, LayoutUnit offset, bool extendLastFragment) const
 {
     if (!m_inLayout)
-        return RenderFlowThread::regionAtBlockOffset(box, offset, extendLastRegion);
+        return RenderFlowThread::fragmentAtBlockOffset(box, offset, extendLastFragment);
 
-    // Layout in progress. We are calculating the set heights as we speak, so the region range
+    // Layout in progress. We are calculating the set heights as we speak, so the fragment range
     // information is not up-to-date.
 
     RenderMultiColumnSet* columnSet = m_lastSetWorkedOn ? m_lastSetWorkedOn : firstMultiColumnSet();
     if (!columnSet) {
         // If there's no set, bail. This multicol is empty or only consists of spanners. There
-        // are no regions.
+        // are no fragments.
         return nullptr;
     }
     // The last set worked on is a good guess. But if we're not within the bounds, search for the
@@ -569,29 +569,29 @@ RenderRegion* RenderMultiColumnFlowThread::regionAtBlockOffset(const RenderBox*
     return columnSet;
 }
 
-void RenderMultiColumnFlowThread::setRegionRangeForBox(const RenderBox& box, RenderRegion* startRegion, RenderRegion* endRegion)
+void RenderMultiColumnFlowThread::setFragmentRangeForBox(const RenderBox& box, RenderFragmentContainer* startFragment, RenderFragmentContainer* endFragment)
 {
     // Some column sets may have zero height, which means that two or more sets may start at the
     // exact same flow thread position, which means that some parts of the code may believe that a
     // given box lives in sets that it doesn't really live in. Make some adjustments here and
-    // include such sets if they are adjacent to the start and/or end regions.
-    for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startRegion).previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet->previousSiblingMultiColumnSet()) {
+    // include such sets if they are adjacent to the start and/or end fragments.
+    for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startFragment).previousSiblingMultiColumnSet(); columnSet; columnSet = columnSet->previousSiblingMultiColumnSet()) {
         if (columnSet->logicalHeightInFlowThread())
             break;
-        startRegion = columnSet;
+        startFragment = columnSet;
     }
-    for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startRegion).nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet()) {
+    for (RenderMultiColumnSet* columnSet = downcast<RenderMultiColumnSet>(*startFragment).nextSiblingMultiColumnSet(); columnSet; columnSet = columnSet->nextSiblingMultiColumnSet()) {
         if (columnSet->logicalHeightInFlowThread())
             break;
-        endRegion = columnSet;
+        endFragment = columnSet;
     }
 
-    RenderFlowThread::setRegionRangeForBox(box, startRegion, endRegion);
+    RenderFlowThread::setFragmentRangeForBox(box, startFragment, endFragment);
 }
 
-bool RenderMultiColumnFlowThread::addForcedRegionBreak(const RenderBlock* block, LayoutUnit offset, RenderBox* /*breakChild*/, bool /*isBefore*/, LayoutUnit* offsetBreakAdjustment)
+bool RenderMultiColumnFlowThread::addForcedFragmentBreak(const RenderBlock* block, LayoutUnit offset, RenderBox* /*breakChild*/, bool /*isBefore*/, LayoutUnit* offsetBreakAdjustment)
 {
-    if (auto* multicolSet = downcast<RenderMultiColumnSet>(regionAtBlockOffset(block, offset))) {
+    if (auto* multicolSet = downcast<RenderMultiColumnSet>(fragmentAtBlockOffset(block, offset))) {
         multicolSet->addForcedBreak(offset);
         if (offsetBreakAdjustment)
             *offsetBreakAdjustment = pageLogicalHeightForOffset(offset) ? pageRemainingLogicalHeightForOffset(offset, IncludePageBoundary) : LayoutUnit::fromPixel(0);
@@ -654,8 +654,8 @@ LayoutSize RenderMultiColumnFlowThread::offsetFromContainer(RenderElement& enclo
         *offsetDependsOnPoint = true;
     
     LayoutPoint translatedPhysicalPoint(physicalPoint);
-    if (RenderRegion* region = physicalTranslationFromFlowToRegion(translatedPhysicalPoint))
-        translatedPhysicalPoint.moveBy(region->topLeftLocation());
+    if (RenderFragmentContainer* fragment = physicalTranslationFromFlowToFragment(translatedPhysicalPoint))
+        translatedPhysicalPoint.moveBy(fragment->topLeftLocation());
     
     LayoutSize offset(translatedPhysicalPoint.x(), translatedPhysicalPoint.y());
     if (is<RenderBox>(enclosingContainer))
@@ -669,7 +669,7 @@ void RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint(MapCoordinatesFlags mo
     parent()->mapAbsoluteToLocalPoint(mode, transformState);
     LayoutPoint transformPoint(transformState.mappedPoint());
     
-    // Now walk through each region.
+    // Now walk through each fragment.
     const RenderMultiColumnSet* candidateColumnSet = nullptr;
     LayoutPoint candidatePoint;
     LayoutSize candidateContainerOffset;
@@ -680,16 +680,16 @@ void RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint(MapCoordinatesFlags mo
         candidatePoint = transformPoint - candidateContainerOffset;
         candidateColumnSet = &columnSet;
         
-        // We really have no clue what to do with overflow. We'll just use the closest region to the point in that case.
+        // We really have no clue what to do with overflow. We'll just use the closest fragment to the point in that case.
         LayoutUnit pointOffset = isHorizontalWritingMode() ? candidatePoint.y() : candidatePoint.x();
-        LayoutUnit regionOffset = isHorizontalWritingMode() ? columnSet.topLeftLocation().y() : columnSet.topLeftLocation().x();
-        if (pointOffset < regionOffset + columnSet.logicalHeight())
+        LayoutUnit fragmentOffset = isHorizontalWritingMode() ? columnSet.topLeftLocation().y() : columnSet.topLeftLocation().x();
+        if (pointOffset < fragmentOffset + columnSet.logicalHeight())
             break;
     }
     
-    // Once we have a good guess as to which region we hit tested through (and yes, this was just a heuristic, but it's
-    // the best we could do), then we can map from the region into the flow thread.
-    LayoutSize translationOffset = physicalTranslationFromRegionToFlow(candidateColumnSet, candidatePoint) + candidateContainerOffset;
+    // Once we have a good guess as to which fragment we hit tested through (and yes, this was just a heuristic, but it's
+    // the best we could do), then we can map from the fragment into the flow thread.
+    LayoutSize translationOffset = physicalTranslationFromFragmentToFlow(candidateColumnSet, candidatePoint) + candidateContainerOffset;
     bool preserve3D = mode & UseTransforms && (parent()->style().preserves3D() || style().preserves3D());
     if (mode & UseTransforms && shouldUseTransformFromContainer(parent())) {
         TransformationMatrix t;
@@ -699,41 +699,41 @@ void RenderMultiColumnFlowThread::mapAbsoluteToLocalPoint(MapCoordinatesFlags mo
         transformState.move(translationOffset.width(), translationOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
 }
 
-LayoutSize RenderMultiColumnFlowThread::physicalTranslationFromRegionToFlow(const RenderMultiColumnSet* columnSet, const LayoutPoint& physicalPoint) const
+LayoutSize RenderMultiColumnFlowThread::physicalTranslationFromFragmentToFlow(const RenderMultiColumnSet* columnSet, const LayoutPoint& physicalPoint) const
 {
     LayoutPoint logicalPoint = columnSet->flipForWritingMode(physicalPoint);
-    LayoutPoint translatedPoint = columnSet->translateRegionPointToFlowThread(logicalPoint);
+    LayoutPoint translatedPoint = columnSet->translateFragmentPointToFlowThread(logicalPoint);
     LayoutPoint physicalTranslatedPoint = columnSet->flipForWritingMode(translatedPoint);
     return physicalPoint - physicalTranslatedPoint;
 }
 
-RenderRegion* RenderMultiColumnFlowThread::mapFromFlowToRegion(TransformState& transformState) const
+RenderFragmentContainer* RenderMultiColumnFlowThread::mapFromFlowToFragment(TransformState& transformState) const
 {
-    if (!hasValidRegionInfo())
+    if (!hasValidFragmentInfo())
         return nullptr;
 
     // Get back into our local flow thread space.
     LayoutRect boxRect = transformState.mappedQuad().enclosingBoundingBox();
     flipForWritingMode(boxRect);
 
-    // FIXME: We need to refactor RenderObject::absoluteQuads to be able to split the quads across regions,
+    // FIXME: We need to refactor RenderObject::absoluteQuads to be able to split the quads across fragments,
     // for now we just take the center of the mapped enclosing box and map it to a column.
     LayoutPoint centerPoint = boxRect.center();
     LayoutUnit centerLogicalOffset = isHorizontalWritingMode() ? centerPoint.y() : centerPoint.x();
-    RenderRegion* renderRegion = regionAtBlockOffset(this, centerLogicalOffset, true);
-    if (!renderRegion)
+    RenderFragmentContainer* RenderFragmentContainer = fragmentAtBlockOffset(this, centerLogicalOffset, true);
+    if (!RenderFragmentContainer)
         return nullptr;
-    transformState.move(physicalTranslationOffsetFromFlowToRegion(renderRegion, centerLogicalOffset));
-    return renderRegion;
+    transformState.move(physicalTranslationOffsetFromFlowToFragment(RenderFragmentContainer, centerLogicalOffset));
+    return RenderFragmentContainer;
 }
 
-LayoutSize RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegion(const RenderRegion* renderRegion, const LayoutUnit logicalOffset) const
+LayoutSize RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToFragment(const RenderFragmentContainer* RenderFragmentContainer, const LayoutUnit logicalOffset) const
 {
     // Now that we know which multicolumn set we hit, we need to get the appropriate translation offset for the column.
-    const auto* columnSet = downcast<RenderMultiColumnSet>(renderRegion);
+    const auto* columnSet = downcast<RenderMultiColumnSet>(RenderFragmentContainer);
     LayoutPoint translationOffset = columnSet->columnTranslationForOffset(logicalOffset);
     
-    // Now we know how we want the rect to be translated into the region. At this point we're converting
+    // Now we know how we want the rect to be translated into the fragment. At this point we're converting
     // back to physical coordinates.
     if (style().isFlippedBlocksWritingMode()) {
         LayoutRect portionRect(columnSet->flowThreadPortionRect());
@@ -753,27 +753,27 @@ LayoutSize RenderMultiColumnFlowThread::physicalTranslationOffsetFromFlowToRegio
     return LayoutSize(translationOffset.x(), translationOffset.y());
 }
 
-RenderRegion* RenderMultiColumnFlowThread::physicalTranslationFromFlowToRegion(LayoutPoint& physicalPoint) const
+RenderFragmentContainer* RenderMultiColumnFlowThread::physicalTranslationFromFlowToFragment(LayoutPoint& physicalPoint) const
 {
-    if (!hasValidRegionInfo())
+    if (!hasValidFragmentInfo())
         return nullptr;
     
     // Put the physical point into the flow thread's coordinate space.
     LayoutPoint logicalPoint = flipForWritingMode(physicalPoint);
     
-    // Now get the region that we are in.
+    // Now get the fragment that we are in.
     LayoutUnit logicalOffset = isHorizontalWritingMode() ? logicalPoint.y() : logicalPoint.x();
-    RenderRegion* renderRegion = regionAtBlockOffset(this, logicalOffset, true);
-    if (!renderRegion)
+    RenderFragmentContainer* RenderFragmentContainer = fragmentAtBlockOffset(this, logicalOffset, true);
+    if (!RenderFragmentContainer)
         return nullptr;
     
-    // Translate to the coordinate space of the region.
-    LayoutSize translationOffset = physicalTranslationOffsetFromFlowToRegion(renderRegion, logicalOffset);
+    // Translate to the coordinate space of the fragment.
+    LayoutSize translationOffset = physicalTranslationOffsetFromFlowToFragment(RenderFragmentContainer, logicalOffset);
     
-    // Now shift the physical point into the region's coordinate space.
+    // Now shift the physical point into the fragment's coordinate space.
     physicalPoint += translationOffset;
     
-    return renderRegion;
+    return RenderFragmentContainer;
 }
 
 bool RenderMultiColumnFlowThread::isPageLogicalHeightKnown() const
index 4268c61..d4b002b 100644 (file)
@@ -85,30 +85,30 @@ public:
     
     void computeLineGridPaginationOrigin(LayoutState&) const;
     
-    RenderRegion* mapFromFlowToRegion(TransformState&) const override;
+    RenderFragmentContainer* mapFromFlowToFragment(TransformState&) const override;
     
     // This method takes a logical offset and returns a physical translation that can be applied to map
-    // a physical point (corresponding to the logical offset) into the region's physical coordinate space.
-    LayoutSize physicalTranslationOffsetFromFlowToRegion(const RenderRegion*, const LayoutUnit) const;
+    // a physical point (corresponding to the logical offset) into the fragment's physical coordinate space.
+    LayoutSize physicalTranslationOffsetFromFlowToFragment(const RenderFragmentContainer*, const LayoutUnit) const;
     
-    // The point is physical, and the result is a physical location within the region.
-    RenderRegion* physicalTranslationFromFlowToRegion(LayoutPoint&) const;
+    // The point is physical, and the result is a physical location within the fragment.
+    RenderFragmentContainer* physicalTranslationFromFlowToFragment(LayoutPoint&) const;
     
-    // This method is the inverse of the previous method and goes from region to flow.
-    LayoutSize physicalTranslationFromRegionToFlow(const RenderMultiColumnSet*, const LayoutPoint&) const;
+    // This method is the inverse of the previous method and goes from fragment to flow.
+    LayoutSize physicalTranslationFromFragmentToFlow(const RenderMultiColumnSet*, const LayoutPoint&) const;
     
     bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
     
     void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const override;
     LayoutSize offsetFromContainer(RenderElement&, const LayoutPoint&, bool* offsetDependsOnPoint = nullptr) const override;
     
-    // FIXME: Eventually as column and region flow threads start nesting, this will end up changing.
+    // FIXME: Eventually as column and fragment flow threads start nesting, this will end up changing.
     bool shouldCheckColumnBreaks() const override;
 
 private:
     bool isRenderMultiColumnFlowThread() const override { return true; }
     const char* renderName() const override;
-    void addRegionToThread(RenderRegion*) override;
+    void addFragmentToThread(RenderFragmentContainer*) override;
     void willBeRemovedFromTree() override;
     RenderObject* resolveMovedChild(RenderObject* child) const override;
     void flowThreadDescendantInserted(RenderObject&) override;
@@ -118,9 +118,9 @@ private:
     LayoutUnit initialLogicalWidth() const override;
     void setPageBreak(const RenderBlock*, LayoutUnit offset, LayoutUnit spaceShortage) override;
     void updateMinimumPageHeight(const RenderBlock*, LayoutUnit offset, LayoutUnit minHeight) override;
-    RenderRegion* regionAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastRegion = false) const override;
-    void setRegionRangeForBox(const RenderBox&, RenderRegion*, RenderRegion*) override;
-    bool addForcedRegionBreak(const RenderBlock*, LayoutUnit, RenderBox* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) override;
+    RenderFragmentContainer* fragmentAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastFragment = false) const override;
+    void setFragmentRangeForBox(const RenderBox&, RenderFragmentContainer*, RenderFragmentContainer*) override;