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

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

Issue 944923004: rendering/RenderBoxModelObject -> layout/LayoutBoxModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebElement.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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/web/WebElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698