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 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2306 if (filterSkipped) | 2306 if (filterSkipped) |
2307 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor); | 2307 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor); |
2308 | 2308 |
2309 // We are now in our parent container's coordinate space. Apply our transform | 2309 // We are now in our parent container's coordinate space. Apply our transform |
2310 // to obtain a bounding box in the parent's coordinate space that encloses us. | 2310 // to obtain a bounding box in the parent's coordinate space that encloses us. |
2311 if (hasLayer() && layer()->transform()) { | 2311 if (hasLayer() && layer()->transform()) { |
2312 // Use enclosingIntRect because we cannot properly compute pixel snapping | 2312 // Use enclosingIntRect because we cannot properly compute pixel snapping |
2313 // for painted elements within the transform since we don't know the desired | 2313 // for painted elements within the transform since we don't know the desired |
2314 // subpixel accumulation at this point, and the transform may include a | 2314 // subpixel accumulation at this point, and the transform may include a |
2315 // scale. | 2315 // scale. |
2316 FloatRect floatRect = | 2316 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect))); |
2317 rect.isEmpty() ? FloatRect(rect) : FloatRect(enclosingIntRect(rect)); | |
2318 rect = LayoutRect(layer()->transform()->mapRect(floatRect)); | |
2319 } | 2317 } |
2320 LayoutPoint topLeft = rect.location(); | 2318 LayoutPoint topLeft = rect.location(); |
2321 if (container->isBox()) { | 2319 if (container->isBox()) { |
2322 topLeft.moveBy(physicalLocation(toLayoutBox(container))); | 2320 topLeft.moveBy(physicalLocation(toLayoutBox(container))); |
2323 // If the row is the ancestor, however, add its offset back in. In effect, | 2321 // If the row is the ancestor, however, add its offset back in. In effect, |
2324 // this passes from the joint <td> / <tr> coordinate space to the parent | 2322 // this passes from the joint <td> / <tr> coordinate space to the parent |
2325 // space, then back to <tr> / <td>. | 2323 // space, then back to <tr> / <td>. |
2326 if (tableRowContainer) { | 2324 if (tableRowContainer) { |
2327 topLeft.moveBy( | 2325 topLeft.moveBy( |
2328 -tableRowContainer->physicalLocation(toLayoutBox(container))); | 2326 -tableRowContainer->physicalLocation(toLayoutBox(container))); |
(...skipping 3296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5625 LayoutRect rect = frameRect(); | 5623 LayoutRect rect = frameRect(); |
5626 | 5624 |
5627 LayoutBlock* block = containingBlock(); | 5625 LayoutBlock* block = containingBlock(); |
5628 if (block) | 5626 if (block) |
5629 block->adjustChildDebugRect(rect); | 5627 block->adjustChildDebugRect(rect); |
5630 | 5628 |
5631 return rect; | 5629 return rect; |
5632 } | 5630 } |
5633 | 5631 |
5634 } // namespace blink | 5632 } // namespace blink |
OLD | NEW |