[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
mjs
mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:54:43 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit cad42fb4eb40656145d0e1ab81530b40bdc3aa1f
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Aug 29 22:04:02 2003 +0000
Reviewed by Ken.
- fixed 3397775 21 leaks from CSS parser running PLT
* khtml/css/css_ruleimpl.cpp:
(CSSMediaRuleImpl::~CSSMediaRuleImpl): Clear the parent for all contained
rules.
(CSSMediaRuleImpl::append): Call insertRule.
(CSSMediaRuleImpl::insertRule): set parent of the rule to this media rule.
(CSSRuleListImpl::append): Call insertRule to cover all the relevant
additional handling, instead of adding straight to the list.
* khtml/css/css_ruleimpl.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 3fa37a2..b9b3719 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2003-08-29 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3397775 21 leaks from CSS parser running PLT
+
+ * khtml/css/css_ruleimpl.cpp:
+ (CSSMediaRuleImpl::~CSSMediaRuleImpl): Clear the parent for all contained
+ rules.
+ (CSSMediaRuleImpl::append): Call insertRule.
+ (CSSMediaRuleImpl::insertRule): set parent of the rule to this media rule.
+ (CSSRuleListImpl::append): Call insertRule to cover all the relevant
+ additional handling, instead of adding straight to the list.
+ * khtml/css/css_ruleimpl.h:
+
2003-08-29 John Sullivan <sullivan at apple.com>
- fixed 3399880 -- Repro crash when filling out a form to
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 3fa37a2..b9b3719 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2003-08-29 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3397775 21 leaks from CSS parser running PLT
+
+ * khtml/css/css_ruleimpl.cpp:
+ (CSSMediaRuleImpl::~CSSMediaRuleImpl): Clear the parent for all contained
+ rules.
+ (CSSMediaRuleImpl::append): Call insertRule.
+ (CSSMediaRuleImpl::insertRule): set parent of the rule to this media rule.
+ (CSSRuleListImpl::append): Call insertRule to cover all the relevant
+ additional handling, instead of adding straight to the list.
+ * khtml/css/css_ruleimpl.h:
+
2003-08-29 John Sullivan <sullivan at apple.com>
- fixed 3399880 -- Repro crash when filling out a form to
diff --git a/WebCore/khtml/css/css_ruleimpl.cpp b/WebCore/khtml/css/css_ruleimpl.cpp
index a9f60ab..080ab05 100644
--- a/WebCore/khtml/css/css_ruleimpl.cpp
+++ b/WebCore/khtml/css/css_ruleimpl.cpp
@@ -235,12 +235,22 @@ CSSMediaRuleImpl::~CSSMediaRuleImpl()
m_lstMedia->setParent( 0 );
m_lstMedia->deref();
}
+
+ int length = m_lstCSSRules->length();
+ for (int i = 0; i < length; i++) {
+ m_lstCSSRules->item( i )->setParent( 0 );
+ }
m_lstCSSRules->deref();
}
unsigned long CSSMediaRuleImpl::append( CSSRuleImpl *rule )
{
- return rule ? m_lstCSSRules->insertRule( rule, m_lstCSSRules->length() ) : 0;
+ if (!rule) {
+ return 0;
+ }
+
+ rule->setParent(this);
+ return m_lstCSSRules->insertRule( rule, m_lstCSSRules->length() );
}
unsigned long CSSMediaRuleImpl::insertRule( const DOMString &rule,
@@ -249,7 +259,12 @@ unsigned long CSSMediaRuleImpl::insertRule( const DOMString &rule,
CSSParser p( strictParsing );
CSSRuleImpl *newRule = p.parseRule( parentStyleSheet(), rule );
- return newRule ? m_lstCSSRules->insertRule( newRule, index ) : 0;
+ if (!newRule) {
+ return 0;
+ }
+
+ newRule->setParent(this);
+ return m_lstCSSRules->insertRule( newRule, index );
}
CSSRuleListImpl::~CSSRuleListImpl()
@@ -352,6 +367,11 @@ void CSSRuleListImpl::deleteRule ( unsigned long index )
; // ### Throw INDEX_SIZE_ERR exception here (TODO)
}
+void CSSRuleListImpl::append( CSSRuleImpl *rule )
+{
+ insertRule( rule, m_lstCSSRules.count() ) ;
+}
+
unsigned long CSSRuleListImpl::insertRule( CSSRuleImpl *rule,
unsigned long index )
{
diff --git a/WebCore/khtml/css/css_ruleimpl.h b/WebCore/khtml/css/css_ruleimpl.h
index eacd8af..96521d6 100644
--- a/WebCore/khtml/css/css_ruleimpl.h
+++ b/WebCore/khtml/css/css_ruleimpl.h
@@ -143,7 +143,7 @@ public:
unsigned long insertRule ( CSSRuleImpl *rule, unsigned long index );
void deleteRule ( unsigned long index );
- void append( CSSRuleImpl *rule ) { m_lstCSSRules.append( rule ); }
+ void append( CSSRuleImpl *rule );
protected:
QPtrList<CSSRuleImpl> m_lstCSSRules;
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list