Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backport patch for zero-size pixels in blink #21857

Merged
merged 1 commit into from Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions patches/chromium/.patches
Expand Up @@ -90,3 +90,4 @@ fix_focusowningwebcontents_to_handle_renderwidgethosts_for_oopifs.patch
feat_allow_disbaling_blink_scheduler_throttling_per_renderview.patch
accessible_pane_view.patch
only_apply_transform_when_outermost_outer_webcontents.patch
never_let_a_non-zero-size_pixel_snap_to_zero_size.patch
2 changes: 1 addition & 1 deletion patches/chromium/accessible_pane_view.patch
Expand Up @@ -9,7 +9,7 @@ need to override them in MenuBar.
Pending upstream patch: https://crrev.com/c/1959189

diff --git a/ui/views/accessible_pane_view.h b/ui/views/accessible_pane_view.h
index 813fd13860a8..990c905e8f19 100644
index 813fd13860a863cd1e6e5bfec38d15f798418673..990c905e8f19dd015a625010ea30adfcb6f51ea6 100644
--- a/ui/views/accessible_pane_view.h
+++ b/ui/views/accessible_pane_view.h
@@ -35,7 +35,7 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
Expand Down
13 changes: 6 additions & 7 deletions patches/chromium/command-ismediakey.patch
Expand Up @@ -11,7 +11,7 @@ control events until it begins playing audio. This means that a media shortcut w
into effect until you, for example, began playing a YouTube video which sort of defeats the
purpose of GlobalShortcuts.

At the moment there is no upstream possibility for this; but perhaps Chromium may
At the moment there is no upstream possibility for this; but perhaps Chromium may
consider some kind of switch, enabled by default, which would conditionally choose to avoid usage of
RemoteCommandCenterDelegate on macOS.

Expand Down Expand Up @@ -72,9 +72,8 @@ index 1145e1f3d79482b5bb468c3128431ac674310e5f..e319e7a3e34e05b0e96d4a2dbb456355
}

} // namespace ui

diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4dbc342ec9 100644
index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..f7e90349ee49f0d79a0443c5a9ec886f5a929242 100644
--- a/ui/base/accelerators/media_keys_listener_mac.mm
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
@@ -11,6 +11,7 @@
Expand All @@ -85,7 +84,7 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4d
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/remote_command_media_keys_listener_mac.h"
#include "ui/base/now_playing/remote_command_center_delegate.h"
@@ -33,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
@@ -33,6 +34,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
case NX_KEYTYPE_NEXT:
case NX_KEYTYPE_FAST:
return VKEY_MEDIA_NEXT_TRACK;
Expand All @@ -98,7 +97,7 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4d
}
return VKEY_UNKNOWN;
}
@@ -193,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -193,7 +200,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&
Expand All @@ -110,15 +109,15 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4d
return event;
}

@@ -233,6 +234,7 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -224,6 +234,7 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
// For Mac OS 10.12.2 or later, we want to use MPRemoteCommandCenter for
// getting media keys globally if there is a RemoteCommandCenterDelegate
// available.
+#if !BUILDFLAG(ENABLE_MEDIA_KEY_OVERRIDES)
if (@available(macOS 10.12.2, *)) {
if (scope == Scope::kGlobal &&
now_playing::RemoteCommandCenterDelegate::GetInstance()) {
@@ -242,7 +244,7 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -233,7 +244,7 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
return std::move(listener);
}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/chromium/fix_disabling_compositor_recycling.patch
Expand Up @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.

diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9f36053c15a9895677c791e1578d16bc867c4265..e74b668f20bea632e09eb1ef016cfa52fc229668 100644
index 6a9f9c466a45312c190b30e53146b9b303b9f32a..80900b809d7b05a4ab546c6ce0686a261755e82a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -487,7 +487,11 @@
@@ -489,7 +489,11 @@
return;

host()->WasHidden();
Expand Down
8 changes: 4 additions & 4 deletions patches/chromium/mas_disable_custom_window_frame.patch
Expand Up @@ -7,7 +7,7 @@ Disable private window frame APIs (NSNextStepFrame and NSThemeFrame) for MAS
build.

diff --git a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
index 1ffb647e85e0..439cc6df5e0c 100644
index 1ffb647e85e00ff60d84234e47f5d7d385f65245..439cc6df5e0cc1ec3732d6f2a2e00d543c73e837 100644
--- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
+++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
@@ -9,6 +9,7 @@
Expand Down Expand Up @@ -42,7 +42,7 @@ index 1ffb647e85e0..439cc6df5e0c 100644
// Keyboard -> Shortcuts -> Keyboard. Usually Ctrl+F5. The argument (|unknown|)
// tends to just be nil.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
index 8416c7c6e052..cd356beda023 100644
index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70ba3674913 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
@@ -4,6 +4,8 @@
Expand Down Expand Up @@ -75,7 +75,7 @@ index 8416c7c6e052..cd356beda023 100644
+
@end
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
index e03bbc724cfd..783745b11365 100644
index e03bbc724cfd01967e71998394361556df1c4915..783745b11365c04c1e1052197d20d494bc901d45 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
@@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
Expand All @@ -95,7 +95,7 @@ index e03bbc724cfd..783745b11365 100644
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index bf4cd6d24635..6955d3975183 100644
index bf4cd6d246358c568cbe192c48748099a3c1de20..6955d39751832815ddec1fec32d791fc03c747b0 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -15,7 +15,9 @@
Expand Down
24 changes: 12 additions & 12 deletions patches/chromium/mas_disable_remote_accessibility.patch
Expand Up @@ -7,7 +7,7 @@ Disable remote accessibility APIs (NSAccessibilityRemoteUIElement) for MAS
build.

diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm
index 628196e20d2b..28dbc7f300dc 100644
index 628196e20d2b3b30231cb03af8288244a4196146..28dbc7f300dc72779ca3e3cb6fbb3d9a0b14666b 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -44,6 +44,7 @@
Expand Down Expand Up @@ -40,7 +40,7 @@ index 628196e20d2b..28dbc7f300dc 100644

} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 6fc744210179..3db03e957c03 100644
index 6fc744210179b06384d9eba08da02a626dab4930..3db03e957c0325417747a952f2dffb45b3c81916 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -554,10 +554,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
Expand All @@ -57,7 +57,7 @@ index 6fc744210179..3db03e957c03 100644
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
index 938854358e5b..c79ee1552668 100644
index 938854358e5b683d5d77c5aa825963daa67e5b2f..c79ee1552668b8522eb88b86dbe4a31bf267bdfe 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -61,8 +61,10 @@ id GetFocusedBrowserAccessibilityElement() override {
Expand All @@ -83,7 +83,7 @@ index 938854358e5b..c79ee1552668 100644
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
};
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 0bf2a269abf7..dde6064a25b6 100644
index 0bf2a269abf7fcf5940e8cf95f6f6b32ae786ddf..dde6064a25b64958b234f4c9a3bf01f5b1c694ff 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -45,7 +45,9 @@ class ScopedPasswordInputEnabler;
Expand All @@ -110,7 +110,7 @@ index 0bf2a269abf7..dde6064a25b6 100644
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9f36053c15a9..6a9f9c466a45 100644
index 9f36053c15a9895677c791e1578d16bc867c4265..6a9f9c466a45312c190b30e53146b9b303b9f32a 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -245,8 +245,10 @@
Expand Down Expand Up @@ -163,7 +163,7 @@ index 9f36053c15a9..6a9f9c466a45 100644

///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 0a3994cebd4a..6a9162808bd0 100644
index 0a3994cebd4a1a56c5e7dc8d36a363468996fb83..6a9162808bd0659e11fa1e2d11e750ea7f673a7f 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -286,6 +286,13 @@ jumbo_component("base") {
Expand All @@ -181,7 +181,7 @@ index 0a3994cebd4a..6a9162808bd0 100644
sources += [ "l10n/l10n_util_posix.cc" ]
}
diff --git a/ui/base/cocoa/remote_accessibility_api.h b/ui/base/cocoa/remote_accessibility_api.h
index 2a58aebabb23..3424b6011e80 100644
index 2a58aebabb23443a2c11364af4988c573f3909ba..3424b6011e80e9c995519b6a8d652abd843d926b 100644
--- a/ui/base/cocoa/remote_accessibility_api.h
+++ b/ui/base/cocoa/remote_accessibility_api.h
@@ -11,6 +11,8 @@
Expand All @@ -201,7 +201,7 @@ index 2a58aebabb23..3424b6011e80 100644
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index 5058eb6048a6..b73c6993b46c 100644
index 528ec883d22679a92c1d82da783588f8e33e4d99..c8b3f1752526c85fd9793e95b29424120c7c5158 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -28,7 +28,9 @@
Expand Down Expand Up @@ -229,10 +229,10 @@ index 5058eb6048a6..b73c6993b46c 100644
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 89eb028e840b..b85cf12286d6 100644
index 6aa9e71245f131b176a2c6d4416786d5bcac621e..b24a364c7689d8ca3df680b9b57bd9d040885985 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -351,14 +351,22 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
@@ -348,14 +348,22 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
Expand All @@ -255,15 +255,15 @@ index 89eb028e840b..b85cf12286d6 100644
}

remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1194,6 +1202,7 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
@@ -1191,6 +1199,7 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
+#ifndef MAS_BUILD
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1201,14 +1210,17 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
@@ -1198,14 +1207,17 @@ void UpdateCALayerParams(gfx::CALayerParams* ca_layer_params) {
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];
Expand Down
Expand Up @@ -6,7 +6,7 @@ Subject: mas_disable_spi_file_type_mappings.patch
Disable NSURLFileTypeMappings API for MAS build.

diff --git a/net/base/platform_mime_util_mac.mm b/net/base/platform_mime_util_mac.mm
index a510c87ea7d9..b5f8ed974402 100644
index a510c87ea7d92763a20db61f1dd946f363fff7a3..b5f8ed97440200c3fccadfccce28c7bc1df44ce8 100644
--- a/net/base/platform_mime_util_mac.mm
+++ b/net/base/platform_mime_util_mac.mm
@@ -18,7 +18,7 @@
Expand Down
@@ -0,0 +1,144 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Tue, 21 Jan 2020 17:31:03 -0800
Subject: Never let a non-zero-size pixel snap to zero size

The logic for LayoutUnit::SnapSizeToPixel maps the size to
the closest pixel align edge given a location. When a size of
width less than 1 happens to straddle a pixel aligned edge this
forces the size to zero.

Force the size to always be non-zero if the input size is non-zero,
and change PhysicalRect to use the LayoutRect snapping to get
correct cull rects.

Bug: 793785
Change-Id: Ia4c30d10c389fb4677006441aac9ee380a7c2f41
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948057
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726516}

diff --git a/third_party/blink/renderer/platform/geometry/layout_unit.h b/third_party/blink/renderer/platform/geometry/layout_unit.h
index eaaff017795237c83b9eb06e8cb70f8598ec5664..8ffe3e11501c005edb233130b231c33e6e79000b 100644
--- a/third_party/blink/renderer/platform/geometry/layout_unit.h
+++ b/third_party/blink/renderer/platform/geometry/layout_unit.h
@@ -723,7 +723,12 @@ inline float& operator/=(float& a, const LayoutUnit& b) {

inline int SnapSizeToPixel(LayoutUnit size, LayoutUnit location) {
LayoutUnit fraction = location.Fraction();
- return (fraction + size).Round() - fraction.Round();
+ int result = (fraction + size).Round() - fraction.Round();
+ if (UNLIKELY(result == 0 &&
+ std::abs(size.ToFloat()) > LayoutUnit::Epsilon() * 4)) {
+ return size > 0 ? 1 : -1;
+ }
+ return result;
}

inline int RoundToInt(LayoutUnit value) {
diff --git a/third_party/blink/renderer/platform/geometry/layout_unit_test.cc b/third_party/blink/renderer/platform/geometry/layout_unit_test.cc
index db1fa1f610f195eb7933ab044c26c3b2bae84120..05d4a2f762ede01f712470363ed118f7b37925a4 100644
--- a/third_party/blink/renderer/platform/geometry/layout_unit_test.cc
+++ b/third_party/blink/renderer/platform/geometry/layout_unit_test.cc
@@ -155,8 +155,20 @@ TEST(LayoutUnitTest, LayoutUnitSnapSizeToPixel) {
EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0.99)));
EXPECT_EQ(2, SnapSizeToPixel(LayoutUnit(1.5), LayoutUnit(1)));

- EXPECT_EQ(0, SnapSizeToPixel(LayoutUnit(0.5), LayoutUnit(1.5)));
- EXPECT_EQ(0, SnapSizeToPixel(LayoutUnit(0.99), LayoutUnit(1.5)));
+ // 0.046875 is 3/64, lower than 4 * LayoutUnit::Epsilon()
+ EXPECT_EQ(0, SnapSizeToPixel(LayoutUnit(0.046875), LayoutUnit(0)));
+ // 0.078125 is 5/64, higher than 4 * LayoutUnit::Epsilon()
+ EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(0.078125), LayoutUnit(0)));
+
+ // Negative versions
+ EXPECT_EQ(0, SnapSizeToPixel(LayoutUnit(-0.046875), LayoutUnit(0)));
+ EXPECT_EQ(-1, SnapSizeToPixel(LayoutUnit(-0.078125), LayoutUnit(0)));
+
+ // The next 2 would snap to zero but for the requirement that we not snap
+ // sizes greater than 4 * LayoutUnit::Epsilon() to 0.
+ EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(0.5), LayoutUnit(1.5)));
+ EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(0.99), LayoutUnit(1.5)));
+
EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(1.0), LayoutUnit(1.5)));
EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(1.49), LayoutUnit(1.5)));
EXPECT_EQ(1, SnapSizeToPixel(LayoutUnit(1.5), LayoutUnit(1.5)));
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render-ref.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render-ref.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d5851d5544f9692d0761dc92c23b6b2b546b4d3
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<title>Reference: Thin elements should paint even at small size</title>
+<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
+<html>
+ <head>
+ <style>
+ .disappearing-border {
+ height:1px;
+ width:100%;
+ border-top:1px solid black;
+ }
+
+ .disappearing-box {
+ height:1px;
+ width:100%;
+ background-color: black;
+ }
+
+ body {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+ }
+ </style>
+</head>
+<body>
+ <div class="disappearing-border"></div>
+ <div style="height:6.5px;"></div>
+ <div class="disappearing-box"></div>
+</body>
+</html>
\ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render.html b/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render.html
new file mode 100644
index 0000000000000000000000000000000000000000..fa587360a6d2625c8f02cd7f0eba54b3bb09a1f1
--- /dev/null
+++ b/third_party/blink/web_tests/external/wpt/css/css-sizing/thin-element-render.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Thin elements should still paint even at small size.</title>
+<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#width-height-keywords">
+<link rel="match" href="thin-element-render-ref.html">
+<html>
+ <head>
+ <style>
+ .disappearing-border {
+ height:0.25px;
+ width:100%;
+ border-top: 0.25px solid black;
+ }
+
+ .disappearing-box {
+ height:0.25px;
+ width:100%;
+ background-color: black;
+ }
+
+ body {
+ margin: 0px;
+ padding: 0px;
+ box-sizing: border-box;
+ }
+ </style>
+</head>
+<body>
+ <div class="disappearing-border"></div>
+ <div style="height:8px;"></div>
+ <div class="disappearing-box"></div>
+</body>
+</html>
\ No newline at end of file