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

Incremental layout: Don't try to repair text fragment styles #7821

Merged
merged 1 commit into from Oct 2, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Incremental layout: Don't try to repair text fragment styles

Fixes #7814.
  • Loading branch information
mbrubeck committed Oct 1, 2015
commit 6426f714bd869aeae1bda8e30575a0ad747f2bca
@@ -1375,11 +1375,17 @@ impl<'a> FlowConstructor<'a> {
// FIXME(pcwalton): Fragment restyle damage too?
flow_ref.repair_style_and_bubble_inline_sizes(&style);
}
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::ScannedText(_) => {
// Text fragments in ConstructionResult haven't been scanned yet
unreachable!()
}
SpecificFragmentInfo::GeneratedContent(_) |
SpecificFragmentInfo::UnscannedText(_) => {
properties::modify_style_for_text(&mut style);
properties::modify_style_for_replaced_content(&mut style);
fragment.repair_style(&style);
// We can't repair this unscanned text; we need to update the
// scanned text fragments.
//
// TODO: Add code to find and repair the ScannedText fragments?
return false
}
_ => {
if node.is_replaced_content() {
@@ -165,6 +165,7 @@ prefs:"layout.writing-mode.enabled" == iframe/size_attributes_vertical_writing_m
== incremental_float_a.html incremental_float_ref.html
== incremental_inline_layout_a.html incremental_inline_layout_ref.html
== incremental_letter_spacing_a.html incremental_letter_spacing_ref.html
== incremental_text_color_a.html incremental_text_color_ref.html
== inline_absolute_hypothetical_clip_a.html inline_absolute_hypothetical_clip_ref.html
== inline_absolute_out_of_flow_a.html inline_absolute_out_of_flow_ref.html
!= inline_background_a.html inline_background_ref.html
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Incremental layout text color test</title>
<style>
span {
color: orange;
}
span.selected {
color: green;
}
</style>
</head>
<body>
<span>A</span>
<script>
document.body.offsetWidth; // force layout
document.querySelector('span').classList.add('selected');
</script>
</body>
</html>
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Incremental layout text color reference</title>
<style>
span {
color: green;
}
</style>
</head>
<body>
<span>A</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.