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

Unified Diff: WebCore/rendering/RenderBox.cpp

Issue 5670003: Merge 73531 - https://bugs.webkit.org/show_bug.cgi?id=50576... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/rendering/RenderBox.cpp
===================================================================
--- WebCore/rendering/RenderBox.cpp (revision 73555)
+++ WebCore/rendering/RenderBox.cpp (working copy)
@@ -2124,20 +2124,19 @@
if (containerDirection == LTR) {
// 'staticX' should already have been set through layout of the parent.
int staticPosition = layer()->staticX() - containerBlock->borderLeft();
- for (RenderObject* po = parent(); po && po != containerBlock; po = po->parent()) {
- if (po->isBox())
- staticPosition += toRenderBox(po)->x();
+ for (RenderObject* curr = parent(); curr && curr != containerBlock; curr = curr->parent()) {
+ if (curr->isBox())
+ staticPosition += toRenderBox(curr)->x();
}
left.setValue(Fixed, staticPosition);
} else {
- RenderObject* po = parent();
+ RenderBox* enclosingBox = parent()->enclosingBox();
// 'staticX' should already have been set through layout of the parent.
int staticPosition = layer()->staticX() + containerWidth + containerBlock->borderRight();
- if (po->isBox())
- staticPosition -= toRenderBox(po)->width();
- for (; po && po != containerBlock; po = po->parent()) {
- if (po->isBox())
- staticPosition -= toRenderBox(po)->x();
+ staticPosition -= enclosingBox->width();
+ for (RenderObject* curr = enclosingBox; curr && curr != containerBlock; curr = curr->parent()) {
+ if (curr->isBox())
+ staticPosition -= toRenderBox(curr)->x();
}
right.setValue(Fixed, staticPosition);
}
« no previous file with comments | « WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698