| 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 15 matching lines...) Expand all Loading... |
| 26 #include "sky/engine/core/rendering/FilterEffectRenderer.h" | 26 #include "sky/engine/core/rendering/FilterEffectRenderer.h" |
| 27 #include "sky/engine/core/rendering/RenderBoxModelObject.h" | 27 #include "sky/engine/core/rendering/RenderBoxModelObject.h" |
| 28 #include "sky/engine/core/rendering/RenderOverflow.h" | 28 #include "sky/engine/core/rendering/RenderOverflow.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 struct LayerPaintingInfo; | 32 struct LayerPaintingInfo; |
| 33 struct PaintInfo; | 33 struct PaintInfo; |
| 34 class HitTestingTransformState; | 34 class HitTestingTransformState; |
| 35 class RenderBlockFlow; | 35 class RenderBlockFlow; |
| 36 class TransformationMatrix; |
| 36 | 37 |
| 37 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 38 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
| 38 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; | 39 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; |
| 39 enum MarginDirection { BlockDirection, InlineDirection }; | 40 enum MarginDirection { BlockDirection, InlineDirection }; |
| 40 | 41 |
| 41 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; | 42 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
| 42 | 43 |
| 43 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; | 44 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; |
| 44 | 45 |
| 45 struct RenderBoxRareData { | 46 struct RenderBoxRareData { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 211 |
| 211 void addVisualEffectOverflow(); | 212 void addVisualEffectOverflow(); |
| 212 LayoutBoxExtent computeVisualEffectOverflowExtent() const; | 213 LayoutBoxExtent computeVisualEffectOverflowExtent() const; |
| 213 void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, ch
ild->locationOffset()); } | 214 void addOverflowFromChild(RenderBox* child) { addOverflowFromChild(child, ch
ild->locationOffset()); } |
| 214 void addOverflowFromChild(RenderBox* child, const LayoutSize& delta); | 215 void addOverflowFromChild(RenderBox* child, const LayoutSize& delta); |
| 215 void clearLayoutOverflow(); | 216 void clearLayoutOverflow(); |
| 216 void clearAllOverflows() { m_overflow.clear(); } | 217 void clearAllOverflows() { m_overflow.clear(); } |
| 217 | 218 |
| 218 void updateLayerTransformAfterLayout(); | 219 void updateLayerTransformAfterLayout(); |
| 219 | 220 |
| 221 // This transform has the transform-origin baked in. |
| 222 TransformationMatrix* transform() const { return m_transform.get(); } |
| 223 bool has3DTransform() const { return m_transform && !m_transform->isAffine()
; } |
| 224 |
| 220 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } | 225 LayoutUnit contentWidth() const { return clientWidth() - paddingLeft() - pad
dingRight(); } |
| 221 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } | 226 LayoutUnit contentHeight() const { return clientHeight() - paddingTop() - pa
ddingBottom(); } |
| 222 LayoutUnit contentLogicalWidth() const { return contentWidth(); } | 227 LayoutUnit contentLogicalWidth() const { return contentWidth(); } |
| 223 LayoutUnit contentLogicalHeight() const { return contentHeight(); } | 228 LayoutUnit contentLogicalHeight() const { return contentHeight(); } |
| 224 | 229 |
| 225 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) | 230 // IE extensions. Used to calculate offsetWidth/Height. Overridden by inlin
es (RenderFlow) |
| 226 // to return the remaining width on a given line (and the height of a single
line). | 231 // to return the remaining width on a given line (and the height of a single
line). |
| 227 virtual LayoutUnit offsetWidth() const override { return width(); } | 232 virtual LayoutUnit offsetWidth() const override { return width(); } |
| 228 virtual LayoutUnit offsetHeight() const override { return height(); } | 233 virtual LayoutUnit offsetHeight() const override { return height(); } |
| 229 | 234 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 | 483 |
| 479 virtual void mapLocalToContainer(const RenderBox* paintInvalidationContainer
, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const override; | 484 virtual void mapLocalToContainer(const RenderBox* paintInvalidationContainer
, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const override; |
| 480 | 485 |
| 481 void paintRootBoxFillLayers(const PaintInfo&); | 486 void paintRootBoxFillLayers(const PaintInfo&); |
| 482 | 487 |
| 483 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); | 488 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); |
| 484 | 489 |
| 485 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} | 490 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} |
| 486 | 491 |
| 487 private: | 492 private: |
| 493 void updateTransformationMatrix(); |
| 494 void updateTransform(const RenderStyle* oldStyle); |
| 488 void updateFromStyle(); | 495 void updateFromStyle(); |
| 489 void updateFilters(); | 496 void updateFilters(); |
| 490 | 497 |
| 491 PassRefPtr<HitTestingTransformState> createLocalTransformState( | 498 PassRefPtr<HitTestingTransformState> createLocalTransformState( |
| 492 RenderLayer* rootLayer, RenderLayer* containerLayer, | 499 RenderLayer* rootLayer, RenderLayer* containerLayer, |
| 493 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, | 500 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, |
| 494 const HitTestingTransformState* containerTransformState) const; | 501 const HitTestingTransformState* containerTransformState) const; |
| 495 bool hitTestNonLayerDescendants(const HitTestRequest& request, HitTestResult
& result, | 502 bool hitTestNonLayerDescendants(const HitTestRequest& request, HitTestResult
& result, |
| 496 const LayoutRect& layerBounds, const HitTestLocation& hitTestLocation); | 503 const LayoutRect& layerBounds, const HitTestLocation& hitTestLocation); |
| 497 | 504 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 557 |
| 551 // The preferred logical width of the element if it were to break its lines
at every possible opportunity. | 558 // The preferred logical width of the element if it were to break its lines
at every possible opportunity. |
| 552 LayoutUnit m_minPreferredLogicalWidth; | 559 LayoutUnit m_minPreferredLogicalWidth; |
| 553 | 560 |
| 554 // The preferred logical width of the element if it never breaks any lines a
t all. | 561 // The preferred logical width of the element if it never breaks any lines a
t all. |
| 555 LayoutUnit m_maxPreferredLogicalWidth; | 562 LayoutUnit m_maxPreferredLogicalWidth; |
| 556 | 563 |
| 557 // Our overflow information. | 564 // Our overflow information. |
| 558 OwnPtr<RenderOverflow> m_overflow; | 565 OwnPtr<RenderOverflow> m_overflow; |
| 559 | 566 |
| 567 // TODO(ojan): Move these two into RenderBoxRareData. |
| 560 OwnPtr<FilterEffectRenderer> m_filterRenderer; | 568 OwnPtr<FilterEffectRenderer> m_filterRenderer; |
| 569 OwnPtr<TransformationMatrix> m_transform; |
| 561 | 570 |
| 562 private: | 571 private: |
| 563 OwnPtr<RenderLayer> m_layer; | 572 OwnPtr<RenderLayer> m_layer; |
| 564 OwnPtr<RenderBoxRareData> m_rareData; | 573 OwnPtr<RenderBoxRareData> m_rareData; |
| 565 }; | 574 }; |
| 566 | 575 |
| 567 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBox, isBox()); | 576 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBox, isBox()); |
| 568 | 577 |
| 569 inline RenderBox* RenderBox::previousSiblingBox() const | 578 inline RenderBox* RenderBox::previousSiblingBox() const |
| 570 { | 579 { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 if (UNLIKELY(inlineBoxWrapper() != 0)) | 611 if (UNLIKELY(inlineBoxWrapper() != 0)) |
| 603 deleteLineBoxWrapper(); | 612 deleteLineBoxWrapper(); |
| 604 } | 613 } |
| 605 | 614 |
| 606 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 615 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
| 607 } | 616 } |
| 608 | 617 |
| 609 } // namespace blink | 618 } // namespace blink |
| 610 | 619 |
| 611 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 620 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
| OLD | NEW |