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

Try to fix incremental_trailing_whitespace_a.html #14285

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

Always

Just for now

@@ -1418,11 +1418,15 @@ impl<Window: WindowMethods> IOCompositor<Window> {
};

if wait_for_stable_image {
// If there are animations active, tick those and continue waiting
// for all animations to complete before bothering the
// constellation.
if self.animations_active() {
self.process_animations();
return Err(UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::AnimationsActive));
}
match self.is_ready_to_paint_image_output() {
Ok(()) => {
// The current image is ready to output. However, if there are animations active,
// tick those instead and continue waiting for the image output to be stable AND
// all active animations to complete.
if self.animations_active() {
self.process_animations();
return Err(UnableToComposite::NotReadyToPaintImage(NotReadyToPaint::AnimationsActive));
@@ -75,6 +75,7 @@ enum ReadyToSave {
PendingFrames,
WebFontNotLoaded,
DocumentLoading,
UnknownState,
EpochMismatch,
PipelineUnknown,
Ready,
@@ -2183,9 +2184,10 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
// See if this pipeline has reached idle script state yet.
match self.document_states.get(&frame.current.pipeline_id) {
Some(&DocumentState::Idle) => {}
Some(&DocumentState::Pending) | None => {
Some(&DocumentState::Pending) => {
return ReadyToSave::DocumentLoading;
}
None => return ReadyToSave::UnknownState,
}

// Check the visible rectangle for this pipeline. If the constellation has received a
@@ -6,7 +6,8 @@
callback = arguments[arguments.length - 1];

function check_done() {
if (!document.body.classList.contains('reftest-wait')) {
if (!document.body.classList.contains('reftest-wait') &&
!document.documentElement.classList.contains('reftest-wait')) {
callback();
} else {
setTimeout(check_done, 50);
@@ -1,9 +1,10 @@
<!doctype html>
<html>
<html class="reftest-wait">
<head>
<meta charset="utf-8">
<title>incremental trailing whitespace test</title>
<link rel="match" href="incremental_trailing_whitespace_ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
#a {
border: 0 solid;
@@ -20,8 +21,14 @@
</div>
<script>
document.body.offsetWidth; // force layout
document.querySelector('#a').classList.add('go');
// FIXME (#10245): Wait for the "transitionend" event.
var div = document.getElementById('a');
div.addEventListener('transitionend', function() {
// FIXME(emilio, #13865): requestAnimationFrame shouldn't be needed.
requestAnimationFrame(function() {
document.documentElement.classList.remove('reftest-wait');
});
});
div.classList.add('go');
</script>
</body>
</html>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.