From ae9593fa1022c92d5760c210408869c0d9741c94 Mon Sep 17 00:00:00 2001 From: "nisheeth%netscape.com" Date: Fri, 4 Sep 1998 23:55:04 +0000 Subject: [PATCH] Fix for bug #313278. Some links were unclickable. Added initialization code in lo_NewElement() for all the common fields shared across layout elements. Now, all the common fields should get sane values assigned to them at creation time. git-svn-id: svn://10.0.0.236/trunk@9394 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/lib/layout/layrelay.c | 2 -- mozilla/lib/layout/layutil.c | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/lib/layout/layrelay.c b/mozilla/lib/layout/layrelay.c index a1fe153fcb6..72806f36947 100644 --- a/mozilla/lib/layout/layrelay.c +++ b/mozilla/lib/layout/layrelay.c @@ -1705,8 +1705,6 @@ void lo_AppendFloatInLineList(MWContext *context, float_dummy->lo_any.ele_id = NEXT_ELEMENT; float_dummy->lo_any.x = state->x; float_dummy->lo_any.y = state->y; - float_dummy->lo_any.width = 0; - float_dummy->lo_any.height = 0; float_dummy->lo_any.next = restOfLine; float_dummy->lo_any.prev = NULL; diff --git a/mozilla/lib/layout/layutil.c b/mozilla/lib/layout/layutil.c index 1d6d7b11e13..3924ed7bb74 100644 --- a/mozilla/lib/layout/layutil.c +++ b/mozilla/lib/layout/layutil.c @@ -2111,6 +2111,14 @@ lo_NewElement(MWContext *context, lo_DocState *state, intn type, } else { + eptr->lo_any.width = 0; + eptr->lo_any.height = 0; + eptr->lo_any.x_offset = 0; + eptr->lo_any.y_offset = 0; + eptr->lo_any.x = 0; + eptr->lo_any.y = 0; + eptr->lo_any.line_height = 0; + eptr->lo_any.next = NULL; eptr->lo_any.prev = NULL; #ifdef EDITOR