Title: [262960] trunk
- Revision
- 262960
- Author
- an...@apple.com
- Date
- 2020-06-12 11:22:31 -0700 (Fri, 12 Jun 2020)
Log Message
REGRESSION (r262618): Very slow typing in a github issue
https://bugs.webkit.org/show_bug.cgi?id=213137
<rdar://problem/64214117>
Reviewed by Darin Adler.
Source/WebCore:
Test: fast/media/media-query-keyframes-resolution-count.html
If a stylesheet had multiple media queries and one of them forced static resolution
(by containing @keyframes rule for example) we would end up reseting the style multiple
times and forcing unneeded style resolutions.
* style/RuleSet.cpp:
(WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
We can't bail out from the loop. Even though the result is known we still need to loop to
save the evaluation result for all media queries.
LayoutTests:
* fast/media/media-query-keyframes-resolution-count-expected.txt: Added.
* fast/media/media-query-keyframes-resolution-count.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (262959 => 262960)
--- trunk/LayoutTests/ChangeLog 2020-06-12 18:03:48 UTC (rev 262959)
+++ trunk/LayoutTests/ChangeLog 2020-06-12 18:22:31 UTC (rev 262960)
@@ -1,3 +1,14 @@
+2020-06-12 Antti Koivisto <an...@apple.com>
+
+ REGRESSION (r262618): Very slow typing in a github issue
+ https://bugs.webkit.org/show_bug.cgi?id=213137
+ <rdar://problem/64214117>
+
+ Reviewed by Darin Adler.
+
+ * fast/media/media-query-keyframes-resolution-count-expected.txt: Added.
+ * fast/media/media-query-keyframes-resolution-count.html: Added.
+
2020-06-12 Antoine Quint <grao...@webkit.org>
Double tap to zoom out doesn't work after upgrading to iOS 13
Added: trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count-expected.txt (0 => 262960)
--- trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count-expected.txt 2020-06-12 18:22:31 UTC (rev 262960)
@@ -0,0 +1,2 @@
+Resolving media queries should not require more than 1 style resolution.
+Style resolution count: 1
Added: trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count.html (0 => 262960)
--- trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count.html (rev 0)
+++ trunk/LayoutTests/fast/media/media-query-keyframes-resolution-count.html 2020-06-12 18:22:31 UTC (rev 262960)
@@ -0,0 +1,36 @@
+<style>
+body { background-color: green }
+
+@media (min-width:10000px) {
+ body { background-color: red }
+
+ @keyframes fade {
+ 0% { opacity: 0; }
+ 100% { opacity: 1; }
+ }
+}
+
+@media (min-width:10000px) {
+ body { background-color: blue }
+}
+</style>
+Resolving media queries should not require more than 1 style resolution.
+<pre id=log></pre>
+<script>
+
+async function test() {
+ if (!window.internals)
+ return;
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+
+ internals.startTrackingStyleRecalcs();
+
+ await new Promise(requestAnimationFrame);
+
+ log.textContent = `Style resolution count: ${ internals.styleRecalcCount() }`;
+
+ testRunner.notifyDone();
+}
+test();
+</script>
Modified: trunk/Source/WebCore/ChangeLog (262959 => 262960)
--- trunk/Source/WebCore/ChangeLog 2020-06-12 18:03:48 UTC (rev 262959)
+++ trunk/Source/WebCore/ChangeLog 2020-06-12 18:22:31 UTC (rev 262960)
@@ -1,3 +1,23 @@
+2020-06-12 Antti Koivisto <an...@apple.com>
+
+ REGRESSION (r262618): Very slow typing in a github issue
+ https://bugs.webkit.org/show_bug.cgi?id=213137
+ <rdar://problem/64214117>
+
+ Reviewed by Darin Adler.
+
+ Test: fast/media/media-query-keyframes-resolution-count.html
+
+ If a stylesheet had multiple media queries and one of them forced static resolution
+ (by containing @keyframes rule for example) we would end up reseting the style multiple
+ times and forcing unneeded style resolutions.
+
+ * style/RuleSet.cpp:
+ (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules):
+
+ We can't bail out from the loop. Even though the result is known we still need to loop to
+ save the evaluation result for all media queries.
+
2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohz...@gmail.com>
FileReader.error should be DOMException now
Modified: trunk/Source/WebCore/style/RuleSet.cpp (262959 => 262960)
--- trunk/Source/WebCore/style/RuleSet.cpp 2020-06-12 18:03:48 UTC (rev 262959)
+++ trunk/Source/WebCore/style/RuleSet.cpp 2020-06-12 18:22:31 UTC (rev 262960)
@@ -437,7 +437,7 @@
if (dynamicRules.requiresFullReset) {
collectedChanges.requiredFullReset = true;
- return collectedChanges;
+ continue;
}
traverseRuleDatas([&](RuleData& ruleData) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes