| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 template <class Iterator> struct MidpointState; | 59 template <class Iterator> struct MidpointState; |
| 60 typedef BidiResolver<InlineIterator, BidiRun> InlineBidiResolver; | 60 typedef BidiResolver<InlineIterator, BidiRun> InlineBidiResolver; |
| 61 typedef MidpointState<InlineIterator> LineMidpointState; | 61 typedef MidpointState<InlineIterator> LineMidpointState; |
| 62 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; | 62 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; |
| 63 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr
ackedDescendantsMap; | 63 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr
ackedDescendantsMap; |
| 64 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC
ontainerMap; | 64 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC
ontainerMap; |
| 65 typedef Vector<WordMeasurement, 64> WordMeasurements; | 65 typedef Vector<WordMeasurement, 64> WordMeasurements; |
| 66 | 66 |
| 67 enum CaretType { CursorCaret, DragCaret }; | 67 enum CaretType { CursorCaret, DragCaret }; |
| 68 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; | 68 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; |
| 69 enum ShapeOutsideFloatOffsetMode { ShapeOutsideFloatShapeOffset, ShapeOutsideFlo
atBoundingBoxOffset }; |
| 69 | 70 |
| 70 enum TextRunFlag { | 71 enum TextRunFlag { |
| 71 DefaultTextRunFlags = 0, | 72 DefaultTextRunFlags = 0, |
| 72 RespectDirection = 1 << 0, | 73 RespectDirection = 1 << 0, |
| 73 RespectDirectionOverride = 1 << 1 | 74 RespectDirectionOverride = 1 << 1 |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 typedef unsigned TextRunFlags; | 77 typedef unsigned TextRunFlags; |
| 77 | 78 |
| 78 class RenderBlock : public RenderBox { | 79 class RenderBlock : public RenderBox { |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 virtual void layout(); | 500 virtual void layout(); |
| 500 | 501 |
| 501 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject
sOnly = false); | 502 void layoutPositionedObjects(bool relayoutChildren, bool fixedPositionObject
sOnly = false); |
| 502 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child); | 503 void markFixedPositionObjectForLayoutIfNeeded(RenderObject* child); |
| 503 | 504 |
| 504 virtual void paint(PaintInfo&, const LayoutPoint&); | 505 virtual void paint(PaintInfo&, const LayoutPoint&); |
| 505 virtual void paintObject(PaintInfo&, const LayoutPoint&); | 506 virtual void paintObject(PaintInfo&, const LayoutPoint&); |
| 506 virtual void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo
& forChild, bool usePrintRect); | 507 virtual void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo
& forChild, bool usePrintRect); |
| 507 bool paintChild(RenderBox*, PaintInfo& forSelf, const LayoutPoint&, PaintInf
o& forChild, bool usePrintRect); | 508 bool paintChild(RenderBox*, PaintInfo& forSelf, const LayoutPoint&, PaintInf
o& forChild, bool usePrintRect); |
| 508 | 509 |
| 509 LayoutUnit logicalRightOffsetForLine(LayoutUnit position, LayoutUnit fixedOf
fset, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0, LayoutUnit l
ogicalHeight = 0) const; | 510 LayoutUnit logicalRightOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixed
Offset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logica
lHeight = 0) const |
| 510 LayoutUnit logicalLeftOffsetForLine(LayoutUnit position, LayoutUnit fixedOff
set, bool applyTextIndent, LayoutUnit* logicalHeightRemaining = 0, LayoutUnit lo
gicalHeight = 0) const; | 511 { |
| 512 return logicalRightOffsetForLineWithoutFloats(logicalRightFloatOffsetFor
Line(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatS
hapeOffset), applyTextIndent); |
| 513 } |
| 514 LayoutUnit logicalLeftOffsetForLine(LayoutUnit logicalTop, LayoutUnit fixedO
ffset, bool applyTextIndent, LayoutUnit* heightRemaining = 0, LayoutUnit logical
Height = 0) const |
| 515 { |
| 516 return logicalLeftOffsetForLineWithoutFloats(logicalLeftFloatOffsetForLi
ne(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatSha
peOffset), applyTextIndent); |
| 517 } |
| 518 LayoutUnit logicalRightOffsetForLineUsingFloatBoundingBox(LayoutUnit logical
Top, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining =
0, LayoutUnit logicalHeight = 0) const |
| 519 { |
| 520 return logicalRightOffsetForLineWithoutFloats(logicalRightFloatOffsetFor
Line(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatB
oundingBoxOffset), applyTextIndent); |
| 521 } |
| 522 LayoutUnit logicalLeftOffsetForLineUsingFloatBoundingBox(LayoutUnit logicalT
op, LayoutUnit fixedOffset, bool applyTextIndent, LayoutUnit* heightRemaining =
0, LayoutUnit logicalHeight = 0) const |
| 523 { |
| 524 return logicalLeftOffsetForLineWithoutFloats(logicalLeftFloatOffsetForLi
ne(logicalTop, fixedOffset, heightRemaining, logicalHeight, ShapeOutsideFloatBou
ndingBoxOffset), applyTextIndent); |
| 525 } |
| 511 | 526 |
| 512 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; | 527 virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const; |
| 513 virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCoun
t */, float& /* logicalLeft */, float& /* logicalWidth */) const { } | 528 virtual void adjustInlineDirectionLineBounds(int /* expansionOpportunityCoun
t */, float& /* logicalLeft */, float& /* logicalWidth */) const { } |
| 514 | 529 |
| 515 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; | 530 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; |
| 516 | 531 |
| 517 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE; | 532 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const OVERRIDE; |
| 518 virtual void computePreferredLogicalWidths() OVERRIDE; | 533 virtual void computePreferredLogicalWidths() OVERRIDE; |
| 519 | 534 |
| 520 virtual int firstLineBoxBaseline() const; | 535 virtual int firstLineBoxBaseline() const; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 #endif | 582 #endif |
| 568 | 583 |
| 569 bool updateRegionsAndExclusionsLogicalSize(RenderFlowThread*); | 584 bool updateRegionsAndExclusionsLogicalSize(RenderFlowThread*); |
| 570 void computeRegionRangeForBlock(RenderFlowThread*); | 585 void computeRegionRangeForBlock(RenderFlowThread*); |
| 571 | 586 |
| 572 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*
); | 587 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox*
); |
| 573 | 588 |
| 574 virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHe
ight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); | 589 virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHe
ight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight); |
| 575 | 590 |
| 576 private: | 591 private: |
| 592 LayoutUnit logicalRightFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit
fixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutside
FloatOffsetMode) const; |
| 593 LayoutUnit logicalLeftFloatOffsetForLine(LayoutUnit logicalTop, LayoutUnit f
ixedOffset, LayoutUnit* heightRemaining, LayoutUnit logicalHeight, ShapeOutsideF
loatOffsetMode) const; |
| 594 LayoutUnit logicalRightOffsetForLineWithoutFloats(LayoutUnit fixedOffset, bo
ol applyTextIndent) const; |
| 595 LayoutUnit logicalLeftOffsetForLineWithoutFloats(LayoutUnit fixedOffset, boo
l applyTextIndent) const; |
| 596 |
| 577 void computeExclusionShapeSize(); | 597 void computeExclusionShapeSize(); |
| 578 void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValu
e*, const ExclusionShapeValue* oldExclusionShape); | 598 void updateExclusionShapeInsideInfoAfterStyleChange(const ExclusionShapeValu
e*, const ExclusionShapeValue* oldExclusionShape); |
| 579 | 599 |
| 580 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi
ldren(); } | 600 virtual RenderObjectChildList* virtualChildren() OVERRIDE FINAL { return chi
ldren(); } |
| 581 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL
{ return children(); } | 601 virtual const RenderObjectChildList* virtualChildren() const OVERRIDE FINAL
{ return children(); } |
| 582 | 602 |
| 583 virtual const char* renderName() const; | 603 virtual const char* renderName() const; |
| 584 | 604 |
| 585 virtual bool isRenderBlock() const OVERRIDE FINAL { return true; } | 605 virtual bool isRenderBlock() const OVERRIDE FINAL { return true; } |
| 586 virtual bool isBlockFlow() const OVERRIDE FINAL { return (!isInline() || isR
eplaced()) && !isTable(); } | 606 virtual bool isBlockFlow() const OVERRIDE FINAL { return (!isInline() || isR
eplaced()) && !isTable(); } |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1317 static String string(const int value); | 1337 static String string(const int value); |
| 1318 }; | 1338 }; |
| 1319 template<> struct ValueToString<RenderBlock::FloatingObject*> { | 1339 template<> struct ValueToString<RenderBlock::FloatingObject*> { |
| 1320 static String string(const RenderBlock::FloatingObject*); | 1340 static String string(const RenderBlock::FloatingObject*); |
| 1321 }; | 1341 }; |
| 1322 #endif | 1342 #endif |
| 1323 | 1343 |
| 1324 } // namespace WebCore | 1344 } // namespace WebCore |
| 1325 | 1345 |
| 1326 #endif // RenderBlock_h | 1346 #endif // RenderBlock_h |
| OLD | NEW |