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

Fix writing-mode display fixup to check the right condition. #16123

Merged
merged 1 commit into from Mar 24, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Fix writing-mode display fixup to check the right condition.

It should be checking the value of the 'writing-mode' property, not the value of
the "writing mode" concept.  The latter is influenced by other properties like
'direction' and whatnot.  That was causing this code to convert inlines to
inline-blocks if they just had a different direction from their parent, which is
not correct
  • Loading branch information
bzbarsky committed Mar 24, 2017
commit 16252633bdfe2d3bdea1fbc32d58134aff030d3a
@@ -2178,7 +2178,9 @@ pub fn apply_declarations<'a, F, I>(device: &Device,
//
// www-style mail regarding above spec: https://lists.w3.org/Archives/Public/www-style/2017Mar/0045.html
// See https://github.com/servo/servo/issues/15754
if context.layout_parent_style.writing_mode != style.writing_mode &&
let our_writing_mode = style.get_inheritedbox().clone_writing_mode();
let parent_writing_mode = context.layout_parent_style.get_inheritedbox().clone_writing_mode();
if our_writing_mode != parent_writing_mode &&
style.get_box().clone_display() == display::inline {
style.mutate_box().set_display(display::inline_block);
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.