<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Altryne's Blog &#187; Problems and Fixes</title> <atom:link href="http://alexw.me/categories/problems-and-fixes/feed/" rel="self" type="application/rss+xml" /><link>http://alexw.me</link> <description>Not everyday I get to learn "nothing"</description> <lastBuildDate>Thu, 08 Mar 2012 10:29:33 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>IE9 is better then firefox and chrome</title><link>http://alexw.me/2011/02/ie9-is-better-then-firefox-and-chrome/</link> <comments>http://alexw.me/2011/02/ie9-is-better-then-firefox-and-chrome/#comments</comments> <pubDate>Sat, 26 Feb 2011 21:07:24 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Problems and Fixes]]></category> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[browser comparison]]></category> <category><![CDATA[IE9]]></category> <category><![CDATA[microsoft]]></category> <guid
isPermaLink="false">http://alexw.me/?p=290</guid> <description><![CDATA[To some of you who follow my blog, the title of this post may sound familiar. 2 years ago I posted with a similar title, only it was about ie8. Microsoft PR dpt. has done it again. They&#8217;ve released a comparison chart, between their brand new IE9, and other browsers such as firefox and chrome. [...]]]></description> <content:encoded><![CDATA[<p>To some of you who follow my blog, the title of this post may sound familiar. 2 years ago I posted with a similar title, only it <a
href="http://alexw.me/2009/06/ie8-is-better-that-firefox-and-chrome-together/">was about ie8</a>.</p><p>Microsoft PR dpt. has done it again. They&#8217;ve released a comparison chart, between their brand new IE9, and other browsers such as firefox and chrome.</p><p>And for one think it has to stop. Their comparison is full will half-truths and whole lies, and coming from a company that made web-developers suffer and scream in rage, it&#8217;s absurd.</p><p>IE9 is a better browser then all other IEs. It&#8217;s faster, more standard driven and all in all a decent browser. BUT (and it&#8217;s a big but) it&#8217;s not a <a
href="http://people.mozilla.com/~prouget/ie9/">modern browser</a> and it&#8217;s not by far, better then Firefox or Chrome.</p><p>This recent post made me create this :</p><p><a
href="http://bit.ly/e7KmId"><span
style="font-size: x-large;">The truth behind IE9 comparison chart</span></a></p><p>Yes it may sound whiny to some, but there&#8217;s no denial that somebody at Microsoft has failed to check all the fact before posting this.</p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2011/02/ie9-is-better-then-firefox-and-chrome/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>All you knew about javascript animation is wrong</title><link>http://alexw.me/2010/12/firefox-problems-with-javascript-animation/</link> <comments>http://alexw.me/2010/12/firefox-problems-with-javascript-animation/#comments</comments> <pubDate>Sun, 05 Dec 2010 22:02:39 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Personal]]></category> <category><![CDATA[Problems and Fixes]]></category> <category><![CDATA[animation]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[optimization]]></category> <category><![CDATA[repaint]]></category> <guid
isPermaLink="false">http://alexw.me/?p=242</guid> <description><![CDATA[Ok, atleast all I knew. And it&#8217;s in firefox, IE8 and Opera. But still&#8230; bare with me : A little history about browser rendering. The are 3 browser events that happen depending on stuff you change dynamically with JS in DOM. restyle &#8211; recalculation of style for affected DOM element. reflow &#8211; recalculation of flow [...]]]></description> <content:encoded><![CDATA[<p>Ok, atleast all I knew. And it&#8217;s in firefox, IE8 and Opera. But still&#8230; bare with me :</p><p>A little history about browser rendering. The are 3 browser events that happen depending on stuff you change dynamically with JS in DOM.</p><ol><li><strong>restyle</strong> &#8211; recalculation of style for affected DOM element.</li><li><strong>reflow</strong> &#8211; recalculation of flow and all the Elements that are affected by your change.</li><li><strong>repaint</strong> /<strong>redraw </strong>- re-rendering of the element in it&#8217;s new position, style, whatever you changed.</li></ol><p>These &#8220;events&#8221; happend each time you change something. I&#8217;m going to talk about <strong>repaint</strong>/<strong>redraw</strong> today.</p><p>When you animate a div for instance, each step in the animation, each frame if you will, fires a <strong>repaint</strong> function in the browser, that makes sense,  as the browser has to show us the updated position/style/whatever of the element.</p><p>You would suspect that a browser only <strong>repaints</strong> the individual animated element, and maybe its surrounding and dependent elements. And you would be right.</p><p>So why does some of your animation on the more heavy sites stugger in firefox and IE and Opera when they work like a charm in webkit browsers? Faster browser? Faster Rendering Engine?</p><p>All these are a factor, but there&#8217;s a <strong>hidden factor</strong> that you didn&#8217;t know about.</p><pre class="brush: css">
float:left;
</pre><p>&#8220;OMG? WTF? float? what&#8217;s float has to do with animation ??? Alex stop beating around and explain this to me&#8221; you must be saying.</p><p>It turns out that whenever you animate a div on a page, even if it&#8217;s position:relative, that if one of it&#8217;s ancestors has a floating (left or right), firefox/opera/ie8 fire a <strong>repaint</strong> function on <strong>ALL THE ANCESTORS</strong> content. Not Only the animated div.</p><p>So if for instance you have a tiny div that animates every 2 seconds, for every frame of that animation, firefox/opera/ie8 <strong>repaint</strong> the entire DOM tree up until the floated ancestor.</p><p>I don&#8217;t know wheather it&#8217;s a bug, or this is just how it&#8217;s suppose to be. But facts are facts.</p><p>I&#8217;ve created a small jsfiddle in order to test this.</p><p><a
href="http://fiddle.jshell.net/JeGKR/10/show/light/">http://fiddle.jshell.net/JeGKR/10/show/light/</a></p><p>The css3 stuff is there only to make the content heavy so you really notice the animation changes.</p><p>Run the animation with task manger open. Then click &#8220;add float:left&#8221; and see the difference. If you have a fast computer, click on &#8220;add content&#8221; a couple of times.</p><p><strong>Workarounds </strong>:</p><p>There&#8217;s one workaround I&#8217;ve read about and it&#8217;s just disabling float:left on the ancestors up until the body Element. This won&#8217;t be applicable in many many cases I&#8217;m afraid.</p><p>I&#8217;ve yet to find another solution beside putting all the animated elements in a non floated container and positioning them accordingly.</p><p>Notes : if you want to see the redraw regions in firefox by yourself, you can download and install  <a
href="https://addons.mozilla.org/en-US/firefox/addon/9620/">firebug paint events</a></p><p>Credits : This post is a partial translation/adoption from <a
href="http://chikuyonok.ru/2010/11/optimization-story">Sergey Chikuyonok</a> &#8211; all credits on this find go to him.</p><div
id="_mcePaste" style="position: absolute; left: -10000px; top: 307px; width: 1px; height: 1px; overflow: hidden;">https://addons.mozilla.org/en-US/firefox/addon/9620/Fire</div> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2010/12/firefox-problems-with-javascript-animation/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Fade in/out effect makes text Garbled. /strange</title><link>http://alexw.me/2009/02/fade-inout-effect-makes-text-garbled-strange/</link> <comments>http://alexw.me/2009/02/fade-inout-effect-makes-text-garbled-strange/#comments</comments> <pubDate>Thu, 12 Feb 2009 22:22:03 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Problems and Fixes]]></category> <category><![CDATA[Css]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[Mootools]]></category> <category><![CDATA[xHtml]]></category> <guid
isPermaLink="false">http://alexw.me/?p=13</guid> <description><![CDATA[<h1>Prologue :</h1> Ok so i'm working on this site at work, and our creative designers decided it should have a news ticker in Javascipt. A fade-in/out kind of thing.]]></description> <content:encoded><![CDATA[<h1>Prologue :</h1><p>Ok so i&#8217;m working on this site at work, and our creative designers decided it should have a news ticker in Javascipt. A fade-in/out kind of thing.</p><p>I used <strong>Mootools</strong> (of course) to write a simple script for this. And then I noticed something very strange. While in transition, both in Firefox and IE (6 and 7) the text got Garbled and rendered strangely.</p><h1>Problem :</h1><p>I then noticed this deal on another websites :<br
/><div
id="attachment_14" class="wp-caption alignnone" style="width: 511px"><img
class="size-full wp-image-14" title="getstisfaction.com" src="http://alexw.me/wp-content/uploads/2009/02/getstisfaction.jpg" alt="getstisfaction.com " width="501" height="341" /><p
class="wp-caption-text">getstisfaction.com</p></div><br
/> <span
id="more-13"></span></p><h1>Preview :</h1><p>I tried to recreate this , and I made it happen only in IE for some reason.<br
/> <Iframe
border="0" frameborder="0" width="500" height="200" src="http://alexw.me/html_examples/show_hide_garlbed.php"></iframe></p><h1>FIX :</h1><p>All that needs to be done, is to add background color to the absolute positioned elements that get faded in and out&#8230;</p><p>like so :<br
/> <code><br
/> .fade_div{<br
/> position:absolute;<br
/> background-color:#fff;<br
/> }<br
/> </code></p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2009/02/fade-inout-effect-makes-text-garbled-strange/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
