Title: [223380] releases/WebKitGTK/webkit-2.18
- Revision
- 223380
- Author
- [email protected]
- Date
- 2017-10-16 03:56:58 -0700 (Mon, 16 Oct 2017)
Log Message
Merge r222168 - Always update display: contents styles in RenderTreeUpdater.
https://bugs.webkit.org/show_bug.cgi?id=177065
Patch by Emilio Cobos Álvarez <[email protected]> on 2017-09-18
Reviewed by Antti Koivisto.
Source/WebCore:
Otherwise we keep an old style around, making following style updates wrong.
Test: fast/css/display-contents-style-update.html
* style/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateElementRenderer):
LayoutTests:
* fast/css/display-contents-style-update-expected.html: Added.
* fast/css/display-contents-style-update.html: Added.
Modified Paths
Added Paths
Diff
Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog (223379 => 223380)
--- releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog 2017-10-16 10:55:24 UTC (rev 223379)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/ChangeLog 2017-10-16 10:56:58 UTC (rev 223380)
@@ -1,3 +1,13 @@
+2017-09-18 Emilio Cobos Álvarez <[email protected]>
+
+ Always update display: contents styles in RenderTreeUpdater.
+ https://bugs.webkit.org/show_bug.cgi?id=177065
+
+ Reviewed by Antti Koivisto.
+
+ * fast/css/display-contents-style-update-expected.html: Added.
+ * fast/css/display-contents-style-update.html: Added.
+
2017-09-18 Antti Koivisto <[email protected]>
Avoid style resolution when clearing focused element.
Modified: releases/WebKitGTK/webkit-2.18/LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt (223379 => 223380)
--- releases/WebKitGTK/webkit-2.18/LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt 2017-10-16 10:55:24 UTC (rev 223379)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/editing/execCommand/justify-right-then-indent-with-problematic-body-expected.txt 2017-10-16 10:56:58 UTC (rev 223380)
@@ -1,3 +1,2 @@
Pass.
WebKit didn't Crash.
-
Added: releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update-expected.html (0 => 223380)
--- releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update-expected.html (rev 0)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update-expected.html 2017-10-16 10:56:58 UTC (rev 223380)
@@ -0,0 +1,4 @@
+<!doctype html>
+<div style="color: green;">
+ Passes if the text is green and there's no border.
+</div>
Added: releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update.html (0 => 223380)
--- releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update.html (rev 0)
+++ releases/WebKitGTK/webkit-2.18/LayoutTests/fast/css/display-contents-style-update.html 2017-10-16 10:56:58 UTC (rev 223380)
@@ -0,0 +1,15 @@
+<!doctype html>
+<div id="contents" style="display: contents; color: green; border: 10px solid red;">
+ <div>
+ Passes if the text is green and there's no border.
+ </div>
+</div>
+<script>
+document.body.offsetTop;
+
+let contents = document.getElementById("contents");
+
+contents.style.color = "red";
+document.body.offsetTop;
+contents.style.color = "green";
+</script>
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog (223379 => 223380)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-10-16 10:55:24 UTC (rev 223379)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/ChangeLog 2017-10-16 10:56:58 UTC (rev 223380)
@@ -1,3 +1,17 @@
+2017-09-18 Emilio Cobos Álvarez <[email protected]>
+
+ Always update display: contents styles in RenderTreeUpdater.
+ https://bugs.webkit.org/show_bug.cgi?id=177065
+
+ Reviewed by Antti Koivisto.
+
+ Otherwise we keep an old style around, making following style updates wrong.
+
+ Test: fast/css/display-contents-style-update.html
+
+ * style/RenderTreeUpdater.cpp:
+ (WebCore::RenderTreeUpdater::updateElementRenderer):
+
2017-09-18 Antti Koivisto <[email protected]>
Avoid style resolution when clearing focused element.
Modified: releases/WebKitGTK/webkit-2.18/Source/WebCore/style/RenderTreeUpdater.cpp (223379 => 223380)
--- releases/WebKitGTK/webkit-2.18/Source/WebCore/style/RenderTreeUpdater.cpp 2017-10-16 10:55:24 UTC (rev 223379)
+++ releases/WebKitGTK/webkit-2.18/Source/WebCore/style/RenderTreeUpdater.cpp 2017-10-16 10:56:58 UTC (rev 223380)
@@ -306,12 +306,10 @@
}
bool hasDisplayContents = update.style->display() == CONTENTS;
- if (hasDisplayContents != element.hasDisplayContents()) {
- if (!hasDisplayContents)
- element.resetComputedStyle();
- else
- element.storeDisplayContentsStyle(RenderStyle::clonePtr(*update.style));
- }
+ if (hasDisplayContents)
+ element.storeDisplayContentsStyle(RenderStyle::clonePtr(*update.style));
+ else
+ element.resetComputedStyle();
bool shouldCreateNewRenderer = !element.renderer() && !hasDisplayContents;
if (shouldCreateNewRenderer) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes