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

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

Issue 1544423002: Improve positioned/percentHeight descendant/container tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 6645 matching lines...) Expand 10 before | Expand all | Expand 10 after
6656 6656
6657 WebView* webView = webViewHelper.webView(); 6657 WebView* webView = webViewHelper.webView();
6658 webViewHelper.resize(WebSize(800, 800)); 6658 webViewHelper.resize(WebSize(800, 800));
6659 webView->updateAllLifecyclePhases(); 6659 webView->updateAllLifecyclePhases();
6660 6660
6661 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc ument(); 6661 Document* document = toWebLocalFrameImpl(webView->mainFrame())->frame()->doc ument();
6662 LayoutBlock* container = toLayoutBlock(document->getElementById("container") ->layoutObject()); 6662 LayoutBlock* container = toLayoutBlock(document->getElementById("container") ->layoutObject());
6663 LayoutBox* percentHeightInAnonymous = toLayoutBox(document->getElementById(" percent-height-in-anonymous")->layoutObject()); 6663 LayoutBox* percentHeightInAnonymous = toLayoutBox(document->getElementById(" percent-height-in-anonymous")->layoutObject());
6664 LayoutBox* percentHeightDirectChild = toLayoutBox(document->getElementById(" percent-height-direct-child")->layoutObject()); 6664 LayoutBox* percentHeightDirectChild = toLayoutBox(document->getElementById(" percent-height-direct-child")->layoutObject());
6665 6665
6666 EXPECT_TRUE(LayoutBlock::hasPercentHeightDescendant(percentHeightInAnonymous )); 6666 EXPECT_TRUE(container->hasPercentHeightDescendant(percentHeightInAnonymous)) ;
6667 EXPECT_TRUE(LayoutBlock::hasPercentHeightDescendant(percentHeightDirectChild )); 6667 EXPECT_TRUE(container->hasPercentHeightDescendant(percentHeightDirectChild)) ;
6668 6668
6669 ASSERT_TRUE(container->percentHeightDescendants()); 6669 ASSERT_TRUE(container->percentHeightDescendants());
6670 ASSERT_TRUE(container->hasPercentHeightDescendants()); 6670 ASSERT_TRUE(container->hasPercentHeightDescendants());
6671 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); 6671 EXPECT_EQ(2U, container->percentHeightDescendants()->size());
6672 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA nonymous)); 6672 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA nonymous));
6673 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir ectChild)); 6673 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir ectChild));
6674 6674
6675 LayoutBlock* anonymousBlock = percentHeightInAnonymous->containingBlock(); 6675 LayoutBlock* anonymousBlock = percentHeightInAnonymous->containingBlock();
6676 EXPECT_TRUE(anonymousBlock->isAnonymous()); 6676 EXPECT_TRUE(anonymousBlock->isAnonymous());
6677 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); 6677 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants());
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
8405 } 8405 }
8406 8406
8407 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) 8407 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange)
8408 { 8408 {
8409 swapLocalFrameToRemoteFrame(); 8409 swapLocalFrameToRemoteFrame();
8410 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';")); 8410 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p arentElement.style.display = 'none';"));
8411 EXPECT_FALSE(remoteFrameClient()->isVisible()); 8411 EXPECT_FALSE(remoteFrameClient()->isVisible());
8412 } 8412 }
8413 8413
8414 } // namespace blink 8414 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698