| OLD | NEW |
| 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 | 669 |
| 670 WebScreenInfo m_screenInfo; | 670 WebScreenInfo m_screenInfo; |
| 671 }; | 671 }; |
| 672 | 672 |
| 673 // Viewport settings need to be set before the page gets loaded | 673 // Viewport settings need to be set before the page gets loaded |
| 674 static void enableViewportSettings(WebSettings* settings) | 674 static void enableViewportSettings(WebSettings* settings) |
| 675 { | 675 { |
| 676 settings->setViewportMetaEnabled(true); | 676 settings->setViewportMetaEnabled(true); |
| 677 settings->setViewportEnabled(true); | 677 settings->setViewportEnabled(true); |
| 678 settings->setMainFrameResizesAreOrientationChanges(true); | 678 settings->setMainFrameResizesAreOrientationChanges(true); |
| 679 settings->setShrinksViewportContentToFit(true); |
| 679 } | 680 } |
| 680 | 681 |
| 681 TEST_F(WebFrameTest, FrameViewNeedsLayoutOnFixedLayoutResize) | 682 TEST_F(WebFrameTest, FrameViewNeedsLayoutOnFixedLayoutResize) |
| 682 { | 683 { |
| 683 UseMockScrollbarSettings mockScrollbarSettings; | 684 UseMockScrollbarSettings mockScrollbarSettings; |
| 684 registerMockedHttpURLLoad("fixed_layout.html"); | 685 registerMockedHttpURLLoad("fixed_layout.html"); |
| 685 | 686 |
| 686 FixedLayoutTestWebViewClient client; | 687 FixedLayoutTestWebViewClient client; |
| 687 int viewportWidth = 640; | 688 int viewportWidth = 640; |
| 688 int viewportHeight = 480; | 689 int viewportHeight = 480; |
| (...skipping 4793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5482 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); | 5483 EXPECT_EQ(2U, container->percentHeightDescendants()->size()); |
| 5483 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); | 5484 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightInA
nonymous)); |
| 5484 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); | 5485 EXPECT_TRUE(container->percentHeightDescendants()->contains(percentHeightDir
ectChild)); |
| 5485 | 5486 |
| 5486 WebCore::RenderBlock* anonymousBlock = percentHeightInAnonymous->containingB
lock(); | 5487 WebCore::RenderBlock* anonymousBlock = percentHeightInAnonymous->containingB
lock(); |
| 5487 EXPECT_TRUE(anonymousBlock->isAnonymous()); | 5488 EXPECT_TRUE(anonymousBlock->isAnonymous()); |
| 5488 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); | 5489 EXPECT_FALSE(anonymousBlock->hasPercentHeightDescendants()); |
| 5489 } | 5490 } |
| 5490 | 5491 |
| 5491 } // namespace | 5492 } // namespace |
| OLD | NEW |