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) 2007 David Smith (catfish.man@gmail.com) | 4 * (C) 2007 David Smith (catfish.man@gmail.com) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 RenderObjectChildList* children() { return &m_children; } | 75 RenderObjectChildList* children() { return &m_children; } |
76 | 76 |
77 bool beingDestroyed() const { return m_beingDestroyed; } | 77 bool beingDestroyed() const { return m_beingDestroyed; } |
78 | 78 |
79 // These two functions are overridden for inline-block. | 79 // These two functions are overridden for inline-block. |
80 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const OVERRIDE FINAL; | 80 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio nMode = PositionOnContainingLine) const OVERRIDE FINAL; |
81 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE; | 81 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode , LinePositionMode = PositionOnContainingLine) const OVERRIDE; |
82 | 82 |
83 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep lacedHeight) const; | 83 LayoutUnit minLineHeightForReplacedRenderer(bool isFirstLine, LayoutUnit rep lacedHeight) const; |
84 | 84 |
85 protected: | |
86 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } | 85 RenderLineBoxList* lineBoxes() { return &m_lineBoxes; } |
87 | 86 |
88 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } | 87 InlineFlowBox* firstLineBox() const { return m_lineBoxes.firstLineBox(); } |
89 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } | 88 InlineFlowBox* lastLineBox() const { return m_lineBoxes.lastLineBox(); } |
90 | 89 |
91 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } | 90 RootInlineBox* firstRootBox() const { return static_cast<RootInlineBox*>(fir stLineBox()); } |
92 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); } | 91 RootInlineBox* lastRootBox() const { return static_cast<RootInlineBox*>(last LineBox()); } |
93 | 92 |
94 public: | 93 public: |
95 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow | 94 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 }; | 266 }; |
268 | 267 |
269 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout); | 268 void layoutPositionedObjects(bool relayoutChildren, PositionedLayoutBehavior = DefaultLayout); |
270 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa youtScope&); | 269 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child, SubtreeLa youtScope&); |
271 | 270 |
272 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox* child) const; | 271 LayoutUnit marginIntrinsicLogicalWidthForChild(RenderBox* child) const; |
273 | 272 |
274 int beforeMarginInLineDirection(LineDirectionMode) const; | 273 int beforeMarginInLineDirection(LineDirectionMode) const; |
275 | 274 |
276 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; | 275 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE; |
276 public: | |
277 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; | 277 virtual void paintObject(PaintInfo&, const LayoutPoint&) OVERRIDE; |
278 virtual void paintChildren(PaintInfo&, const LayoutPoint&); | 278 virtual void paintChildren(PaintInfo&, const LayoutPoint&); |
279 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); | 279 void paintChild(RenderBox*, PaintInfo&, const LayoutPoint&); |
280 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); | 280 void paintChildAsInlineBlock(RenderBox*, PaintInfo&, const LayoutPoint&); |
281 | 281 protected: |
282 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } | 282 virtual void adjustInlineDirectionLineBounds(unsigned /* expansionOpportunit yCount */, float& /* logicalLeft */, float& /* logicalWidth */) const { } |
283 | 283 |
284 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE; | 284 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE; |
285 virtual void computePreferredLogicalWidths() OVERRIDE; | 285 virtual void computePreferredLogicalWidths() OVERRIDE; |
286 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const; | 286 void adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalWidth, Lay outUnit& maxLogicalWidth) const; |
287 | 287 |
288 virtual int firstLineBoxBaseline() const OVERRIDE; | 288 virtual int firstLineBoxBaseline() const OVERRIDE; |
289 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE; | 289 virtual int inlineBlockBaseline(LineDirectionMode) const OVERRIDE; |
290 int lastLineBoxBaseline(LineDirectionMode) const; | 290 int lastLineBoxBaseline(LineDirectionMode) const; |
291 | 291 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
355 virtual bool isSelfCollapsingBlock() const OVERRIDE; | 355 virtual bool isSelfCollapsingBlock() const OVERRIDE; |
356 | 356 |
357 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); | 357 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); |
358 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); | 358 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); |
359 | 359 |
360 void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText& c urrentChild, unsigned length); | 360 void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText& c urrentChild, unsigned length); |
361 void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* fi rstLetterContainer); | 361 void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* fi rstLetterContainer); |
362 | 362 |
363 Node* nodeForHitTest() const; | 363 Node* nodeForHitTest() const; |
364 | 364 |
365 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow | 365 public: |
Stephen Chennney
2014/09/15 20:18:05
Indent.
chrishtr
2014/09/15 20:52:08
Done.
| |
366 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to RenderBl ockFlow | |
366 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } | 367 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } |
367 void paintContents(PaintInfo&, const LayoutPoint&); | |
368 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false); | |
369 void paintColumnRules(PaintInfo&, const LayoutPoint&); | |
370 void paintSelection(PaintInfo&, const LayoutPoint&); | 368 void paintSelection(PaintInfo&, const LayoutPoint&); |
371 void paintCarets(PaintInfo&, const LayoutPoint&); | 369 private: |
372 | |
373 bool hasCaret() const; | |
374 | |
375 virtual bool avoidsFloats() const OVERRIDE { return true; } | 370 virtual bool avoidsFloats() const OVERRIDE { return true; } |
376 | 371 |
377 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); | 372 bool hitTestColumns(const HitTestRequest&, HitTestResult&, const HitTestLoca tion& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction); |
378 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ; | 373 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ; |
379 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow | 374 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow |
380 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; } | 375 virtual bool hitTestFloats(const HitTestRequest&, HitTestResult&, const HitT estLocation&, const LayoutPoint&) { return false; } |
381 | 376 |
382 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); | 377 virtual bool isPointInOverflowControl(HitTestResult&, const LayoutPoint& loc ationInContainer, const LayoutPoint& accumulatedOffset); |
383 | 378 |
384 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; | 379 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; |
(...skipping 22 matching lines...) Expand all Loading... | |
407 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; | 402 virtual LayoutUnit logicalLeftSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; |
408 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; | 403 virtual LayoutUnit logicalRightSelectionOffset(const RenderBlock* rootBlock, LayoutUnit position) const; |
409 | 404 |
410 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow | 405 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow |
411 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co nst LayoutPoint&, const LayoutSize&) const { }; | 406 virtual void clipOutFloatingObjects(const RenderBlock*, const PaintInfo*, co nst LayoutPoint&, const LayoutSize&) const { }; |
412 | 407 |
413 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const OVERRIDE; | 408 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const OVERRIDE; |
414 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID E; | 409 virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const OVERRID E; |
415 | 410 |
416 LayoutUnit desiredColumnWidth() const; | 411 LayoutUnit desiredColumnWidth() const; |
417 | 412 public: |
418 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); | 413 void paintContinuationOutlines(PaintInfo&, const LayoutPoint&); |
419 | 414 private: |
420 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) OVERRIDE FINAL; | 415 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) OVERRIDE FINAL; |
421 | 416 |
422 void adjustPointToColumnContents(LayoutPoint&) const; | 417 void adjustPointToColumnContents(LayoutPoint&) const; |
423 | 418 |
424 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0); | 419 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0); |
425 | 420 |
426 Position positionForBox(InlineBox*, bool start = true) const; | 421 Position positionForBox(InlineBox*, bool start = true) const; |
427 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); | 422 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); |
428 | 423 |
429 void calcColumnWidth(); | 424 void calcColumnWidth(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 // FIXME: This is temporary as we move code that accesses block flow | 499 // FIXME: This is temporary as we move code that accesses block flow |
505 // member variables out of RenderBlock and into RenderBlockFlow. | 500 // member variables out of RenderBlock and into RenderBlockFlow. |
506 friend class RenderBlockFlow; | 501 friend class RenderBlockFlow; |
507 }; | 502 }; |
508 | 503 |
509 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); | 504 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); |
510 | 505 |
511 } // namespace blink | 506 } // namespace blink |
512 | 507 |
513 #endif // RenderBlock_h | 508 #endif // RenderBlock_h |
OLD | NEW |