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

Inline split fixes#12699 #12760

Merged
merged 4 commits into from Aug 9, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -1644,7 +1644,7 @@ impl Fragment {
_ => return None,
};

let mut remaining_inline_size = max_inline_size;
let mut remaining_inline_size = max_inline_size - self.border_padding.inline_start_end();

This comment has been minimized.

@pcwalton

pcwalton Aug 8, 2016

Contributor

Disregard previous comment, I was very confused. Sorry about that.

let mut inline_start_range = Range::new(text_fragment_info.range.begin(), ByteIndex(0));
let mut inline_end_range = None;
let mut overflowing = false;
@@ -636,7 +636,23 @@ impl LineBreaker {
// Push the first fragment onto the line we're working on and start off the next line with
// the second fragment. If there's no second fragment, the next line will start off empty.
match (inline_start_fragment, inline_end_fragment) {
(Some(inline_start_fragment), Some(inline_end_fragment)) => {
(Some(mut inline_start_fragment), Some(mut inline_end_fragment)) => {
inline_start_fragment.border_padding.inline_end = Au(0);
if let Some(ref mut inline_context) = inline_start_fragment.inline_context {
for node in &mut inline_context.nodes {
node.flags.remove(LAST_FRAGMENT_OF_ELEMENT);
}
}
inline_start_fragment.border_box.size.inline += inline_start_fragment.border_padding.inline_start;

inline_end_fragment.border_padding.inline_start = Au(0);
if let Some(ref mut inline_context) = inline_end_fragment.inline_context {
for node in &mut inline_context.nodes {
node.flags.remove(FIRST_FRAGMENT_OF_ELEMENT);
}
}
inline_end_fragment.border_box.size.inline += inline_end_fragment.border_padding.inline_end;

self.push_fragment_to_line(layout_context,
inline_start_fragment,
LineFlushMode::Flush);

This file was deleted.

@@ -1,3 +1,4 @@
[c5509-ipadn-l-003.htm]
type: reftest
expected: FAIL
expected:
if os == "mac": FAIL

This file was deleted.

@@ -816,6 +816,18 @@
"url": "/_mozilla/css/border_collapse_simple_a.html"
}
],
"css/border_inline_split.html": [
{
"path": "css/border_inline_split.html",
"references": [
[
"/_mozilla/css/border_inline_split_ref.html",
"=="
]
],
"url": "/_mozilla/css/border_inline_split.html"
}
],
"css/border_radius_asymmetric_sizes_a.html": [
{
"path": "css/border_radius_asymmetric_sizes_a.html",
@@ -9958,6 +9970,18 @@
"url": "/_mozilla/css/border_collapse_simple_a.html"
}
],
"css/border_inline_split.html": [
{
"path": "css/border_inline_split.html",
"references": [
[
"/_mozilla/css/border_inline_split_ref.html",
"=="
]
],
"url": "/_mozilla/css/border_inline_split.html"
}
],
"css/border_radius_asymmetric_sizes_a.html": [
{
"path": "css/border_radius_asymmetric_sizes_a.html",
@@ -0,0 +1,20 @@
<!doctype html>
<html><head>
<link rel=match href=border_inline_split_ref.html>
<meta content="ahem dom" name="flags">
<style>
div {
font: 20px/1 Ahem;
width: 7em;
}
span {
border-left: yellow solid 0.5em;
border-right: yellow solid 0.5em;
}
</style>
</head>
<body>
<div>
<span>Very long |</span>
</div>
</body></html>
@@ -0,0 +1,14 @@
<!doctype html>
<html><head>
<meta content="ahem dom" name="flags">
<style>
span {
font: 20px/1 Ahem;
border-left: yellow solid 0.5em;
border-right: yellow solid 0.5em;
}
</style>
</head>
<body>
<span>Very <br>long |</span>
</body></html>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.