PrestoXen / openopera-issues

Issue tracker for OpenOpera
26 stars 0 forks source link

fix display:none - as in old Opera #14

Closed WonderRat closed 7 years ago

WonderRat commented 7 years ago

Old Opera was don't load content (not load-and-hide it) with "display:none" style - that was used for CSS content blocker.

<html>
<body>

<style> .hide { display:none } </style>

<img src="must_be_not_loaded1.jpg" style="display:none">
<img src="must_be_not_loaded2.jpg" class="hide">

<img src="loaded_by_script1.jpg" id="pic1" style="display:none">
<img src="loaded_by_script2.jpg" id="pic2" class="hide">

<script>
document.querySelector('#pic1').style.display='block';
document.querySelector('#pic2').className='somethingelse';
</script>

</body>
</html>
fat32 commented 7 years ago

I think it should be optional, even better per-site. But content blocker should definitely use old-style display:none behaviour.

Zero3K commented 7 years ago

"btw, issue #14 can be fixed with TWEAK_LOGDOC_LOAD_IMAGES_FROM_PARSER NO" is what arisu on opennet.ru's post regarding Opera 12.15's source code wrote regarding this issue.

Zero3K commented 7 years ago

Here's a link to a Pastebin that contains the patch that fixes this issue:

http://pastebin.com/cb8rKKRp

Zero3K commented 7 years ago

It has been fixed thanks to "Phony Welder" whom is on the forums for it.