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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/forced-layout-only-in-document.html

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 4
5 <div id="mutator"></div> 5 <div id="mutator"></div>
6 6
7 <script> 7 <script>
8 description("Element APIs should not force layout for nodes not in the active do cument."); 8 description("Element APIs should not force layout for nodes not in the active do cument.");
9 9
10 var testStatements = [ 10 var testStatements = [
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 var mutator = document.getElementById("mutator"); 42 var mutator = document.getElementById("mutator");
43 var element = document.createElement("div"); 43 var element = document.createElement("div");
44 var causedRecalc = false; 44 var causedRecalc = false;
45 for (var i = 0; i < testStatements.length; ++i) { 45 for (var i = 0; i < testStatements.length; ++i) {
46 var statement = testStatements[i]; 46 var statement = testStatements[i];
47 mutator.offsetTop; 47 mutator.offsetTop;
48 // Make the mutator's style dirty. 48 // Make the mutator's style dirty.
49 mutator.style.flexGrow = i; 49 mutator.style.flexGrow = i;
50 eval(statement); 50 eval(statement);
51 // The mutator element should still be dirty. 51 // The mutator element should still be dirty.
52 if (internals.updateStyleAndReturnAffectedElementCount() != 1) { 52 if (internals.updateStyleAndLayoutAndReturnAffectedElementCount() != 1) {
53 causedRecalc = true; 53 causedRecalc = true;
54 testFailed(statement + " caused a style or layout update."); 54 testFailed(statement + " caused a style or layout update.");
55 } 55 }
56 } 56 }
57 if (!causedRecalc) 57 if (!causedRecalc)
58 testPassed("No style or layout updates."); 58 testPassed("No style or layout updates.");
59 </script> 59 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698