Changeset 195309 in webkit


Ignore:
Timestamp:
Jan 19, 2016 12:59:56 PM (8 years ago)
Author:
Chris Dumez
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

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195308 r195309  
     12016-01-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Unreviewed, rolling out r195173.
     4
     5        It relies on r195141 which was rolled out
     6
     7        Reverted changeset:
     8
     9        "Give RuleSet a BumpArena and start using it for
     10        RuleDataVectors."
     11        https://bugs.webkit.org/show_bug.cgi?id=153169
     12        http://trac.webkit.org/changeset/195173
     13
    1142016-01-19  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/Source/WebCore/css/RuleSet.cpp

    r195173 r195309  
    184184}
    185185
    186 RuleSet::RuleSet()
    187     : m_arena(WTF::BumpArena::create())
    188 {
    189 }
    190 
    191186void RuleSet::addToRuleSet(AtomicStringImpl* key, AtomRuleMap& map, const RuleData& ruleData)
    192187{
     
    195190    auto& rules = map.add(key, nullptr).iterator->value;
    196191    if (!rules)
    197         rules = RuleDataVector::create(m_arena.get());
     192        rules = std::make_unique<RuleDataVector>();
    198193    rules->append(ruleData);
    199194}
     
    405400{
    406401    for (auto& keyValuePair : other.m_shadowPseudoElementRules)
    407         m_shadowPseudoElementRules.add(keyValuePair.key, RuleDataVector::create(m_arena.get(), *keyValuePair.value));
     402        m_shadowPseudoElementRules.add(keyValuePair.key, std::make_unique<RuleDataVector>(*keyValuePair.value));
    408403
    409404#if ENABLE(VIDEO_TRACK)
  • trunk/Source/WebCore/css/RuleSet.h

    r195173 r195309  
    2626#include "SelectorCompiler.h"
    2727#include "StyleRule.h"
    28 #include <wtf/BumpArena.h>
    2928#include <wtf/Forward.h>
    3029#include <wtf/HashMap.h>
     
    160159    RuleSet();
    161160
    162     class RuleDataVector : public Vector<RuleData, 1> {
    163         WTF_MAKE_BUMPARENA_ALLOCATED;
    164     public:
    165         static std::unique_ptr<RuleDataVector> create(BumpArena& arena)
    166         {
    167             return std::unique_ptr<RuleDataVector>(new (&arena) RuleDataVector);
    168         }
    169         static std::unique_ptr<RuleDataVector> create(BumpArena& arena, const RuleDataVector& other)
    170         {
    171             return std::unique_ptr<RuleDataVector>(new (&arena) RuleDataVector(other));
    172         }
    173     };
    174 
     161    typedef Vector<RuleData, 1> RuleDataVector;
    175162    typedef HashMap<AtomicStringImpl*, std::unique_ptr<RuleDataVector>> AtomRuleMap;
    176163
     
    227214    RuleDataVector m_universalRules;
    228215    Vector<StyleRulePage*> m_pageRules;
    229     unsigned m_ruleCount { 0 };
    230     bool m_autoShrinkToFitEnabled { true };
     216    unsigned m_ruleCount;
     217    bool m_autoShrinkToFitEnabled;
    231218    RuleFeatureSet m_features;
    232219    Vector<RuleSetSelectorPair> m_regionSelectorsAndRuleSets;
    233     Ref<BumpArena> m_arena;
    234 };
     220};
     221
     222inline RuleSet::RuleSet()
     223    : m_ruleCount(0)
     224    , m_autoShrinkToFitEnabled(true)
     225{
     226}
    235227
    236228inline const RuleSet::RuleDataVector* RuleSet::tagRules(AtomicStringImpl* key, bool isHTMLName) const
Note: See TracChangeset for help on using the changeset viewer.