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

Floated menu doesn't appear #20445

Open
jdm opened this issue Mar 27, 2018 · 6 comments
Open

Floated menu doesn't appear #20445

jdm opened this issue Mar 27, 2018 · 6 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Mar 27, 2018

The menu on the left side of the page at https://hanoverlibrary.ca/fees/ doesn't appear in Servo.

@nicoabie
Copy link

@nicoabie nicoabie commented Jul 26, 2020

Now it does not render at all

ngallinal@ITs-Mac-mini-2 servo % ./mach run https://hanoverlibrary.ca/fees/
called `Option::unwrap()` on a `None` value (thread CanvasThread, at /Users/ngallinal/.cargo/registry/src/github.com-1ecc6299db9ec823/raqote-0.8.0/src/draw_target.rs:753)
   0: <servo::backtrace::Print as core::fmt::Debug>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: servo::backtrace::print
   4: servo::main::{{closure}}
   5: std::panicking::rust_panic_with_hook
   6: _rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::panicking::panic
   9: raqote::draw_target::DrawTarget::draw_text
  10: canvas::raqote_backend::<impl canvas::canvas_data::GenericDrawTarget for raqote::draw_target::DrawTarget>::fill_text
  11: canvas::canvas_data::CanvasData::fill_text
  12: canvas::canvas_paint_thread::CanvasPaintThread::process_canvas_2d_message
  13: std::sys_common::backtrace::__rust_begin_short_backtrace
  14: core::ops::function::FnOnce::call_once{{vtable.shim}}
  15: std::sys::unix::thread::Thread::new::thread_start
  16: __pthread_start
[2020-07-26T18:37:00Z ERROR servo] called `Option::unwrap()` on a `None` value

macOS 10.15.6 built with b83433f

@atouchet
Copy link
Contributor

@atouchet atouchet commented Jul 27, 2020

I am able to get the page to render in the latest nightly build but the menu on the left side does not appear.

Screenshot

@nicoabie
Copy link

@nicoabie nicoabie commented Jul 27, 2020

On macOS latest nightly build displays an empty white page.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 27, 2020

The panic happens when we try to draw a glyph to the canvas that isn't present in the selected font: https://github.com/jrmuizel/raqote/blob/490bff22610a130ad75eb797b6bd6e3e361bbde5/src/draw_target.rs#L755

@jdm
Copy link
Member Author

@jdm jdm commented Jul 27, 2020

@nicoabie
Copy link

@nicoabie nicoabie commented Jul 27, 2020

Excellent finding, it is very interesting that it only fails on macOS

bors-servo added a commit that referenced this issue Aug 7, 2020
Canvas text and macOS font fixes

These changes work around a source of panics by skipping glyphs that don't exist when drawing text to the canvas. Ideally we would have font fallback and/or tofu characters, but that's a larger project than I wanted to get into right now.

Relatedly, while investigating the non-panic errors observed in #27476, I realized that the underlying source of #24622 could be dealt with because we shouldn't actually need to open the CTFont by a file path to get the bytes, since we already have bytes available that we use to create the CTFont.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24622 and fix #27476 and fix the panic observed in #20445.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Aug 7, 2020
Canvas text and macOS font fixes

These changes work around a source of panics by skipping glyphs that don't exist when drawing text to the canvas. Ideally we would have font fallback and/or tofu characters, but that's a larger project than I wanted to get into right now.

Relatedly, while investigating the non-panic errors observed in #27476, I realized that the underlying source of #24622 could be dealt with because we shouldn't actually need to open the CTFont by a file path to get the bytes, since we already have bytes available that we use to create the CTFont.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24622 and fix #27476 and fix the panic observed in #20445.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Aug 7, 2020
Canvas text and macOS font fixes

These changes work around a source of panics by skipping glyphs that don't exist when drawing text to the canvas. Ideally we would have font fallback and/or tofu characters, but that's a larger project than I wanted to get into right now.

Relatedly, while investigating the non-panic errors observed in #27476, I realized that the underlying source of #24622 could be dealt with because we shouldn't actually need to open the CTFont by a file path to get the bytes, since we already have bytes available that we use to create the CTFont.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24622 and fix #27476 and fix the panic observed in #20445.
- [x] There are tests for these changes
bors-servo added a commit that referenced this issue Aug 10, 2020
Canvas text and macOS font fixes

These changes work around a source of panics by skipping glyphs that don't exist when drawing text to the canvas. Ideally we would have font fallback and/or tofu characters, but that's a larger project than I wanted to get into right now.

Relatedly, while investigating the non-panic errors observed in #27476, I realized that the underlying source of #24622 could be dealt with because we shouldn't actually need to open the CTFont by a file path to get the bytes, since we already have bytes available that we use to create the CTFont.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24622 and fix #27476 and fix the panic observed in #20445.
- [x] There are tests for these changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.