| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual LayerType layerTypeRequired() const override | 72 virtual LayerType layerTypeRequired() const override |
| 73 { | 73 { |
| 74 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| hasHiddenBackface() || !style()->hasAutoZIndex()) | 74 if (isPositioned() || createsGroup() || hasClipPath() || hasTransform()
|| hasHiddenBackface() || !style()->hasAutoZIndex()) |
| 75 return NormalLayer; | 75 return NormalLayer; |
| 76 if (hasOverflowClip()) | 76 if (hasOverflowClip()) |
| 77 return OverflowClipLayer; | 77 return OverflowClipLayer; |
| 78 | 78 |
| 79 return NoLayer; | 79 return NoLayer; |
| 80 } | 80 } |
| 81 | 81 |
| 82 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect)
const override; | |
| 83 | |
| 84 // Use this with caution! No type checking is done! | 82 // Use this with caution! No type checking is done! |
| 85 RenderBox* firstChildBox() const; | 83 RenderBox* firstChildBox() const; |
| 86 RenderBox* lastChildBox() const; | 84 RenderBox* lastChildBox() const; |
| 87 | 85 |
| 88 LayoutUnit x() const { return m_frameRect.x(); } | 86 LayoutUnit x() const { return m_frameRect.x(); } |
| 89 LayoutUnit y() const { return m_frameRect.y(); } | 87 LayoutUnit y() const { return m_frameRect.y(); } |
| 90 LayoutUnit width() const { return m_frameRect.width(); } | 88 LayoutUnit width() const { return m_frameRect.width(); } |
| 91 LayoutUnit height() const { return m_frameRect.height(); } | 89 LayoutUnit height() const { return m_frameRect.height(); } |
| 92 | 90 |
| 93 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } | 91 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 | 474 |
| 477 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir
ection() == object->style()->direction(); } | 475 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir
ection() == object->style()->direction(); } |
| 478 | 476 |
| 479 protected: | 477 protected: |
| 480 virtual void willBeDestroyed() override; | 478 virtual void willBeDestroyed() override; |
| 481 | 479 |
| 482 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o
verride; | 480 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o
verride; |
| 483 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; | 481 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
| 484 virtual void updateFromStyle() override; | 482 virtual void updateFromStyle() override; |
| 485 | 483 |
| 486 // Returns false if it could not cheaply compute the extent (e.g. fixed back
ground), in which case the returned rect may be incorrect. | |
| 487 bool getBackgroundPaintedExtent(LayoutRect&) const; | |
| 488 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect,
unsigned maxDepthToTest) const; | |
| 489 virtual bool computeBackgroundIsKnownToBeObscured() override; | |
| 490 | |
| 491 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); | 484 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); |
| 492 | 485 |
| 493 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, RenderObject* backgroundObject, bool skip
BaseColor = false); | 486 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, RenderObject* backgroundObject, bool skip
BaseColor = false); |
| 494 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, RenderObject* back
groundObject = 0); | 487 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, RenderObject* back
groundObject = 0); |
| 495 | 488 |
| 496 void paintMaskImages(const PaintInfo&, const LayoutRect&); | 489 void paintMaskImages(const PaintInfo&, const LayoutRect&); |
| 497 void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, co
nst LayoutRect&); | 490 void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, co
nst LayoutRect&); |
| 498 | 491 |
| 499 // Information extracted from RenderStyle for box painting. | 492 // Information extracted from RenderStyle for box painting. |
| 500 // These are always needed during box painting and recomputing them takes ti
me. | 493 // These are always needed during box painting and recomputing them takes ti
me. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 if (UNLIKELY(inlineBoxWrapper() != 0)) | 620 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 628 deleteLineBoxWrapper(); | 621 deleteLineBoxWrapper(); |
| 629 } | 622 } |
| 630 | 623 |
| 631 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 624 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 632 } | 625 } |
| 633 | 626 |
| 634 } // namespace blink | 627 } // namespace blink |
| 635 | 628 |
| 636 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 629 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
| OLD | NEW |