[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: patch + examples, change frameset.rows from js
From: <koos.vriezen () xs4all ! nl>
Date: 2001-12-20 18:49:52
[Download RAW message or body]
On Thu, 20 Dec 2001, David Faure wrote:
> On Thursday 20 December 2001 18:17, koos.vriezen@xs4all.nl wrote:
> > void NodeBaseImpl::applyChanges(bool top, bool force)
> > {
> >
> > setChanged(false);
> > ^^^^^^^^^^^^^^^^^
> > if (!attached())
> > return;
> >
> > int ow = (m_style?m_style->outlineWidth():0);
> >
> > if (top)
> > recalcStyle();
> >
> > // a style change can influence the children, so we just go
> > // through them and trigger an appplyChanges there too
> > NodeImpl *n = _first;
> > while(n) {
> > n->applyChanges(false,force || changed());
> > n = n->nextSibling(); ^^^^^^^^^
> > }
>
> Maybe this should be || n->changed() here ?
> I'm not sure what the logic aims to be.... (Dirk knows ;)
That would make all 'if (changed())' in HTML*Impl::applyChanges redundant
> >[...]
> > I think the line 'setChanged(false);' should be removed here.
Sorry, I meant in HTMLFrameSetElementImpl::applyChanges
>
> At least in the above code it can't be completely removed, but
> maybe simple moved inside the if(!attached()) case - in such a
> case we want to clear the changed bool (IIRC I had problems with
> that in the past).
Sorry I overlooked that one.
Ok, I tried this patch:
+++ html/html_baseimpl.cpp Thu Dec 20 19:35:57 2001
@@ -389,18 +389,12 @@
m_rows = attr->val()->toLengthList();
m_totalRows = m_rows->count();
setChanged();
- // ### nasty - usual change handling is not enough FIXIT!
- if (m_render)
- m_render->layout();
break;
case ATTR_COLS:
delete m_cols;
m_cols = attr->val()->toLengthList();
m_totalCols = m_cols->count();
setChanged();
- // ### nasty - usual change handling is not enough FIXIT!
- if (m_render)
- m_render->layout();
break;
case ATTR_FRAMEBORDER:
// false or "no" or "0"..
@@ -527,10 +521,9 @@
void HTMLFrameSetElementImpl::applyChanges(bool top, bool force)
{
- if (changed() && m_render) {
+ if ((force || changed()) && m_render) {
m_render->setLayouted(false);
m_render->layout();
- setChanged(false);
}
HTMLElementImpl::applyChanges(top,force);
}
--- xml/dom_nodeimpl.cpp.orig Thu Dec 20 19:16:05 2001
+++ xml/dom_nodeimpl.cpp Thu Dec 20 19:16:15 2001
@@ -1519,10 +1519,11 @@
void NodeBaseImpl::applyChanges(bool top, bool force)
{
- setChanged(false);
- if (!attached())
+ if (!attached()) {
+ setChanged(false);
return;
+ }
int ow = (m_style?m_style->outlineWidth():0);
with no luck, changes are only performed when moving the mouse over the
frame. I do think the last two chunks should be applied.
I will investigate further.
Regards,
Koos Vriezen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic