Title: [204781] releases/WebKitGTK/webkit-2.12
- Revision
- 204781
- Author
- [email protected]
- Date
- 2016-08-23 01:32:31 -0700 (Tue, 23 Aug 2016)
Log Message
Merge r203415 - theguardian.co.uk crossword puzzles are sometimes not displaying text
https://bugs.webkit.org/show_bug.cgi?id=159924
<rdar://problem/27409483>
Reviewed by Simon Fraser.
Source/WebCore:
This patch fixes the case when
- 2 disjoint subtrees are dirty
- RenderView is also dirty.
and we end up not laying out one of the 2 subtrees.
In FrameView::scheduleRelayoutOfSubtree, we assume that when the RenderView is dirty
we already have a pending full layout which means that any previous subtree layouts have already been
converted to full layouts.
However this assumption is incorrect. RenderView can get dirty without checking if there's
already a pending subtree layout.
One option to solve this problem would be to override RenderObject::setNeedsLayout in RenderView
so that when the RenderView gets dirty, we could also convert any pending subtree layout to full layout.
However RenderObject::setNeedsLayout is a hot function and making it virtual would impact performance.
The other option is to always normalize subtree layouts in FrameView::scheduleRelayoutOfSubtree().
This patch implements the second option.
Test: fast/misc/subtree-layouts.html
* page/FrameView.cpp:
(WebCore::FrameView::scheduleRelayoutOfSubtree):
LayoutTests:
* fast/misc/subtree-layouts-expected.html: Added.
* fast/misc/subtree-layouts.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog (204780 => 204781)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-08-23 08:31:07 UTC (rev 204780)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog 2016-08-23 08:32:31 UTC (rev 204781)
@@ -1,3 +1,14 @@
+2016-07-19 Zalan Bujtas <[email protected]>
+
+ theguardian.co.uk crossword puzzles are sometimes not displaying text
+ https://bugs.webkit.org/show_bug.cgi?id=159924
+ <rdar://problem/27409483>
+
+ Reviewed by Simon Fraser.
+
+ * fast/misc/subtree-layouts-expected.html: Added.
+ * fast/misc/subtree-layouts.html: Added.
+
2016-07-10 Zalan Bujtas <[email protected]>
Fix LogicalSelectionOffsetCaches to work with detached render tree.
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts-expected.html (0 => 204781)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts-expected.html 2016-08-23 08:32:31 UTC (rev 204781)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we layout both subtrees when they change the same time with selection on.</title>
+</head>
+<body>
+<div>
+ <svg height="30" width="200">
+ <text id=first x="0" y="15">second</text>
+ </svg>
+</div>
+<div>
+ <svg height="30" width="200">
+ <text id=second x="0" y="15">first</text>
+ </svg>
+</div>
+</body>
+</html>
Added: releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts.html (0 => 204781)
--- releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/LayoutTests/fast/misc/subtree-layouts.html 2016-08-23 08:32:31 UTC (rev 204781)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>This tests that we layout both subtrees when they change the same time with selection on.</title>
+</head>
+<body>
+<div>
+ <svg height="30" width="200">
+ <text id=first x="0" y="15">first</text>
+ </svg>
+</div>
+<div>
+ <svg height="30" width="200">
+ <text id=second x="0" y="15">second</text>
+ </svg>
+</div>
+
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+var selection = window.getSelection();
+var range = document.createRange();
+range.selectNodeContents(document.getElementById("second"));
+selection.addRange(range);
+
+setTimeout(function() {
+ document.getElementById("first").textContent = "second";
+ document.getElementById("second").textContent = "first";
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 0);
+</script>
+</body>
+</html>
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (204780 => 204781)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-08-23 08:31:07 UTC (rev 204780)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-08-23 08:32:31 UTC (rev 204781)
@@ -1,3 +1,32 @@
+2016-07-19 Zalan Bujtas <[email protected]>
+
+ theguardian.co.uk crossword puzzles are sometimes not displaying text
+ https://bugs.webkit.org/show_bug.cgi?id=159924
+ <rdar://problem/27409483>
+
+ Reviewed by Simon Fraser.
+
+ This patch fixes the case when
+ - 2 disjoint subtrees are dirty
+ - RenderView is also dirty.
+ and we end up not laying out one of the 2 subtrees.
+
+ In FrameView::scheduleRelayoutOfSubtree, we assume that when the RenderView is dirty
+ we already have a pending full layout which means that any previous subtree layouts have already been
+ converted to full layouts.
+ However this assumption is incorrect. RenderView can get dirty without checking if there's
+ already a pending subtree layout.
+ One option to solve this problem would be to override RenderObject::setNeedsLayout in RenderView
+ so that when the RenderView gets dirty, we could also convert any pending subtree layout to full layout.
+ However RenderObject::setNeedsLayout is a hot function and making it virtual would impact performance.
+ The other option is to always normalize subtree layouts in FrameView::scheduleRelayoutOfSubtree().
+ This patch implements the second option.
+
+ Test: fast/misc/subtree-layouts.html
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::scheduleRelayoutOfSubtree):
+
2016-07-11 Zalan Bujtas <[email protected]>
Unable to edit fields or drag to select text in Dashboard widgets.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp (204780 => 204781)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp 2016-08-23 08:31:07 UTC (rev 204780)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp 2016-08-23 08:32:31 UTC (rev 204781)
@@ -2649,7 +2649,9 @@
ASSERT(!renderView.documentBeingDestroyed());
ASSERT(frame().view() == this);
- if (renderView.needsLayout()) {
+ // When m_layoutRoot is already set, ignore the renderView's needsLayout bit
+ // since we need to resolve the conflict between the m_layoutRoot and newRelayoutRoot layouts.
+ if (renderView.needsLayout() && !m_layoutRoot) {
m_layoutRoot = &newRelayoutRoot;
convertSubtreeLayoutToFullLayout();
return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes