Summary: | getComputedStyle returns wrong value for CSS3 2D transformations | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexander Shalamov <alexander.shalamov> | ||||||||||||||||||||||||
Component: | CSS | Assignee: | Alexander Shalamov <alexander.shalamov> | ||||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||||
Severity: | Normal | CC: | cmarcelo, dglazkov, macpherson, menard, simon.fraser, webkit.review.bot | ||||||||||||||||||||||||
Priority: | P2 | ||||||||||||||||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||||||
Attachments: |
|
Created attachment 158782 [details]
Patch
Fix for style calculation and for layout test.
Comment on attachment 158782 [details] Patch Attachment 158782 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13513558 New failing tests: fast/css/getComputedStyle/getComputedStyle-transform.html Created attachment 158789 [details]
Archive of layout-test-results from gce-cr-linux-03
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-03 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Created attachment 158793 [details]
Patch
Fixed typos in changelog.
Attachment 158793 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files']" exit_code: 1
Total errors found: 0 in 0 files
If any of these errors are false positives, please file a bug against check-webkit-style.
looks like upload failed. Will re-upload patch. Created attachment 158798 [details]
Patch
Re-uploading patch
Comment on attachment 158798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=158798&action=review > LayoutTests/fast/css/getComputedStyle/getComputedStyle-transform.html:47 > + for(i=1; i < 7; i++) { Spaces around the = please. Also need 'var i'. > LayoutTests/fast/css/getComputedStyle/getComputedStyle-transform.html:49 > + if ( !(Math.abs(parsedComputed[i] - parsedExpected[i]) < 0.05) ) No space before the !. Comment on attachment 158798 [details]
Patch
Alexander is going to do a bit more work here.
Created attachment 159658 [details]
Patch
- Applied fixes according to comments
- Added check if renderer has transform
- Added test for non-box element
- Rebased to master
Comment on attachment 159658 [details] Patch Attachment 159658 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13549320 Comment on attachment 159658 [details] Patch Attachment 159658 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/13555040 Comment on attachment 159658 [details] Patch Attachment 159658 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/13543742 Created attachment 159667 [details]
Patch
newly added pixelSnappedSizingBox is not required - removed
Comment on attachment 159667 [details] Patch Attachment 159667 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13544837 New failing tests: fast/css/getComputedStyle/getComputedStyle-transform.html Created attachment 159714 [details]
Archive of layout-test-results from gce-cr-linux-01
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment on attachment 159667 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159667&action=review I thought you were going to fix transform-origin too? > LayoutTests/ChangeLog:8 > + This change will fix getComputedStyle-transform.html test. s/will fix/fixes. > LayoutTests/ChangeLog:12 > + Currently, the test doesn't do anything. When new transformation > + value is set, it immediately read back as an old value, thus > + computed style is equal to an old style. Moreover, expected > + result is never checked. Using 'currently' in a changelog is ambiguous. Does it refer to the state before or after the change? I'd say "before this change, the test didn't do anything". Created attachment 159960 [details]
Patch
- Fixed transform-origin computation
- Added two cases to transforms/2d/computed-style-origin.html
(In reply to comment #17) > I thought you were going to fix transform-origin too? Fixed, and added two test cases to transforms/2d/computed-style-origin.html > > LayoutTests/ChangeLog:8 > > + This change will fix getComputedStyle-transform.html test. > > s/will fix/fixes. Fixed > > > LayoutTests/ChangeLog:12 > Using 'currently' in a changelog is ambiguous. Does it refer to the state before or after the change? I'd say "before this change, the test didn't do anything". Fixed Comment on attachment 159960 [details] Patch Attachment 159960 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13564349 New failing tests: fast/css/getComputedStyle/getComputedStyle-zoom-and-background-size.html svg/transforms/transform-origin-presentation-attribute.xhtml transitions/shorthand-transitions.html svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/getComputedStyle-length-unit.html fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-with-zoom.html transforms/2d/computed-style-origin.html Created attachment 159968 [details]
Archive of layout-test-results from gce-cr-linux-06
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-06 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Created attachment 160102 [details]
Patch
Fixed chromium bot failures
Comment on attachment 160102 [details] Patch Clearing flags on attachment: 160102 Committed r126443: <http://trac.webkit.org/changeset/126443> All reviewed patches have been landed. Closing bug. |
Created attachment 158763 [details] Test When 2D transformation is applied, "borderBoxRect" is used to calculate transformation values. However, when style values are computed using getComputedStyle, content box size is used to calculate transformation value. In attached test, div element is moved down (y) by 60 pixels, while getComputedStyle reports that it was moved by 50px.