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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 ASSERT_NEAR(1.2, webScrollLayer->scrollPositionDouble().y, 0.01); | 176 ASSERT_NEAR(1.2, webScrollLayer->scrollPositionDouble().y, 0.01); |
177 } | 177 } |
178 | 178 |
179 static WebLayer* webLayerFromElement(Element* element) | 179 static WebLayer* webLayerFromElement(Element* element) |
180 { | 180 { |
181 if (!element) | 181 if (!element) |
182 return 0; | 182 return 0; |
183 LayoutObject* renderer = element->renderer(); | 183 LayoutObject* renderer = element->renderer(); |
184 if (!renderer || !renderer->isBoxModelObject()) | 184 if (!renderer || !renderer->isBoxModelObject()) |
185 return 0; | 185 return 0; |
186 Layer* layer = toRenderBoxModelObject(renderer)->layer(); | 186 Layer* layer = toLayoutBoxModelObject(renderer)->layer(); |
187 if (!layer) | 187 if (!layer) |
188 return 0; | 188 return 0; |
189 if (!layer->hasCompositedLayerMapping()) | 189 if (!layer->hasCompositedLayerMapping()) |
190 return 0; | 190 return 0; |
191 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi
ng(); | 191 CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMappi
ng(); |
192 GraphicsLayer* graphicsLayer = compositedLayerMapping->mainGraphicsLayer(); | 192 GraphicsLayer* graphicsLayer = compositedLayerMapping->mainGraphicsLayer(); |
193 if (!graphicsLayer) | 193 if (!graphicsLayer) |
194 return 0; | 194 return 0; |
195 return graphicsLayer->platformLayer(); | 195 return graphicsLayer->platformLayer(); |
196 } | 196 } |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 WebLayer* contentsLayer = scrollbarGraphicsLayer->contentsLayer(); | 575 WebLayer* contentsLayer = scrollbarGraphicsLayer->contentsLayer(); |
576 ASSERT_TRUE(contentsLayer); | 576 ASSERT_TRUE(contentsLayer); |
577 | 577 |
578 // After scrollableAreaScrollbarLayerDidChange, | 578 // After scrollableAreaScrollbarLayerDidChange, |
579 // if the main frame's scrollbarLayer is opaque, | 579 // if the main frame's scrollbarLayer is opaque, |
580 // contentsLayer should be opaque too. | 580 // contentsLayer should be opaque too. |
581 ASSERT_EQ(platformLayer->opaque(), contentsLayer->opaque()); | 581 ASSERT_EQ(platformLayer->opaque(), contentsLayer->opaque()); |
582 } | 582 } |
583 | 583 |
584 } // namespace | 584 } // namespace |
OLD | NEW |