attribute cache hashed background attributes into per-document buckets.
* khtml/html/html_baseimpl.cpp:
(HTMLBodyElementImpl::mapToEntry):
* khtml/html/html_elementimpl.h:
(DOM::):
* khtml/html/html_tableimpl.cpp:
(HTMLTableElementImpl::mapToEntry):
(HTMLTablePartElementImpl::mapToEntry):
* khtml/xml/dom_docimpl.cpp:
(DocumentImpl::DocumentImpl):
* khtml/xml/dom_docimpl.h:
(DOM::DocumentImpl::docID):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9036
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-04-21 David Hyatt <hyatt@apple.com>
+
+ Fix for 4095839, wrong background image used on flechtwerk.de. Make sure that the global mapped
+ attribute cache hashed background attributes into per-document buckets.
+
+ * khtml/html/html_baseimpl.cpp:
+ (HTMLBodyElementImpl::mapToEntry):
+ * khtml/html/html_elementimpl.h:
+ (DOM::):
+ * khtml/html/html_tableimpl.cpp:
+ (HTMLTableElementImpl::mapToEntry):
+ (HTMLTablePartElementImpl::mapToEntry):
+ * khtml/xml/dom_docimpl.cpp:
+ (DocumentImpl::DocumentImpl):
+ * khtml/xml/dom_docimpl.h:
+ (DOM::DocumentImpl::docID):
+
2005-04-21 Vicki Murley <vicki@apple.com>
- layout test for 4065447, outerHTML on images
switch(attr)
{
case ATTR_BACKGROUND:
+ result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+ return false;
case ATTR_BGCOLOR:
case ATTR_TEXT:
case ATTR_MARGINWIDTH:
class DocumentFragmentImpl;
enum MappedAttributeEntry { eNone, eUniversal, ePersistent, eReplaced, eBlock, eHR, eUnorderedList, eListItem,
- eTable, eCell, eCaption };
+ eTable, eCell, eCaption, eLastEntry };
class CSSMappedAttributeDeclarationImpl : public CSSMutableStyleDeclarationImpl
{
bool HTMLTableElementImpl::mapToEntry(NodeImpl::Id attr, MappedAttributeEntry& result) const
{
switch(attr) {
+ case ATTR_BACKGROUND:
+ result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+ return false;
case ATTR_WIDTH:
case ATTR_HEIGHT:
case ATTR_BGCOLOR:
- case ATTR_BACKGROUND:
case ATTR_CELLSPACING:
case ATTR_VSPACE:
case ATTR_HSPACE:
bool HTMLTablePartElementImpl::mapToEntry(NodeImpl::Id attr, MappedAttributeEntry& result) const
{
switch(attr) {
- case ATTR_BGCOLOR:
case ATTR_BACKGROUND:
+ result = (MappedAttributeEntry)(eLastEntry + getDocument()->docID());
+ return false;
+ case ATTR_BGCOLOR:
case ATTR_BORDERCOLOR:
case ATTR_VALIGN:
case ATTR_HEIGHT:
m_jsEditor = 0;
m_markers.setAutoDelete(true);
+
+ static int docID = 0;
+ m_docID = docID++;
}
DocumentImpl::~DocumentImpl()
DocumentImpl *parentDocument() const;
DocumentImpl *topDocument() const;
+ int docID() const { return m_docID; }
+
#ifdef KHTML_XSLT
void applyXSLTransform(ProcessingInstructionImpl* pi);
void setTransformSource(void* doc) { m_transformSource = doc; }
QPtrDict<NodeImpl> m_disconnectedNodesWithEventListeners;
+ int m_docID; // A unique document identifier used for things like document-specific mapped attributes.
+
#if APPLE_CHANGES
public:
KWQSignal m_finishedParsing;