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

Issue 769206 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Compat


Participants' hotlists:
Hotlist-1


Sign in to add a comment

Page is being rendered without complete css

Reported by talta...@gmail.com, Sep 27 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Example URL:
https://www.sapfioritrial.com/sites?helpset=trial&sap-client=001

Steps to reproduce the problem:
1. In this site (and other similar SAP FLP sites) css is being fetched using link tag in the html head section.
2. Then other scripts are loaded, and dom elements are created.
3. At first few seconds some parts of the page (header and texts) that have css classes (that exists in the library.css loaded at first) are rendered without the css... its like the page is rendered without complete css parsing.

If i replace (using fiddler) the loading of css from link to @import, it seems ok.

What is the expected behavior?
elements should be rendered with full css parsing.

What went wrong?
Page is rendered without full css parsing of loaded css classed.

Does it occur on multiple sites: N/A

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version:
 
screenshot.PNG
179 KB View Download
Cc: krajshree@chromium.org
Components: Platform>DevTools
Labels: Needs-Feedback Needs-Triage-M61
Unable to reproduce the issue on Win-10 using chrome reported version #61.0.3163.100 and latest canary #63.0.3225.0.

Attached a screen cast for reference.

Following are the steps followed to reproduce the issue.
------------
1. Navigated to URL: https://www.sapfioritrial.com/sites?helpset=trial&sap-client=001
2. Opened dev tools->Network and clicked CSS.
3. Observed that the elements in that page rendered with full css parsing.

taltal78@ - Could you please verify the screen cast and please let us know if anything missed from our side. Also if possible please provide a screen cast for better understanding of issue.

Thanks...!!
769206.webm
8.7 MB View Download

Comment 2 by talta...@gmail.com, Sep 28 2017

Hi Krajshree,
See attached cast.
I put a js breakpoint to show the issue. and you can see when I inspect an element that has css class (that was already loaded at beginning) on the right side of dev inspector you can see that this class isnt linked to no where, and not found.
Thanks,
Tal
Sep-28-2017-11-03-AM.mp4
6.0 MB View Download
Project Member

Comment 3 by sheriffbot@chromium.org, Sep 28 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by woxxom@gmail.com, Sep 28 2017

Bisect info: 470489 (good) - 470495 (bad)
https://chromium.googlesource.com/chromium/src/+log/5730d628..27217b88?pretty=fuller
Suspecting r470490 "Add Field Trial Testing Configuration for MojoLoading"
Landed in 60.0.3096.0

Confirmed by disabling chrome://flags/#enable-mojo-loading and observing the behavior becoming the same as in "good" builds.
It should be noted that even in "good" builds there's a bit of unstyled content shown (FOUC), see the attached pictures.
Firefox correctly shows only the styled page, no unstyled elements appear while loading the page.
good.jpg
6.8 KB View Download
bad.jpg
43.0 KB View Download

Comment 5 by woxxom@gmail.com, Sep 28 2017

krajshree@chromium.org, the bug is about the first seconds during loading of the page.
If you compare to Firefox, you will easily see the difference.
Cc: yhirano@chromium.org tzik@chromium.org
Components: -Platform>DevTools Blink>Loader
Labels: Needs-Feedback
> If i replace (using fiddler) the loading of css from link to @import, it seems ok.

Can you explain this a bit?

Owner: yhirano@chromium.org
Status: Assigned (was: Unconfirmed)
yhirano,

If instead of <link href...> to load the css , i use the @import, i dont see the problem:
   <style>
        @import url("link_to_css.css");
    </style>

I guess "link_to_css.css" is not the exact URL, right? Can you provide the exact URL(s)?

Comment 12 by talta...@gmail.com, Oct 18 2017

