namespace WebCore {
-class BasicShape;
-class BidiContext;
-class LayoutStateMaintainer;
class LineLayoutState;
class RenderInline;
-class RenderText;
-struct BidiRun;
struct PaintInfo;
+class WordMeasurement;
+
class LineInfo;
class RenderRubyRun;
-class WordMeasurement;
template <class Run> class BidiRunList;
typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet;
typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedContainerMap;
typedef Vector<WordMeasurement, 64> WordMeasurements;
-enum CaretType { CursorCaret, DragCaret };
enum ContainingBlockState { NewContainingBlock, SameContainingBlock };
enum TextRunFlag {
RenderObject* firstChild() const { ASSERT(children() == virtualChildren()); return children()->firstChild(); }
RenderObject* lastChild() const { ASSERT(children() == virtualChildren()); return children()->lastChild(); }
+ // If you have a RenderBlock, use firstChild or lastChild instead.
+ void slowFirstChild() const WTF_DELETED_FUNCTION;
+ void slowLastChild() const WTF_DELETED_FUNCTION;
+
const RenderObjectChildList* children() const { return &m_children; }
RenderObjectChildList* children() { return &m_children; }
RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(firstLineBox()); }
RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(lastLineBox()); }
+ virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL;
GapRects selectionGapRectsForRepaint(const RenderLayerModelObject* repaintContainer);
LayoutRect logicalLeftSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
RenderObject* selObj, LayoutUnit logicalLeft, LayoutUnit logicalTop, LayoutUnit logicalHeight, const PaintInfo*);
LayoutUnit collapsedMarginAfterForChild(const RenderBox* child) const;
virtual void updateFirstLetter();
+ virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
- virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*verticalScrollbarChanged*/) { };
+ virtual void scrollbarsChanged(bool /*horizontalScrollbarChanged*/, bool /*verticalScrollbarChanged*/) { }
LayoutUnit availableLogicalWidthForContent() const { return max<LayoutUnit>(0, logicalRightOffsetForContent() - logicalLeftOffsetForContent()); }
LayoutUnit logicalLeftOffsetForContent() const { return isHorizontalWritingMode() ? borderLeft() + paddingLeft() : borderTop() + paddingTop(); }
virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunityCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { }
- virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) OVERRIDE;
-
virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const OVERRIDE;
virtual void computePreferredLogicalWidths() OVERRIDE;
void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const;
void setDesiredColumnCountAndWidth(int, LayoutUnit);
- bool avoidsOrIgnoresFloats() { return isFloatingOrOutOfFlowPositioned() || avoidsFloats(); }
public:
virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false);
protected:
virtual bool isInlineBlockOrInlineTable() const OVERRIDE FINAL { return isInline() && isReplaced(); }
- virtual void repaintTreeAfterLayout() OVERRIDE;
+ virtual void invalidateTreeAfterLayout(const RenderLayerModelObject&) OVERRIDE;
private:
virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return children(); }
void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
void paintColumnRules(PaintInfo&, const LayoutPoint&);
void paintSelection(PaintInfo&, const LayoutPoint&);
- void paintCaret(PaintInfo&, const LayoutPoint&, CaretType);
+ void paintCarets(PaintInfo&, const LayoutPoint&);
+
+ bool hasCaret() const;
- bool hasCaret() const { return hasCaret(CursorCaret) || hasCaret(DragCaret); }
- bool hasCaret(CaretType) const;
+ virtual bool avoidsFloats() const OVERRIDE;
bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction);
// children.
virtual RenderBlock* firstLineBlock() const OVERRIDE;
- virtual LayoutRect rectWithOutlineForRepaint(const RenderLayerModelObject* repaintContainer, LayoutUnit outlineWidth) const OVERRIDE FINAL;
- virtual RenderStyle* outlineStyleForRepaint() const OVERRIDE FINAL;
+ virtual LayoutRect rectWithOutlineForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, LayoutUnit outlineWidth) const OVERRIDE FINAL;
+ virtual RenderStyle* outlineStyleForPaintInvalidation() const OVERRIDE FINAL;
virtual RenderObject* hoverAncestor() const OVERRIDE FINAL;
virtual void updateDragState(bool dragOn) OVERRIDE FINAL;
virtual void childBecameNonInline(RenderObject* child) OVERRIDE FINAL;
- virtual LayoutRect selectionRectForRepaint(const RenderLayerModelObject* repaintContainer, bool /*clipToVisibleContent*/) OVERRIDE FINAL
+ virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelObject* paintInvalidationContainer, bool /*clipToVisibleContent*/) OVERRIDE FINAL
{
- return selectionGapRectsForRepaint(repaintContainer);
+ return selectionGapRectsForRepaint(paintInvalidationContainer);
}
- virtual bool shouldPaintSelectionGaps() const OVERRIDE FINAL;
bool isSelectionRoot() const;
GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLeft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0);
enum PageBoundaryRule { ExcludePageBoundary, IncludePageBoundary };
LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset, PageBoundaryRule = ExcludePageBoundary) const;
+ bool createsBlockFormattingContext() const;
+
public:
LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const;
LayoutUnit pageLogicalHeightForOffset(LayoutUnit offset) const;
public:
virtual LayoutUnit offsetFromLogicalTopOfFirstPage() const OVERRIDE FINAL;
- void invalidateLineHeight() { m_lineHeight = -1; }
-
public:
// Allocated only when some of these fields have non-default values
RenderObjectChildList m_children;
RenderLineBoxList m_lineBoxes; // All of the root line boxes created for this block flow. For example, <div>Hello<br>world.</div> will have two total lines for the <div>.
- mutable signed m_lineHeight : 26;
+ // WARNING: Don't add any bits here until we are comfortable that removing m_lineHeight has not regressed performance. See http://crrev.com/260073005 for more information.
unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in RenderBlockRareData since they are set too frequently.
unsigned m_hasMarginAfterQuirk : 1;
unsigned m_beingDestroyed : 1;