Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1097 forceFullCompositingUpdate(); | 1097 forceFullCompositingUpdate(); |
| 1098 ASSERT_FALSE(frameView->mainThreadScrollingReasons()); | 1098 ASSERT_FALSE(frameView->mainThreadScrollingReasons()); |
| 1099 } | 1099 } |
| 1100 } | 1100 } |
| 1101 }; | 1101 }; |
| 1102 | 1102 |
| 1103 INSTANTIATE_TEST_CASE_P(All, | 1103 INSTANTIATE_TEST_CASE_P(All, |
| 1104 StyleRelatedMainThreadScrollingReasonTest, | 1104 StyleRelatedMainThreadScrollingReasonTest, |
| 1105 ::testing::Bool()); | 1105 ::testing::Bool()); |
| 1106 | 1106 |
| 1107 TEST_P(StyleRelatedMainThreadScrollingReasonTest, TransparentTest) { | 1107 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransparentTest) { |
|
pdr.
2017/03/21 21:11:06
Please add a link to the bug that will fix this he
| |
| 1108 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText); | 1108 testStyle("transparent", MainThreadScrollingReason::kHasOpacityAndLCDText); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 TEST_P(StyleRelatedMainThreadScrollingReasonTest, TransformTest) { | 1111 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_TransformTest) { |
| 1112 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText); | 1112 testStyle("transform", MainThreadScrollingReason::kHasTransformAndLCDText); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BackgroundNotOpaqueTest) { | 1115 TEST_P(StyleRelatedMainThreadScrollingReasonTest, |
| 1116 DISABLED_BackgroundNotOpaqueTest) { | |
| 1116 testStyle("background-not-opaque", | 1117 testStyle("background-not-opaque", |
| 1117 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText); | 1118 MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText); |
| 1118 } | 1119 } |
| 1119 | 1120 |
| 1120 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BorderRadiusTest) { | 1121 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_BorderRadiusTest) { |
| 1121 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius); | 1122 testStyle("border-radius", MainThreadScrollingReason::kHasBorderRadius); |
| 1122 } | 1123 } |
| 1123 | 1124 |
| 1124 TEST_P(StyleRelatedMainThreadScrollingReasonTest, ClipTest) { | 1125 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipTest) { |
| 1125 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty); | 1126 testStyle("clip", MainThreadScrollingReason::kHasClipRelatedProperty); |
| 1126 } | 1127 } |
| 1127 | 1128 |
| 1128 TEST_P(StyleRelatedMainThreadScrollingReasonTest, ClipPathTest) { | 1129 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_ClipPathTest) { |
| 1129 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty; | 1130 uint32_t reason = MainThreadScrollingReason::kHasClipRelatedProperty; |
| 1130 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false); | 1131 webViewImpl()->settings()->setPreferCompositingToLCDTextEnabled(false); |
| 1131 Document* document = frame()->document(); | 1132 Document* document = frame()->document(); |
| 1132 // Test ancestor with ClipPath | 1133 // Test ancestor with ClipPath |
| 1133 Element* element = document->body(); | 1134 Element* element = document->body(); |
| 1134 DCHECK(element); | 1135 DCHECK(element); |
| 1135 element->setAttribute(HTMLNames::styleAttr, | 1136 element->setAttribute(HTMLNames::styleAttr, |
| 1136 "clip-path:circle(115px at 20px 20px);"); | 1137 "clip-path:circle(115px at 20px 20px);"); |
| 1137 forceFullCompositingUpdate(); | 1138 forceFullCompositingUpdate(); |
| 1138 | 1139 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 1153 "clip-path:circle(115px at 20px 20px);"); | 1154 "clip-path:circle(115px at 20px 20px);"); |
| 1154 forceFullCompositingUpdate(); | 1155 forceFullCompositingUpdate(); |
| 1155 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason); | 1156 ASSERT_TRUE(frameView->mainThreadScrollingReasons() & reason); |
| 1156 | 1157 |
| 1157 // Remove clip path from descendant. | 1158 // Remove clip path from descendant. |
| 1158 element->removeAttribute(HTMLNames::styleAttr); | 1159 element->removeAttribute(HTMLNames::styleAttr); |
| 1159 forceFullCompositingUpdate(); | 1160 forceFullCompositingUpdate(); |
| 1160 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason); | 1161 ASSERT_FALSE(frameView->mainThreadScrollingReasons() & reason); |
| 1161 } | 1162 } |
| 1162 | 1163 |
| 1163 TEST_P(StyleRelatedMainThreadScrollingReasonTest, LCDTextEnabledTest) { | 1164 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_LCDTextEnabledTest) { |
| 1164 testStyle("transparent border-radius", | 1165 testStyle("transparent border-radius", |
| 1165 MainThreadScrollingReason::kHasOpacityAndLCDText | | 1166 MainThreadScrollingReason::kHasOpacityAndLCDText | |
| 1166 MainThreadScrollingReason::kHasBorderRadius); | 1167 MainThreadScrollingReason::kHasBorderRadius); |
| 1167 } | 1168 } |
| 1168 | 1169 |
| 1169 TEST_P(StyleRelatedMainThreadScrollingReasonTest, BoxShadowTest) { | 1170 TEST_P(StyleRelatedMainThreadScrollingReasonTest, DISABLED_BoxShadowTest) { |
| 1170 testStyle("box-shadow", | 1171 testStyle("box-shadow", |
| 1171 MainThreadScrollingReason::kHasBoxShadowFromNonRootLayer); | 1172 MainThreadScrollingReason::kHasBoxShadowFromNonRootLayer); |
| 1172 } | 1173 } |
| 1173 | 1174 |
| 1174 } // namespace blink | 1175 } // namespace blink |
| OLD | NEW |