Repository navigation
script: Determine dimensions for <img> and <input> - #49085
Conversation
|
🔨 Triggering try run (#39401434794) for Linux (WPT) |
| @@ -1,88 +1,27 @@ | |||
| [image-width-height.html] | |||
| expected: TIMEOUT | |||
| [no width/height attributes] | |||
There was a problem hiding this comment.
Unfortunately we fail some of the most basic tests. That's because node.context_box() for an <img> that loads an image of 100 by 100 pixels reports 100 by 103 pixels. E.g. the height is 3 pixels too large. I have no clue why that is happening. Initially I thought it would have been our CSS, but we don't set any padding explicitly for an <input type="image">:
servo/components/layout/stylesheets/servo.css
Lines 25 to 27 in 16d7503
Then I thought maybe the image does itself, but that's also not the case. Basically, I have no clue why this is happening 😭 Still, these tests run now rather than timeout, so that's progress.
|
Test results for linux-wpt from try job (#39401434794): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (10)
Stable unexpected results (3)
|
|
|
The img and input elements have specific handling for how they determine their dimensions. They should inspect the relevant image and also take into account the existing width/height attributes (if any) if they aren't rendering. Implement the relevant algorithms for these and let input defer to img for it, since it uses that element in its shadow tree. Note that we also weren't firing the `load`/`error` event for input since these weren't escaping the shadow tree. By firing these events on the host of the img element we start running the appropriate tests. Part of servo#48603 Testing: new WPT tests passing Signed-off-by: Tim van der Lippe <[email protected]>
84a1e0c to
72e9a4b
Compare
The img and input elements have specific handling for how they determine their dimensions. They should inspect the relevant image and also take into account the existing width/height attributes (if any) if they aren't rendering.
Implement the relevant algorithms for these and let input defer to img for it, since it uses that element in its shadow tree. Note that we also weren't firing the
load/errorevent for input since these weren't escaping the shadow tree. By firing these events on the host of the img element we start running the appropriate tests.Part of #48603
Testing: new WPT tests passing