[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Ugly patch, change frameset.rows from js
From: <koos.vriezen () xs4all ! nl>
Date: 2001-12-17 13:57:43
[Download RAW message or body]
Hi,
To make the following work:
index.html:
<HTML><HEAD> </HEAD>
<FRAMESET ROWS="200,*" ID='OUTERFRAME'>
<FRAME SRC="topframe.html">
<FRAME SRC="http://www.kde.org">
</FRAMESET>
</HTML>
topframe.html
<HTML>
<HEAD>
<SCRIPT>
function resizeFrame() {
window.alert("resizeFrame");
var fs = top.document.getElementById("OUTERFRAME");
window.alert (fs.rows);
fs.rows = "300,*";
window.alert (fs.rows);
}
</SCRIPT>
</HEAD>
<BODY onClick='resizeFrame()'>
</BODY>
</HTML>
I made the following patch:
--- html/html_baseimpl.cpp.orig Sun Dec 16 19:15:35 2001
+++ html/html_baseimpl.cpp Mon Dec 17 14:27:43 2001
@@ -385,8 +385,10 @@
switch(attr->attrId)
{
case ATTR_ROWS:
+ delete m_rows;
m_rows = attr->val()->toLengthList();
m_totalRows = m_rows->count();
+ if (m_render) { ((RenderFrameSet*)m_render)->m_rows = m_rows;
m_render->layout(); }
break;
case ATTR_COLS:
m_cols = attr->val()->toLengthList();
Same could be done for cols.
I'm not sure, if forcing layouting, should be done here or can I mark the
document as changed, so layouting is done after the js code is finished.
Why has RenderFrameSet a copy of the m_rows member of
HTMLFrameSetElementImpl? It has alreay a pointer to
HTMLFrameSetElementImpl.
Dragging a frame border, doesn't update HTMLFrameSetElementImpl::m_rows.
Should that be fixed? (eg. remove the m_rows in RenderFrameSet)
Regards,
Koos Vriezen
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic