diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderBox.h')
| -rw-r--r-- | Source/WebCore/rendering/RenderBox.h | 155 |
1 files changed, 94 insertions, 61 deletions
diff --git a/Source/WebCore/rendering/RenderBox.h b/Source/WebCore/rendering/RenderBox.h index c1de3e736..9756f9e8e 100644 --- a/Source/WebCore/rendering/RenderBox.h +++ b/Source/WebCore/rendering/RenderBox.h @@ -26,6 +26,9 @@ #include "RenderBoxModelObject.h" #include "RenderOverflow.h" #include "ScrollTypes.h" +#if ENABLE(CSS_SHAPES) +#include "ShapeOutsideInfo.h" +#endif namespace WebCore { @@ -34,17 +37,21 @@ class RenderRegion; struct PaintInfo; enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; - +enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorderPadding }; enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayScrollbarSize }; +enum ShouldComputePreferred { ComputeActual, ComputePreferred }; + class RenderBox : public RenderBoxModelObject { public: - RenderBox(Node*); + explicit RenderBox(ContainerNode*); virtual ~RenderBox(); // hasAutoZIndex only returns true if the element is positioned or a flex-item since // position:static elements that are not flex-items get their z-index coerced to auto. - virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style()->hasAutoZIndex(); } + virtual bool requiresLayer() const OVERRIDE { return isRoot() || isPositioned() || createsGroup() || hasClipPath() || hasOverflowClip() || hasTransform() || hasHiddenBackface() || hasReflection() || style()->specifiesColumns() || !style()->hasAutoZIndex() || isFloatingWithShapeOutside(); } + + virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE; // Use this with caution! No type checking is done! RenderBox* firstChildBox() const; @@ -75,8 +82,9 @@ public: LayoutUnit logicalWidth() const { return style()->isHorizontalWritingMode() ? width() : height(); } LayoutUnit logicalHeight() const { return style()->isHorizontalWritingMode() ? height() : width(); } - LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const; + LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = 0) const; LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit) const; + LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit) const; int pixelSnappedLogicalHeight() const { return style()->isHorizontalWritingMode() ? pixelSnappedHeight() : pixelSnappedWidth(); } int pixelSnappedLogicalWidth() const { return style()->isHorizontalWritingMode() ? pixelSnappedWidth() : pixelSnappedHeight(); } @@ -139,6 +147,7 @@ public: void setFrameRect(const LayoutRect& rect) { m_frameRect = rect; } LayoutRect borderBoxRect() const { return LayoutRect(LayoutPoint(), size()); } + LayoutRect paddingBoxRect() const { return LayoutRect(borderLeft(), borderTop(), contentWidth() + paddingLeft() + paddingRight(), contentHeight() + paddingTop() + paddingBottom()); } IntRect pixelSnappedBorderBoxRect() const { return IntRect(IntPoint(), m_frameRect.pixelSnappedSize()); } virtual IntRect borderBoundingBox() const { return pixelSnappedBorderBoxRect(); } @@ -155,7 +164,7 @@ public: // Bounds of the outline box in absolute coords. Respects transforms virtual LayoutRect outlineBoundsForRepaint(const RenderLayerModelObject* /*repaintContainer*/, const RenderGeometryMap*) const OVERRIDE; - virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint&); + virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& additionalOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE; // Use this with caution! No type checking is done! RenderBox* previousSiblingBox() const; @@ -167,8 +176,6 @@ public: // respectively are flipped when compared to their physical counterparts. For example minX is on the left in vertical-lr, // but it is on the right in vertical-rl. LayoutRect layoutOverflowRect() const { return m_overflow ? m_overflow->layoutOverflowRect() : clientBoxRect(); } - IntRect pixelSnappedLayoutOverflowRect() const { return pixelSnappedIntRect(layoutOverflowRect()); } - LayoutSize maxLayoutOverflow() const { return LayoutSize(layoutOverflowRect().maxX(), layoutOverflowRect().maxY()); } LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); } LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontalWritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } @@ -184,7 +191,6 @@ public: void addVisualEffectOverflow(); void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, child->locationOffset()); } void addOverflowFromChild(RenderBox* child, const LayoutSize& delta); - void clearLayoutOverflow(); void updateLayerTransform(); @@ -198,9 +204,8 @@ public: virtual LayoutUnit offsetWidth() const { return width(); } virtual LayoutUnit offsetHeight() const { return height(); } - // FIXME: The implementation for these functions will change once we move to subpixel layout. See bug 60318. - virtual int pixelSnappedOffsetWidth() const { return pixelSnappedWidth(); } - virtual int pixelSnappedOffsetHeight() const { return pixelSnappedHeight(); } + virtual int pixelSnappedOffsetWidth() const OVERRIDE; + virtual int pixelSnappedOffsetHeight() const OVERRIDE; // More IE extensions. clientWidth and clientHeight represent the interior of an object // excluding border and scrollbar. clientLeft/Top are just the borderLeftWidth and borderTopWidth. @@ -312,6 +317,7 @@ public: void setOverrideContainingBlockContentLogicalWidth(LayoutUnit); void setOverrideContainingBlockContentLogicalHeight(LayoutUnit); void clearContainingBlockOverrideSize(); + void clearOverrideContainingBlockContentLogicalHeight(); virtual LayoutSize offsetFromContainer(RenderObject*, const LayoutPoint&, bool* offsetDependsOnPoint = 0) const; @@ -320,8 +326,6 @@ public: LayoutUnit adjustContentBoxLogicalWidthForBoxSizing(LayoutUnit width) const; LayoutUnit adjustContentBoxLogicalHeightForBoxSizing(LayoutUnit height) const; - virtual void borderFitAdjust(LayoutRect&) const { } // Shrink the box in which the border paints if border-fit is set. - struct ComputedMarginValues { ComputedMarginValues() : m_before(0) @@ -355,8 +359,9 @@ public: void computeAndSetBlockDirectionMargins(const RenderBlock* containingBlock); enum RenderBoxRegionInfoFlags { CacheRenderBoxRegionInfo, DoNotCacheRenderBoxRegionInfo }; - LayoutRect borderBoxRectInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage = 0, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const; + LayoutRect borderBoxRectInRegion(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const; void clearRenderBoxRegionInfo(); + virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const; void positionLineBox(InlineBox*); @@ -372,26 +377,26 @@ public: virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject* repaintContainer) const OVERRIDE; virtual void computeRectForRepaint(const RenderLayerModelObject* repaintContainer, LayoutRect&, bool fixed = false) const OVERRIDE; - - virtual void repaintDuringLayoutIfMoved(const LayoutRect&); + void repaintDuringLayoutIfMoved(const LayoutRect&); + virtual void repaintOverhangingFloats(bool paintAllDescendants); virtual LayoutUnit containingBlockLogicalWidthForContent() const; - LayoutUnit containingBlockLogicalHeightForContent() const; + LayoutUnit containingBlockLogicalHeightForContent(AvailableLogicalHeightType) const; - LayoutUnit containingBlockLogicalWidthForContentInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; - LayoutUnit containingBlockAvailableLineWidthInRegion(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; + LayoutUnit containingBlockLogicalWidthForContentInRegion(RenderRegion*) const; + LayoutUnit containingBlockAvailableLineWidthInRegion(RenderRegion*) const; LayoutUnit perpendicularContainingBlockLogicalHeight() const; virtual void updateLogicalWidth(); virtual void updateLogicalHeight(); virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const; - RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const; - void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const; + RenderBoxRegionInfo* renderBoxRegionInfo(RenderRegion*, RenderBoxRegionInfoFlags = CacheRenderBoxRegionInfo) const; + void computeLogicalWidthInRegion(LogicalExtentComputedValues&, RenderRegion* = 0) const; bool stretchesToViewport() const { - return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !document()->shouldDisplaySeamlesslyWithParent(); + return document()->inQuirksMode() && style()->logicalHeight().isAuto() && !isFloatingOrOutOfFlowPositioned() && (isRoot() || isBody()) && !document()->shouldDisplaySeamlesslyWithParent() && !isInline(); } virtual LayoutSize intrinsicSize() const { return LayoutSize(); } @@ -401,20 +406,19 @@ public: // Whether or not the element shrinks to its intrinsic width (rather than filling the width // of a containing block). HTML4 buttons, <select>s, <input>s, legends, and floating/compact elements do this. bool sizesLogicalWidthToFitContent(SizeType) const; - virtual bool stretchesToMinIntrinsicLogicalWidth() const { return false; } - LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; + LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*) const; - LayoutUnit computeLogicalWidthInRegionUsing(SizeType, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*, LayoutUnit offsetFromLogicalTopOfFirstPage) const; - LayoutUnit computeLogicalHeightUsing(SizeType, const Length& height) const; - LayoutUnit computeContentLogicalHeight(SizeType, const Length& height); - LayoutUnit computeContentAndScrollbarLogicalHeightUsing(SizeType, const Length& height) const; - LayoutUnit computeReplacedLogicalWidthUsing(SizeType, Length width) const; - LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, bool includeMaxWidth = true) const; - LayoutUnit computeReplacedLogicalHeightUsing(SizeType, Length height) const; + LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*) const; + LayoutUnit computeLogicalHeightUsing(const Length& height) const; + LayoutUnit computeContentLogicalHeight(const Length& height) const; + LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height) const; + LayoutUnit computeReplacedLogicalWidthUsing(Length width) const; + LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, ShouldComputePreferred = ComputeActual) const; + LayoutUnit computeReplacedLogicalHeightUsing(Length height) const; LayoutUnit computeReplacedLogicalHeightRespectingMinMaxHeight(LayoutUnit logicalHeight) const; - virtual LayoutUnit computeReplacedLogicalWidth(bool includeMaxWidth = true) const; + virtual LayoutUnit computeReplacedLogicalWidth(ShouldComputePreferred = ComputeActual) const; virtual LayoutUnit computeReplacedLogicalHeight() const; static bool percentageLogicalHeightIsResolvableFromBlock(const RenderBlock* containingBlock, bool outOfFlowPositioned); @@ -422,24 +426,29 @@ public: // Block flows subclass availableWidth/Height to handle multi column layout (shrinking the width/height available to children when laying out.) virtual LayoutUnit availableLogicalWidth() const { return contentLogicalWidth(); } - virtual LayoutUnit availableLogicalHeight() const; - LayoutUnit availableLogicalHeightUsing(const Length&) const; + virtual LayoutUnit availableLogicalHeight(AvailableLogicalHeightType) const; + LayoutUnit availableLogicalHeightUsing(const Length&, AvailableLogicalHeightType) const; // There are a few cases where we need to refer specifically to the available physical width and available physical height. // Relative positioning is one of those cases, since left/top offsets are physical. - LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(); } - LayoutUnit availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight() : availableLogicalWidth(); } + LayoutUnit availableWidth() const { return style()->isHorizontalWritingMode() ? availableLogicalWidth() : availableLogicalHeight(IncludeMarginBorderPadding); } + LayoutUnit availableHeight() const { return style()->isHorizontalWritingMode() ? availableLogicalHeight(IncludeMarginBorderPadding) : availableLogicalWidth(); } virtual int verticalScrollbarWidth() const; int horizontalScrollbarHeight() const; + int instrinsicScrollbarLogicalWidth() const; int scrollbarLogicalHeight() const { return style()->isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); } virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Node** stopNode = 0); bool canBeScrolledAndHasScrollableArea() const; virtual bool canBeProgramaticallyScrolled() const; - virtual void autoscroll(); + virtual void autoscroll(const IntPoint&); + bool canAutoscroll() const; + IntSize calculateAutoscrollDirection(const IntPoint& windowPoint) const; + static RenderBox* findAutoscrollable(RenderObject*); virtual void stopAutoscroll() { } virtual void panScroll(const IntPoint&); + bool hasAutoVerticalScrollbar() const { return hasOverflowClip() && (style()->overflowY() == OAUTO || style()->overflowY() == OOVERLAY); } bool hasAutoHorizontalScrollbar() const { return hasOverflowClip() && (style()->overflowX() == OAUTO || style()->overflowX() == OOVERLAY); } bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY(); } @@ -452,7 +461,8 @@ public: virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine = 0); - virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegion*, OverlayScrollbarSizeRelevancy = IgnoreOverlayScrollbarSize); + virtual LayoutRect overflowClipRect(const LayoutPoint& location, RenderRegion*, 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 bool hasControlClip() const { return false; } virtual LayoutRect controlClipRect(const LayoutPoint&) const { return LayoutRect(); } @@ -496,6 +506,7 @@ public: bool isWritingModeRoot() const { return !parent() || parent()->style()->writingMode() != style()->writingMode(); } bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } + bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloatingOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDeprecated(); } virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const OVERRIDE; @@ -521,7 +532,7 @@ public: LayoutRect logicalLayoutOverflowRectForPropagation(RenderStyle*) const; LayoutRect layoutOverflowRectForPropagation(RenderStyle*) const; - RenderOverflow* hasRenderOverflow() const { return m_overflow.get(); } + bool hasRenderOverflow() const { return m_overflow; } bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().contains(m_overflow->visualOverflowRect()); } virtual bool needsPreferredWidthsRecalculation() const; @@ -533,27 +544,26 @@ public: virtual bool hasRelativeDimensions() const; virtual bool hasRelativeLogicalHeight() const; + virtual bool hasViewportPercentageLogicalHeight() const; bool hasHorizontalLayoutOverflow() const { - if (RenderOverflow* overflow = hasRenderOverflow()) { - LayoutRect layoutOverflowRect = overflow->layoutOverflowRect(); - flipForWritingMode(layoutOverflowRect); - return layoutOverflowRect.x() < x() || layoutOverflowRect.maxX() > x() + logicalWidth(); - } + if (!m_overflow) + return false; - return false; + LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); + flipForWritingMode(layoutOverflowRect); + return layoutOverflowRect.x() < x() || layoutOverflowRect.maxX() > x() + logicalWidth(); } bool hasVerticalLayoutOverflow() const { - if (RenderOverflow* overflow = hasRenderOverflow()) { - LayoutRect layoutOverflowRect = overflow->layoutOverflowRect(); - flipForWritingMode(layoutOverflowRect); - return layoutOverflowRect.y() < y() || layoutOverflowRect.maxY() > y() + logicalHeight(); - } + if (!m_overflow) + return false; - return false; + LayoutRect layoutOverflowRect = m_overflow->layoutOverflowRect(); + flipForWritingMode(layoutOverflowRect); + return layoutOverflowRect.y() < y() || layoutOverflowRect.maxY() > y() + logicalHeight(); } virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) const @@ -564,6 +574,13 @@ public: bool hasSameDirectionAs(const RenderBox* object) const { return style()->direction() == object->style()->direction(); } +#if ENABLE(CSS_SHAPES) + ShapeOutsideInfo* shapeOutsideInfo() const + { + return isFloatingWithShapeOutside() && ShapeOutsideInfo::isEnabledFor(this) ? ShapeOutsideInfo::info(this) : 0; + } +#endif + protected: virtual void willBeDestroyed(); @@ -571,7 +588,11 @@ protected: virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); virtual void updateFromStyle() OVERRIDE; - virtual bool backgroundIsObscured() const { return false; } + // Returns false if it could not cheaply compute the extent (e.g. fixed background), in which case the returned rect may be incorrect. + bool getBackgroundPaintedExtent(LayoutRect&) const; + virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; + virtual bool computeBackgroundIsKnownToBeObscured() OVERRIDE; + void paintBackground(const PaintInfo&, const LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone); void paintFillLayer(const PaintInfo&, const Color&, const FillLayer*, const LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgroundObject); @@ -580,17 +601,19 @@ protected: void paintMaskImages(const PaintInfo&, const LayoutRect&); BackgroundBleedAvoidance determineBackgroundBleedAvoidance(GraphicsContext*) const; - bool backgroundIsSingleOpaqueLayer() const; + bool backgroundHasOpaqueTopLayer() const; #if PLATFORM(MAC) void paintCustomHighlight(const LayoutPoint&, const AtomicString& type, bool behindText); #endif - void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = 0, LayoutUnit offsetFromLogicalTopOfFirstPage = 0) const; + void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = 0) const; + + LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const; virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() && !isInlineBlockOrInlineTable(); } - virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip | SnapOffsetForTransforms, bool* wasFixed = 0) const OVERRIDE; + virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE; virtual const RenderObject* pushMappingToContainer(const RenderLayerModelObject*, RenderGeometryMap&) const OVERRIDE; virtual void mapAbsoluteToLocalPoint(MapCoordinatesFlags, TransformState&) const; @@ -599,6 +622,10 @@ protected: RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); private: +#if ENABLE(CSS_SHAPES) + void updateShapeOutsideInfoAfterStyleChange(const ShapeValue* shapeOutside, const ShapeValue* oldShapeOutside); +#endif + bool fixedElementLaysOutRelativeToFrame(Frame*, FrameView*) const; bool includeVerticalScrollbarSize() const; @@ -609,16 +636,17 @@ private: bool skipContainingBlockForPercentHeightCalculation(const RenderBox* containingBlock) const; - LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = 0, - LayoutUnit offsetFromLogicalTopOfFirstPage = 0, bool checkForPerpendicularWritingMode = true) const; + LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* = 0, bool checkForPerpendicularWritingMode = true) const; LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode = true) const; + LayoutUnit viewLogicalHeightForPercentages() const; + void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; - void computePositionedLogicalWidthUsing(SizeType, Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection, + void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBoxModelObject* containerBlock, TextDirection containerDirection, LayoutUnit containerLogicalWidth, LayoutUnit bordersPlusPadding, Length logicalLeft, Length logicalRight, Length marginLogicalLeft, Length marginLogicalRight, LogicalExtentComputedValues&) const; - void computePositionedLogicalHeightUsing(SizeType, Length logicalHeightLength, const RenderBoxModelObject* containerBlock, + void computePositionedLogicalHeightUsing(Length logicalHeightLength, const RenderBoxModelObject* containerBlock, LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, Length logicalTop, Length logicalBottom, Length marginLogicalTop, Length marginLogicalBottom, LogicalExtentComputedValues&) const; @@ -626,6 +654,11 @@ private: void computePositionedLogicalHeightReplaced(LogicalExtentComputedValues&) const; void computePositionedLogicalWidthReplaced(LogicalExtentComputedValues&) const; + LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth) const; + LayoutUnit fillAvailableMeasure(LayoutUnit availableLogicalWidth, LayoutUnit& marginStart, LayoutUnit& marginEnd) const; + + virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const; + // This function calculates the minimum and maximum preferred widths for an object. // These values are used in shrink-to-fit layout systems. // These include tables, positioned objects, floats and flexible boxes. @@ -659,13 +692,13 @@ private: inline RenderBox* toRenderBox(RenderObject* object) { - ASSERT(!object || object->isBox()); + ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBox()); return static_cast<RenderBox*>(object); } inline const RenderBox* toRenderBox(const RenderObject* object) { - ASSERT(!object || object->isBox()); + ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isBox()); return static_cast<const RenderBox*>(object); } |
