Skip to content

Use DOM width/height for canvas display list item. - #10727

Merged
bors-servo merged 1 commit into
servo:masterfrom
jdm:canvas_panic
Apr 22, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
jdm:canvas_panic

Conversation

@jdm

@jdm jdm commented Apr 19, 2016

Copy link
Copy Markdown
Member

Fixes #10705.

r? @glennw


This change is Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 19, 2016
@jdm

jdm commented Apr 19, 2016

Copy link
Copy Markdown
Member Author

It's possible that we should be using the computed width and height for the stretch_size, rather than the stacking-relative content box. What would be a good testcase for that?

@jdm

jdm commented Apr 20, 2016

Copy link
Copy Markdown
Member Author

Actually, this may be more @pcwalton's ballpark.

r? @pcwalton and see previous question.

@highfive highfive assigned pcwalton and unassigned glennw Apr 20, 2016
@Ms2ger

Ms2ger commented Apr 20, 2016

Copy link
Copy Markdown
Contributor

Reviewed 3 of 4 files at r1.
Review status: 3 of 4 files reviewed at latest revision, 9 unresolved discussions.


tests/wpt/mozilla/tests/css/canvas_scale.html, line 3 [r1] (raw file):
that…


tests/wpt/mozilla/tests/css/canvas_scale.html, line 13 [r1] (raw file):
Reftests should generally not have anything red if they pass.


tests/wpt/mozilla/tests/css/canvas_scale.html, line 13 [r1] (raw file):
I don't think the inline style on the div is necessary


tests/wpt/mozilla/tests/css/canvas_scale.html, line 14 [r1] (raw file):
Nit: put this line in a div too.


tests/wpt/mozilla/tests/css/canvas_scale.html, line 14 [r1] (raw file):
#00FF may not have been intended.


tests/wpt/mozilla/tests/css/canvas_scale.html, line 17 [r1] (raw file):
20x20 / 16x16


tests/wpt/mozilla/tests/css/canvas_scale.html, line 20 [r1] (raw file):
Rm


tests/wpt/mozilla/tests/css/canvas_scale_ref.html, line 12 [r1] (raw file):
Use div rather than br for consistency.


tests/wpt/mozilla/tests/css/canvas_scale_ref.html, line 13 [r1] (raw file):
Nit: use #RRGGBB to match the test


Comments from Reviewable

@Ms2ger

Ms2ger commented Apr 20, 2016

Copy link
Copy Markdown
Contributor

Oh, and the test should go upstream

@jdm

jdm commented Apr 20, 2016

Copy link
Copy Markdown
Member Author

The inline style on the div is necessary due to #10726.

@jdm

jdm commented Apr 20, 2016

Copy link
Copy Markdown
Member Author

I've addressed the review comments, but I haven't yet found an appropriate part of the specification that would map to where to add this test upstream. I've looked for every instance of output bitmap and intrinsic size in the <canvas> and 2d rendering context sections, as well as CSS' definition of paint source.

@Ms2ger

Ms2ger commented Apr 21, 2016

Copy link
Copy Markdown
Contributor

html/rendering/replaced-elements/embedded-content-rendering-rules/ would be fine

@jdm
jdm force-pushed the canvas_panic branch 2 times, most recently from 6dd355b to af439be Compare April 21, 2016 19:17
@pcwalton

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit af439be has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 21, 2016
@jdm

jdm commented Apr 21, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: p=1000

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit af439be with merge df0aa8f...

bors-servo pushed a commit that referenced this pull request Apr 21, 2016
Use DOM width/height for canvas display list item.

Fixes #10705.

r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10727)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 21, 2016
@jdm

jdm commented Apr 21, 2016

