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

Side by Side Diff: third_party/WebKit/Source/web/tests/DocumentLoadingRenderingTest.cpp

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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/Document.h" 5 #include "core/dom/Document.h"
6 #include "core/html/HTMLIFrameElement.h" 6 #include "core/html/HTMLIFrameElement.h"
7 #include "core/layout/api/LayoutViewItem.h" 7 #include "core/layout/api/LayoutViewItem.h"
8 #include "core/paint/PaintLayer.h" 8 #include "core/paint/PaintLayer.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "web/tests/sim/SimCompositor.h" 10 #include "web/tests/sim/SimCompositor.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 "<div style='transform: translateZ(0); background: green;'>" 257 "<div style='transform: translateZ(0); background: green;'>"
258 " <p style='background: blue;'>Hello Layer</p>" 258 " <p style='background: blue;'>Hello Layer</p>"
259 " <div style='position: relative; background: red;'>Hello World</div> " 259 " <div style='position: relative; background: red;'>Hello World</div> "
260 "</div>" 260 "</div>"
261 ); 261 );
262 262
263 // Trigger a layout with pending sheets. For example a page could trigger 263 // Trigger a layout with pending sheets. For example a page could trigger
264 // this by doing offsetTop in a setTimeout, or by a parent frame executing 264 // this by doing offsetTop in a setTimeout, or by a parent frame executing
265 // script that touched offsetTop in the child frame. 265 // script that touched offsetTop in the child frame.
266 auto* childFrame = toHTMLIFrameElement(document().getElementById("frame")); 266 auto* childFrame = toHTMLIFrameElement(document().getElementById("frame"));
267 childFrame->contentDocument()->updateLayoutIgnorePendingStylesheets(); 267 childFrame->contentDocument()->updateStyleAndLayoutIgnorePendingStylesheets( );
268 268
269 auto frame2 = compositor().beginFrame(); 269 auto frame2 = compositor().beginFrame();
270 270
271 // The child frame still has pending sheets, and the parent frame has no 271 // The child frame still has pending sheets, and the parent frame has no
272 // invalid paint so we shouldn't draw any text. 272 // invalid paint so we shouldn't draw any text.
273 EXPECT_FALSE(frame2.contains(SimCanvas::Text)); 273 EXPECT_FALSE(frame2.contains(SimCanvas::Text));
274 274
275 LayoutViewItem iframeLayoutViewItem = childFrame->contentDocument()->layoutV iewItem(); 275 LayoutViewItem iframeLayoutViewItem = childFrame->contentDocument()->layoutV iewItem();
276 const DisplayItemList& displayItemList = iframeLayoutViewItem.layer()->graph icsLayerBacking()->getPaintController().getDisplayItemList(); 276 const DisplayItemList& displayItemList = iframeLayoutViewItem.layer()->graph icsLayerBacking()->getPaintController().getDisplayItemList();
277 // Check that the DisplayItemList has no subsequene caching markers. These a re not allowed in pending-style-sheets mode 277 // Check that the DisplayItemList has no subsequene caching markers. These a re not allowed in pending-style-sheets mode
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 cssBodyResource.complete("a { color: red; }"); 336 cssBodyResource.complete("a { color: red; }");
337 EXPECT_TRUE(document().isRenderingReady()); 337 EXPECT_TRUE(document().isRenderingReady());
338 338
339 // Finish the load, painting should stay enabled. 339 // Finish the load, painting should stay enabled.
340 mainResource.finish(); 340 mainResource.finish();
341 EXPECT_TRUE(document().isRenderingReady()); 341 EXPECT_TRUE(document().isRenderingReady());
342 } 342 }
343 343
344 344
345 } // namespace blink 345 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/mac/WebSubstringUtil.mm ('k') | third_party/WebKit/Source/web/tests/WebDocumentTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698