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

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

Issue 2766353002: Merge the patch back into M57 (Closed)
Patch Set: Created 3 years, 9 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/frame/FrameView.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 1085
1086 if ((reason & m_LCDTextRelatedReasons) && 1086 if ((reason & m_LCDTextRelatedReasons) &&
1087 !(reason & ~m_LCDTextRelatedReasons)) { 1087 !(reason & ~m_LCDTextRelatedReasons)) {
1088 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(true); 1088 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(true);
1089 forceFullCompositingUpdate(); 1089 forceFullCompositingUpdate();
1090 ASSERT_FALSE(frameView->mainThreadScrollingReasons()); 1090 ASSERT_FALSE(frameView->mainThreadScrollingReasons());
1091 } 1091 }
1092 } 1092 }
1093 }; 1093 };
1094 1094
1095 TEST_F(StyleRelatedMainThreadScrollingReasonTest, TransparentTest) { 1095 // TODO(yigu): This test and all other style realted main thread scrolling
1096 // reason tests below have been disabled due to https://crbug.com/701355.
1097 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransparentTest) {
1096 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText); 1098 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText);
1097 } 1099 }
1098 1100
1099 TEST_F(StyleRelatedMainThreadScrollingReasonTest, TransformTest) { 1101 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransformTest) {
1100 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText); 1102 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText);
1101 } 1103 }
1102 1104
1103 TEST_F(StyleRelatedMainThreadScrollingReasonTest, BackgroundNotOpaqueTest) { 1105 TEST_F(StyleRelatedMainThreadScrollingReasonTest,
1106 DISABLED_BackgroundNotOpaqueTest) {
1104 testStyle("background-not-opaque", 1107 testStyle("background-not-opaque",
1105 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText); 1108 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText);
1106 } 1109 }
1107 1110
1108 TEST_F(StyleRelatedMainThreadScrollingReasonTest, BorderRadiusTest) { 1111 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_BorderRadiusTest) {
1109 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius); 1112 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius);
1110 } 1113 }
1111 1114
1112 TEST_F(StyleRelatedMainThreadScrollingReasonTest, ClipTest) { 1115 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipTest) {
1113 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty); 1116 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty);
1114 } 1117 }
1115 1118
1116 TEST_F(StyleRelatedMainThreadScrollingReasonTest, ClipPathTest) { 1119 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipPathTest) {
1117 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty; 1120 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty;
1118 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false); 1121 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false);
1119 Document* document = frame()->document(); 1122 Document* document = frame()->document();
1120 // Test ancestor with ClipPath 1123 // Test ancestor with ClipPath
1121 Element* element = document->body(); 1124 Element* element = document->body();
1122 DCHECK(element); 1125 DCHECK(element);
1123 element->setAttribute(HTMLNames::styleAttr, 1126 element->setAttribute(HTMLNames::styleAttr,
1124 "clip-path:circle(115px at 20px 20px);"); 1127 "clip-path:circle(115px at 20px 20px);");
1125 forceFullCompositingUpdate(); 1128 forceFullCompositingUpdate();
1126 1129
(...skipping 14 matching lines...) Expand all
1141 "clip-path:circle(115px at 20px 20px);"); 1144 "clip-path:circle(115px at 20px 20px);");
1142 forceFullCompositingUpdate(); 1145 forceFullCompositingUpdate();
1143 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason); 1146 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason);
1144 1147
1145 // Remove clip path from descendant. 1148 // Remove clip path from descendant.
1146 element->removeAttribute(HTMLNames::styleAttr); 1149 element->removeAttribute(HTMLNames::styleAttr);
1147 forceFullCompositingUpdate(); 1150 forceFullCompositingUpdate();
1148 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason); 1151 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason);
1149 } 1152 }
1150 1153
1151 TEST_F(StyleRelatedMainThreadScrollingReasonTest, LCDTextEnabledTest) { 1154 TEST_F(StyleRelatedMainThreadScrollingReasonTest, DISABLED_LCDTextEnabledTest) {
1152 testStyle("transparent border-radius", 1155 testStyle("transparent border-radius",
1153 MainThreadScrollingReason::kHasOpacityAndLCDText | 1156 MainThreadScrollingReason::kHasOpacityAndLCDText |
1154 MainThreadScrollingReason::kHasBorderRadius); 1157 MainThreadScrollingReason::kHasBorderRadius);
1155 } 1158 }
1156 1159
1157 } // namespace blink 1160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698