Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert layout code to use logical directions #2797

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix some comments to make more sense with Writing Modes.

  • Loading branch information
SimonSapin committed Jul 18, 2014
commit af17cf34e5910fefe63c9ea91cb8c425086aba43
@@ -278,9 +278,10 @@ impl BSizeConstraintSolution {
}
}

/// Performs bsize calculations potentially multiple times, taking `bsize`, `min-bsize`, and
/// `max-bsize` into account. After each call to `next()`, the caller must call `.try()` with the
/// current calculated value of `bsize`.
/// Performs bsize calculations potentially multiple times, taking
/// (assuming an horizontal writing mode) `height`, `min-height`, and `max-height`
/// into account. After each call to `next()`, the caller must call `.try()` with the
/// current calculated value of `height`.
///
/// See CSS 2.1 § 10.7.
struct CandidateBSizeIterator {
@@ -297,9 +298,11 @@ impl CandidateBSizeIterator {
/// absolutely-positioned containing blocks.
pub fn new(style: &ComputedValues, block_container_bsize: Option<Au>)
-> CandidateBSizeIterator {
// Per CSS 2.1 § 10.7, percentages in `min-bsize` and `max-bsize` refer to the bsize of
// the containing block. If that is not determined yet by the time we need to resolve
// `min-bsize` and `max-bsize`, percentage values are ignored.
// Per CSS 2.1 § 10.7, (assuming an horizontal writing mode,)
// percentages in `min-height` and `max-height` refer to the height of
// the containing block.
// If that is not determined yet by the time we need to resolve
// `min-height` and `max-height`, percentage values are ignored.

let bsize = match (style.content_bsize(), block_container_bsize) {
(LPA_Percentage(percent), Some(block_container_bsize)) => {
@@ -180,7 +180,8 @@ impl Flow for TableRowGroupFlow {

// The position was set to the containing block by the flow's parent.
let containing_block_isize = self.block_flow.base.position.size.isize;
// FIXME: In case of border-collapse: collapse, istart_content_edge should be border-istart
// FIXME: In case of border-collapse: collapse, istart_content_edge should be
// the border width on the inline-start side.
let istart_content_edge = Au::new(0);
let content_isize = containing_block_isize;

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.