WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94211
getComputedStyle returns wrong value for CSS3 2D transformations
https://bugs.webkit.org/show_bug.cgi?id=94211
Summary
getComputedStyle returns wrong value for CSS3 2D transformations
Alexander Shalamov
Reported
2012-08-16 03:19:13 PDT
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.
Attachments
Test
(467 bytes, text/html)
2012-08-16 03:19 PDT
,
Alexander Shalamov
no flags
Details
Patch
(5.45 KB, patch)
2012-08-16 05:12 PDT
,
Alexander Shalamov
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-03
(437.18 KB, application/zip)
2012-08-16 06:01 PDT
,
WebKit Review Bot
no flags
Details
Patch
(6.57 KB, patch)
2012-08-16 06:09 PDT
,
Alexander Shalamov
no flags
Details
Formatted Diff
Diff
Patch
(6.25 KB, patch)
2012-08-16 06:30 PDT
,
Alexander Shalamov
simon.fraser
: review-
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
Patch
(7.26 KB, patch)
2012-08-21 04:53 PDT
,
Alexander Shalamov
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Patch
(7.67 KB, patch)
2012-08-21 05:40 PDT
,
Alexander Shalamov
simon.fraser
: review-
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-01
(311.92 KB, application/zip)
2012-08-21 10:17 PDT
,
WebKit Review Bot
no flags
Details
Patch
(11.81 KB, patch)
2012-08-22 10:31 PDT
,
Alexander Shalamov
simon.fraser
: review+
webkit.review.bot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from gce-cr-linux-06
(613.94 KB, application/zip)
2012-08-22 11:11 PDT
,
WebKit Review Bot
no flags
Details
Patch
(11.12 KB, patch)
2012-08-23 00:32 PDT
,
Alexander Shalamov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(6)
View All
Add attachment
proposed patch, testcase, etc.
Alexander Shalamov
Comment 1
2012-08-16 05:12:50 PDT
Created
attachment 158782
[details]
Patch Fix for style calculation and for layout test.
WebKit Review Bot
Comment 2
2012-08-16 06:01:14 PDT
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
WebKit Review Bot
Comment 3
2012-08-16 06:01:18 PDT
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
Alexander Shalamov
Comment 4
2012-08-16 06:09:31 PDT
Created
attachment 158793
[details]
Patch Fixed typos in changelog.
WebKit Review Bot
Comment 5
2012-08-16 06:15:51 PDT
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.
Alexander Shalamov
Comment 6
2012-08-16 06:23:17 PDT
looks like upload failed. Will re-upload patch.
Alexander Shalamov
Comment 7
2012-08-16 06:30:49 PDT
Created
attachment 158798
[details]
Patch Re-uploading patch
Simon Fraser (smfr)
Comment 8
2012-08-20 10:52:11 PDT
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 !.
Simon Fraser (smfr)
Comment 9
2012-08-20 11:00:57 PDT
Comment on
attachment 158798
[details]
Patch Alexander is going to do a bit more work here.
Alexander Shalamov
Comment 10
2012-08-21 04:53:12 PDT
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
WebKit Review Bot
Comment 11
2012-08-21 05:07:01 PDT
Comment on
attachment 159658
[details]
Patch
Attachment 159658
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/13549320
Early Warning System Bot
Comment 12
2012-08-21 05:20:53 PDT
Comment on
attachment 159658
[details]
Patch
Attachment 159658
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/13555040
Early Warning System Bot
Comment 13
2012-08-21 05:33:00 PDT
Comment on
attachment 159658
[details]
Patch
Attachment 159658
[details]
did not pass qt-wk2-ews (qt): Output:
http://queues.webkit.org/results/13543742
Alexander Shalamov
Comment 14
2012-08-21 05:40:04 PDT
Created
attachment 159667
[details]
Patch newly added pixelSnappedSizingBox is not required - removed
WebKit Review Bot
Comment 15
2012-08-21 10:17:08 PDT
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
WebKit Review Bot
Comment 16
2012-08-21 10:17:13 PDT
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
Simon Fraser (smfr)
Comment 17
2012-08-21 10:39:38 PDT
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".
Alexander Shalamov
Comment 18
2012-08-22 10:31:27 PDT
Created
attachment 159960
[details]
Patch - Fixed transform-origin computation - Added two cases to transforms/2d/computed-style-origin.html
Alexander Shalamov
Comment 19
2012-08-22 10:33:28 PDT
(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
WebKit Review Bot
Comment 20
2012-08-22 11:11:02 PDT
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
WebKit Review Bot
Comment 21
2012-08-22 11:11:06 PDT
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
Alexander Shalamov
Comment 22
2012-08-23 00:32:20 PDT
Created
attachment 160102
[details]
Patch Fixed chromium bot failures
WebKit Review Bot
Comment 23
2012-08-23 10:22:58 PDT
Comment on
attachment 160102
[details]
Patch Clearing flags on attachment: 160102 Committed
r126443
: <
http://trac.webkit.org/changeset/126443
>
WebKit Review Bot
Comment 24
2012-08-23 10:23:03 PDT
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.
Top of Page
Format For Printing
XML
Clone This Bug