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

Unified Diff: Source/core/rendering/style/RenderStyle.h

Issue 157553002: Remove the Pagination struct, clean up viewport scroll policy propagation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.h
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index 9e42ffe6d9fd9c5be04be13b361c8333e6ba0b1f..75f8a3e28e9392eb9ca25b18bd1bac69e907bf6b 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -538,6 +538,7 @@ public:
EOverflow overflowY() const { return static_cast<EOverflow>(noninherited_flags._overflowY); }
// It's sufficient to just check one direction, since it's illegal to have visible on only one overflow value.
bool isOverflowVisible() const { ASSERT(overflowX() != OVISIBLE || overflowX() == overflowY()); return overflowX() == OVISIBLE; }
+ bool isOverflowPaged() const { return overflowY() == OPAGEDX || overflowY() == OPAGEDY; }
EVisibility visibility() const { return static_cast<EVisibility>(inherited_flags._visibility); }
EVerticalAlign verticalAlign() const { return static_cast<EVerticalAlign>(noninherited_flags._vertical_align); }
@@ -829,6 +830,15 @@ public:
ColumnAxis axis = columnAxis();
return axis == AutoColumnAxis || isHorizontalWritingMode() == (axis == HorizontalColumnAxis);
}
+ bool hasInlinePaginationAxis() const
+ {
+ // If the pagination axis is parallel with the writing mode inline axis, columns may be laid
+ // out along the inline axis, just like for regular multicol. Otherwise, we need to lay out
+ // along the block axis.
+ if (isOverflowPaged())
+ return (overflowY() == OPAGEDX) == isHorizontalWritingMode();
+ return false;
+ }
ColumnProgression columnProgression() const { return static_cast<ColumnProgression>(rareNonInheritedData->m_multiCol->m_progression); }
float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width; }
bool hasAutoColumnWidth() const { return rareNonInheritedData->m_multiCol->m_autoWidth; }
« no previous file with comments | « Source/core/rendering/RenderView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698