[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:51:21 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 197ddda6fa5f63bc2d8754228ca203a513765cb1
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 19 23:41:38 2002 +0000
- fixed 3075032 -- textarea contents sometimes aren't shown
The root of the problem is that we weren't delivering close calls to
the render objects in the case where we created them late due to our FOUC
fix. I taught the DOM implementation to remember that a close call is
due, and deliver it when the render object is created. We can probably
replace the closeEntireTree hack with this too. I'll talk to Dave about
that on Monday.
* khtml/xml/dom_nodeimpl.h: Add m_rendererNeedsClose and closeRenderer.
* khtml/xml/dom_nodeimpl.cpp:
(NodeImpl::NodeImpl): Initialize m_rendererNeedsClose to false.
(NodeImpl::closeRenderer): Call close on the renderer if it's created, otherwise
set m_rendererNeedsClose.
(NodeImpl::attach): If the renderer is created and m_rendererNeedsClose is true
call close on the renderer and set it to false.
* khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
Rearrange this so that the base class attach is called before updateFromElement
is called. This allows the base attach to do a close for us before we update.
* khtml/html/htmlparser.cpp:
(KHTMLParser::insertNode): Call closeRenderer on the DOM node rather than
calling close on the render node.
(KHTMLParser::popOneBlock): Ditto.
* khtml/xml/xml_tokenizer.cpp:
(XMLHandler::endElement): Ditto.
(XMLTokenizer::finish): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 9bcedf9..6f462d7 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,34 @@
+2002-10-19 Darin Adler <darin at apple.com>
+
+ - fixed 3075032 -- textarea contents sometimes aren't shown
+
+ The root of the problem is that we weren't delivering close calls to
+ the render objects in the case where we created them late due to our FOUC
+ fix. I taught the DOM implementation to remember that a close call is
+ due, and deliver it when the render object is created. We can probably
+ replace the closeEntireTree hack with this too. I'll talk to Dave about
+ that on Monday.
+
+ * khtml/xml/dom_nodeimpl.h: Add m_rendererNeedsClose and closeRenderer.
+ * khtml/xml/dom_nodeimpl.cpp:
+ (NodeImpl::NodeImpl): Initialize m_rendererNeedsClose to false.
+ (NodeImpl::closeRenderer): Call close on the renderer if it's created, otherwise
+ set m_rendererNeedsClose.
+ (NodeImpl::attach): If the renderer is created and m_rendererNeedsClose is true
+ call close on the renderer and set it to false.
+
+ * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
+ Rearrange this so that the base class attach is called before updateFromElement
+ is called. This allows the base attach to do a close for us before we update.
+
+ * khtml/html/htmlparser.cpp:
+ (KHTMLParser::insertNode): Call closeRenderer on the DOM node rather than
+ calling close on the render node.
+ (KHTMLParser::popOneBlock): Ditto.
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::endElement): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
2002-10-19 David Hyatt <hyatt at apple.com>
A couple of whitespace fixes. What's really odd about these
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 9bcedf9..6f462d7 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,34 @@
+2002-10-19 Darin Adler <darin at apple.com>
+
+ - fixed 3075032 -- textarea contents sometimes aren't shown
+
+ The root of the problem is that we weren't delivering close calls to
+ the render objects in the case where we created them late due to our FOUC
+ fix. I taught the DOM implementation to remember that a close call is
+ due, and deliver it when the render object is created. We can probably
+ replace the closeEntireTree hack with this too. I'll talk to Dave about
+ that on Monday.
+
+ * khtml/xml/dom_nodeimpl.h: Add m_rendererNeedsClose and closeRenderer.
+ * khtml/xml/dom_nodeimpl.cpp:
+ (NodeImpl::NodeImpl): Initialize m_rendererNeedsClose to false.
+ (NodeImpl::closeRenderer): Call close on the renderer if it's created, otherwise
+ set m_rendererNeedsClose.
+ (NodeImpl::attach): If the renderer is created and m_rendererNeedsClose is true
+ call close on the renderer and set it to false.
+
+ * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
+ Rearrange this so that the base class attach is called before updateFromElement
+ is called. This allows the base attach to do a close for us before we update.
+
+ * khtml/html/htmlparser.cpp:
+ (KHTMLParser::insertNode): Call closeRenderer on the DOM node rather than
+ calling close on the render node.
+ (KHTMLParser::popOneBlock): Ditto.
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::endElement): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
2002-10-19 David Hyatt <hyatt at apple.com>
A couple of whitespace fixes. What's really odd about these
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 9bcedf9..6f462d7 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2002-10-19 Darin Adler <darin at apple.com>
+
+ - fixed 3075032 -- textarea contents sometimes aren't shown
+
+ The root of the problem is that we weren't delivering close calls to
+ the render objects in the case where we created them late due to our FOUC
+ fix. I taught the DOM implementation to remember that a close call is
+ due, and deliver it when the render object is created. We can probably
+ replace the closeEntireTree hack with this too. I'll talk to Dave about
+ that on Monday.
+
+ * khtml/xml/dom_nodeimpl.h: Add m_rendererNeedsClose and closeRenderer.
+ * khtml/xml/dom_nodeimpl.cpp:
+ (NodeImpl::NodeImpl): Initialize m_rendererNeedsClose to false.
+ (NodeImpl::closeRenderer): Call close on the renderer if it's created, otherwise
+ set m_rendererNeedsClose.
+ (NodeImpl::attach): If the renderer is created and m_rendererNeedsClose is true
+ call close on the renderer and set it to false.
+
+ * khtml/html/html_formimpl.cpp: (HTMLGenericFormElementImpl::attach):
+ Rearrange this so that the base class attach is called before updateFromElement
+ is called. This allows the base attach to do a close for us before we update.
+
+ * khtml/html/htmlparser.cpp:
+ (KHTMLParser::insertNode): Call closeRenderer on the DOM node rather than
+ calling close on the render node.
+ (KHTMLParser::popOneBlock): Ditto.
+ * khtml/xml/xml_tokenizer.cpp:
+ (XMLHandler::endElement): Ditto.
+ (XMLTokenizer::finish): Ditto.
+
2002-10-19 David Hyatt <hyatt at apple.com>
A couple of whitespace fixes. What's really odd about these
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 5ce1f4c..6ec50e1 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -562,10 +562,15 @@ void HTMLGenericFormElementImpl::attach()
if (m_render) {
assert(m_render->style());
parentNode()->renderer()->addChild(m_render, nextRenderer());
- m_render->updateFromElement();
}
- NodeBaseImpl::attach();
+ HTMLElementImpl::attach();
+
+ // The call to updateFromElement() needs to go after the call through
+ // to the base class's attach() because that can sometimes do a close
+ // on the renderer.
+ if (m_render)
+ m_render->updateFromElement();
}
HTMLFormElementImpl *HTMLGenericFormElementImpl::getForm() const
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index f5717a5..039b32d 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -346,8 +346,7 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
QString state(document->document()->nextState());
if (!state.isNull()) n->restoreState(state);
}
- if(n->renderer())
- n->renderer()->close();
+ n->closeRenderer();
// if n is inline, then go ahead and treat as though we're
// inline, since we know we're going to be wrapped anyway.
@@ -1229,8 +1228,7 @@ void KHTMLParser::popOneBlock()
QString state(document->document()->nextState());
if (!state.isNull()) current->restoreState(state);
}
- if (current->renderer())
- current->renderer()->close();
+ current->closeRenderer();
}
#endif
diff --git a/WebCore/khtml/xml/dom_nodeimpl.cpp b/WebCore/khtml/xml/dom_nodeimpl.cpp
index 39d6a07..41fd921 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.cpp
+++ b/WebCore/khtml/xml/dom_nodeimpl.cpp
@@ -66,7 +66,8 @@ NodeImpl::NodeImpl(DocumentPtr *doc)
m_specified( false ),
m_focused( false ),
m_active( false ),
- m_styleElement( false )
+ m_styleElement( false ),
+ m_rendererNeedsClose( false )
{
if (document)
document->ref();
@@ -918,10 +919,28 @@ void NodeImpl::init()
{
}
+void NodeImpl::closeRenderer()
+{
+ // It's important that we close the renderer, even if it hasn't been
+ // created yet. This happens even more because of the FOUC fixes we did
+ // at Apple, which prevent renderers from being created until the stylesheets
+ // are all loaded. If the renderer is not here to be closed, we set a flag,
+ // then close it later when it's attached.
+ assert(!m_rendererNeedsClose);
+ if (m_render)
+ m_render->close();
+ else
+ m_rendererNeedsClose = true;
+}
+
void NodeImpl::attach()
{
assert(!attached());
assert(!m_render || (m_render->style() && m_render->parent()));
+ if (m_render && m_rendererNeedsClose) {
+ m_render->close();
+ m_rendererNeedsClose = false;
+ }
m_attached = true;
}
diff --git a/WebCore/khtml/xml/dom_nodeimpl.h b/WebCore/khtml/xml/dom_nodeimpl.h
index e86e426..28c3fd2 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.h
+++ b/WebCore/khtml/xml/dom_nodeimpl.h
@@ -297,6 +297,8 @@ public:
*/
virtual void detach();
+ void closeRenderer();
+
// -----------------------------------------------------------------------------
// Methods for maintaining the state of the element between history navigation
@@ -382,8 +384,9 @@ protected:
bool m_focused : 1;
bool m_active : 1;
bool m_styleElement : 1; // contains stylesheet text
+ bool m_rendererNeedsClose : 1;
- // 3 bits unused
+ // 2 bits unused
};
// this is the full Node Implementation with parents and children.
diff --git a/WebCore/khtml/xml/xml_tokenizer.cpp b/WebCore/khtml/xml/xml_tokenizer.cpp
index b3afddb..ee1634d 100644
--- a/WebCore/khtml/xml/xml_tokenizer.cpp
+++ b/WebCore/khtml/xml/xml_tokenizer.cpp
@@ -113,8 +113,7 @@ bool XMLHandler::endElement( const QString& /*namespaceURI*/, const QString& /*l
if (m_currentNode->nodeType() == Node::TEXT_NODE)
exitText();
if (m_currentNode->parentNode() != 0) {
- if (m_currentNode->renderer())
- m_currentNode->renderer()->close();
+ m_currentNode->closeRenderer();
m_currentNode = m_currentNode->parentNode();
}
// ### else error
@@ -384,9 +383,9 @@ void XMLTokenizer::finish()
// Close the renderers so that they update their display correctly
// ### this should not be necessary, but requires changes in the rendering code...
- h1->renderer()->close();
- pre->renderer()->close();
- body->renderer()->close();
+ h1->closeRenderer();
+ pre->closeRenderer();
+ body->closeRenderer();
m_doc->document()->recalcStyle( NodeImpl::Inherit );
m_doc->document()->updateRendering();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list