| 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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 enum LayerType { | 61 enum LayerType { |
| 62 NoLayer, | 62 NoLayer, |
| 63 NormalLayer, | 63 NormalLayer, |
| 64 // An overflow clip layer is required for bookkeeping purposes, | 64 // An overflow clip layer is required for bookkeeping purposes, |
| 65 // but does not force a layer to be self painting. | 65 // but does not force a layer to be self painting. |
| 66 OverflowClipLayer, | 66 OverflowClipLayer, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 struct FontBaselineOrAuto { |
| 70 FontBaselineOrAuto() |
| 71 : m_auto(true) |
| 72 , m_baseline(AlphabeticBaseline) |
| 73 { |
| 74 } |
| 75 FontBaselineOrAuto(FontBaseline baseline) |
| 76 : m_auto(false) |
| 77 , m_baseline(baseline) |
| 78 { |
| 79 } |
| 80 bool m_auto; |
| 81 FontBaseline m_baseline; |
| 82 }; |
| 83 |
| 69 class RenderBox : public RenderBoxModelObject { | 84 class RenderBox : public RenderBoxModelObject { |
| 70 public: | 85 public: |
| 71 explicit RenderBox(ContainerNode*); | 86 explicit RenderBox(ContainerNode*); |
| 72 | 87 |
| 73 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since | 88 // hasAutoZIndex only returns true if the element is positioned or a flex-it
em since |
| 74 // position:static elements that are not flex-items get their z-index coerce
d to auto. | 89 // position:static elements that are not flex-items get their z-index coerce
d to auto. |
| 75 virtual LayerType layerTypeRequired() const | 90 virtual LayerType layerTypeRequired() const |
| 76 { | 91 { |
| 77 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| !style()->hasAutoZIndex()) | 92 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| !style()->hasAutoZIndex()) |
| 78 return NormalLayer; | 93 return NormalLayer; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 updateLogicalHeight(); | 437 updateLogicalHeight(); |
| 423 return true; | 438 return true; |
| 424 } | 439 } |
| 425 | 440 |
| 426 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; | 441 virtual PositionWithAffinity positionForPoint(const LayoutPoint&) override; |
| 427 | 442 |
| 428 void removeFloatingOrPositionedChildFromBlockLists(); | 443 void removeFloatingOrPositionedChildFromBlockLists(); |
| 429 | 444 |
| 430 RenderLayer* enclosingFloatPaintingLayer() const; | 445 RenderLayer* enclosingFloatPaintingLayer() const; |
| 431 | 446 |
| 432 virtual int firstLineBoxBaseline() const { return -1; } | 447 virtual int firstLineBoxBaseline(FontBaselineOrAuto baselineType) const { re
turn -1; } |
| 433 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R
eturns -1 if we should skip this box when computing the baseline of an inline-bl
ock. | 448 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R
eturns -1 if we should skip this box when computing the baseline of an inline-bl
ock. |
| 434 | 449 |
| 435 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } | 450 bool isFlexItem() const { return !isInline() && !isFloatingOrOutOfFlowPositi
oned() && parent() && parent()->isFlexibleBox(); } |
| 436 | 451 |
| 437 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override; | 452 virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositio
nMode = PositionOnContainingLine) const override; |
| 438 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; | 453 virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode
, LinePositionMode = PositionOnContainingLine) const override; |
| 439 | 454 |
| 440 virtual LayoutUnit offsetLeft() const override; | 455 virtual LayoutUnit offsetLeft() const override; |
| 441 virtual LayoutUnit offsetTop() const override; | 456 virtual LayoutUnit offsetTop() const override; |
| 442 | 457 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 if (UNLIKELY(inlineBoxWrapper() != 0)) | 631 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 617 deleteLineBoxWrapper(); | 632 deleteLineBoxWrapper(); |
| 618 } | 633 } |
| 619 | 634 |
| 620 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 635 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 621 } | 636 } |
| 622 | 637 |
| 623 } // namespace blink | 638 } // namespace blink |
| 624 | 639 |
| 625 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 640 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
| OLD | NEW |