+2013-11-19 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [CSS Regions] Add performance test for selection
+ https://bugs.webkit.org/show_bug.cgi?id=119230
+
+ Reviewed by Ryosuke Niwa.
+
+ Add new performance test for selection in CSS Regions. It checks a
+ selection from the first region to the last one, passing through all the
+ regions.
+
+ Test is skipped for now while implementation of selection in CSS Regions
+ is still evolving.
+
+ * Layout/RegionsSelection.html: Added.
+ * Layout/resources/regions.js:
+ (.):
+ * Skipped:
+
2013-11-18 Ryosuke Niwa <rniwa@webkit.org>
Simplify and reformat the output of performance tests inside test runners
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+ <script src="../resources/runner.js"></script>
+ <script src="resources/regions.js"></script>
+ <style type="text/css">
+ #log {
+ position: fixed;
+ }
+ </style>
+ </head>
+ <body>
+ <pre id="log"></pre>
+ <script>
+ PerfTestRunner.measureTime(createRegionsSelectionTest(100));
+ </script>
+ </body>
+</html>
};
}
+ function mouseMoveToRegionCenter(region) {
+ var rect = region.getBoundingClientRect();
+ eventSender.mouseMoveTo(rect.left + (rect.width / 2), rect.top + (rect.height / 2));
+ }
+
+ function performSelection(regionCount) {
+ var regions = document.getElementsByClassName("region");
+
+ if (window.eventSender) {
+ mouseMoveToRegionCenter(regions[0]);
+ eventSender.mouseDown();
+
+ for (var i = 1; i < regionCount; i++)
+ mouseMoveToRegionCenter(regions[i]);
+
+ eventSender.mouseUp();
+ }
+ }
+
+ function createRegionsSelectionTest(regionCount) {
+ var article = createArticle(regionCount, 1);
+ article.className = "articleInFlow";
+ var regions = createRegions("600px", "auto", regionCount, "auto");
+ document.body.appendChild(article);
+ document.body.appendChild(regions);
+ return {
+ description: "Testing selection with " + regionCount + " regions. Select text from first region to last one passing through all the regions.",
+ run: function() {
+ performSelection(regionCount);
+ },
+ setup: function() {
+ window.getSelection().removeAllRanges();
+ },
+ done: function() {
+ document.body.removeChild(article);
+ document.body.removeChild(regions);
+ templateParagraph = null;
+ templateRegion = null;
+ }
+ };
+ }
+
window.createRegionsTest = createRegionsTest;
+ window.createRegionsSelectionTest = createRegionsSelectionTest;
+
})();
Layout/RegionsAutoMaxHeight.html
Layout/RegionsFixed.html
Layout/RegionsFixedShort.html
+Layout/RegionsSelection.html
# https://bugs.webkit.org/show_bug.cgi?id=113811#c2
Layout/LineLayoutJapanese.html