Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: sky/engine/core/rendering/RenderBox.h

Issue 703563002: Remove shape-outside. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 * 20 *
21 */ 21 */
22 22
23 #ifndef RenderBox_h 23 #ifndef RenderBox_h
24 #define RenderBox_h 24 #define RenderBox_h
25 25
26 #include "core/rendering/RenderBoxModelObject.h" 26 #include "core/rendering/RenderBoxModelObject.h"
27 #include "core/rendering/RenderOverflow.h" 27 #include "core/rendering/RenderOverflow.h"
28 #include "core/rendering/shapes/ShapeOutsideInfo.h"
29 #include "platform/scroll/ScrollTypes.h" 28 #include "platform/scroll/ScrollTypes.h"
30 29
31 namespace blink { 30 namespace blink {
32 31
33 struct PaintInfo; 32 struct PaintInfo;
33 class RenderBlockFlow;
34 class RenderLayerScrollableArea; 34 class RenderLayerScrollableArea;
35 35
36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize }; 36 enum SizeType { MainOrPreferredSize, MinSize, MaxSize };
37 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding }; 37 enum AvailableLogicalHeightType { ExcludeMarginBorderPadding, IncludeMarginBorde rPadding };
38 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize }; 38 enum OverlayScrollbarSizeRelevancy { IgnoreOverlayScrollbarSize, IncludeOverlayS crollbarSize };
39 enum MarginDirection { BlockDirection, InlineDirection }; 39 enum MarginDirection { BlockDirection, InlineDirection };
40 40
41 enum ShouldComputePreferred { ComputeActual, ComputePreferred }; 41 enum ShouldComputePreferred { ComputeActual, ComputePreferred };
42 42
43 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible }; 43 enum ContentsClipBehavior { ForceContentsClip, SkipContentsClipIfPossible };
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 555 }
556 556
557 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) con st 557 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const RenderObject*) con st
558 { 558 {
559 ASSERT_NOT_REACHED(); 559 ASSERT_NOT_REACHED();
560 return 0; 560 return 0;
561 } 561 }
562 562
563 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir ection() == object->style()->direction(); } 563 bool hasSameDirectionAs(const RenderBox* object) const { return style()->dir ection() == object->style()->direction(); }
564 564
565 ShapeOutsideInfo* shapeOutsideInfo() const
566 {
567 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t his) : 0;
568 }
569
570 protected: 565 protected:
571 virtual void willBeDestroyed() override; 566 virtual void willBeDestroyed() override;
572 567
573 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o verride; 568 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) o verride;
574 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride; 569 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov erride;
575 virtual void updateFromStyle() override; 570 virtual void updateFromStyle() override;
576 571
577 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 572 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
578 bool getBackgroundPaintedExtent(LayoutRect&) const; 573 bool getBackgroundPaintedExtent(LayoutRect&) const;
579 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; 574 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer, 617 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInva lidationContainer,
623 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) override; 618 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInva lidationContainer) override;
624 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds , const LayoutPoint& positionFromPaintInvalidationContainer) override; 619 virtual void incrementallyInvalidatePaint(const RenderLayerModelObject& pain tInvalidationContainer, const LayoutRect& oldBounds, const LayoutRect& newBounds , const LayoutPoint& positionFromPaintInvalidationContainer) override;
625 620
626 virtual void clearPaintInvalidationState(const PaintInvalidationState&) over ride; 621 virtual void clearPaintInvalidationState(const PaintInvalidationState&) over ride;
627 #if ENABLE(ASSERT) 622 #if ENABLE(ASSERT)
628 virtual bool paintInvalidationStateIsDirty() const override; 623 virtual bool paintInvalidationStateIsDirty() const override;
629 #endif 624 #endif
630 625
631 private: 626 private:
632 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render Style* oldStyle);
633
634 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const; 627 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const;
635 628
636 // Returns true if we queued up a paint invalidation. 629 // Returns true if we queued up a paint invalidation.
637 bool paintInvalidationLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawingBackground); 630 bool paintInvalidationLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawingBackground);
638 631
639 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain ingBlock) const; 632 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain ingBlock) const;
640 633
641 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje ct* containingBlock) const; 634 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje ct* containingBlock) const;
642 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj ect* containingBlock) const; 635 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj ect* containingBlock) const;
643 636
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 if (UNLIKELY(inlineBoxWrapper() != 0)) 736 if (UNLIKELY(inlineBoxWrapper() != 0))
744 deleteLineBoxWrapper(); 737 deleteLineBoxWrapper();
745 } 738 }
746 739
747 ensureRareData().m_inlineBoxWrapper = boxWrapper; 740 ensureRareData().m_inlineBoxWrapper = boxWrapper;
748 } 741 }
749 742
750 } // namespace blink 743 } // namespace blink
751 744
752 #endif // RenderBox_h 745 #endif // RenderBox_h
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBlock.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698