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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2547093002: Revert of Don't expand empty rect during rect mapping (patchset #4 id:60001 of https://codereview.c… (Closed)
Patch Set: Created 4 years 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
OLDNEW
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 2293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 if (filterSkipped) 2304 if (filterSkipped)
2305 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor); 2305 inflateVisualRectForFilterUnderContainer(rect, *container, ancestor);
2306 2306
2307 // We are now in our parent container's coordinate space. Apply our transform 2307 // We are now in our parent container's coordinate space. Apply our transform
2308 // to obtain a bounding box in the parent's coordinate space that encloses us. 2308 // to obtain a bounding box in the parent's coordinate space that encloses us.
2309 if (hasLayer() && layer()->transform()) { 2309 if (hasLayer() && layer()->transform()) {
2310 // Use enclosingIntRect because we cannot properly compute pixel snapping 2310 // Use enclosingIntRect because we cannot properly compute pixel snapping
2311 // for painted elements within the transform since we don't know the desired 2311 // for painted elements within the transform since we don't know the desired
2312 // subpixel accumulation at this point, and the transform may include a 2312 // subpixel accumulation at this point, and the transform may include a
2313 // scale. 2313 // scale.
2314 FloatRect floatRect = 2314 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect)));
2315 rect.isEmpty() ? FloatRect(rect) : FloatRect(enclosingIntRect(rect));
2316 rect = LayoutRect(layer()->transform()->mapRect(floatRect));
2317 } 2315 }
2318 LayoutPoint topLeft = rect.location(); 2316 LayoutPoint topLeft = rect.location();
2319 if (container->isBox()) { 2317 if (container->isBox()) {
2320 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); 2318 topLeft.moveBy(topLeftLocation(toLayoutBox(container)));
2321 // If the row is the ancestor, however, add its offset back in. In effect, 2319 // If the row is the ancestor, however, add its offset back in. In effect,
2322 // this passes from the joint <td> / <tr> coordinate space to the parent 2320 // this passes from the joint <td> / <tr> coordinate space to the parent
2323 // space, then back to <tr> / <td>. 2321 // space, then back to <tr> / <td>.
2324 if (tableRowContainer) 2322 if (tableRowContainer)
2325 topLeft.moveBy( 2323 topLeft.moveBy(
2326 -tableRowContainer->topLeftLocation(toLayoutBox(container))); 2324 -tableRowContainer->topLeftLocation(toLayoutBox(container)));
(...skipping 3289 matching lines...) Expand 10 before | Expand all | Expand 10 after
5616 LayoutRect rect = frameRect(); 5614 LayoutRect rect = frameRect();
5617 5615
5618 LayoutBlock* block = containingBlock(); 5616 LayoutBlock* block = containingBlock();
5619 if (block) 5617 if (block)
5620 block->adjustChildDebugRect(rect); 5618 block->adjustChildDebugRect(rect);
5621 5619
5622 return rect; 5620 return rect;
5623 } 5621 }
5624 5622
5625 } // namespace blink 5623 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/paint/invalidation/transform-inline-layered-child-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698