New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 663288 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

x3dom fails to render on nbviewer.jupyter.org

Reported by marti...@simula.no, Nov 8 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/53.0.2785.143 Chrome/53.0.2785.143 Safari/537.36

Example URL:
http://nbviewer.jupyter.org/github/garth-wells/fenics-x3dom/blob/master/DOLFIN_X3DOM.ipynb

Steps to reproduce the problem:
1. Open provided url and observe no x3dom 3d models visible.
2. Inspect page and note that x3d tag has size 2x2, even though larger width and height are specified in the document.

What is the expected behavior?
Display x3dom 3d models next to the red text lines "Out[3]" and "Out[4]".

Open in firefox to see.

What went wrong?
It may seem that CSS computations set the wrong size of the x3d element (in this case).

Alternatively see other possibly related examples without x3dom on jupyter notebook issue 
https://github.com/jupyter/notebook/issues/429

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 53.0.2785.143  Channel: stable
OS Version: Ubuntu 16.04
Flash Version:
 
Cc: nyquist@chromium.org

Comment 2 by rtoy@chromium.org, Nov 8 2016

Components: -Blink Blink>CSS
Components: -Blink>CSS Blink>Layout
The dimensions of the Out[3] and Out[4] x3dom elements appear to be decided by flexbox rather than CSS
Cc: kkaluri@chromium.org
Status: Untriaged (was: Unconfirmed)
Able to reproduce this issue on windows 10,Ubuntu 14.04 and Mac 10.11.6 using chrome stable M53-53.0.2785.143 
and earlier version of chrome M30-30.0.1549.0. This is a non-regression issue and marking it as untriaged.

Please look into the attached screencast and screenshot.

Thank You...
Capture-FF.PNG
101 KB View Download
Issue-663288.mp4
2.7 MB View Download

Comment 5 by skobes@chromium.org, Nov 13 2016

Status: Available (was: Untriaged)
Summary: x3dom fails to render on nbviewer.jupyter.org (was: CSS computation bug causes collapsing cells in display of jupyter notebook)
The <x3d> element has no rendered content and no CSS width or height specified.  It has DOM attributes named "width" and "height" but CSS does not care about those.

On Firefox a <canvas> element is generated inside the <x3d> element, which renders the 3D model, but on Chrome no <canvas> element is created.  This suggests the problem is in the x3dom Javascript.

The following error appears in the console and may be related:

Uncaught RangeError: Maximum call stack size exceeded
  document.getElementsByTagName @ x3dom.js:964
  document.getElementsByTagName @ x3dom.js:964
  ...

Comment 6 by skobes@chromium.org, Nov 29 2016

Status: WontFix (was: Available)
The problem on http://nbviewer.jupyter.org/github/garth-wells/fenics-x3dom/blob/master/DOLFIN_X3DOM.ipynb is caused by including x3dom.js twice on the same page.

Including x3dom.js twice causes infinite recursion due to the way it hooks getElementsByTagName:

// inside x3dom.js
document.__getElementsByTagName = document.getElementsByTagName;
document.getElementsByTagName = function(tag) {
  // ... (calls __getElementsByTagName) ...
};

When the second <script> tag referecing x3dom.js is removed, the script successfully renders the <x3d> elements.

The HTML import issue described in https://github.com/jupyter/notebook/issues/429 is unrelated, and the report is over a year old.  If it still repros and you'd like us to look at it, please file a new bug with a URL that demonstrates the issue.

Comment 7 by marti...@simula.no, Nov 30 2016

Thanks for looking into it. For the record I've updated the issue trackers for jupyter notebook and dolfin and registered an issue with x3dom.

Sign in to add a comment