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

Side by Side Diff: Source/core/rendering/RenderBox.h

Issue 385583005: For flex items, percent paddings should resolve against their respective dimension Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 5 months 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
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 *
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t his) : 0; 616 return ShapeOutsideInfo::isEnabledFor(*this) ? ShapeOutsideInfo::info(*t his) : 0;
617 } 617 }
618 618
619 void markShapeOutsideDependentsForLayout() 619 void markShapeOutsideDependentsForLayout()
620 { 620 {
621 if (isFloating()) 621 if (isFloating())
622 removeFloatingOrPositionedChildFromBlockLists(); 622 removeFloatingOrPositionedChildFromBlockLists();
623 } 623 }
624 624
625 virtual void invalidateTreeAfterLayout(const PaintInvalidationState&) OVERRI DE; 625 virtual void invalidateTreeAfterLayout(const PaintInvalidationState&) OVERRI DE;
626 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain ingBlock) const;
626 627
627 protected: 628 protected:
628 virtual void willBeDestroyed() OVERRIDE; 629 virtual void willBeDestroyed() OVERRIDE;
629 630
630 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE; 631 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle) O VERRIDE;
631 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE; 632 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
632 virtual void updateFromStyle() OVERRIDE; 633 virtual void updateFromStyle() OVERRIDE;
633 634
634 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 635 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
635 bool getBackgroundPaintedExtent(LayoutRect&) const; 636 bool getBackgroundPaintedExtent(LayoutRect&) const;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 private: 674 private:
674 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render Style* oldStyle); 675 void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const Render Style* oldStyle);
675 void updateGridPositionAfterStyleChange(const RenderStyle*); 676 void updateGridPositionAfterStyleChange(const RenderStyle*);
676 677
677 bool autoWidthShouldFitContent() const; 678 bool autoWidthShouldFitContent() const;
678 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const; 679 void shrinkToFitWidth(const LayoutUnit availableSpace, const LayoutUnit logi calLeftValue, const LayoutUnit bordersPlusPadding, LogicalExtentComputedValues&) const;
679 680
680 // Returns true if we did a full repaint 681 // Returns true if we did a full repaint
681 bool repaintLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawi ngBackground); 682 bool repaintLayerRectsForImage(WrappedImagePtr, const FillLayer&, bool drawi ngBackground);
682 683
683 bool skipContainingBlockForPercentHeightCalculation(const RenderBox* contain ingBlock) const;
684
685 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje ct* containingBlock, bool checkForPerpendicularWritingMode = true) const; 684 LayoutUnit containingBlockLogicalWidthForPositioned(const RenderBoxModelObje ct* containingBlock, bool checkForPerpendicularWritingMode = true) const;
686 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj ect* containingBlock, bool checkForPerpendicularWritingMode = true) const; 685 LayoutUnit containingBlockLogicalHeightForPositioned(const RenderBoxModelObj ect* containingBlock, bool checkForPerpendicularWritingMode = true) const;
687 686
688 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const; 687 void computePositionedLogicalHeight(LogicalExtentComputedValues&) const;
689 void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBox ModelObject* containerBlock, TextDirection containerDirection, 688 void computePositionedLogicalWidthUsing(Length logicalWidth, const RenderBox ModelObject* containerBlock, TextDirection containerDirection,
690 LayoutUnit containerLogicalWidth, La youtUnit bordersPlusPadding, 689 LayoutUnit containerLogicalWidth, La youtUnit bordersPlusPadding,
691 const Length& logicalLeft, const Len gth& logicalRight, const Length& marginLogicalLeft, 690 const Length& logicalLeft, const Len gth& logicalRight, const Length& marginLogicalLeft,
692 const Length& marginLogicalRight, Lo gicalExtentComputedValues&) const; 691 const Length& marginLogicalRight, Lo gicalExtentComputedValues&) const;
693 void computePositionedLogicalHeightUsing(Length logicalHeightLength, const R enderBoxModelObject* containerBlock, 692 void computePositionedLogicalHeightUsing(Length logicalHeightLength, const R enderBoxModelObject* containerBlock,
694 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight, 693 LayoutUnit containerLogicalHeight, LayoutUnit bordersPlusPadding, LayoutUnit logicalHeight,
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 if (UNLIKELY(inlineBoxWrapper() != 0)) 779 if (UNLIKELY(inlineBoxWrapper() != 0))
781 deleteLineBoxWrapper(); 780 deleteLineBoxWrapper();
782 } 781 }
783 782
784 ensureRareData().m_inlineBoxWrapper = boxWrapper; 783 ensureRareData().m_inlineBoxWrapper = boxWrapper;
785 } 784 }
786 785
787 } // namespace WebCore 786 } // namespace WebCore
788 787
789 #endif // RenderBox_h 788 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698