[Webkit-unassigned] [Bug 29084] New: getComputedStyle returns percentage values for left / right / top / bottom
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 9 07:07:17 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29084
Summary: getComputedStyle returns percentage values for left /
right / top / bottom
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: jaffathecake at gmail.com
var div = document.createElement('div');
div.style.position = 'absolute';
div.style.top = '10%';
document.body.appendChild(div);
alert( window.getComputedStyle(div, null).top );
The above will alert '10%' rather than the pixel value.
Gecko / Presto will give the pixel value.
Webkit gives the pixel value for other properties (widht, height etc) and will
give the pixel value for left / right / top / bottom if the set value isn't a
percent, eg 10em.
The above bug exists in Safari, Chrome and Nightly r48199, although I have only
tested on Windows.
Jake.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list