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

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: 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
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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (container->isBox()) {
2100 topLeft.moveBy(topLeftLocation(toLayoutBox(container))); 2100 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> 2101 // 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>. 2102 // coordinate space to the parent space, then back to <tr> / <td>.
2103 if (tableRowContainer) 2103 if (tableRowContainer)
2104 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta iner))); 2104 topLeft.moveBy(-tableRowContainer->topLeftLocation(toLayoutBox(conta iner)));
2105 } else if (container->isRuby()) {
2106 topLeft.moveBy(topLeftLocation());
wkorman 2016/07/20 22:12:33 This was needed to apply offset resulting from any
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();
2110 EPosition position = styleToUse.position(); 2112 EPosition position = styleToUse.position();
2111 if (position == AbsolutePosition && container->isInFlowPositioned() && conta iner->isLayoutInline()) { 2113 if (position == AbsolutePosition && container->isInFlowPositioned() && conta iner->isLayoutInline()) {
2112 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t his); 2114 topLeft += toLayoutInline(container)->offsetForInFlowPositionedInline(*t his);
2113 } else if (styleToUse.hasInFlowPosition() && layer()) { 2115 } else if (styleToUse.hasInFlowPosition() && layer()) {
2114 // Apply the relative position offset when invalidating a rectangle. Th e layer 2116 // Apply the relative position offset when invalidating a rectangle. Th e layer
(...skipping 2847 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

Powered by Google App Engine
This is Rietveld 408576698