Commit ef118386 authored by mjs's avatar mjs

Reviewed by Darin.

	- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
	- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
	- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing

        * khtml/html/html_baseimpl.h:
        * khtml/html/html_baseimpl.cpp:
        (HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
	to be called if src attribute is set explicitly and the element is already
	attached.
        (HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
	attrinute is set.
        (HTMLFrameElementImpl::contentDocument): Don't involve render widget
	in getting the content document.
        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::createContextualFragment): Allow contextual
	fragments to be created (and therefore innerHTML to be set on) TR
	and HTML elements.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 218c4e41
2002-12-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing
* khtml/html/html_baseimpl.h:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
to be called if src attribute is set explicitly and the element is already
attached.
(HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
attrinute is set.
(HTMLFrameElementImpl::contentDocument): Don't involve render widget
in getting the content document.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Allow contextual
fragments to be created (and therefore innerHTML to be set on) TR
and HTML elements.
2002-12-16 David Hyatt <hyatt@apple.com>
Use the layer's bounds as the damage rect not the object's.
......
2002-12-16 Maciej Stachowiak <mjs@apple.com>
Reviewed by Darin.
- fixed 3125412 - HOMEPAGE: 2nd load of html in the same div fails.
- fixed 3052113 - HOMEPAGE: "site menu" part of .mac home page editing doesn't work
- fixed 3075392 - HOMEPAGE: "pages" section of mac.com homepage editing is missing
* khtml/html/html_baseimpl.h:
* khtml/html/html_baseimpl.cpp:
(HTMLFrameElementImpl::updateForNewURL): Function that loads new URL,
to be called if src attribute is set explicitly and the element is already
attached.
(HTMLFrameElementImpl::parseAttribute): Call updateForNewURL when src
attrinute is set.
(HTMLFrameElementImpl::contentDocument): Don't involve render widget
in getting the content document.
* khtml/html/html_elementimpl.cpp:
(HTMLElementImpl::createContextualFragment): Allow contextual
fragments to be created (and therefore innerHTML to be set on) TR
and HTML elements.
2002-12-16 David Hyatt <hyatt@apple.com>
Use the layer's bounds as the damage rect not the object's.
......
......@@ -227,12 +227,37 @@ NodeImpl::Id HTMLFrameElementImpl::id() const
return ID_FRAME;
}
void HTMLFrameElementImpl::updateForNewURL()
{
if (attached()) {
// ignore display: none for this element!
KHTMLView* w = getDocument()->view();
// avoid endless recursion
KURL u;
if (!url.isEmpty()) u = getDocument()->completeURL( url.string() );
bool selfreference = false;
for (KHTMLPart* part = w->part(); part; part = part->parentPart())
if (part->url() == u) {
selfreference = true;
break;
}
// load the frame contents
if ( !url.isEmpty() && !(w->part()->onlyLocalReferences() && u.protocol() != "file")) {
KHTMLPart *part = w->part()->findFrame( name.string() );
part->openURL(u);
}
}
}
void HTMLFrameElementImpl::parseAttribute(AttributeImpl *attr)
{
switch(attr->id())
{
case ATTR_SRC:
url = khtml::parseURL(attr->val());
updateForNewURL();
break;
case ATTR_ID:
case ATTR_NAME:
......@@ -363,12 +388,12 @@ void HTMLFrameElementImpl::setFocus(bool received)
DocumentImpl* HTMLFrameElementImpl::contentDocument() const
{
if ( !m_render ) return 0;
RenderPart* render = static_cast<RenderPart*>( m_render );
KHTMLView* w = getDocument()->view();
if(render->widget() && render->widget()->inherits("KHTMLView"))
return static_cast<KHTMLView*>( render->widget() )->part()->xmlDocImpl();
if (w) {
KHTMLPart *part = w->part()->findFrame( name.string() );
return part->xmlDocImpl();
}
return 0;
}
......
......@@ -112,6 +112,9 @@ protected:
bool frameBorder : 1;
bool frameBorderSet : 1;
bool noresize : 1;
private:
void updateForNewURL();
};
// -------------------------------------------------------------------------
......
......@@ -301,14 +301,12 @@ DocumentFragmentImpl *HTMLElementImpl::createContextualFragment( const DOMString
case ID_COLGROUP:
case ID_FRAMESET:
case ID_HEAD:
case ID_HTML:
case ID_STYLE:
case ID_TABLE:
case ID_TBODY:
case ID_TFOOT:
case ID_THEAD:
case ID_TITLE:
case ID_TR:
return NULL;
default:
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment