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 (LayoutObject* renderer = document->renderView(); renderer; renderer = r
enderer->nextInPreOrder()) { | 706 for (LayoutObject* renderer = document->renderView(); renderer; renderer = r
enderer->nextInPreOrder()) { |
707 if (renderer->style()) { | 707 if (LayoutStyle* style = renderer->mutableStyle()) { |
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 6343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7064 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7064 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
7065 | 7065 |
7066 // Neither should a page reload. | 7066 // Neither should a page reload. |
7067 localFrame->reload(); | 7067 localFrame->reload(); |
7068 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); | 7068 EXPECT_EQ(4u, frameClient.provisionalLoadCount()); |
7069 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); | 7069 EXPECT_FALSE(frameClient.wasLastProvisionalLoadATransition()); |
7070 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); | 7070 EXPECT_EQ(1u, frameClient.navigationalDataReceivedCount()); |
7071 } | 7071 } |
7072 | 7072 |
7073 } // namespace | 7073 } // namespace |
OLD | NEW |