OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 ASSERT(node); | 203 ASSERT(node); |
204 // Apparently we're only interested in background images on spans and divs. | 204 // Apparently we're only interested in background images on spans and divs. |
205 if (!isHTMLSpanElement(*node) && !isHTMLDivElement(*node)) | 205 if (!isHTMLSpanElement(*node) && !isHTMLDivElement(*node)) |
206 return true; | 206 return true; |
207 | 207 |
208 // This check actually makes a bit of sense. If you're going to sprite an | 208 // This check actually makes a bit of sense. If you're going to sprite an |
209 // image out of a CSS background, you're probably going to specify a height | 209 // image out of a CSS background, you're probably going to specify a height |
210 // or a width. On the other hand, if we've got a legit background image, | 210 // or a width. On the other hand, if we've got a legit background image, |
211 // it's very likely the height or the width will be set to auto. | 211 // it's very likely the height or the width will be set to auto. |
212 LayoutObject* layoutObject = node->layoutObject(); | 212 LayoutObject* layoutObject = node->layoutObject(); |
213 if (layoutObject && (layoutObject->style()->logicalHeight().isAuto() || | 213 if (layoutObject && |
214 layoutObject->style()->logicalWidth().isAuto())) | 214 (layoutObject->style()->logicalHeight().isAuto() || |
| 215 layoutObject->style()->logicalWidth().isAuto())) |
215 return true; | 216 return true; |
216 | 217 |
217 return false; | 218 return false; |
218 } | 219 } |
219 | 220 |
220 void SmartClip::collectOverlappingChildNodes( | 221 void SmartClip::collectOverlappingChildNodes( |
221 Node* parentNode, | 222 Node* parentNode, |
222 const IntRect& cropRectInViewport, | 223 const IntRect& cropRectInViewport, |
223 HeapVector<Member<Node>>& hitNodes) { | 224 HeapVector<Member<Node>>& hitNodes) { |
224 if (!parentNode) | 225 if (!parentNode) |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 264 |
264 result.append(nodeValue); | 265 result.append(nodeValue); |
265 } | 266 } |
266 } | 267 } |
267 } | 268 } |
268 | 269 |
269 return result.toString(); | 270 return result.toString(); |
270 } | 271 } |
271 | 272 |
272 } // namespace blink | 273 } // namespace blink |
OLD | NEW |