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

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

Issue 2166923004: Fix Ruby visual rects in flipped blocks writing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify and comment. Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-flipped-blocks-expected.txt ('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) 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. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2078 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 2089
2090 // We are now in our parent container's coordinate space. Apply our transfo rm to obtain a bounding box 2090 // We are now in our parent container's coordinate space. Apply our transfo rm to obtain a bounding box
2091 // in the parent's coordinate space that encloses us. 2091 // in the parent's coordinate space that encloses us.
2092 if (hasLayer() && layer()->transform()) { 2092 if (hasLayer() && layer()->transform()) {
2093 // Use enclosingIntRect because we cannot properly compute pixel snappin g for painted elements within 2093 // Use enclosingIntRect because we cannot properly compute pixel snappin g for painted elements within
2094 // the transform since we don't know the desired subpixel accumulation a t this point, and the transform may 2094 // the transform since we don't know the desired subpixel accumulation a t this point, and the transform may
2095 // include a scale. 2095 // include a scale.
2096 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect))) ; 2096 rect = LayoutRect(layer()->transform()->mapRect(enclosingIntRect(rect))) ;
2097 } 2097 }
2098 LayoutPoint topLeft = rect.location(); 2098 LayoutPoint topLeft = rect.location();
2099 if (container->isBox()) { 2099 // LayoutRubyRun is the (anonymous) block container for LayoutRuby{Base,Text }, all of which are boxes.
2100 // We need to only flip once, so we leave that to LayoutRubyRun.
2101 if (container->isBox() && !container->isRubyRun()) {
chrishtr 2016/07/21 17:24:54 !container->isInline() also makes this test pass,
wkorman 2016/07/26 00:38:14 I looked into how PaintLayer::updateLayerPosition
chrishtr 2016/07/26 18:02:29 Please add a TODO(wkorman) that it's not clear why
2100 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); 2102 topLeft.moveBy(topLeftLocation(toLayoutBox(container)));
2101 // If the row is the ancestor, however, add its offset back in. In effec t, this passes from the joint <td> / <tr> 2103 // If the row is the ancestor, however, add its offset back in. In effec t, this passes from the joint <td> / <tr>
2102 // coordinate space to the parent space, then back to <tr> / <td>. 2104 // coordinate space to the parent space, then back to <tr> / <td>.
2103 if (tableRowContainer) 2105 if (tableRowContainer)
2104 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta iner))); 2106 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta iner)));
2105 } else { 2107 } else {
2106 topLeft.moveBy(location()); 2108 topLeft.moveBy(location());
2107 } 2109 }
2108 2110
2109 const ComputedStyle& styleToUse = styleRef(); 2111 const ComputedStyle& styleToUse = styleRef();
(...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
4962 m_rareData->m_snapAreas->remove(&snapArea); 4964 m_rareData->m_snapAreas->remove(&snapArea);
4963 } 4965 }
4964 } 4966 }
4965 4967
4966 SnapAreaSet* LayoutBox::snapAreas() const 4968 SnapAreaSet* LayoutBox::snapAreas() const
4967 { 4969 {
4968 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4970 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4969 } 4971 }
4970 4972
4971 } // namespace blink 4973 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/ruby-flipped-blocks-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698