Summary: | Javascript or CSS error in http://www.htmlhelp.com/reference/html40/special/img.html | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Albert Astals Cid <aacid> |
Component: | khtml ecma | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Albert Astals Cid
2003-04-12 13:41:12 UTC
Using Konqueror HEAD branch build from 1 July 2003 is even worse, as it doesn't even show the hide non-strict attibutes button page changed layout.. Yes, the button doesn't work SVN commit 555957 by ggarand: make updating of addRule/removeRule/insertRule work cf. http://www.quirksmode.org/dom/w3c_css.html#change BUG: 57159 M +12 -0 ChangeLog M +4 -0 css/css_stylesheetimpl.cpp M +10 -2 xml/dom_docimpl.cpp M +5 -1 xml/dom_docimpl.h --- branches/KDE/3.5/kdelibs/khtml/ChangeLog #555956:555957 @@ -1,3 +1,15 @@ +2006-06-28 Germain Garand <germain@ebooksfrance.org> + + make updating of addRule/removeRule/insertRule work + cf. http://www.quirksmode.org/dom/w3c_css.html#change + + * css/css_stylesheetimpl.cpp + (insertRule/deleteRule): shallow update of styleselector. + * xml/dom_docimpl.{h,cpp} + (updateStyleSelector): new boolean argument for shallow recalculation, when all sheets are known. + (DocumentImpl::recalcStyleSelector): split. + (DocumentImpl::rebuildStyleSelector): new from split. Recreate styleselector with known sheets. + 2006-06-27 Germain Garand <germain@ebooksfrance.org> . Correct drawing of borders on iframes and objects (#118277/#56109) --- branches/KDE/3.5/kdelibs/khtml/css/css_stylesheetimpl.cpp #555956:555957 @@ -194,6 +194,8 @@ // HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the specified index e.g. if an //@import rule is inserted after a standard rule set or other at-rule. m_lstChildren->insert(index, r); + if (m_doc) + m_doc->updateStyleSelector(true /*shallow*/); return index; } @@ -211,6 +213,8 @@ return; } b->deref(); + if (m_doc) + m_doc->updateStyleSelector(true /*shallow*/); } void CSSStyleSheetImpl::addNamespace(CSSParser* p, const DOM::DOMString& prefix, const DOM::DOMString& uri) --- branches/KDE/3.5/kdelibs/khtml/xml/dom_docimpl.cpp #555956:555957 @@ -1976,7 +1976,7 @@ if (exceptioncode) *exceptioncode = excode; } -void DocumentImpl::updateStyleSelector() +void DocumentImpl::updateStyleSelector(bool shallow) { // kdDebug() << "PENDING " << m_pendingStylesheets << endl; @@ -1984,7 +1984,10 @@ if (m_pendingStylesheets > 0) return; - recalcStyleSelector(); + if (shallow) + rebuildStyleSelector(); + else + recalcStyleSelector(); recalcStyle(Force); #if 0 @@ -2134,6 +2137,11 @@ for (; it.current(); ++it) it.current()->deref(); + rebuildStyleSelector(); +} + +void DocumentImpl::rebuildStyleSelector() +{ // Create a new style selector delete m_styleSelector; QString usersheet = m_usersheet; --- branches/KDE/3.5/kdelibs/khtml/xml/dom_docimpl.h #555956:555957 @@ -258,10 +258,14 @@ * <LINK>, <STYLE> or <BODY> elements, as well as processing instructions (XML documents only). A list is * constructed from these which is used to create the a new style selector which collates all of the stylesheets * found and is used to calculate the derived styles for all rendering objects. + * + * @param shallow If the stylesheet list for the document is unchanged, with only added or removed rules + * in existing sheets, then set this argument to true for efficiency. */ - void updateStyleSelector(); + void updateStyleSelector(bool shallow=false); void recalcStyleSelector(); + void rebuildStyleSelector(); QString nextState(); |