| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 class VerticalPositionCache; | 36 class VerticalPositionCache; |
| 37 | 37 |
| 38 struct GlyphOverflow; | 38 struct GlyphOverflow; |
| 39 | 39 |
| 40 typedef HashMap<const InlineTextBox*, pair<Vector<const SimpleFontData*>, GlyphO
verflow>> GlyphOverflowAndFallbackFontsMap; | 40 typedef HashMap<const InlineTextBox*, pair<Vector<const SimpleFontData*>, GlyphO
verflow>> GlyphOverflowAndFallbackFontsMap; |
| 41 | 41 |
| 42 class InlineFlowBox : public InlineBox { | 42 class InlineFlowBox : public InlineBox { |
| 43 public: | 43 public: |
| 44 InlineFlowBox(LayoutObject& obj) | 44 InlineFlowBox(LayoutObject& obj) |
| 45 : InlineBox(obj) | 45 : InlineBox(obj) |
| 46 , m_firstChild(0) | 46 , m_firstChild(nullptr) |
| 47 , m_lastChild(0) | 47 , m_lastChild(nullptr) |
| 48 , m_prevLineBox(0) | 48 , m_prevLineBox(nullptr) |
| 49 , m_nextLineBox(0) | 49 , m_nextLineBox(nullptr) |
| 50 , m_includeLogicalLeftEdge(false) | 50 , m_includeLogicalLeftEdge(false) |
| 51 , m_includeLogicalRightEdge(false) | 51 , m_includeLogicalRightEdge(false) |
| 52 , m_descendantsHaveSameLineHeightAndBaseline(true) | 52 , m_descendantsHaveSameLineHeightAndBaseline(true) |
| 53 , m_baselineType(AlphabeticBaseline) | 53 , m_baselineType(AlphabeticBaseline) |
| 54 , m_hasAnnotationsBefore(false) | 54 , m_hasAnnotationsBefore(false) |
| 55 , m_hasAnnotationsAfter(false) | 55 , m_hasAnnotationsAfter(false) |
| 56 , m_lineBreakBidiStatusEor(WTF::Unicode::LeftToRight) | 56 , m_lineBreakBidiStatusEor(WTF::Unicode::LeftToRight) |
| 57 , m_lineBreakBidiStatusLastStrong(WTF::Unicode::LeftToRight) | 57 , m_lineBreakBidiStatusLastStrong(WTF::Unicode::LeftToRight) |
| 58 , m_lineBreakBidiStatusLast(WTF::Unicode::LeftToRight) | 58 , m_lineBreakBidiStatusLast(WTF::Unicode::LeftToRight) |
| 59 , m_isFirstAfterPageBreak(false) | 59 , m_isFirstAfterPageBreak(false) |
| 60 #if ENABLE(ASSERT) | 60 #if ENABLE(ASSERT) |
| 61 , m_hasBadChildList(false) | 61 , m_hasBadChildList(false) |
| 62 #endif | 62 #endif |
| 63 { | 63 { |
| 64 // Internet Explorer and Firefox always create a marker for list items,
even when the list-style-type is none. We do not make a marker | 64 // Internet Explorer and Firefox always create a marker for list items,
even when the list-style-type is none. We do not make a marker |
| 65 // in the list-style-type: none case, since it is wasteful to do so. Ho
wever, in order to match other browsers we have to pretend like | 65 // in the list-style-type: none case, since it is wasteful to do so. Ho
wever, in order to match other browsers we have to pretend like |
| 66 // an invisible marker exists. The side effect of having an invisible m
arker is that the quirks mode behavior of shrinking lines with no | 66 // an invisible marker exists. The side effect of having an invisible m
arker is that the quirks mode behavior of shrinking lines with no |
| 67 // text children must not apply. This change also means that gaps will
exist between image bullet list items. Even when the list bullet | 67 // text children must not apply. This change also means that gaps will
exist between image bullet list items. Even when the list bullet |
| 68 // is an image, the line is still considered to be immune from the quirk
. | 68 // is an image, the line is still considered to be immune from the quirk
. |
| 69 m_hasTextChildren = obj.style()->display() == LIST_ITEM; | 69 m_hasTextChildren = obj.style()->display() == LIST_ITEM; |
| 70 m_hasTextDescendants = m_hasTextChildren; | 70 m_hasTextDescendants = m_hasTextChildren; |
| 71 } | 71 } |
| 72 | 72 |
| 73 #if ENABLE(ASSERT) | 73 #if ENABLE(ASSERT) |
| 74 virtual ~InlineFlowBox(); | 74 virtual ~InlineFlowBox(); |
| 75 #endif | 75 #endif |
| 76 | 76 |
| 77 #ifndef NDEBUG | 77 #ifndef NDEBUG |
| 78 virtual void showLineTreeAndMark(const InlineBox* = 0, const char* = 0, cons
t InlineBox* = 0, const char* = 0, const LayoutObject* = 0, int = 0) const overr
ide; | 78 virtual void showLineTreeAndMark(const InlineBox* = nullptr, const char* = n
ullptr, const InlineBox* = nullptr, const char* = nullptr, const LayoutObject* =
nullptr, int = 0) const override; |
| 79 #endif | 79 #endif |
| 80 virtual const char* boxName() const override; | 80 virtual const char* boxName() const override; |
| 81 | 81 |
| 82 InlineFlowBox* prevLineBox() const { return m_prevLineBox; } | 82 InlineFlowBox* prevLineBox() const { return m_prevLineBox; } |
| 83 InlineFlowBox* nextLineBox() const { return m_nextLineBox; } | 83 InlineFlowBox* nextLineBox() const { return m_nextLineBox; } |
| 84 void setNextLineBox(InlineFlowBox* n) { m_nextLineBox = n; } | 84 void setNextLineBox(InlineFlowBox* n) { m_nextLineBox = n; } |
| 85 void setPreviousLineBox(InlineFlowBox* p) { m_prevLineBox = p; } | 85 void setPreviousLineBox(InlineFlowBox* p) { m_prevLineBox = p; } |
| 86 | 86 |
| 87 InlineBox* firstChild() const { checkConsistency(); return m_firstChild; } | 87 InlineBox* firstChild() const { checkConsistency(); return m_firstChild; } |
| 88 InlineBox* lastChild() const { checkConsistency(); return m_lastChild; } | 88 InlineBox* lastChild() const { checkConsistency(); return m_lastChild; } |
| 89 | 89 |
| 90 virtual bool isLeaf() const override final { return false; } | 90 virtual bool isLeaf() const override final { return false; } |
| 91 | 91 |
| 92 InlineBox* firstLeafChild() const; | 92 InlineBox* firstLeafChild() const; |
| 93 InlineBox* lastLeafChild() const; | 93 InlineBox* lastLeafChild() const; |
| 94 | 94 |
| 95 typedef void (*CustomInlineBoxRangeReverse)(void* userData, Vector<InlineBox
*>::iterator first, Vector<InlineBox*>::iterator last); | 95 typedef void (*CustomInlineBoxRangeReverse)(void* userData, Vector<InlineBox
*>::iterator first, Vector<InlineBox*>::iterator last); |
| 96 void collectLeafBoxesInLogicalOrder(Vector<InlineBox*>&, CustomInlineBoxRang
eReverse customReverseImplementation = 0, void* userData = 0) const; | 96 void collectLeafBoxesInLogicalOrder(Vector<InlineBox*>&, CustomInlineBoxRang
eReverse customReverseImplementation = 0, void* userData = nullptr) const; |
| 97 | 97 |
| 98 virtual void setConstructed() override final | 98 virtual void setConstructed() override final |
| 99 { | 99 { |
| 100 InlineBox::setConstructed(); | 100 InlineBox::setConstructed(); |
| 101 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) | 101 for (InlineBox* child = firstChild(); child; child = child->nextOnLine()
) |
| 102 child->setConstructed(); | 102 child->setConstructed(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void addToLine(InlineBox* child); | 105 void addToLine(InlineBox* child); |
| 106 virtual void deleteLine() override final; | 106 virtual void deleteLine() override final; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 } | 364 } |
| 365 | 365 |
| 366 } // namespace blink | 366 } // namespace blink |
| 367 | 367 |
| 368 #ifndef NDEBUG | 368 #ifndef NDEBUG |
| 369 // Outside the WebCore namespace for ease of invocation from gdb. | 369 // Outside the WebCore namespace for ease of invocation from gdb. |
| 370 void showTree(const blink::InlineFlowBox*); | 370 void showTree(const blink::InlineFlowBox*); |
| 371 #endif | 371 #endif |
| 372 | 372 |
| 373 #endif // InlineFlowBox_h | 373 #endif // InlineFlowBox_h |
| OLD | NEW |