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

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

Issue 1921553008: Fix scroll origin, overflow rects, and coordinate flipping for flexbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebaseline Created 4 years, 7 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalW ritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); } 373 LayoutUnit logicalLeftLayoutOverflow() const { return style()->isHorizontalW ritingMode() ? layoutOverflowRect().x() : layoutOverflowRect().y(); }
374 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontal WritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); } 374 LayoutUnit logicalRightLayoutOverflow() const { return style()->isHorizontal WritingMode() ? layoutOverflowRect().maxX() : layoutOverflowRect().maxY(); }
375 375
376 LayoutRect visualOverflowRect() const override; 376 LayoutRect visualOverflowRect() const override;
377 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalW ritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); } 377 LayoutUnit logicalLeftVisualOverflow() const { return style()->isHorizontalW ritingMode() ? visualOverflowRect().x() : visualOverflowRect().y(); }
378 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontal WritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); } 378 LayoutUnit logicalRightVisualOverflow() const { return style()->isHorizontal WritingMode() ? visualOverflowRect().maxX() : visualOverflowRect().maxY(); }
379 379
380 LayoutRect selfVisualOverflowRect() const { return m_overflow ? m_overflow-> selfVisualOverflowRect() : borderBoxRect(); } 380 LayoutRect selfVisualOverflowRect() const { return m_overflow ? m_overflow-> selfVisualOverflowRect() : borderBoxRect(); }
381 LayoutRect contentsVisualOverflowRect() const { return m_overflow ? m_overfl ow->contentsVisualOverflowRect() : LayoutRect(); } 381 LayoutRect contentsVisualOverflowRect() const { return m_overflow ? m_overfl ow->contentsVisualOverflowRect() : LayoutRect(); }
382 382
383 virtual bool hasTopOverflow() const;
leviw_travelin_and_unemployed 2016/05/10 01:57:06 May be worth a comment about when this would be tr
szager1 2016/05/10 07:33:09 Added a comment.
384 virtual bool hasLeftOverflow() const;
385
383 void addLayoutOverflow(const LayoutRect&); 386 void addLayoutOverflow(const LayoutRect&);
384 void addSelfVisualOverflow(const LayoutRect&); 387 void addSelfVisualOverflow(const LayoutRect&);
385 void addContentsVisualOverflow(const LayoutRect&); 388 void addContentsVisualOverflow(const LayoutRect&);
386 389
387 void addVisualEffectOverflow(); 390 void addVisualEffectOverflow();
388 LayoutRectOutsets computeVisualEffectOverflowOutsets() const; 391 LayoutRectOutsets computeVisualEffectOverflowOutsets() const;
389 void addOverflowFromChild(LayoutBox* child) { addOverflowFromChild(child, ch ild->locationOffset()); } 392 void addOverflowFromChild(LayoutBox* child) { addOverflowFromChild(child, ch ild->locationOffset()); }
390 void addOverflowFromChild(LayoutBox* child, const LayoutSize& delta); 393 void addOverflowFromChild(LayoutBox* child, const LayoutSize& delta);
391 void clearLayoutOverflow(); 394 void clearLayoutOverflow();
392 void clearAllOverflows() { m_overflow.clear(); } 395 void clearAllOverflows() { m_overflow.clear(); }
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 LayoutRect visualOverflowRectForPropagation(const ComputedStyle&) const; 867 LayoutRect visualOverflowRectForPropagation(const ComputedStyle&) const;
865 LayoutRect logicalLayoutOverflowRectForPropagation(const ComputedStyle&) con st; 868 LayoutRect logicalLayoutOverflowRectForPropagation(const ComputedStyle&) con st;
866 LayoutRect layoutOverflowRectForPropagation(const ComputedStyle&) const; 869 LayoutRect layoutOverflowRectForPropagation(const ComputedStyle&) const;
867 870
868 bool hasOverflowModel() const { return m_overflow.get(); } 871 bool hasOverflowModel() const { return m_overflow.get(); }
869 bool hasSelfVisualOverflow() const { return m_overflow && !borderBoxRect().c ontains(m_overflow->selfVisualOverflowRect()); } 872 bool hasSelfVisualOverflow() const { return m_overflow && !borderBoxRect().c ontains(m_overflow->selfVisualOverflowRect()); }
870 bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().conta ins(visualOverflowRect()); } 873 bool hasVisualOverflow() const { return m_overflow && !borderBoxRect().conta ins(visualOverflowRect()); }
871 874
872 virtual bool needsPreferredWidthsRecalculation() const; 875 virtual bool needsPreferredWidthsRecalculation() const;
873 876
877 virtual IntSize originAdjustmentForScrollbars() const;
874 IntSize scrolledContentOffset() const; 878 IntSize scrolledContentOffset() const;
875 879
876 // Maps a rect in scrolling contents space to box space and apply overflow c lip if needed. 880 // Maps a rect in scrolling contents space to box space and apply overflow c lip if needed.
877 // Returns true if no clipping applied or the rect actually intersects the c lipping region. 881 // Returns true if no clipping applied or the rect actually intersects the c lipping region.
878 // If edgeInclusive is true, then this method may return true even 882 // If edgeInclusive is true, then this method may return true even
879 // if the resulting rect has zero area. 883 // if the resulting rect has zero area.
880 bool mapScrollingContentsRectToBoxSpace(LayoutRect&, ApplyOverflowClipFlag, VisualRectFlags = DefaultVisualRectFlags) const; 884 bool mapScrollingContentsRectToBoxSpace(LayoutRect&, ApplyOverflowClipFlag, VisualRectFlags = DefaultVisualRectFlags) const;
881 885
882 virtual bool hasRelativeLogicalWidth() const; 886 virtual bool hasRelativeLogicalWidth() const;
883 virtual bool hasRelativeLogicalHeight() const; 887 virtual bool hasRelativeLogicalHeight() const;
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 || breakValue == BreakLeft 1183 || breakValue == BreakLeft
1180 || breakValue == BreakPage 1184 || breakValue == BreakPage
1181 || breakValue == BreakRecto 1185 || breakValue == BreakRecto
1182 || breakValue == BreakRight 1186 || breakValue == BreakRight
1183 || breakValue == BreakVerso; 1187 || breakValue == BreakVerso;
1184 } 1188 }
1185 1189
1186 } // namespace blink 1190 } // namespace blink
1187 1191
1188 #endif // LayoutBox_h 1192 #endif // LayoutBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698