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

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: Rebase (merge conflict resolved) 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 virtual int firstLineBoxBaseline() const { return -1; } 745 virtual int firstLineBoxBaseline() const { return -1; }
746 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. 746 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.
747 747
748 bool shrinkToAvoidFloats() const; 748 bool shrinkToAvoidFloats() const;
749 virtual bool avoidsFloats() const; 749 virtual bool avoidsFloats() const;
750 750
751 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&); 751 virtual void markForPaginationRelayoutIfNeeded(SubtreeLayoutScope&);
752 752
753 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); } 753 bool isWritingModeRoot() const { return !parent() || parent()->style()->writ ingMode() != style()->writingMode(); }
754 bool isOrthogonalWritingModeRoot() const { return parent() && parent()->isHo rizontalWritingMode() != isHorizontalWritingMode(); }
755 void markOrthogonalWritingModeRoot();
756 void unmarkOrthogonalWritingModeRoot();
754 757
755 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); } 758 bool isDeprecatedFlexItem() const { return !isInline() && !isFloatingOrOutOf FlowPositioned() && parent() && parent()->isDeprecatedFlexibleBox(); }
756 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); } 759 bool isFlexItemIncludingDeprecated() const { return !isInline() && !isFloati ngOrOutOfFlowPositioned() && parent() && parent()->isFlexibleBoxIncludingDepreca ted(); }
757 760
758 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); } 761 bool isGridItem() const { return parent() && parent()->isLayoutGrid(); }
759 762
760 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; 763 LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override;
761 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override; 764 int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePo sitionMode = PositionOnContainingLine) const override;
762 765
763 LayoutUnit offsetLeft() const override; 766 LayoutUnit offsetLeft() const override;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 void clearPreviousPaintInvalidationRects() override; 875 void clearPreviousPaintInvalidationRects() override;
873 876
874 LayoutBlock* percentHeightContainer() const { return m_rareData ? m_rareData ->m_percentHeightContainer : nullptr; } 877 LayoutBlock* percentHeightContainer() const { return m_rareData ? m_rareData ->m_percentHeightContainer : nullptr; }
875 void setPercentHeightContainer(LayoutBlock*); 878 void setPercentHeightContainer(LayoutBlock*);
876 void removeFromPercentHeightContainer(); 879 void removeFromPercentHeightContainer();
877 void clearPercentHeightDescendants(); 880 void clearPercentHeightDescendants();
878 881
879 protected: 882 protected:
880 void willBeDestroyed() override; 883 void willBeDestroyed() override;
881 884
885 void insertedIntoTree() override;
886 void willBeRemovedFromTree() override;
887
882 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e; 888 void styleWillChange(StyleDifference, const ComputedStyle& newStyle) overrid e;
883 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ; 889 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override ;
884 void updateFromStyle() override; 890 void updateFromStyle() override;
885 891
886 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect. 892 // Returns false if it could not cheaply compute the extent (e.g. fixed back ground), in which case the returned rect may be incorrect.
887 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const. 893 // FIXME: make this a const method once the LayoutBox reference in BoxPainte r is const.
888 bool getBackgroundPaintedExtent(LayoutRect&) const; 894 bool getBackgroundPaintedExtent(LayoutRect&) const;
889 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const; 895 virtual bool foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const;
890 bool computeBackgroundIsKnownToBeObscured() const override; 896 bool computeBackgroundIsKnownToBeObscured() const override;
891 897
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 if (UNLIKELY(m_inlineBoxWrapper != nullptr)) 1114 if (UNLIKELY(m_inlineBoxWrapper != nullptr))
1109 deleteLineBoxWrapper(); 1115 deleteLineBoxWrapper();
1110 } 1116 }
1111 1117
1112 m_inlineBoxWrapper = boxWrapper; 1118 m_inlineBoxWrapper = boxWrapper;
1113 } 1119 }
1114 1120
1115 } // namespace blink 1121 } // namespace blink
1116 1122
1117 #endif // LayoutBox_h 1123 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698