Bug 45944 - Update percent-image-height layout test to include additional parent element positioning modes.
Summary: Update percent-image-height layout test to include additional parent element ...
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-16 20:28 PDT by Luke Macpherson
Modified: 2017-07-18 08:27 PDT (History)
1 user (show)

See Also:


Attachments
Patch (6.67 KB, patch)
2010-09-16 20:30 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff
Patch (6.74 KB, patch)
2010-09-16 20:34 PDT, Luke Macpherson
ojan: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Macpherson 2010-09-16 20:28:44 PDT
Update percent-image-height layout test to include additional parent element positioning modes.
Comment 1 Luke Macpherson 2010-09-16 20:30:04 PDT
Created attachment 67879 [details]
Patch
Comment 2 Luke Macpherson 2010-09-16 20:34:35 PDT
Created attachment 67880 [details]
Patch
Comment 3 Ojan Vafai 2010-09-16 21:37:04 PDT
Comment on attachment 67880 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67880&action=prettypatch

> LayoutTests/fast/images/percent-height-image.html:34
> +    function runTests() {

Here and below: WebKit style is to put the opening bracket on the next line. Not all the JS code follows the style since there's no formal WebKit JS style, but we're trying to push it in that direction to make it match C++.

> LayoutTests/fast/images/percent-height-image.html:43
> +        document.querySelector("body").className = name;

how about:
document.getElementById('parent').className = name.

Then  you can change the selectors in the CSS above to just have the className. I think that would make the test a bit more readable.

> LayoutTests/fast/images/percent-height-image.html:48
> +            log(className + " FAIL: image height was " + actual + " expected " + expected);

Indentation is off.

> LayoutTests/fast/images/percent-height-image.html:56
> +    Tests that an image with height 100% inside a floated div keeps its intrinsic height.<br/>

This description is no longer accurate.
Comment 4 James Robinson 2010-09-16 21:41:01 PDT
Comment on attachment 67880 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=67880&action=prettypatch

> LayoutTests/fast/images/percent-height-image.html:39
> +        test("testOne", child, 20);
> +        test("testTwo", child, 20);
> +        test("testThree", child, 20);
> +        test("testFour", child, 20);

I'm pretty sure Firefox returns 0 here, and I'm pretty sure that is the correct answer.