OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 bool needsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNe
edsOverflowRecalcAfterStyleChange() || m_bitfields.childNeedsOverflowRecalcAfter
StyleChange(); } | 577 bool needsOverflowRecalcAfterStyleChange() const { return m_bitfields.selfNe
edsOverflowRecalcAfterStyleChange() || m_bitfields.childNeedsOverflowRecalcAfter
StyleChange(); } |
578 bool selfNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.se
lfNeedsOverflowRecalcAfterStyleChange(); } | 578 bool selfNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.se
lfNeedsOverflowRecalcAfterStyleChange(); } |
579 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c
hildNeedsOverflowRecalcAfterStyleChange(); } | 579 bool childNeedsOverflowRecalcAfterStyleChange() const { return m_bitfields.c
hildNeedsOverflowRecalcAfterStyleChange(); } |
580 | 580 |
581 bool isSelectionBorder() const; | 581 bool isSelectionBorder() const; |
582 | 582 |
583 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl
ip(); } | 583 bool hasClip() const { return isOutOfFlowPositioned() && !style()->hasAutoCl
ip(); } |
584 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); } | 584 bool hasOverflowClip() const { return m_bitfields.hasOverflowClip(); } |
585 bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip();
} | 585 bool hasClipOrOverflowClip() const { return hasClip() || hasOverflowClip();
} |
586 | 586 |
587 bool hasTransform() const { return m_bitfields.hasTransform(); } | 587 bool hasTransformRelatedProperty() const { return m_bitfields.hasTransformRe
latedProperty(); } |
588 bool hasMask() const { return style() && style()->hasMask(); } | 588 bool hasMask() const { return style() && style()->hasMask(); } |
589 bool hasClipPath() const { return style() && style()->clipPath(); } | 589 bool hasClipPath() const { return style() && style()->clipPath(); } |
590 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili
ty() == BackfaceVisibilityHidden; } | 590 bool hasHiddenBackface() const { return style() && style()->backfaceVisibili
ty() == BackfaceVisibilityHidden; } |
591 | 591 |
592 bool hasFilter() const { return style() && style()->hasFilter(); } | 592 bool hasFilter() const { return style() && style()->hasFilter(); } |
593 | 593 |
594 bool hasBlendMode() const; | 594 bool hasBlendMode() const; |
595 | 595 |
596 bool hasShapeOutside() const { return style() && style()->shapeOutside(); } | 596 bool hasShapeOutside() const { return style() && style()->shapeOutside(); } |
597 | 597 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 void setHasBoxDecorationBackground(bool); | 674 void setHasBoxDecorationBackground(bool); |
675 void invalidateBackgroundObscurationStatus(); | 675 void invalidateBackgroundObscurationStatus(); |
676 virtual bool computeBackgroundIsKnownToBeObscured() { return false; } | 676 virtual bool computeBackgroundIsKnownToBeObscured() { return false; } |
677 | 677 |
678 void setIsText() { m_bitfields.setIsText(true); } | 678 void setIsText() { m_bitfields.setIsText(true); } |
679 void setIsBox() { m_bitfields.setIsBox(true); } | 679 void setIsBox() { m_bitfields.setIsBox(true); } |
680 void setReplaced(bool isReplaced) { m_bitfields.setIsReplaced(isReplaced); } | 680 void setReplaced(bool isReplaced) { m_bitfields.setIsReplaced(isReplaced); } |
681 void setHorizontalWritingMode(bool hasHorizontalWritingMode) { m_bitfields.s
etHorizontalWritingMode(hasHorizontalWritingMode); } | 681 void setHorizontalWritingMode(bool hasHorizontalWritingMode) { m_bitfields.s
etHorizontalWritingMode(hasHorizontalWritingMode); } |
682 void setHasOverflowClip(bool hasOverflowClip) { m_bitfields.setHasOverflowCl
ip(hasOverflowClip); } | 682 void setHasOverflowClip(bool hasOverflowClip) { m_bitfields.setHasOverflowCl
ip(hasOverflowClip); } |
683 void setHasLayer(bool hasLayer) { m_bitfields.setHasLayer(hasLayer); } | 683 void setHasLayer(bool hasLayer) { m_bitfields.setHasLayer(hasLayer); } |
684 void setHasTransform(bool hasTransform) { m_bitfields.setHasTransform(hasTra
nsform); } | 684 void setHasTransformRelatedProperty(bool hasTransform) { m_bitfields.setHasT
ransformRelatedProperty(hasTransform); } |
685 void setHasReflection(bool hasReflection) { m_bitfields.setHasReflection(has
Reflection); } | 685 void setHasReflection(bool hasReflection) { m_bitfields.setHasReflection(has
Reflection); } |
686 | 686 |
687 void scheduleRelayout(); | 687 void scheduleRelayout(); |
688 | 688 |
689 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); | 689 void updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers
); |
690 void updateImage(StyleImage*, StyleImage*); | 690 void updateImage(StyleImage*, StyleImage*); |
691 void updateShapeImage(const ShapeValue*, const ShapeValue*); | 691 void updateShapeImage(const ShapeValue*, const ShapeValue*); |
692 | 692 |
693 // paintOffset is the offset from the origin of the GraphicsContext at which
to paint the current object. | 693 // paintOffset is the offset from the origin of the GraphicsContext at which
to paint the current object. |
694 virtual void paint(PaintInfo&, const LayoutPoint& paintOffset); | 694 virtual void paint(PaintInfo&, const LayoutPoint& paintOffset); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 | 734 |
735 // Updates only the local style ptr of the object. Does not update the stat
e of the object, | 735 // Updates only the local style ptr of the object. Does not update the stat
e of the object, |
736 // and so only should be called when the style is known not to have changed
(or from setStyle). | 736 // and so only should be called when the style is known not to have changed
(or from setStyle). |
737 void setStyleInternal(PassRefPtr<RenderStyle> style) { m_style = style; } | 737 void setStyleInternal(PassRefPtr<RenderStyle> style) { m_style = style; } |
738 | 738 |
739 // returns the containing block level element for this element. | 739 // returns the containing block level element for this element. |
740 RenderBlock* containingBlock() const; | 740 RenderBlock* containingBlock() const; |
741 | 741 |
742 bool canContainFixedPositionObjects() const | 742 bool canContainFixedPositionObjects() const |
743 { | 743 { |
744 return isRenderView() || (hasTransform() && isRenderBlock()) || isSVGFor
eignObject(); | 744 return isRenderView() || (hasTransformRelatedProperty() && isRenderBlock
()) || isSVGForeignObject(); |
745 } | 745 } |
746 | 746 |
747 // Convert the given local point to absolute coordinates | 747 // Convert the given local point to absolute coordinates |
748 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. | 748 // FIXME: Temporary. If UseTransforms is true, take transforms into account.
Eventually localToAbsolute() will always be transform-aware. |
749 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; | 749 FloatPoint localToAbsolute(const FloatPoint& localPoint = FloatPoint(), MapC
oordinatesFlags = 0) const; |
750 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; | 750 FloatPoint absoluteToLocal(const FloatPoint&, MapCoordinatesFlags = 0) const
; |
751 | 751 |
752 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. | 752 // Convert a local quad to absolute coordinates, taking transforms into acco
unt. |
753 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const | 753 FloatQuad localToAbsoluteQuad(const FloatQuad& quad, MapCoordinatesFlags mod
e = 0, bool* wasFixed = 0) const |
754 { | 754 { |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const | 1037 bool shouldCheckForPaintInvalidation(const PaintInvalidationState& paintInva
lidationState) const |
1038 { | 1038 { |
1039 return paintInvalidationState.forceCheckForPaintInvalidation() || should
CheckForPaintInvalidationRegardlessOfPaintInvalidationState(); | 1039 return paintInvalidationState.forceCheckForPaintInvalidation() || should
CheckForPaintInvalidationRegardlessOfPaintInvalidationState(); |
1040 } | 1040 } |
1041 | 1041 |
1042 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st | 1042 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con
st |
1043 { | 1043 { |
1044 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation()
|| shouldDoFullPaintInvalidation() || shouldInvalidateSelection(); | 1044 return layoutDidGetCalledSinceLastFrame() || mayNeedPaintInvalidation()
|| shouldDoFullPaintInvalidation() || shouldInvalidateSelection(); |
1045 } | 1045 } |
1046 | 1046 |
1047 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasColumn
s() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMo
de(); } | 1047 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasColumn
s() && !hasTransformRelatedProperty() && !hasReflection() && !style()->isFlipped
BlocksWritingMode(); } |
1048 | 1048 |
1049 void setNeedsOverflowRecalcAfterStyleChange(); | 1049 void setNeedsOverflowRecalcAfterStyleChange(); |
1050 void markContainingBlocksForOverflowRecalc(); | 1050 void markContainingBlocksForOverflowRecalc(); |
1051 | 1051 |
1052 virtual LayoutRect viewRect() const; | 1052 virtual LayoutRect viewRect() const; |
1053 | 1053 |
1054 protected: | 1054 protected: |
1055 enum RenderObjectType { | 1055 enum RenderObjectType { |
1056 RenderObjectBr, | 1056 RenderObjectBr, |
1057 RenderObjectCanvas, | 1057 RenderObjectCanvas, |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 , m_childNeedsOverflowRecalcAfterStyleChange(false) | 1269 , m_childNeedsOverflowRecalcAfterStyleChange(false) |
1270 , m_isAnonymous(!node) | 1270 , m_isAnonymous(!node) |
1271 , m_isText(false) | 1271 , m_isText(false) |
1272 , m_isBox(false) | 1272 , m_isBox(false) |
1273 , m_isInline(true) | 1273 , m_isInline(true) |
1274 , m_isReplaced(false) | 1274 , m_isReplaced(false) |
1275 , m_horizontalWritingMode(true) | 1275 , m_horizontalWritingMode(true) |
1276 , m_isDragging(false) | 1276 , m_isDragging(false) |
1277 , m_hasLayer(false) | 1277 , m_hasLayer(false) |
1278 , m_hasOverflowClip(false) | 1278 , m_hasOverflowClip(false) |
1279 , m_hasTransform(false) | 1279 , m_hasTransformRelatedProperty(false) |
1280 , m_hasReflection(false) | 1280 , m_hasReflection(false) |
1281 , m_hasCounterNodeMap(false) | 1281 , m_hasCounterNodeMap(false) |
1282 , m_everHadLayout(false) | 1282 , m_everHadLayout(false) |
1283 , m_ancestorLineBoxDirty(false) | 1283 , m_ancestorLineBoxDirty(false) |
1284 , m_layoutDidGetCalledSinceLastFrame(false) | 1284 , m_layoutDidGetCalledSinceLastFrame(false) |
1285 , m_hasPendingResourceUpdate(false) | 1285 , m_hasPendingResourceUpdate(false) |
1286 , m_childrenInline(false) | 1286 , m_childrenInline(false) |
1287 , m_hasColumns(false) | 1287 , m_hasColumns(false) |
1288 , m_alwaysCreateLineBoxesForRenderInline(false) | 1288 , m_alwaysCreateLineBoxesForRenderInline(false) |
1289 , m_positionedState(IsStaticallyPositioned) | 1289 , m_positionedState(IsStaticallyPositioned) |
(...skipping 22 matching lines...) Expand all Loading... |
1312 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); | 1312 ADD_BOOLEAN_BITFIELD(isAnonymous, IsAnonymous); |
1313 ADD_BOOLEAN_BITFIELD(isText, IsText); | 1313 ADD_BOOLEAN_BITFIELD(isText, IsText); |
1314 ADD_BOOLEAN_BITFIELD(isBox, IsBox); | 1314 ADD_BOOLEAN_BITFIELD(isBox, IsBox); |
1315 ADD_BOOLEAN_BITFIELD(isInline, IsInline); | 1315 ADD_BOOLEAN_BITFIELD(isInline, IsInline); |
1316 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced); | 1316 ADD_BOOLEAN_BITFIELD(isReplaced, IsReplaced); |
1317 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode); | 1317 ADD_BOOLEAN_BITFIELD(horizontalWritingMode, HorizontalWritingMode); |
1318 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); | 1318 ADD_BOOLEAN_BITFIELD(isDragging, IsDragging); |
1319 | 1319 |
1320 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); | 1320 ADD_BOOLEAN_BITFIELD(hasLayer, HasLayer); |
1321 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden | 1321 ADD_BOOLEAN_BITFIELD(hasOverflowClip, HasOverflowClip); // Set in the ca
se of overflow:auto/scroll/hidden |
1322 ADD_BOOLEAN_BITFIELD(hasTransform, HasTransform); | 1322 ADD_BOOLEAN_BITFIELD(hasTransformRelatedProperty, HasTransformRelatedPro
perty); |
1323 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); | 1323 ADD_BOOLEAN_BITFIELD(hasReflection, HasReflection); |
1324 | 1324 |
1325 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); | 1325 ADD_BOOLEAN_BITFIELD(hasCounterNodeMap, HasCounterNodeMap); |
1326 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); | 1326 ADD_BOOLEAN_BITFIELD(everHadLayout, EverHadLayout); |
1327 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); | 1327 ADD_BOOLEAN_BITFIELD(ancestorLineBoxDirty, AncestorLineBoxDirty); |
1328 | 1328 |
1329 ADD_BOOLEAN_BITFIELD(layoutDidGetCalledSinceLastFrame, LayoutDidGetCalle
dSinceLastFrame); | 1329 ADD_BOOLEAN_BITFIELD(layoutDidGetCalledSinceLastFrame, LayoutDidGetCalle
dSinceLastFrame); |
1330 | 1330 |
1331 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate)
; | 1331 ADD_BOOLEAN_BITFIELD(hasPendingResourceUpdate, HasPendingResourceUpdate)
; |
1332 | 1332 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 void showTree(const blink::RenderObject*); | 1610 void showTree(const blink::RenderObject*); |
1611 void showLineTree(const blink::RenderObject*); | 1611 void showLineTree(const blink::RenderObject*); |
1612 void showRenderTree(const blink::RenderObject* object1); | 1612 void showRenderTree(const blink::RenderObject* object1); |
1613 // We don't make object2 an optional parameter so that showRenderTree | 1613 // We don't make object2 an optional parameter so that showRenderTree |
1614 // can be called from gdb easily. | 1614 // can be called from gdb easily. |
1615 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); | 1615 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec
t* object2); |
1616 | 1616 |
1617 #endif | 1617 #endif |
1618 | 1618 |
1619 #endif // RenderObject_h | 1619 #endif // RenderObject_h |
OLD | NEW |