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

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

Issue 2536453002: Rename some functions about layout locations (Closed)
Patch Set: Rebase 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 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 // container chain, if |offsetParent| is an inline split into 980 // container chain, if |offsetParent| is an inline split into
981 // continuations: <body style="display:inline;" id="offsetParent"> 981 // continuations: <body style="display:inline;" id="offsetParent">
982 // <div id="this"> 982 // <div id="this">
983 // This is why we have to do a nullptr check here. 983 // This is why we have to do a nullptr check here.
984 for (const LayoutObject* current = container(); 984 for (const LayoutObject* current = container();
985 current && current->node() != offsetParent; 985 current && current->node() != offsetParent;
986 current = current->container()) { 986 current = current->container()) {
987 // FIXME: What are we supposed to do inside SVG content? 987 // FIXME: What are we supposed to do inside SVG content?
988 referencePoint.move(current->columnOffset(referencePoint)); 988 referencePoint.move(current->columnOffset(referencePoint));
989 if (current->isBox() && !current->isTableRow()) 989 if (current->isBox() && !current->isTableRow())
990 referencePoint.moveBy(toLayoutBox(current)->topLeftLocation()); 990 referencePoint.moveBy(toLayoutBox(current)->physicalLocation());
991 } 991 }
992 992
993 if (offsetParentObject->isBox() && offsetParentObject->isBody() && 993 if (offsetParentObject->isBox() && offsetParentObject->isBody() &&
994 !offsetParentObject->isPositioned()) { 994 !offsetParentObject->isPositioned()) {
995 referencePoint.moveBy( 995 referencePoint.moveBy(
996 toLayoutBox(offsetParentObject)->topLeftLocation()); 996 toLayoutBox(offsetParentObject)->physicalLocation());
997 } 997 }
998 } 998 }
999 999
1000 if (offsetParentObject->isLayoutInline()) { 1000 if (offsetParentObject->isLayoutInline()) {
1001 const LayoutInline* inlineParent = toLayoutInline(offsetParentObject); 1001 const LayoutInline* inlineParent = toLayoutInline(offsetParentObject);
1002 1002
1003 if (isBox() && style()->position() == AbsolutePosition && 1003 if (isBox() && style()->position() == AbsolutePosition &&
1004 inlineParent->isInFlowPositioned()) { 1004 inlineParent->isInFlowPositioned()) {
1005 // Offset for absolute elements with inline parent is a special 1005 // Offset for absolute elements with inline parent is a special
1006 // case in the CSS spec 1006 // case in the CSS spec
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 if (rootElementStyle->hasBackground()) 1314 if (rootElementStyle->hasBackground())
1315 return false; 1315 return false;
1316 1316
1317 if (node() != document().firstBodyElement()) 1317 if (node() != document().firstBodyElement())
1318 return false; 1318 return false;
1319 1319
1320 return true; 1320 return true;
1321 } 1321 }
1322 1322
1323 } // namespace blink 1323 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutBoxTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698