OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 if (parent() && diff.needsPaintInvalidationLayer()) { | 171 if (parent() && diff.needsPaintInvalidationLayer()) { |
172 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip() | 172 if (oldStyle->hasAutoClip() != newStyle.hasAutoClip() |
173 || oldStyle->clip() != newStyle.clip()) | 173 || oldStyle->clip() != newStyle.clip()) |
174 layer()->clipper().clearClipRectsIncludingDescendants(); | 174 layer()->clipper().clearClipRectsIncludingDescendants(); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 LayoutObject::styleWillChange(diff, newStyle); | 178 LayoutObject::styleWillChange(diff, newStyle); |
179 } | 179 } |
180 | 180 |
181 static inline LayoutBox* findScrollAncestor(const Node* startNode) | |
182 { | |
183 ASSERT(startNode->layoutObject()); | |
184 LayoutBox* curBox = startNode->layoutObject()->containingBlock(); | |
185 | |
186 // Scrolling propagates along the containing block chain. | |
187 while (curBox && !curBox->isLayoutView()) { | |
188 if (curBox->hasOverflowClip()) | |
189 return curBox; | |
190 curBox = curBox->containingBlock(); | |
191 } | |
192 | |
193 return nullptr; | |
194 } | |
195 | |
181 void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt yle* oldStyle) | 196 void LayoutBoxModelObject::styleDidChange(StyleDifference diff, const ComputedSt yle* oldStyle) |
182 { | 197 { |
183 bool hadTransform = hasTransformRelatedProperty(); | 198 bool hadTransform = hasTransformRelatedProperty(); |
184 bool hadLayer = hasLayer(); | 199 bool hadLayer = hasLayer(); |
185 bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer(); | 200 bool layerWasSelfPainting = hadLayer && layer()->isSelfPaintingLayer(); |
186 bool wasFloatingBeforeStyleChanged = FloatStateForStyleChange::wasFloating(t his); | 201 bool wasFloatingBeforeStyleChanged = FloatStateForStyleChange::wasFloating(t his); |
187 | 202 |
188 LayoutObject::styleDidChange(diff, oldStyle); | 203 LayoutObject::styleDidChange(diff, oldStyle); |
189 updateFromStyle(); | 204 updateFromStyle(); |
190 | 205 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
261 bool newStoleBodyBackground = toLayoutBoxModelObject(bodyLayout)->ba ckgroundStolenForBeingBody(style()); | 276 bool newStoleBodyBackground = toLayoutBoxModelObject(bodyLayout)->ba ckgroundStolenForBeingBody(style()); |
262 bool oldStoleBodyBackground = oldStyle && toLayoutBoxModelObject(bod yLayout)->backgroundStolenForBeingBody(oldStyle); | 277 bool oldStoleBodyBackground = oldStyle && toLayoutBoxModelObject(bod yLayout)->backgroundStolenForBeingBody(oldStyle); |
263 if (newStoleBodyBackground != oldStoleBodyBackground | 278 if (newStoleBodyBackground != oldStoleBodyBackground |
264 && bodyLayout->style() && bodyLayout->style()->hasBackground()) { | 279 && bodyLayout->style() && bodyLayout->style()->hasBackground()) { |
265 bodyLayout->setShouldDoFullPaintInvalidation(); | 280 bodyLayout->setShouldDoFullPaintInvalidation(); |
266 } | 281 } |
267 } | 282 } |
268 } | 283 } |
269 | 284 |
270 if (FrameView *frameView = view()->frameView()) { | 285 if (FrameView *frameView = view()->frameView()) { |
271 bool newStyleIsViewportConstained = style()->hasViewportConstrainedPosit ion(); | 286 bool newStyleIsViewportConstained = style()->position() == FixedPosition ; |
272 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->hasViewportCo nstrainedPosition(); | 287 bool oldStyleIsViewportConstrained = oldStyle && oldStyle->position() == FixedPosition; |
288 | |
289 // Sticky positioned elements are only viewport constrained if they have no ancestor scroller. | |
290 if (style()->position() == StickyPosition || (oldStyle && oldStyle->posi tion() == StickyPosition)) { | |
291 if (!findScrollAncestor(node())) { | |
292 newStyleIsViewportConstained |= style()->position() == StickyPos ition; | |
293 oldStyleIsViewportConstrained |= oldStyle && oldStyle->position( ) == StickyPosition; | |
294 } | |
295 } | |
296 | |
273 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { | 297 if (newStyleIsViewportConstained != oldStyleIsViewportConstrained) { |
274 if (newStyleIsViewportConstained && layer()) | 298 if (newStyleIsViewportConstained && layer()) |
275 frameView->addViewportConstrainedObject(this); | 299 frameView->addViewportConstrainedObject(this); |
276 else | 300 else |
277 frameView->removeViewportConstrainedObject(this); | 301 frameView->removeViewportConstrainedObject(this); |
278 } | 302 } |
279 } | 303 } |
280 } | 304 } |
281 | 305 |
282 void LayoutBoxModelObject::createLayer(PaintLayerType type) | 306 void LayoutBoxModelObject::createLayer(PaintLayerType type) |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
601 | 625 |
602 else if (!style()->bottom().isAuto() | 626 else if (!style()->bottom().isAuto() |
603 && (!containingBlock->hasAutoHeightOrContainingBlockWithAutoHeight() | 627 && (!containingBlock->hasAutoHeightOrContainingBlockWithAutoHeight() |
604 || !style()->bottom().hasPercent() | 628 || !style()->bottom().hasPercent() |
605 || containingBlock->stretchesToViewport())) | 629 || containingBlock->stretchesToViewport())) |
606 offset.expand(0, -valueForLength(style()->bottom(), containingBlock->ava ilableHeight())); | 630 offset.expand(0, -valueForLength(style()->bottom(), containingBlock->ava ilableHeight())); |
607 | 631 |
608 return offset; | 632 return offset; |
609 } | 633 } |
610 | 634 |
635 void LayoutBoxModelObject::computeStickyPositionConstraints(StickyPositionViewpo rtConstraints& constraints, const LayoutRect& constrainingRect) const | |
chrishtr
2015/12/09 00:37:38
I have a bunch of questions about this method. The
flackr
2015/12/10 23:43:15
Acknowledged.
| |
636 { | |
637 LayoutBlock* containingBlock = this->containingBlock(); | |
638 | |
639 LayoutRect containerContentRect = containingBlock->contentBoxRect(); | |
640 LayoutUnit maxWidth = containingBlock->availableLogicalWidth(); | |
641 | |
642 // Sticky positioned element ignore any override logical width on the contai ning block (as they don't call | |
643 // containingBlockLogicalWidthForContent). It's unclear whether this is tota lly fine. | |
644 // Compute the container-relative area within which the sticky element is al lowed to move. | |
645 containerContentRect.contractEdges( | |
646 minimumValueForLength(style()->marginTop(), maxWidth), | |
647 minimumValueForLength(style()->marginRight(), maxWidth), | |
648 minimumValueForLength(style()->marginBottom(), maxWidth), | |
649 minimumValueForLength(style()->marginLeft(), maxWidth)); | |
650 | |
651 // Map to the view to avoid including page scale factor. | |
652 constraints.setAbsoluteContainingBlockRect(LayoutRect(containingBlock->local ToContainerQuad(FloatRect(containerContentRect), view()).boundingBox())); | |
653 | |
654 LayoutRect stickyBoxRect = isLayoutInline() | |
655 ? LayoutRect(toLayoutInline(this)->linesBoundingBox()) | |
656 : toLayoutBox(this)->frameRect(); | |
657 LayoutRect flippedStickyBoxRect = stickyBoxRect; | |
658 containingBlock->flipForWritingMode(flippedStickyBoxRect); | |
659 LayoutPoint stickyLocation = flippedStickyBoxRect.location(); | |
660 | |
661 // FIXME: sucks to call localToAbsolute again, but we can't just offset from the previously computed rect if there are transforms. | |
662 // Map to the view to avoid including page scale factor. | |
663 LayoutRect absContainerFrame = LayoutRect(containingBlock->localToContainerQ uad(FloatRect(FloatPoint(), FloatSize(containingBlock->size())), view()).boundin gBox()); | |
664 | |
665 if (containingBlock->hasOverflowClip()) { | |
666 LayoutSize scrollOffset(containingBlock->layer()->scrollableArea()->adju stedScrollOffset()); | |
chrishtr
2015/12/09 19:12:21
Is this code useless? Can the containing block be
flackr
2015/12/10 23:43:15
No, the containing block can't be a scroller witho
chrishtr
2015/12/11 02:06:11
Ok please add a comment explaining this then.
flackr
2016/01/19 15:40:48
Done.
| |
667 stickyLocation -= scrollOffset; | |
668 } | |
669 | |
670 // We can't call localToAbsolute on |this| because that will recur. FIXME: F or now, assume that |this| is not transformed. | |
671 constraints.setAbsoluteStickyBoxRect(LayoutRect(LayoutPoint(absContainerFram e.location()) + stickyLocation, flippedStickyBoxRect.size())); | |
672 | |
673 LayoutUnit horizontalOffsets = minimumValueForLength(style()->right(), const rainingRect.width()) + | |
674 minimumValueForLength(style()->left(), constrainingRect.width()); | |
675 bool skipRight = false; | |
676 bool skipLeft = false; | |
677 if (!style()->left().isAuto() && !style()->right().isAuto()) { | |
678 if (horizontalOffsets > containerContentRect.width() | |
679 || horizontalOffsets + containerContentRect.width() > constrainingRe ct.width()) { | |
680 skipRight = style()->isLeftToRightDirection(); | |
681 skipLeft = !skipRight; | |
682 } | |
683 } | |
684 | |
685 if (!style()->left().isAuto() && !skipLeft) { | |
686 constraints.setLeftOffset(minimumValueForLength(style()->left(), constra iningRect.width())); | |
687 constraints.addAnchorEdge(ViewportConstraints::AnchorEdgeLeft); | |
688 } | |
689 | |
690 if (!style()->right().isAuto() && !skipRight) { | |
691 constraints.setRightOffset(minimumValueForLength(style()->right(), const rainingRect.width())); | |
692 constraints.addAnchorEdge(ViewportConstraints::AnchorEdgeRight); | |
693 } | |
694 | |
695 bool skipBottom = false; | |
696 // FIXME(ostap): Exclude top or bottom edge offset depending on the writing mode when related | |
697 // sections are fixed in spec: http://lists.w3.org/Archives/Public/www-style /2014May/0286.html | |
698 LayoutUnit verticalOffsets = minimumValueForLength(style()->top(), constrain ingRect.width()) + | |
699 minimumValueForLength(style()->bottom(), constrainingRect.width()); | |
700 if (!style()->top().isAuto() && !style()->bottom().isAuto()) { | |
701 if (verticalOffsets > containerContentRect.height() | |
702 || verticalOffsets + containerContentRect.height() > constrainingRec t.height()) { | |
703 skipBottom = true; | |
704 } | |
705 } | |
706 | |
707 if (!style()->top().isAuto()) { | |
708 constraints.setTopOffset(minimumValueForLength(style()->top(), constrain ingRect.height())); | |
709 constraints.addAnchorEdge(ViewportConstraints::AnchorEdgeTop); | |
710 } | |
711 | |
712 if (!style()->bottom().isAuto() && !skipBottom) { | |
713 constraints.setBottomOffset(minimumValueForLength(style()->bottom(), con strainingRect.height())); | |
714 constraints.addAnchorEdge(ViewportConstraints::AnchorEdgeBottom); | |
715 } | |
716 } | |
717 | |
718 LayoutRect LayoutBoxModelObject::computeStickyConstrainingRect() const | |
719 { | |
720 LayoutRect constrainingRect; | |
721 | |
722 ASSERT(hasLayer()); | |
723 LayoutBox* enclosingClippingBox = findScrollAncestor(node()); | |
724 if (enclosingClippingBox) { | |
725 LayoutRect clipRect = enclosingClippingBox->overflowClipRect(LayoutPoint ()); | |
726 clipRect.move(enclosingClippingBox->paddingLeft(), enclosingClippingBox- >paddingTop()); | |
727 clipRect.contract(LayoutSize(enclosingClippingBox->paddingLeft() + enclo singClippingBox->paddingRight(), | |
chrishtr
2015/12/09 19:12:21
Why is special code needed to remove padding?
flackr
2015/12/10 23:43:15
The padding is not clipped from an overflow box, s
| |
728 enclosingClippingBox->paddingTop() + enclosingClippingBox->paddingBo ttom())); | |
729 constrainingRect = LayoutRect(enclosingClippingBox->localToContainerQuad (FloatRect(clipRect), view()).boundingBox()); | |
730 } else { | |
731 constrainingRect = LayoutRect(view()->frameView()->visibleContentRect()) ; | |
732 } | |
733 | |
734 return constrainingRect; | |
735 } | |
736 | |
737 LayoutSize LayoutBoxModelObject::stickyPositionOffset() const | |
738 { | |
739 LayoutRect constrainingRect = computeStickyConstrainingRect(); | |
740 StickyPositionViewportConstraints constraints; | |
741 computeStickyPositionConstraints(constraints, constrainingRect); | |
742 | |
743 // The sticky offset is physical, so we can just return the delta computed i n absolute coords (though it may be wrong with transforms). | |
744 return LayoutSize(constraints.computeStickyOffset(constrainingRect)); | |
745 } | |
746 | |
611 LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeToOffsetParent(const L ayoutPoint& startPoint) const | 747 LayoutPoint LayoutBoxModelObject::adjustedPositionRelativeToOffsetParent(const L ayoutPoint& startPoint) const |
612 { | 748 { |
613 // If the element is the HTML body element or doesn't have a parent | 749 // If the element is the HTML body element or doesn't have a parent |
614 // return 0 and stop this algorithm. | 750 // return 0 and stop this algorithm. |
615 if (isBody() || !parent()) | 751 if (isBody() || !parent()) |
616 return LayoutPoint(); | 752 return LayoutPoint(); |
617 | 753 |
618 LayoutPoint referencePoint = startPoint; | 754 LayoutPoint referencePoint = startPoint; |
619 referencePoint.move(parent()->columnOffset(referencePoint)); | 755 referencePoint.move(parent()->columnOffset(referencePoint)); |
620 | 756 |
621 // If the offsetParent of the element is null, or is the HTML body element, | 757 // If the offsetParent of the element is null, or is the HTML body element, |
622 // return the distance between the canvas origin and the left border edge | 758 // return the distance between the canvas origin and the left border edge |
623 // of the element and stop this algorithm. | 759 // of the element and stop this algorithm. |
624 Element* element = offsetParent(); | 760 Element* element = offsetParent(); |
625 if (!element) | 761 if (!element) |
626 return referencePoint; | 762 return referencePoint; |
627 | 763 |
628 if (const LayoutBoxModelObject* offsetParent = element->layoutBoxModelObject ()) { | 764 if (const LayoutBoxModelObject* offsetParent = element->layoutBoxModelObject ()) { |
629 if (offsetParent->isBox() && !offsetParent->isBody()) | 765 if (offsetParent->isBox() && !offsetParent->isBody()) |
630 referencePoint.move(-toLayoutBox(offsetParent)->borderLeft(), -toLay outBox(offsetParent)->borderTop()); | 766 referencePoint.move(-toLayoutBox(offsetParent)->borderLeft(), -toLay outBox(offsetParent)->borderTop()); |
631 if (!isOutOfFlowPositioned() || flowThreadContainingBlock()) { | 767 if (!isOutOfFlowPositioned() || flowThreadContainingBlock()) { |
632 if (isInFlowPositioned()) | 768 if (isInFlowPositioned()) |
633 referencePoint.move(relativePositionOffset()); | 769 referencePoint.move(offsetForInFlowPosition()); |
634 | 770 |
635 LayoutObject* current; | 771 LayoutObject* current; |
636 for (current = parent(); current != offsetParent && current->parent( ); current = current->parent()) { | 772 for (current = parent(); current != offsetParent && current->parent( ); current = current->parent()) { |
637 // FIXME: What are we supposed to do inside SVG content? | 773 // FIXME: What are we supposed to do inside SVG content? |
638 if (!isOutOfFlowPositioned()) { | 774 if (!isOutOfFlowPositioned()) { |
639 if (current->isBox() && !current->isTableRow()) | 775 if (current->isBox() && !current->isTableRow()) |
640 referencePoint.moveBy(toLayoutBox(current)->topLeftLocat ion()); | 776 referencePoint.moveBy(toLayoutBox(current)->topLeftLocat ion()); |
641 referencePoint.move(current->parent()->columnOffset(referenc ePoint)); | 777 referencePoint.move(current->parent()->columnOffset(referenc ePoint)); |
642 } | 778 } |
643 } | 779 } |
644 | 780 |
645 if (offsetParent->isBox() && offsetParent->isBody() && !offsetParent ->isPositioned()) | 781 if (offsetParent->isBox() && offsetParent->isBody() && !offsetParent ->isPositioned()) |
646 referencePoint.moveBy(toLayoutBox(offsetParent)->topLeftLocation ()); | 782 referencePoint.moveBy(toLayoutBox(offsetParent)->topLeftLocation ()); |
647 } | 783 } |
648 } | 784 } |
649 | 785 |
650 return referencePoint; | 786 return referencePoint; |
651 } | 787 } |
652 | 788 |
653 LayoutSize LayoutBoxModelObject::offsetForInFlowPosition() const | 789 LayoutSize LayoutBoxModelObject::offsetForInFlowPosition() const |
654 { | 790 { |
655 return isRelPositioned() ? relativePositionOffset() : LayoutSize(); | 791 if (isRelPositioned()) |
792 return relativePositionOffset(); | |
793 | |
794 if (isStickyPositioned()) | |
795 return stickyPositionOffset(); | |
796 | |
797 return LayoutSize(); | |
656 } | 798 } |
657 | 799 |
658 LayoutUnit LayoutBoxModelObject::offsetLeft() const | 800 LayoutUnit LayoutBoxModelObject::offsetLeft() const |
659 { | 801 { |
660 // Note that LayoutInline and LayoutBox override this to pass a different | 802 // Note that LayoutInline and LayoutBox override this to pass a different |
661 // startPoint to adjustedPositionRelativeToOffsetParent. | 803 // startPoint to adjustedPositionRelativeToOffsetParent. |
662 return adjustedPositionRelativeToOffsetParent(LayoutPoint()).x(); | 804 return adjustedPositionRelativeToOffsetParent(LayoutPoint()).x(); |
663 } | 805 } |
664 | 806 |
665 LayoutUnit LayoutBoxModelObject::offsetTop() const | 807 LayoutUnit LayoutBoxModelObject::offsetTop() const |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
968 const LayoutObject* LayoutBoxModelObject::pushMappingToContainer(const LayoutBox ModelObject* ancestorToStopAt, LayoutGeometryMap& geometryMap) const | 1110 const LayoutObject* LayoutBoxModelObject::pushMappingToContainer(const LayoutBox ModelObject* ancestorToStopAt, LayoutGeometryMap& geometryMap) const |
969 { | 1111 { |
970 ASSERT(ancestorToStopAt != this); | 1112 ASSERT(ancestorToStopAt != this); |
971 | 1113 |
972 bool ancestorSkipped; | 1114 bool ancestorSkipped; |
973 LayoutObject* container = this->container(ancestorToStopAt, &ancestorSkipped ); | 1115 LayoutObject* container = this->container(ancestorToStopAt, &ancestorSkipped ); |
974 if (!container) | 1116 if (!container) |
975 return nullptr; | 1117 return nullptr; |
976 | 1118 |
977 bool isInline = isLayoutInline(); | 1119 bool isInline = isLayoutInline(); |
978 bool isFixedPos = !isInline && style()->position() == FixedPosition; | 1120 bool isFixedPosition = !isInline && style()->position() == FixedPosition; |
979 bool hasTransform = !isInline && hasLayer() && layer()->transform(); | 1121 bool hasTransform = !isInline && hasLayer() && layer()->transform(); |
980 | 1122 |
981 LayoutSize adjustmentForSkippedAncestor; | 1123 LayoutSize adjustmentForSkippedAncestor; |
982 if (ancestorSkipped) { | 1124 if (ancestorSkipped) { |
983 // There can't be a transform between paintInvalidationContainer and anc estorToStopAt, because transforms create containers, so it should be safe | 1125 // There can't be a transform between paintInvalidationContainer and anc estorToStopAt, because transforms create containers, so it should be safe |
984 // to just subtract the delta between the ancestor and ancestorToStopAt. | 1126 // to just subtract the delta between the ancestor and ancestorToStopAt. |
985 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container); | 1127 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container); |
986 } | 1128 } |
987 | 1129 |
988 bool offsetDependsOnPoint = false; | 1130 bool offsetDependsOnPoint = false; |
989 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), & offsetDependsOnPoint); | 1131 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), & offsetDependsOnPoint); |
1132 LayoutSize stickyOffset; | |
1133 if (style()->position() == StickyPosition) | |
1134 stickyOffset = offsetForInFlowPosition(); | |
990 | 1135 |
991 bool preserve3D = container->style()->preserves3D() || style()->preserves3D( ); | 1136 bool preserve3D = container->style()->preserves3D() || style()->preserves3D( ); |
992 if (shouldUseTransformFromContainer(container)) { | 1137 if (shouldUseTransformFromContainer(container)) { |
993 TransformationMatrix t; | 1138 TransformationMatrix t; |
994 getTransformFromContainer(container, containerOffset, t); | 1139 getTransformFromContainer(container, containerOffset, t); |
995 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm entForSkippedAncestor.height().toFloat()); | 1140 t.translateRight(adjustmentForSkippedAncestor.width().toFloat(), adjustm entForSkippedAncestor.height().toFloat()); |
996 geometryMap.push(this, t, preserve3D, offsetDependsOnPoint, isFixedPos, hasTransform); | 1141 geometryMap.push(this, t, preserve3D, offsetDependsOnPoint, isFixedPosit ion, hasTransform, LayoutSize(), stickyOffset); |
997 } else { | 1142 } else { |
998 containerOffset += adjustmentForSkippedAncestor; | 1143 containerOffset += adjustmentForSkippedAncestor; |
999 geometryMap.push(this, containerOffset, preserve3D, offsetDependsOnPoint , isFixedPos, hasTransform); | 1144 geometryMap.push(this, containerOffset, preserve3D, offsetDependsOnPoint , isFixedPosition, hasTransform, LayoutSize(), stickyOffset); |
1000 } | 1145 } |
1001 | 1146 |
1002 return ancestorSkipped ? ancestorToStopAt : container; | 1147 return ancestorSkipped ? ancestorToStopAt : container; |
1003 } | 1148 } |
1004 | 1149 |
1005 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) | 1150 void LayoutBoxModelObject::moveChildTo(LayoutBoxModelObject* toBoxModelObject, L ayoutObject* child, LayoutObject* beforeChild, bool fullRemoveInsert) |
1006 { | 1151 { |
1007 // We assume that callers have cleared their positioned objects list for chi ld moves (!fullRemoveInsert) so the | 1152 // We assume that callers have cleared their positioned objects list for chi ld moves (!fullRemoveInsert) so the |
1008 // positioned layoutObject maps don't become stale. It would be too slow to do the map lookup on each call. | 1153 // positioned layoutObject maps don't become stale. It would be too slow to do the map lookup on each call. |
1009 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos itionedObjects()); | 1154 ASSERT(!fullRemoveInsert || !isLayoutBlock() || !toLayoutBlock(this)->hasPos itionedObjects()); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1057 if (rootElementStyle->hasBackground()) | 1202 if (rootElementStyle->hasBackground()) |
1058 return false; | 1203 return false; |
1059 | 1204 |
1060 if (node() != document().firstBodyElement()) | 1205 if (node() != document().firstBodyElement()) |
1061 return false; | 1206 return false; |
1062 | 1207 |
1063 return true; | 1208 return true; |
1064 } | 1209 } |
1065 | 1210 |
1066 } // namespace blink | 1211 } // namespace blink |
OLD | NEW |