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

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

Issue 2519103002: SVGRoot's writing-mode should not affect SVGText/SVGForeign's location (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | 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. 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 5159 matching lines...) Expand 10 before | Expand all | Expand 10 after
5170 return point; 5170 return point;
5171 5171
5172 // The child is going to add in its x(), so we have to make sure it ends up in 5172 // The child is going to add in its x(), so we have to make sure it ends up in
5173 // the right place. 5173 // the right place.
5174 return LayoutPoint(point.x() + size().width() - child->size().width() - 5174 return LayoutPoint(point.x() + size().width() - child->size().width() -
5175 (2 * child->location().x()), 5175 (2 * child->location().x()),
5176 point.y()); 5176 point.y());
5177 } 5177 }
5178 5178
5179 LayoutBox* LayoutBox::locationContainer() const { 5179 LayoutBox* LayoutBox::locationContainer() const {
5180 // Location of a non-root SVG object derived from LayoutBox should not be
5181 // affected by writing-mode of the containing box (SVGRoot).
5182 if (isSVG() && !isSVGRoot())
5183 return nullptr;
5184
5180 // Normally the box's location is relative to its containing box. 5185 // Normally the box's location is relative to its containing box.
5181 LayoutObject* container = this->container(); 5186 LayoutObject* container = this->container();
5182 while (container && !container->isBox()) 5187 while (container && !container->isBox())
5183 container = container->container(); 5188 container = container->container();
5184 return toLayoutBox(container); 5189 return toLayoutBox(container);
5185 } 5190 }
5186 5191
5187 LayoutPoint LayoutBox::topLeftLocation( 5192 LayoutPoint LayoutBox::topLeftLocation(
5188 const LayoutBox* flippedBlocksContainer) const { 5193 const LayoutBox* flippedBlocksContainer) const {
5189 const LayoutBox* containerBox; 5194 const LayoutBox* containerBox;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
5619 LayoutRect rect = frameRect(); 5624 LayoutRect rect = frameRect();
5620 5625
5621 LayoutBlock* block = containingBlock(); 5626 LayoutBlock* block = containingBlock();
5622 if (block) 5627 if (block)
5623 block->adjustChildDebugRect(rect); 5628 block->adjustChildDebugRect(rect);
5624 5629
5625 return rect; 5630 return rect;
5626 } 5631 }
5627 5632
5628 } // namespace blink 5633 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698