Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: PerformanceTests/flexbox-with-stretch-layout.html

Issue 129633004: Avoid unnecessary forced layout of flex items when stretching (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/css3/flexbox/repaint-on-layout-expected.txt ('k') | Source/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PerformanceTests/flexbox-with-stretch-layout.html
diff --git a/PerformanceTests/flexbox-with-stretch-layout.html b/PerformanceTests/flexbox-with-stretch-layout.html
new file mode 100644
index 0000000000000000000000000000000000000000..7be0d079ec4df3a537b5dad167ae704926c3d7af
--- /dev/null
+++ b/PerformanceTests/flexbox-with-stretch-layout.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/runner.js"></script>
+<style>
+
+#container {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.byteBox {
+ width: 9px;
+ font-size: 9px;
+}
+
+.inlineBlock {
+ font-family: Ahem;
+ width: 100%;
+ display: inline-block;
+}
+
+</style>
+</head>
+<body>
+
+<div id="container" style="">
+</div>
+
+</body>
+<script>
+
+var nbsp = '\u00A0';
+
+function setupTest()
+{
+ var container = document.getElementById("container");
+ for (var i = 0; i < 200; i++) {
+ var div = document.createElement("div");
+ div.className = "byteBox";
+ var span = document.createElement("span");
+ span.className = "inlineBlock";
+ span.innerText = nbsp;
+ div.appendChild(span);
+ container.appendChild(div);
+ };
+};
+
+setupTest();
+
+var switcher = true;
+
+function runTest()
+{
+ var inlineBlocks = document.getElementsByClassName("inlineBlock");
+ for (var i = inlineBlocks.length - 1; i >= 0; i--) {
+ inlineBlocks[i].innerText = switcher ? " " : nbsp;
+ inlineBlocks[i].offsetTop;
+ };
+ switcher = !switcher;
+};
+
+PerfTestRunner.measureRunsPerSecond({run: runTest });
+</script>
+</html>
« no previous file with comments | « LayoutTests/css3/flexbox/repaint-on-layout-expected.txt ('k') | Source/core/rendering/RenderFlexibleBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698