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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.h

Issue 1549153002: Fix preferred logical widths of orthogonal writing modes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: leviw review Created 4 years, 10 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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 747
748 virtual int firstLineBoxBaseline() const { return -1; } 748 virtual int firstLineBoxBaseline() const { return -1; }
749 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R eturns -1 if we should skip this box when computing the baseline of an inline-bl ock. 749 virtual int inlineBlockBaseline(LineDirectionMode) const { return -1; } // R eturns -1 if we should skip this box when computing the baseline of an inline-bl ock.
750 750
751 bool shrinkToAvoidFloats() const; 751 bool shrinkToAvoidFloats() const;
752 virtual bool avoidsFloats() const; 752 virtual bool avoidsFloats() const;
753 753
754 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&); 754 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&);
755 755
756 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); } 756 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); }
757 bool isOrthogonalWritingModeRoot() const { return parent() && parent()->isHo rizontalWritingMode() != isHorizontalWritingMode(); }
758 void markOrthogonalWritingModeRoot();
759 void unmarkOrthogonalWritingModeRoot();
757 760
758 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } 761 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); }
759 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); } 762 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); }
760 763
761 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } 764 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); }
762 765
763 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; 766 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;
764 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; 767 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override;
765 768
766 LayoutUnit offsetLeft() const override; 769 LayoutUnit offsetLeft() const override;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 void clearPreviousPaintInvalidationRects() override; 878 void clearPreviousPaintInvalidationRects() override;
876 879
877 LayoutBlock* percentHeightContainer() const { return m_rareData ? m_rareData ->m_percentHeightContainer : nullptr; } 880 LayoutBlock* percentHeightContainer() const { return m_rareData ? m_rareData ->m_percentHeightContainer : nullptr; }
878 void setPercentHeightContainer(LayoutBlock*); 881 void setPercentHeightContainer(LayoutBlock*);
879 void removeFromPercentHeightContainer(); 882 void removeFromPercentHeightContainer();
880 void clearPercentHeightDescendants(); 883 void clearPercentHeightDescendants();
881 884
882 protected: 885 protected:
883 void willBeDestroyed() override; 886 void willBeDestroyed() override;
884 887
888 void insertedIntoTree() override;
889 void willBeRemovedFromTree() override;
890
885 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e; 891 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e;
886 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; 892 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
887 void updateFromStyle() override; 893 void updateFromStyle() override;
888 894
889 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 895 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
890 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const. 896 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const.
891 bool getBackgroundPaintedExtent(LayoutRect&) const; 897 bool getBackgroundPaintedExtent(LayoutRect&) const;
892 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; 898 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const;
893 bool computeBackgroundIsKnownToBeObscured() const override; 899 bool computeBackgroundIsKnownToBeObscured() const override;
894 900
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) 1117 if (UNLIKELY(m_inlineBoxWrapper != nullptr))
1112 deleteLineBoxWrapper(); 1118 deleteLineBoxWrapper();
1113 } 1119 }
1114 1120
1115 m_inlineBoxWrapper = boxWrapper; 1121 m_inlineBoxWrapper = boxWrapper;
1116 } 1122 }
1117 1123
1118 } // namespace blink 1124 } // namespace blink
1119 1125
1120 #endif // LayoutBox_h 1126 #endif // LayoutBox_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698