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 12 matching lines...) Expand all Loading... |
23 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 23 #ifndef SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
24 #define SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 24 #define SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
25 | 25 |
26 #include "sky/engine/core/rendering/RenderBoxModelObject.h" | 26 #include "sky/engine/core/rendering/RenderBoxModelObject.h" |
27 #include "sky/engine/core/rendering/RenderOverflow.h" | 27 #include "sky/engine/core/rendering/RenderOverflow.h" |
28 | 28 |
29 namespace blink { | 29 namespace blink { |
30 | 30 |
31 struct LayerPaintingInfo; | 31 struct LayerPaintingInfo; |
32 struct PaintInfo; | 32 struct PaintInfo; |
| 33 class HitTestingTransformState; |
33 class RenderBlockFlow; | 34 class RenderBlockFlow; |
34 | 35 |
35 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; | 36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; |
36 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; | 37 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde
rPadding }; |
37 enum MarginDirection { BlockDirection, InlineDirection }; | 38 enum MarginDirection { BlockDirection, InlineDirection }; |
38 | 39 |
39 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; | 40 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; |
40 | 41 |
41 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; | 42 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; |
42 | 43 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 m_marginBox.setStart(styleToUse->direction(), value); | 262 m_marginBox.setStart(styleToUse->direction(), value); |
262 } | 263 } |
263 void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = 0) | 264 void setMarginEnd(LayoutUnit value, const RenderStyle* overrideStyle = 0) |
264 { | 265 { |
265 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); | 266 const RenderStyle* styleToUse = overrideStyle ? overrideStyle : style(); |
266 m_marginBox.setEnd(styleToUse->direction(), value); | 267 m_marginBox.setEnd(styleToUse->direction(), value); |
267 } | 268 } |
268 | 269 |
269 virtual void absoluteQuads(Vector<FloatQuad>&) const override; | 270 virtual void absoluteQuads(Vector<FloatQuad>&) const override; |
270 | 271 |
| 272 bool hitTestLayer(RenderLayer* rootLayer, RenderLayer* containerLayer, |
| 273 const HitTestRequest& request, HitTestResult& result, |
| 274 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, |
| 275 const HitTestingTransformState* transformState = 0, double* zOffset = 0)
; |
| 276 |
271 void paintLayer(GraphicsContext* context, RenderLayer* rootLayer, const IntR
ect& rect); | 277 void paintLayer(GraphicsContext* context, RenderLayer* rootLayer, const IntR
ect& rect); |
272 | 278 |
273 virtual void layout() override; | 279 virtual void layout() override; |
274 virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layer
s) override; | 280 virtual void paint(PaintInfo&, const LayoutPoint&, Vector<RenderBox*>& layer
s) override; |
275 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override; | 281 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset) override; |
276 | 282 |
277 virtual LayoutUnit minPreferredLogicalWidth() const override; | 283 virtual LayoutUnit minPreferredLogicalWidth() const override; |
278 virtual LayoutUnit maxPreferredLogicalWidth() const override; | 284 virtual LayoutUnit maxPreferredLogicalWidth() const override; |
279 | 285 |
280 // FIXME: We should rename these back to overrideLogicalHeight/Width and hav
e them store | 286 // FIXME: We should rename these back to overrideLogicalHeight/Width and hav
e them store |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 466 |
461 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const
override; | 467 virtual void mapLocalToContainer(const RenderLayerModelObject* paintInvalida
tionContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const
override; |
462 | 468 |
463 void paintRootBoxFillLayers(const PaintInfo&); | 469 void paintRootBoxFillLayers(const PaintInfo&); |
464 | 470 |
465 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); | 471 RenderObject* splitAnonymousBoxesAroundChild(RenderObject* beforeChild); |
466 | 472 |
467 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} | 473 void updateIntrinsicContentLogicalHeight(LayoutUnit intrinsicContentLogicalH
eight) const { m_intrinsicContentLogicalHeight = intrinsicContentLogicalHeight;
} |
468 | 474 |
469 private: | 475 private: |
| 476 PassRefPtr<HitTestingTransformState> createLocalTransformState( |
| 477 RenderLayer* rootLayer, RenderLayer* containerLayer, |
| 478 const LayoutRect& hitTestRect, const HitTestLocation& hitTestLocation, |
| 479 const HitTestingTransformState* containerTransformState) const; |
| 480 bool hitTestNonLayerDescendants(const HitTestRequest& request, HitTestResult
& result, |
| 481 const LayoutRect& layerBounds, const HitTestLocation& hitTestLocation); |
| 482 |
470 void paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& p
aintingInfo, const IntRect& rect); | 483 void paintLayerContents(GraphicsContext* context, const LayerPaintingInfo& p
aintingInfo, const IntRect& rect); |
471 | 484 |
472 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi
calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&)
const; | 485 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi
calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&)
const; |
473 | 486 |
474 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain
ingBlock) const; | 487 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain
ingBlock) const; |
475 | 488 |
476 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje
ct* containingBlock) const; | 489 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje
ct* containingBlock) const; |
477 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj
ect* containingBlock) const; | 490 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj
ect* containingBlock) const; |
478 | 491 |
479 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; | 492 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 if (UNLIKELY(inlineBoxWrapper() != 0)) | 584 if (UNLIKELY(inlineBoxWrapper() != 0)) |
572 deleteLineBoxWrapper(); | 585 deleteLineBoxWrapper(); |
573 } | 586 } |
574 | 587 |
575 ensureRareData().m_inlineBoxWrapper = boxWrapper; | 588 ensureRareData().m_inlineBoxWrapper = boxWrapper; |
576 } | 589 } |
577 | 590 |
578 } // namespace blink | 591 } // namespace blink |
579 | 592 |
580 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ | 593 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBOX_H_ |
OLD | NEW |