RESOLVED FIXED72919
[chromium] updateRect is probably incorrect when contentBounds != bounds
https://bugs.webkit.org/show_bug.cgi?id=72919
Summary [chromium] updateRect is probably incorrect when contentBounds != bounds
Shawn Singh
Reported 2011-11-21 17:18:31 PST
We should do the following (1) fix the bug, of course (2) re-name the transform conversion functions in the m_tiler - contentRectToLayerRect and layerRectToContentRect - so that they are clearer (3) add testing that the updateRect is computed correctly for the case where contentBounds != bounds.
Attachments
Patch (6.66 KB, patch)
2012-01-18 19:45 PST, Shawn Singh
no flags
addressed reviewer comments, removed unnecessary code in FakeTiledLayerEtc (7.34 KB, patch)
2012-01-19 17:54 PST, Shawn Singh
no flags
Patch for landing (7.19 KB, patch)
2012-01-20 16:59 PST, Shawn Singh
no flags
Patch for landing (7.19 KB, patch)
2012-01-22 15:49 PST, Shawn Singh
no flags
Shawn Singh
Comment 1 2012-01-18 19:45:38 PST
Shawn Singh
Comment 2 2012-01-18 19:46:23 PST
Note that (2) on the list above was already done by Enne in a previous patch. This patch addresses (1) and (3).
Adrienne Walker
Comment 3 2012-01-19 11:12:51 PST
Comment on attachment 123054 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=123054&action=review In general, looks good. Can you also leave a comment on LayerChromium::m_updateRect about what space it's supposed to be in? > Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp:367 > + // The updateRect (that indicates what was actually painted) should be in > + // layer space, not the "content space". This is quite minor, but I'm kind of curious why content space gets scare quotes everywhere in this patch. Do you want to be calling it something else?
Shawn Singh
Comment 4 2012-01-19 17:54:44 PST
Created attachment 123228 [details] addressed reviewer comments, removed unnecessary code in FakeTiledLayerEtc Yeah, the reason I put quotes there is obsolete now anyway. and I tend to overuse quotes, too.
Shawn Singh
Comment 5 2012-01-20 13:41:36 PST
Enne and James, could you please review? Should be a relatively quick and easy review... thanks!
Adrienne Walker
Comment 6 2012-01-20 13:48:11 PST
Comment on attachment 123228 [details] addressed reviewer comments, removed unnecessary code in FakeTiledLayerEtc Thanks for the extra comment. LGTM.
James Robinson
Comment 7 2012-01-20 14:40:11 PST
Comment on attachment 123228 [details] addressed reviewer comments, removed unnecessary code in FakeTiledLayerEtc View in context: https://bugs.webkit.org/attachment.cgi?id=123228&action=review R=me, some minor cleanups suggested > Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:245 > + float widthScale = bounds().width() / static_cast<double>(contentBounds().width()); > + float heightScale = bounds().height() / static_cast<double>(contentBounds().height()); nit: if we're assigning to a float, why static_cast<> to double? why not float? > Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp:246 > + m_updateRect = FloatRect(m_paintRect.x() * widthScale, m_paintRect.y() * heightScale, m_paintRect.width() * widthScale, m_paintRect.height() * heightScale); nit: i think i'd weakly prefer doing something like FloatRect(m_paintRect).scale(widthScale, heightScale); just to make the line a bit shorter and have less risk of silly copy/paste errors
Shawn Singh
Comment 8 2012-01-20 16:59:01 PST
Created attachment 123414 [details] Patch for landing
WebKit Review Bot
Comment 9 2012-01-20 17:01:51 PST
Comment on attachment 123414 [details] Patch for landing Rejecting attachment 123414 [details] from commit-queue. shawnsingh@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Shawn Singh
Comment 10 2012-01-22 15:49:44 PST
Created attachment 123501 [details] Patch for landing
WebKit Review Bot
Comment 11 2012-01-23 18:45:19 PST
Comment on attachment 123501 [details] Patch for landing Clearing flags on attachment: 123501 Committed r105680: <http://trac.webkit.org/changeset/105680>
WebKit Review Bot
Comment 12 2012-01-23 18:45:24 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.