Diff
Modified: trunk/Source/WebCore/ChangeLog (224403 => 224404)
--- trunk/Source/WebCore/ChangeLog 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/ChangeLog 2017-11-03 16:59:30 UTC (rev 224404)
@@ -1,3 +1,77 @@
+2017-11-03 Zalan Bujtas <[email protected]>
+
+ RenderObject::*positioned() naming cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=179206
+ <rdar://problem/35325254>
+
+ Reviewed by Darin Adler.
+
+ +isFixedPositioned()
+ +isAbsolutelyPositioned()
+ isRelPositioned() -> isRelativelyPositioned()
+
+ Covered by existing tests.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::positionOffsetValue):
+ * dom/Element.cpp:
+ (WebCore::layoutOverflowRectContainsAllDescendants):
+ * rendering/LayoutState.cpp:
+ (WebCore::LayoutState::LayoutState):
+ * rendering/LayoutState.h:
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::renderName const):
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::fixedElementLaysOutRelativeToFrame const):
+ (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect const):
+ (WebCore::RenderBox::mapLocalToContainer const):
+ (WebCore::RenderBox::pushMappingToContainer const):
+ (WebCore::RenderBox::mapAbsoluteToLocalPoint const):
+ (WebCore::RenderBox::offsetFromContainer const):
+ (WebCore::RenderBox::containingBlockLogicalWidthForPositioned const):
+ (WebCore::RenderBox::containingBlockLogicalHeightForPositioned const):
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent const):
+ (WebCore::RenderBoxModelObject::offsetForInFlowPosition const):
+ * rendering/RenderDeprecatedFlexibleBox.cpp:
+ (WebCore::RenderDeprecatedFlexibleBox::renderName const):
+ * rendering/RenderFragmentedFlow.cpp:
+ (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
+ * rendering/RenderGeometryMap.cpp:
+ (WebCore::canMapBetweenRenderersViaLayers):
+ * rendering/RenderGrid.cpp:
+ (WebCore::RenderGrid::renderName const):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::renderName const):
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::paintLayer):
+ (WebCore::RenderLayer::calculateClipRects const):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateCompositedBounds):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateBacking):
+ (WebCore::RenderLayerCompositor::computeExtent const):
+ (WebCore::RenderLayerCompositor::reasonsForCompositing const):
+ (WebCore::RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer const):
+ (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
+ (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::containingBlock const):
+ (WebCore::RenderObject::outputRenderObject const):
+ (WebCore::RenderObject::offsetParent const):
+ * rendering/RenderObject.h:
+ (WebCore::RenderObject::isPositioned const):
+ (WebCore::RenderObject::isInFlowPositioned const):
+ (WebCore::RenderObject::isFixedPositioned const):
+ (WebCore::RenderObject::isAbsolutePositioned const):
+ (WebCore::RenderObject::isRelativePositioned const):
+ (WebCore::RenderObject::isStickyPositioned const):
+ (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
+ (WebCore::RenderObject::RenderObjectBitfields::isRelativePositioned const):
+ (WebCore::RenderObject::RenderObjectBitfields::isPositioned const):
+ (WebCore::RenderObject::isRelPositioned const): Deleted.
+ (WebCore::RenderObject::RenderObjectBitfields::isRelPositioned const): Deleted.
+
2017-11-03 Chris Dumez <[email protected]>
Use a single identifier type to identify Service Workers
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (224403 => 224404)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -779,7 +779,7 @@
// We should return the "used value".
auto& box = downcast<RenderBox>(*renderer);
auto* containingBlock = box.containingBlock();
- if (box.isRelPositioned() || !containingBlock)
+ if (box.isRelativelyPositioned() || !containingBlock)
return zoomAdjustedPixelValue(getOffsetUsedStyleRelative(box, propertyID), style);
if (renderer->isOutOfFlowPositioned())
return zoomAdjustedPixelValue(getOffsetUsedStyleOutOfFlowPositioned(*containingBlock, box, propertyID), style);
Modified: trunk/Source/WebCore/dom/Element.cpp (224403 => 224404)
--- trunk/Source/WebCore/dom/Element.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/dom/Element.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -1035,7 +1035,7 @@
for (auto* positionedBox : *viewPositionedObjects) {
if (positionedBox == &renderBox)
continue;
- if (positionedBox->style().position() == FixedPosition && renderBox.element()->contains(positionedBox->element()))
+ if (positionedBox->isFixedPositioned() && renderBox.element()->contains(positionedBox->element()))
return false;
}
}
Modified: trunk/Source/WebCore/rendering/LayoutState.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/LayoutState.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/LayoutState.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -42,7 +42,7 @@
{
ASSERT(m_ancestor);
- bool fixed = renderer->isOutOfFlowPositioned() && renderer->style().position() == FixedPosition;
+ bool fixed = renderer->isFixedPositioned();
if (fixed) {
// FIXME: This doesn't work correctly with transforms.
FloatPoint fixedOffset = renderer->view().localToAbsolute(FloatPoint(), IsFixed);
Modified: trunk/Source/WebCore/rendering/LayoutState.h (224403 => 224404)
--- trunk/Source/WebCore/rendering/LayoutState.h 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/LayoutState.h 2017-11-03 16:59:30 UTC (rev 224404)
@@ -103,9 +103,9 @@
// e.g., because of composited scrolling.
LayoutRect m_clipRect;
- // x/y offset from container. Includes relative positioning and scroll offsets.
+ // x/y offset from layout root. Includes in-flow positioning and scroll offsets.
LayoutSize m_paintOffset;
- // x/y offset from container. Does not include relative positioning or scroll offsets.
+ // x/y offset from layout root. Does not include in-flow positioning or scroll offsets.
LayoutSize m_layoutOffset;
// Transient offset from the final position of the object
// used to ensure that repaints happen in the correct place.
Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -3531,9 +3531,9 @@
return "RenderBlock (generated)";
if (isAnonymous())
return "RenderBlock (generated)";
- if (isRelPositioned())
+ if (isRelativelyPositioned())
return "RenderBlock (relative positioned)";
- if (isStickyPositioned())
+ if (isStickilyPositioned())
return "RenderBlock (sticky positioned)";
return "RenderBlock";
}
Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderBox.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -742,7 +742,7 @@
bool RenderBox::fixedElementLaysOutRelativeToFrame(const FrameView& frameView) const
{
- return style().position() == FixedPosition && container()->isRenderView() && frameView.fixedElementsLayoutRelativeToFrame();
+ return isFixedPositioned() && container()->isRenderView() && frameView.fixedElementsLayoutRelativeToFrame();
}
bool RenderBox::includeVerticalScrollbarSize() const
@@ -1423,7 +1423,7 @@
if (!isCandidateForOpaquenessTest(childBox))
continue;
LayoutPoint childLocation = childBox.location();
- if (childBox.isRelPositioned())
+ if (childBox.isRelativelyPositioned())
childLocation.move(childBox.relativePositionOffset());
LayoutRect childLocalRect = localRect;
childLocalRect.moveBy(-childLocation);
@@ -1935,7 +1935,7 @@
if (!container)
return;
- bool isFixedPos = style().position() == FixedPosition;
+ bool isFixedPos = isFixedPositioned();
// If this box has a transform, it acts as a fixed position container for fixed descendants,
// and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
if (hasTransform() && !isFixedPos)
@@ -1978,7 +1978,7 @@
if (!container)
return nullptr;
- bool isFixedPos = style().position() == FixedPosition;
+ bool isFixedPos = isFixedPositioned();
LayoutSize adjustmentForSkippedAncestor;
if (ancestorSkipped) {
// There can't be a transform between repaintContainer and container, because transforms create containers, so it should be safe
@@ -2006,7 +2006,7 @@
void RenderBox::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformState& transformState) const
{
- bool isFixedPos = style().position() == FixedPosition;
+ bool isFixedPos = isFixedPositioned();
if (hasTransform() && !isFixedPos) {
// If this box has a transform, it acts as a fixed position container for fixed descendants,
// and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position.
@@ -2017,10 +2017,10 @@
RenderBoxModelObject::mapAbsoluteToLocalPoint(mode, transformState);
}
-LayoutSize RenderBox::offsetFromContainer(RenderElement& renderer, const LayoutPoint&, bool* offsetDependsOnPoint) const
+LayoutSize RenderBox::offsetFromContainer(RenderElement& container, const LayoutPoint&, bool* offsetDependsOnPoint) const
{
// A fragment "has" boxes inside it without being their container.
- ASSERT(&renderer == container() || is<RenderFragmentContainer>(renderer));
+ ASSERT(&container == this->container() || is<RenderFragmentContainer>(container));
LayoutSize offset;
if (isInFlowPositioned())
@@ -2029,14 +2029,14 @@
if (!isInline() || isReplaced())
offset += topLeftLocationOffset();
- if (is<RenderBox>(renderer))
- offset -= toLayoutSize(downcast<RenderBox>(renderer).scrollPosition());
+ if (is<RenderBox>(container))
+ offset -= toLayoutSize(downcast<RenderBox>(container).scrollPosition());
- if (style().position() == AbsolutePosition && renderer.isInFlowPositioned() && is<RenderInline>(renderer))
- offset += downcast<RenderInline>(renderer).offsetForInFlowPositionedInline(this);
+ if (isAbsolutelyPositioned() && container.isInFlowPositioned() && is<RenderInline>(container))
+ offset += downcast<RenderInline>(container).offsetForInFlowPositionedInline(this);
if (offsetDependsOnPoint)
- *offsetDependsOnPoint |= is<RenderFragmentedFlow>(renderer);
+ *offsetDependsOnPoint |= is<RenderFragmentedFlow>(container);
return offset;
}
@@ -3209,7 +3209,7 @@
}
if (is<RenderBox>(containingBlock)) {
- bool isFixedPosition = style().position() == FixedPosition;
+ bool isFixedPosition = isFixedPositioned();
RenderFragmentedFlow* fragmentedFlow = enclosingFragmentedFlow();
if (!fragmentedFlow) {
@@ -3274,7 +3274,7 @@
}
if (containingBlock.isBox()) {
- bool isFixedPosition = style().position() == FixedPosition;
+ bool isFixedPosition = isFixedPositioned();
if (isFixedPosition && is<RenderView>(containingBlock))
return downcast<RenderView>(containingBlock).clientLogicalHeightForFixedPosition();
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -448,9 +448,9 @@
if (is<RenderBox>(*offsetParent) && !offsetParent->isBody() && !is<RenderTable>(*offsetParent))
referencePoint.move(-downcast<RenderBox>(*offsetParent).borderLeft(), -downcast<RenderBox>(*offsetParent).borderTop());
if (!isOutOfFlowPositioned() || enclosingFragmentedFlow()) {
- if (isRelPositioned())
+ if (isRelativelyPositioned())
referencePoint.move(relativePositionOffset());
- else if (isStickyPositioned())
+ else if (isStickilyPositioned())
referencePoint.move(stickyPositionOffset());
// CSS regions specification says that region flows should return the body element as their offsetParent.
@@ -601,10 +601,10 @@
LayoutSize RenderBoxModelObject::offsetForInFlowPosition() const
{
- if (isRelPositioned())
+ if (isRelativelyPositioned())
return relativePositionOffset();
- if (isStickyPositioned())
+ if (isStickilyPositioned())
return stickyPositionOffset();
return LayoutSize();
Modified: trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -1122,7 +1122,7 @@
return "RenderDeprecatedFlexibleBox (generated)";
if (isAnonymous())
return "RenderDeprecatedFlexibleBox (generated)";
- if (isRelPositioned())
+ if (isRelativelyPositioned())
return "RenderDeprecatedFlexibleBox (relative positioned)";
return "RenderDeprecatedFlexibleBox";
}
Modified: trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderFragmentedFlow.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -324,9 +324,9 @@
// Since the top has been overriden, check if the
// relative/sticky positioning must be reconsidered.
- if (boxModelObject.isRelPositioned())
+ if (boxModelObject.isRelativelyPositioned())
referencePoint.move(0, boxModelObject.relativePositionOffset().height());
- else if (boxModelObject.isStickyPositioned())
+ else if (boxModelObject.isStickilyPositioned())
referencePoint.move(0, boxModelObject.stickyPositionOffset().height());
}
Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -151,7 +151,7 @@
{
for (const RenderElement* current = &renderer; ; current = current->parent()) {
const RenderStyle& style = current->style();
- if (style.position() == FixedPosition || style.isFlippedBlocksWritingMode())
+ if (current->isFixedPositioned() || style.isFlippedBlocksWritingMode())
return false;
if (current->hasTransformRelatedProperty() && (current->style().hasTransform() || current->style().hasPerspective()))
Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderGrid.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -1693,7 +1693,7 @@
return "RenderGrid (positioned)";
if (isAnonymous())
return "RenderGrid (generated)";
- if (isRelPositioned())
+ if (isRelativelyPositioned())
return "RenderGrid (relative positioned)";
return "RenderGrid";
}
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -842,9 +842,9 @@
const char* RenderInline::renderName() const
{
- if (isRelPositioned())
+ if (isRelativelyPositioned())
return "RenderInline (relative positioned)";
- if (isStickyPositioned())
+ if (isStickilyPositioned())
return "RenderInline (sticky positioned)";
// FIXME: Temporary hack while the new generated content system is being implemented.
if (isPseudoElement())
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -3959,7 +3959,7 @@
} else if (viewportConstrainedNotCompositedReason() == NotCompositedForBoundsOutOfView) {
// Don't paint out-of-view viewport constrained layers (when doing prepainting) because they will never be visible
// unless their position or viewport size is changed.
- ASSERT(renderer().style().position() == FixedPosition);
+ ASSERT(renderer().isFixedPositioned());
return;
}
@@ -5414,13 +5414,13 @@
// A fixed object is essentially the root of its containing block hierarchy, so when
// we encounter such an object, we reset our clip rects to the fixedClipRect.
- if (renderer().style().position() == FixedPosition) {
+ if (renderer().isFixedPositioned()) {
clipRects.setPosClipRect(clipRects.fixedClipRect());
clipRects.setOverflowClipRect(clipRects.fixedClipRect());
clipRects.setFixed(true);
- } else if (renderer().style().hasInFlowPosition())
+ } else if (renderer().isInFlowPositioned())
clipRects.setPosClipRect(clipRects.overflowClipRect());
- else if (renderer().style().position() == AbsolutePosition)
+ else if (renderer().isAbsolutelyPositioned())
clipRects.setOverflowClipRect(clipRects.posClipRect());
// Update the clip rects that will be passed to child layers.
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -592,7 +592,7 @@
auto* rootLayer = view.layer();
LayoutRect clippingBounds;
- if (renderer().style().position() == FixedPosition && renderer().container() == &view)
+ if (renderer().isFixedPositioned() && renderer().container() == &view)
clippingBounds = view.frameView().rectForFixedPositionLayout();
else
clippingBounds = view.unscaledDocumentRect();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -1086,7 +1086,7 @@
// If a fixed position layer gained/lost a backing or the reason not compositing it changed,
// the scrolling coordinator needs to recalculate whether it can do fast scrolling.
- if (layer.renderer().style().position() == FixedPosition) {
+ if (layer.renderer().isFixedPositioned()) {
if (layer.viewportConstrainedNotCompositedReason() != viewportConstrainedNotCompositedReason) {
layer.setViewportConstrainedNotCompositedReason(viewportConstrainedNotCompositedReason);
layerChanged = true;
@@ -1202,7 +1202,7 @@
RenderLayerModelObject& renderer = layer.renderer();
- if (renderer.isOutOfFlowPositioned() && renderer.style().position() == FixedPosition && renderer.container() == &m_renderView) {
+ if (renderer.isFixedPositioned() && renderer.container() == &m_renderView) {
// Because fixed elements get moved around without re-computing overlap, we have to compute an overlap
// rect that covers all the locations that the fixed element could move to.
// FIXME: need to handle sticky too.
@@ -2142,7 +2142,7 @@
reasons |= CompositingReason::WillChange;
if (requiresCompositingForPosition(renderer, *renderer.layer()))
- reasons |= renderer.style().position() == FixedPosition ? CompositingReason::PositionFixed : CompositingReason::PositionSticky;
+ reasons |= renderer.isFixedPositioned() ? CompositingReason::PositionFixed : CompositingReason::PositionSticky;
#if PLATFORM(IOS)
if (requiresCompositingForScrolling(*renderer.layer()))
@@ -2553,7 +2553,7 @@
bool RenderLayerCompositor::isAsyncScrollableStickyLayer(const RenderLayer& layer, const RenderLayer** enclosingAcceleratedOverflowLayer) const
{
- ASSERT(layer.renderer().isStickyPositioned());
+ ASSERT(layer.renderer().isStickilyPositioned());
auto* enclosingOverflowLayer = layer.enclosingOverflowClipLayer(ExcludeSelf);
@@ -2584,7 +2584,7 @@
bool RenderLayerCompositor::isViewportConstrainedFixedOrStickyLayer(const RenderLayer& layer) const
{
- if (layer.renderer().isStickyPositioned())
+ if (layer.renderer().isStickilyPositioned())
return isAsyncScrollableStickyLayer(layer);
if (layer.renderer().style().position() != FixedPosition)
@@ -2592,7 +2592,7 @@
// FIXME: Handle fixed inside of a transform, which should not behave as fixed.
for (auto* stackingContainer = layer.stackingContainer(); stackingContainer; stackingContainer = stackingContainer->stackingContainer()) {
- if (stackingContainer->isComposited() && stackingContainer->renderer().style().position() == FixedPosition)
+ if (stackingContainer->isComposited() && stackingContainer->renderer().isFixedPositioned())
return false;
}
@@ -3758,7 +3758,7 @@
// If a node plays both roles, fixed/sticky is always the ancestor node of scrolling.
if (reasons & ViewportConstrained) {
ScrollingNodeType nodeType = FrameScrollingNode;
- if (layer.renderer().style().position() == FixedPosition)
+ if (layer.renderer().isFixedPositioned())
nodeType = FixedNode;
else if (layer.renderer().style().position() == StickyPosition)
nodeType = StickyNode;
@@ -3856,7 +3856,7 @@
ASSERT(layer->isComposited());
std::unique_ptr<ViewportConstraints> constraints;
- if (layer->renderer().isStickyPositioned()) {
+ if (layer->renderer().isStickilyPositioned()) {
constraints = std::make_unique<StickyPositionViewportConstraints>(computeStickyViewportConstraints(*layer));
const RenderLayer* enclosingTouchScrollableLayer = nullptr;
if (isAsyncScrollableStickyLayer(*layer, &enclosingTouchScrollableLayer) && enclosingTouchScrollableLayer) {
@@ -3863,7 +3863,7 @@
ASSERT(enclosingTouchScrollableLayer->isComposited());
stickyContainerMap.add(layer->backing()->graphicsLayer()->platformLayer(), enclosingTouchScrollableLayer->backing()->scrollingLayer()->platformLayer());
}
- } else if (layer->renderer().style().position() == FixedPosition)
+ } else if (layer->renderer().isFixedPositioned())
constraints = std::make_unique<FixedPositionViewportConstraints>(computeFixedViewportConstraints(*layer));
else
continue;
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2017-11-03 16:59:30 UTC (rev 224404)
@@ -602,10 +602,9 @@
{
auto containingBlockForRenderer = [](const RenderElement& renderer)
{
- auto& style = renderer.style();
- if (style.position() == AbsolutePosition)
+ if (renderer.isAbsolutelyPositioned())
return renderer.containingBlockForAbsolutePosition();
- if (style.position() == FixedPosition)
+ if (renderer.isFixedPositioned())
return renderer.containingBlockForFixedPosition();
return renderer.containingBlockForObjectInFlow();
};
@@ -1069,12 +1068,12 @@
stream << "B";
if (isPositioned()) {
- if (isRelPositioned())
+ if (isRelativelyPositioned())
stream << "R";
- else if (isStickyPositioned())
+ else if (isStickilyPositioned())
stream << "K";
else if (isOutOfFlowPositioned()) {
- if (style().position() == AbsolutePosition)
+ if (isAbsolutelyPositioned())
stream << "A";
else
stream << "X";
@@ -1719,7 +1718,7 @@
// A is the root element.
// A is the HTML body element.
// The computed value of the position property for element A is fixed.
- if (isDocumentElementRenderer() || isBody() || (isOutOfFlowPositioned() && style().position() == FixedPosition))
+ if (isDocumentElementRenderer() || isBody() || isFixedPositioned())
return nullptr;
// If A is an area HTML element which has a map HTML element somewhere in the ancestor
Modified: trunk/Source/WebCore/rendering/RenderObject.h (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderObject.h 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderObject.h 2017-11-03 16:59:30 UTC (rev 224404)
@@ -414,11 +414,13 @@
bool isFloating() const { return m_bitfields.floating(); }
+ bool isPositioned() const { return m_bitfields.isPositioned(); }
+ bool isInFlowPositioned() const { return m_bitfields.isRelativelyPositioned() || m_bitfields.isStickilyPositioned(); }
bool isOutOfFlowPositioned() const { return m_bitfields.isOutOfFlowPositioned(); } // absolute or fixed positioning
- bool isInFlowPositioned() const { return m_bitfields.isRelPositioned() || m_bitfields.isStickyPositioned(); } // relative or sticky positioning
- bool isRelPositioned() const { return m_bitfields.isRelPositioned(); } // relative positioning
- bool isStickyPositioned() const { return m_bitfields.isStickyPositioned(); }
- bool isPositioned() const { return m_bitfields.isPositioned(); }
+ bool isFixedPositioned() const { return isOutOfFlowPositioned() && style().position() == FixedPosition; }
+ bool isAbsolutelyPositioned() const { return isOutOfFlowPositioned() && style().position() == AbsolutePosition; }
+ bool isRelativelyPositioned() const { return m_bitfields.isRelativelyPositioned(); }
+ bool isStickilyPositioned() const { return m_bitfields.isStickilyPositioned(); }
bool isText() const { return !m_bitfields.isBox() && m_bitfields.isTextOrRenderView(); }
bool isLineBreak() const { return m_bitfields.isLineBreak(); }
@@ -856,7 +858,7 @@
IsStaticallyPositioned = 0,
IsRelativelyPositioned = 1,
IsOutOfFlowPositioned = 2,
- IsStickyPositioned = 3
+ IsStickilyPositioned = 3
};
public:
@@ -929,8 +931,8 @@
public:
bool isOutOfFlowPositioned() const { return m_positionedState == IsOutOfFlowPositioned; }
- bool isRelPositioned() const { return m_positionedState == IsRelativelyPositioned; }
- bool isStickyPositioned() const { return m_positionedState == IsStickyPositioned; }
+ bool isRelativelyPositioned() const { return m_positionedState == IsRelativelyPositioned; }
+ bool isStickilyPositioned() const { return m_positionedState == IsStickilyPositioned; }
bool isPositioned() const { return m_positionedState != IsStaticallyPositioned; }
void setPositionedState(int positionState)
Modified: trunk/Source/WebCore/rendering/RenderTableRow.h (224403 => 224404)
--- trunk/Source/WebCore/rendering/RenderTableRow.h 2017-11-03 16:37:04 UTC (rev 224403)
+++ trunk/Source/WebCore/rendering/RenderTableRow.h 2017-11-03 16:59:30 UTC (rev 224404)
@@ -77,7 +77,7 @@
void layout() override;
LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const override;
- bool requiresLayer() const override { return hasOverflowClip() || hasTransformRelatedProperty() || hasHiddenBackface() || hasClipPath() || createsGroup() || isStickyPositioned(); }
+ bool requiresLayer() const override { return hasOverflowClip() || hasTransformRelatedProperty() || hasHiddenBackface() || hasClipPath() || createsGroup() || isStickilyPositioned(); }
void paint(PaintInfo&, const LayoutPoint&) override;