Copy link
Copy Markdown
Member Author
  ▶ CRASH [expected FAIL] /css-flexbox-1_dev/html/flexbox-basic-canvas-horiz-001.htm
  │ 
  │ thread 'PaintWorker' panicked at 'assertion failed: (data.len() as i32) >= stride * size.height', /Users/servo/.cargo/git/checkouts/rust-azure-97bcec2370a94878/master/src/azure_hl.rs:710
  │ stack backtrace:
  │    1:        0x107a1e218 - std::sys::backtrace::tracing::imp::write::h714760a4c8c0cdd8
  │    2:        0x107a244f5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hff309ab1d83ffd90
  │    3:        0x107a2410e - std::panicking::default_hook::h08ad3bb09872855b
  │    4:        0x10738bbbf - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::heda6930908f06acc
  │    5:        0x107a0bdf8 - std::sys_common::unwind::begin_unwind_inner::h406d5f1a330b854b
  │    6:        0x106c42c24 - std::sys_common::unwind::begin_unwind::h51df842978a11a26
  │    7:        0x10715d992 - azure::azure_hl::DrawTarget::create_source_surface_from_data::hff8d4d6dfe1b29ec
  │    8:        0x106e211c5 - gfx::paint_context::PaintContext::draw_image::ha2fe22b05b23a9c0
  │    9:        0x106e33502 - gfx::display_list::DisplayItem::draw_into_context::he113844733ffa618
  │   10:        0x106e33364 - gfx::display_list::DisplayList::draw_item_at_index_into_context::h67a2d41500a19eda
  │   11:        0x106e4a92b - gfx::paint_thread::WorkerThread::main::h9b9e5853d5716090
  │   12:        0x106e48850 - std::sys_common::unwind::try::try_fn::hccead59819239409
  │   13:        0x107a1d47b - __rust_try
  │   14:        0x107a1d403 - std::sys_common::unwind::inner_try::h4e97625a08807651
  │   15:        0x106e48e1b - _<F as alloc..boxed..FnBox<A>>::call_box::h37bba8686619f570
  │   16:        0x107a23578 - std::sys::thread::Thread::new::thread_start::h74af400293164137
  │   17:     0x7fff8face059 - _pthread_body
  │   18:     0x7fff8facdfd6 - _pthread_start
  │ Thread "PaintThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }" panicked with an unwrap of `RecvError` (backtrace skipped)
  └ Pipeline failed in hard-fail mode.  Crashing!

  ▶ CRASH [expected FAIL] /css-flexbox-1_dev/html/flexbox-basic-canvas-vert-001.htm
  │ 
  │ thread 'PaintWorker' panicked at 'assertion failed: (data.len() as i32) >= stride * size.height', /Users/servo/.cargo/git/checkouts/rust-azure-97bcec2370a94878/master/src/azure_hl.rs:710
  │ stack backtrace:
  │    1:        0x10d914218 - std::sys::backtrace::tracing::imp::write::h714760a4c8c0cdd8
  │    2:        0x10d91a4f5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hff309ab1d83ffd90
  │    3:        0x10d91a10e - std::panicking::default_hook::h08ad3bb09872855b
  │    4:        0x10d281bbf - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::heda6930908f06acc
  │    5:        0x10d901df8 - std::sys_common::unwind::begin_unwind_inner::h406d5f1a330b854b
  │    6:        0x10cb38c24 - std::sys_common::unwind::begin_unwind::h51df842978a11a26
  │    7:        0x10d053992 - azure::azure_hl::DrawTarget::create_source_surface_from_data::hff8d4d6dfe1b29ec
  │    8:        0x10cd171c5 - gfx::paint_context::PaintContext::draw_image::ha2fe22b05b23a9c0
  │    9:        0x10cd29502 - gfx::display_list::DisplayItem::draw_into_context::he113844733ffa618
  │   10:        0x10cd29364 - gfx::display_list::DisplayList::draw_item_at_index_into_context::h67a2d41500a19eda
  │   11:        0x10cd4092b - gfx::paint_thread::WorkerThread::main::h9b9e5853d5716090
  │   12:        0x10cd3e850 - std::sys_common::unwind::try::try_fn::hccead59819239409
  │   13:        0x10d91347b - __rust_try
  │   14:        0x10d913403 - std::sys_common::unwind::inner_try::h4e97625a08807651
  │   15:        0x10cd3ee1b - _<F as alloc..boxed..FnBox<A>>::call_box::h37bba8686619f570
  │   16:        0x10d919578 - std::sys::thread::Thread::new::thread_start::h74af400293164137
  │   17:     0x7fff8face059 - _pthread_body
  │   18:     0x7fff8facdfd6 - _pthread_start
  │ Thread "PaintThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }" panicked with an unwrap of `RecvError` (backtrace skipped)
  └ Pipeline failed in hard-fail mode.  Crashing!

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 22, 2016
@jdm

jdm commented Apr 22, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: r=pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c5c1fbf has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 22, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c5c1fbf with merge ad8df0f...

bors-servo pushed a commit that referenced this pull request Apr 22, 2016
Use DOM width/height for canvas display list item.

Fixes #10705.

r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10727)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 22, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 22, 2016
@jdm

jdm commented Apr 22, 2016

Copy link
Copy Markdown
Member Author

@bors-servo: r=pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 1623114 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 22, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 1623114 with merge 0e0e902...

bors-servo pushed a commit that referenced this pull request Apr 22, 2016
Use DOM width/height for canvas display list item.

Fixes #10705.

r? @glennw

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10727)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants