[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 22:59:56
[Download RAW message or body]

> 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.
>
Well, I figured out how the update mechanism works:
'NodeImpl::setChanged(bool b)' does a
'ownerDocument()->changedNodes.append(this);' and
'DocumentImpl::updateRendering()' checks if there are nodes in
'changedNodes'.
This doesn't seem to work with frames, where a js call from one document
changes another document. Here some debug info:

konqueror: KJSProxyImpl::evaluate inlineCode=true
konqueror: NodeImpl::setChanged ownerDoucment:0x824c548
konqueror: UPDATERENDERING: 0 this:0x83657d0

So updateRendering is called on an inner document (as the heap goes up).
Both documents return NULL as parentNode() and I couldn't find a way to
get to this outer(=frameset) document.
Can anyone give me a clue on this?

Regards,

Koos Vriezen


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic