Title: [195309] trunk/Source/WebCore
- Revision
- 195309
- Author
- [email protected]
- Date
- 2016-01-19 12:59:56 -0800 (Tue, 19 Jan 2016)
Log Message
Unreviewed, rolling out r195173.
It relies on r195141 which was rolled out
Reverted changeset:
"Give RuleSet a BumpArena and start using it for
RuleDataVectors."
https://bugs.webkit.org/show_bug.cgi?id=153169
http://trac.webkit.org/changeset/195173
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (195308 => 195309)
--- trunk/Source/WebCore/ChangeLog 2016-01-19 20:56:21 UTC (rev 195308)
+++ trunk/Source/WebCore/ChangeLog 2016-01-19 20:59:56 UTC (rev 195309)
@@ -1,3 +1,16 @@
+2016-01-19 Chris Dumez <[email protected]>
+
+ Unreviewed, rolling out r195173.
+
+ It relies on r195141 which was rolled out
+
+ Reverted changeset:
+
+ "Give RuleSet a BumpArena and start using it for
+ RuleDataVectors."
+ https://bugs.webkit.org/show_bug.cgi?id=153169
+ http://trac.webkit.org/changeset/195173
+
2016-01-19 Commit Queue <[email protected]>
Unreviewed, rolling out r195300.
Modified: trunk/Source/WebCore/css/RuleSet.cpp (195308 => 195309)
--- trunk/Source/WebCore/css/RuleSet.cpp 2016-01-19 20:56:21 UTC (rev 195308)
+++ trunk/Source/WebCore/css/RuleSet.cpp 2016-01-19 20:59:56 UTC (rev 195309)
@@ -183,18 +183,13 @@
features.uncommonAttributeRules.append(RuleFeature(ruleData.rule(), ruleData.selectorIndex(), ruleData.hasDocumentSecurityOrigin()));
}
-RuleSet::RuleSet()
- : m_arena(WTF::BumpArena::create())
-{
-}
-
void RuleSet::addToRuleSet(AtomicStringImpl* key, AtomRuleMap& map, const RuleData& ruleData)
{
if (!key)
return;
auto& rules = map.add(key, nullptr).iterator->value;
if (!rules)
- rules = RuleDataVector::create(m_arena.get());
+ rules = std::make_unique<RuleDataVector>();
rules->append(ruleData);
}
@@ -404,7 +399,7 @@
void RuleSet::copyShadowPseudoElementRulesFrom(const RuleSet& other)
{
for (auto& keyValuePair : other.m_shadowPseudoElementRules)
- m_shadowPseudoElementRules.add(keyValuePair.key, RuleDataVector::create(m_arena.get(), *keyValuePair.value));
+ m_shadowPseudoElementRules.add(keyValuePair.key, std::make_unique<RuleDataVector>(*keyValuePair.value));
#if ENABLE(VIDEO_TRACK)
// FIXME: We probably shouldn't treat WebVTT as author stylable user agent shadow tree.
Modified: trunk/Source/WebCore/css/RuleSet.h (195308 => 195309)
--- trunk/Source/WebCore/css/RuleSet.h 2016-01-19 20:56:21 UTC (rev 195308)
+++ trunk/Source/WebCore/css/RuleSet.h 2016-01-19 20:59:56 UTC (rev 195309)
@@ -25,7 +25,6 @@
#include "RuleFeature.h"
#include "SelectorCompiler.h"
#include "StyleRule.h"
-#include <wtf/BumpArena.h>
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -159,19 +158,7 @@
RuleSet();
- class RuleDataVector : public Vector<RuleData, 1> {
- WTF_MAKE_BUMPARENA_ALLOCATED;
- public:
- static std::unique_ptr<RuleDataVector> create(BumpArena& arena)
- {
- return std::unique_ptr<RuleDataVector>(new (&arena) RuleDataVector);
- }
- static std::unique_ptr<RuleDataVector> create(BumpArena& arena, const RuleDataVector& other)
- {
- return std::unique_ptr<RuleDataVector>(new (&arena) RuleDataVector(other));
- }
- };
-
+ typedef Vector<RuleData, 1> RuleDataVector;
typedef HashMap<AtomicStringImpl*, std::unique_ptr<RuleDataVector>> AtomRuleMap;
void addRulesFromSheet(StyleSheetContents&, const MediaQueryEvaluator&, StyleResolver* = 0);
@@ -226,13 +213,18 @@
RuleDataVector m_focusPseudoClassRules;
RuleDataVector m_universalRules;
Vector<StyleRulePage*> m_pageRules;
- unsigned m_ruleCount { 0 };
- bool m_autoShrinkToFitEnabled { true };
+ unsigned m_ruleCount;
+ bool m_autoShrinkToFitEnabled;
RuleFeatureSet m_features;
Vector<RuleSetSelectorPair> m_regionSelectorsAndRuleSets;
- Ref<BumpArena> m_arena;
};
+inline RuleSet::RuleSet()
+ : m_ruleCount(0)
+ , m_autoShrinkToFitEnabled(true)
+{
+}
+
inline const RuleSet::RuleDataVector* RuleSet::tagRules(AtomicStringImpl* key, bool isHTMLName) const
{
const AtomRuleMap* tagRules;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes