| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 settings->setViewportEnabled(true); | 697 settings->setViewportEnabled(true); |
| 698 settings->setMainFrameResizesAreOrientationChanges(true); | 698 settings->setMainFrameResizesAreOrientationChanges(true); |
| 699 settings->setShrinksViewportContentToFit(true); | 699 settings->setShrinksViewportContentToFit(true); |
| 700 } | 700 } |
| 701 | 701 |
| 702 // Helper function to set autosizing multipliers on a document. | 702 // Helper function to set autosizing multipliers on a document. |
| 703 static bool setTextAutosizingMultiplier(Document* document, float multiplier) | 703 static bool setTextAutosizingMultiplier(Document* document, float multiplier) |
| 704 { | 704 { |
| 705 bool multiplierSet = false; | 705 bool multiplierSet = false; |
| 706 for (RenderObject* renderer = document->renderView(); renderer; renderer = r
enderer->nextInPreOrder()) { | 706 for (RenderObject* renderer = document->renderView(); renderer; renderer = r
enderer->nextInPreOrder()) { |
| 707 if (renderer->style()) { | 707 if (RenderStyle* style = renderer->deprecatedMutableStyle()) { |
| 708 renderer->style()->setTextAutosizingMultiplier(multiplier); | 708 style->setTextAutosizingMultiplier(multiplier); |
| 709 | 709 |
| 710 EXPECT_EQ(multiplier, renderer->style()->textAutosizingMultiplier())
; | 710 EXPECT_EQ(multiplier, style->textAutosizingMultiplier()); |
| 711 multiplierSet = true; | 711 multiplierSet = true; |
| 712 } | 712 } |
| 713 } | 713 } |
| 714 return multiplierSet; | 714 return multiplierSet; |
| 715 } | 715 } |
| 716 | 716 |
| 717 // Helper function to check autosizing multipliers on a document. | 717 // Helper function to check autosizing multipliers on a document. |
| 718 static bool checkTextAutosizingMultiplier(Document* document, float multiplier) | 718 static bool checkTextAutosizingMultiplier(Document* document, float multiplier) |
| 719 { | 719 { |
| 720 bool multiplierChecked = false; | 720 bool multiplierChecked = false; |
| (...skipping 6296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7017 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7017 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7018 | 7018 |
| 7019 // Neither should a page reload. | 7019 // Neither should a page reload. |
| 7020 localFrame->reload(); | 7020 localFrame->reload(); |
| 7021 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 7021 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
| 7022 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 7022 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
| 7023 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7023 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
| 7024 } | 7024 } |
| 7025 | 7025 |
| 7026 } // namespace | 7026 } // namespace |
| OLD | NEW |