Commit-Queue | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
based on the bug comments I think that pdr has more context on this
Do you think we could make a WPT in web_tests/external/wpt? I imagine that this is something that other browsers would care about too, right?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Do you think we could make a WPT in web_tests/external/wpt? I imagine that this is something that other browsers would care about too, right?
Unfortunately we don't really have mobile coverage in WPT.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
int layout_width =
I think this change is good, but because of low test coverage, I'd like to guard this change with an enabled-by-default RuntimeEnabledFeature which we can force-disable in the event that we break some important image usecase.
Can you please change this to roughly:
```
int width = (RuntimeEnabledFeature::ImageDocumentUseLayoutWidthEnabled() ? View()->GetLayoutSize().width() : GetFrame()->GetPage()->GetVisualViewport().Size().width()) / GetFrame()->LayoutZoomFactor();
```
Then add the following in `third_party/blink/renderer/platform/runtime_enabled_features.json5`:
```
{
name: "ImageDocumentUseLayoutWidth",
status: "stable",
},
```
TEST_F(ImageDocumentViewportTest, DivWidthOnMobileWithDisabledViewportMeta) {
Can you add two additional testcases that are the same (verify centering) except the images are 10000x1 pixels and 1x10000 pixels? There is probably a better way to include the images than the `JpegImage` approach.
EXPECT_EQ(465, rect->x());
This isn't obviously verifying centering to me. Can you add a comment about where this comes from? E.g., is it (980 / 2) - (50 / 2)?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I think this change is good, but because of low test coverage, I'd like to guard this change with an enabled-by-default RuntimeEnabledFeature which we can force-disable in the event that we break some important image usecase.
Can you please change this to roughly:
```
int width = (RuntimeEnabledFeature::ImageDocumentUseLayoutWidthEnabled() ? View()->GetLayoutSize().width() : GetFrame()->GetPage()->GetVisualViewport().Size().width()) / GetFrame()->LayoutZoomFactor();
```Then add the following in `third_party/blink/renderer/platform/runtime_enabled_features.json5`:
```
{
name: "ImageDocumentUseLayoutWidth",
status: "stable",
},
```
Done
TEST_F(ImageDocumentViewportTest, DivWidthOnMobileWithDisabledViewportMeta) {
Can you add two additional testcases that are the same (verify centering) except the images are 10000x1 pixels and 1x10000 pixels? There is probably a better way to include the images than the `JpegImage` approach.
Done
This isn't obviously verifying centering to me. Can you add a comment about where this comes from? E.g., is it (980 / 2) - (50 / 2)?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fix image centering when viewport meta is disabled on mobile
On mobile, when viewport meta is disabled, the layout width is greater
than the viewport width, resulting in the image not being centered. This
CL uses layout width instead of viewport width to calculate div width,
ensuring that the image is displayed in the center.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |