Title: [237449] trunk
- Revision
- 237449
- Author
- [email protected]
- Date
- 2018-10-26 06:16:03 -0700 (Fri, 26 Oct 2018)
Log Message
REGRESSION (r237255): Text selection is broken in form fields
https://bugs.webkit.org/show_bug.cgi?id=190899
Reviewed by Ryosuke Niwa.
Source/WebCore:
Fix missing negation when checking for a fully-clipped-out rect. This was causing
RenderObject::computeVisibleRectInContainer to incorrectly early-out.
Test: fast/repaint/text-selection-overflow-hidden.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::computeVisibleRectInContainer const):
LayoutTests:
Add layout test coverage.
* fast/repaint/text-selection-overflow-hidden-expected.txt: Added.
* fast/repaint/text-selection-overflow-hidden.html: Added.
* platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (237448 => 237449)
--- trunk/LayoutTests/ChangeLog 2018-10-26 08:25:43 UTC (rev 237448)
+++ trunk/LayoutTests/ChangeLog 2018-10-26 13:16:03 UTC (rev 237449)
@@ -1,3 +1,16 @@
+2018-10-26 Ali Juma <[email protected]>
+
+ REGRESSION (r237255): Text selection is broken in form fields
+ https://bugs.webkit.org/show_bug.cgi?id=190899
+
+ Reviewed by Ryosuke Niwa.
+
+ Add layout test coverage.
+
+ * fast/repaint/text-selection-overflow-hidden-expected.txt: Added.
+ * fast/repaint/text-selection-overflow-hidden.html: Added.
+ * platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt: Added.
+
2018-10-25 Ryan Haddad <[email protected]>
Layout Test http/tests/websocket/tests/hybi/handshake-ok-with-legacy-sec-websocket-response-headers.html is a flaky failure
Added: trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden-expected.txt (0 => 237449)
--- trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden-expected.txt 2018-10-26 13:16:03 UTC (rev 237449)
@@ -0,0 +1,6 @@
+Should have green background
+
+(repaint rects
+ (rect 8 16 199 18)
+)
+
Added: trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden.html (0 => 237449)
--- trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden.html (rev 0)
+++ trunk/LayoutTests/fast/repaint/text-selection-overflow-hidden.html 2018-10-26 13:16:03 UTC (rev 237449)
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="" type="text/_javascript_"></script>
+<style>
+#test {
+ background-color: red;
+ color: white;
+ overflow: hidden;
+}
+
+#test::selection {
+ background-color: green;
+}
+</style>
+<script>
+ function repaintTest() {
+ getSelection().setBaseAndExtent(test, 0, test, 1);
+ };
+</script>
+
+<body _onload_="runRepaintTest()">
+ <p id="test">Should have green background</p>
+</body>
Added: trunk/LayoutTests/platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt (0 => 237449)
--- trunk/LayoutTests/platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/win/fast/repaint/text-selection-overflow-hidden-expected.txt 2018-10-26 13:16:03 UTC (rev 237449)
@@ -0,0 +1,6 @@
+Should have green background
+
+(repaint rects
+ (rect 8 16 197 18)
+)
+
Modified: trunk/Source/WebCore/ChangeLog (237448 => 237449)
--- trunk/Source/WebCore/ChangeLog 2018-10-26 08:25:43 UTC (rev 237448)
+++ trunk/Source/WebCore/ChangeLog 2018-10-26 13:16:03 UTC (rev 237449)
@@ -1,3 +1,18 @@
+2018-10-26 Ali Juma <[email protected]>
+
+ REGRESSION (r237255): Text selection is broken in form fields
+ https://bugs.webkit.org/show_bug.cgi?id=190899
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix missing negation when checking for a fully-clipped-out rect. This was causing
+ RenderObject::computeVisibleRectInContainer to incorrectly early-out.
+
+ Test: fast/repaint/text-selection-overflow-hidden.html
+
+ * rendering/RenderObject.cpp:
+ (WebCore::RenderObject::computeVisibleRectInContainer const):
+
2018-10-25 Chris Dumez <[email protected]>
[PSON] Navigating cross-site with locked history but unlocked back/forward list fails to create a new BackForwardListItem
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (237448 => 237449)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2018-10-26 08:25:43 UTC (rev 237448)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2018-10-26 13:16:03 UTC (rev 237449)
@@ -1000,7 +1000,7 @@
LayoutRect adjustedRect = rect;
if (parent->hasOverflowClip()) {
- bool isEmpty = downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRect, container, context);
+ bool isEmpty = !downcast<RenderBox>(*parent).applyCachedClipAndScrollPosition(adjustedRect, container, context);
if (isEmpty) {
if (context.m_options.contains(VisibleRectContextOption::UseEdgeInclusiveIntersection))
return std::nullopt;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes