diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2015-04-23 09:46:04 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2015-04-23 09:46:04 +0100 |
commit | 69776768d2e6fe20bf2346d164e37420f553a2d7 (patch) | |
tree | 1c28ba202c0a7ef27e86bbce196efb29f8e33c6a /render | |
parent | df3a8894357444704ec6c72df2dd3b2161e3f4c7 (diff) | |
download | netsurf-69776768d2e6fe20bf2346d164e37420f553a2d7.tar.gz netsurf-69776768d2e6fe20bf2346d164e37420f553a2d7.tar.bz2 |
Remove duplicate branch in relative position handling.
Diffstat (limited to 'render')
-rw-r--r-- | render/layout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/render/layout.c b/render/layout.c index 67e3219ca..9b479da17 100644 --- a/render/layout.c +++ b/render/layout.c @@ -4493,14 +4493,14 @@ void layout_compute_relative_offset(struct box *box, int *x, int *y) assert(left == -right); - if (top == AUTO && bottom == AUTO) + if (top == AUTO && bottom == AUTO) { top = bottom = 0; - else if (top == AUTO) + } else if (top == AUTO) { top = -bottom; - else if (bottom == AUTO) - bottom = -top; - else + } else { + /* bottom is AUTO, or neither are AUTO */ bottom = -top; + } #ifdef LAYOUT_DEBUG LOG(("left %i, right %i, top %i, bottom %i", left, right, top, bottom)); |