@yhirano,
It doesnt really matter...
Whatever URL which was on the link href, i replaced with @import url
so in case of demo site above, its:
https://www.sapfioritrial.com/sap/ui5/1/stable/resources/sap/fiori/themes/sap_bluecrystal/library.css?version=1.28.47&sap-ui-dist-version=1.28.47
With mojo-loading, .../friori/.../library.css?version=1.28.47... is loaded twice. Without mojo-loading, it's loaded once.
trace_sap-without-mojo-loading.json.gz
3.2 MB Download
trace_sap-with-mojo-loading.json.gz
3.0 MB Download
Probably we should look into library.css?version=1.28.43 instead of 1.28.47.
I think I understand (at least part of) the problem.

The style applied to the dialog is contained in library.css?version=1.28.43. It takes long time to load and the renderer main thread is very busy during the loading (largely due to sync XHR requests). When the CSS file is loaded, with mojo-loading, there is a slight delay of completion event. The script which injects the dialog element ("#eulaDialogContent") starts running (via setTimeout) just before the completion event, and stays running for seconds. That is why we see the dialog without the style applied for seconds.

I suspect that the site relies on subtle timing which is not specified. taltal78@, I'm not sure if you can access the site's code, but if you can, can you insert the dialog element after receiving the onload event of the link element?
For this specific site I have no access.. but I assume you can try it out with fiddler for instance ?
Labels: -Needs-Feedback
According to devtools library.css?version=1.28.43 is requested by core-min-0.js. It seems LoadingWithMojo changes loading timing slightly and that broke site author's assumption. I'm not sure whether the assumption is valid is not - in general a UA can change loading timings as long as conforming to the spec.

The site is too large to investigate further. I will leave this issue as assigned for a while, but will it close as WONTFIX unless a smaller reproduction is provided.
Status: WontFix (was: Assigned)

Comment 20 by talta...@gmail.com, Nov 17 2017

Doesn't occur on any other browser...

Comment 21 by talta...@gmail.com, Nov 28 2017

Hi,
This occurs in chrome only.

You can see here a lightweight example -
http://jsbin.com/wonudujevo/4/edit?html,output

The FOUC is not always visible – only some refreshes show the FOUC (best when debugger is open).

Please check this... its a bug.
thanks,
Tal

Status: Assigned (was: WontFix)
Thank you for the test case, I will take another look.
I can see the "Hello" button style unapplied with Chrome and Firefox.

Comment 24 by talta...@gmail.com, Nov 28 2017

I attach 2 screenshots: withStyle.png ,withoutStyle.png.
Also i attach video of loading.
You can see in second 2 its without style, and in second 3 it gets the style.

withoutStyle.PNG
8.6 KB View Download
withStyle.PNG
6.9 KB View Download
repro.mp4
162 KB View Download
Yeah, and I see the same behavior on Firefox either.

Comment 26 by talta...@gmail.com, Nov 29 2017

In anycase It's a bug.
I tested 2 machines and couldn't see it in IE or Firefox. 

Comment 27 by woxxom@gmail.com, Nov 29 2017

Using http://jsbin.com/wonudujevo/4/edit?html,output from #c21,
Bisect info: 370644 (good) - 370649 (bad)
https://chromium.googlesource.com/chromium/src/+log/9b798d93..e78a0765?pretty=fuller
Suspecting r370646 = bec656722788dbc2f74e15c29d52dfef47089f3d = https://crrev.com/1603873004 by horo@chromium.org
"Dynamically inserted StyleSheet shouldn't block loading."
Landed in 50.0.2628.0

StR:
1. remove the cache i.e. run bisect-builds.py without -p option
2. open http://jsbin.com/wonudujevo/4/edit?html,output
3. repeat 1-2 up to 10 times (retry in the bisect script)
Expected: the button is always styled
Observed: sometimes/often the button is unstyled

P.S. Re-checked the results 4 times.
taltal78@, the two CSS URLs in the jsbin are different. One is .../sap_belize/... and another is .../sap_belize_plus/... . Can you tell me why?
Labels: Needs-Feedback
Status: WontFix (was: Assigned)

Sign in to add a comment