OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 if (filterSkipped) | 2321 if (filterSkipped) |
2322 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor); | 2322 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor); |
2323 | 2323 |
2324 // We are now in our parent container's coordinate space. Apply our transform | 2324 // We are now in our parent container's coordinate space. Apply our transform |
2325 // to obtain a bounding box in the parent's coordinate space that encloses us. | 2325 // to obtain a bounding box in the parent's coordinate space that encloses us. |
2326 if (hasLayer() && layer()->transform()) { | 2326 if (hasLayer() && layer()->transform()) { |
2327 // Use enclosingIntRect because we cannot properly compute pixel snapping | 2327 // Use enclosingIntRect because we cannot properly compute pixel snapping |
2328 // for painted elements within the transform since we don't know the desired | 2328 // for painted elements within the transform since we don't know the desired |
2329 // subpixel accumulation at this point, and the transform may include a | 2329 // subpixel accumulation at this point, and the transform may include a |
2330 // scale. | 2330 // scale. |
2331 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect))); | 2331 FloatRect floatRect = |
| 2332 rect.isEmpty() ? FloatRect(rect) : FloatRect(enclosingIntRect(rect)); |
| 2333 rect = LayoutRect(layer()->transform()->mapRect(floatRect)); |
2332 } | 2334 } |
2333 LayoutPoint topLeft = rect.location(); | 2335 LayoutPoint topLeft = rect.location(); |
2334 if (container->isBox()) { | 2336 if (container->isBox()) { |
2335 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); | 2337 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); |
2336 // If the row is the ancestor, however, add its offset back in. In effect, | 2338 // If the row is the ancestor, however, add its offset back in. In effect, |
2337 // this passes from the joint <td> / <tr> coordinate space to the parent | 2339 // this passes from the joint <td> / <tr> coordinate space to the parent |
2338 // space, then back to <tr> / <td>. | 2340 // space, then back to <tr> / <td>. |
2339 if (tableRowContainer) | 2341 if (tableRowContainer) |
2340 topLeft.moveBy( | 2342 topLeft.moveBy( |
2341 -tableRowContainer->topLeftLocation(toLayoutBox(container))); | 2343 -tableRowContainer->topLeftLocation(toLayoutBox(container))); |
(...skipping 3233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5575 LayoutRect rect = frameRect(); | 5577 LayoutRect rect = frameRect(); |
5576 | 5578 |
5577 LayoutBlock* block = containingBlock(); | 5579 LayoutBlock* block = containingBlock(); |
5578 if (block) | 5580 if (block) |
5579 block->adjustChildDebugRect(rect); | 5581 block->adjustChildDebugRect(rect); |
5580 | 5582 |
5581 return rect; | 5583 return rect; |
5582 } | 5584 } |
5583 | 5585 |
5584 } // namespace blink | 5586 } // namespace blink |
OLD | NEW |