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/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/LayoutView.h" 7 #include "core/layout/LayoutView.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.containsText()); 273 EXPECT_FALSE(frame2.containsText());
274 274
275 LayoutView* iframeLayoutView = childFrame->contentDocument()->layoutView(); 275 LayoutView* iframeLayoutView = childFrame->contentDocument()->layoutView();
276 const DisplayItemList& displayItemList = iframeLayoutView->layer()->graphics LayerBacking()->getPaintController().getDisplayItemList(); 276 const DisplayItemList& displayItemList = iframeLayoutView->layer()->graphics LayerBacking()->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 17 matching lines...) Expand all
295 // painting the real content to avoid FOUC. 295 // painting the real content to avoid FOUC.
296 cssResource.complete(); 296 cssResource.complete();
297 297
298 // First frame where all frames are loaded, should paint the text in the 298 // First frame where all frames are loaded, should paint the text in the
299 // child frame. 299 // child frame.
300 auto frame3 = compositor().beginFrame(); 300 auto frame3 = compositor().beginFrame();
301 EXPECT_TRUE(frame3.containsText()); 301 EXPECT_TRUE(frame3.containsText());
302 } 302 }
303 303
304 } // namespace blink 304 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698