Ignore:
Timestamp:
Nov 15, 2014, 3:02:43 PM (11 years ago)
Author:
[email protected]
Message:

Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
https://bugs.webkit.org/show_bug.cgi?id=138763
<rdar://problem/18991569>

Reviewed by Simon Fraser.

Source/WebCore:

Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
CSSKeyframeRule and CSSKeyframesRule respectively.

This *may* break some existing content, but is compatible with
what Blink and Firefox are doing. To minimize breakage, I kept an
alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
and WEBKIT_KEYFRAME_RULE.

Covered by existing tests.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.vcxproj/WebCore.vcxproj.filters:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJS):

  • bindings/objc/DOMCSS.mm:

(kitClass):

  • css/CSSGrammar.y.includes:
  • css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.

(WebCore::StyleKeyframe::StyleKeyframe):
(WebCore::StyleKeyframe::~StyleKeyframe):
(WebCore::StyleKeyframe::mutableProperties):
(WebCore::StyleKeyframe::parseKeyString):
(WebCore::StyleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::CSSKeyframeRule::~CSSKeyframeRule):
(WebCore::CSSKeyframeRule::style):
(WebCore::CSSKeyframeRule::reattach):

  • css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.

(WebCore::StyleKeyframe::create):
(WebCore::StyleKeyframe::keyText):
(WebCore::StyleKeyframe::setKeyText):
(WebCore::StyleKeyframe::getKeys):
(WebCore::StyleKeyframe::properties):

  • css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
  • css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.

(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
(WebCore::StyleRuleKeyframes::findKeyframeIndex):
(WebCore::CSSKeyframesRule::CSSKeyframesRule):
(WebCore::CSSKeyframesRule::~CSSKeyframesRule):
(WebCore::CSSKeyframesRule::setName):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::insertRule):
(WebCore::CSSKeyframesRule::deleteRule):
(WebCore::CSSKeyframesRule::findRule):
(WebCore::CSSKeyframesRule::cssText):
(WebCore::CSSKeyframesRule::length):
(WebCore::CSSKeyframesRule::item):
(WebCore::CSSKeyframesRule::cssRules):
(WebCore::CSSKeyframesRule::reattach):

  • css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.

(WebCore::StyleRuleKeyframes::create):
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::name):
(WebCore::StyleRuleKeyframes::setName):
(WebCore::StyleRuleKeyframes::copy):

  • css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
  • css/CSSParser.cpp:
  • css/CSSRule.h:
  • css/CSSRule.idl:
  • css/CSSStyleSheet.cpp:
  • css/RuleSet.cpp:
  • css/StyleResolver.cpp:
  • css/StyleRule.cpp:

(WebCore::StyleRuleBase::createCSSOMWrapper):

  • inspector/InspectorStyleSheet.cpp:

(WebCore::asCSSRuleList):

LayoutTests:

Some of the tests use the prefixed interface name. Replace that
with the unprefixed version.

The "keyframes-rule.html" test added a check to make sure the
old constant WEBKIT_KEYFRAMES_RULE is the same as the new
constant KEYFRAMES_RULE.

  • animations/keyframes-rule-expected.txt:
  • animations/keyframes-rule.html:
  • fast/dom/resources/wrapper-identity-base.js:
  • fast/dom/wrapper-classes.html:
  • fast/dom/wrapper-identity-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/fast/dom/objc-wrapper-identity-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSKeyframesRule.cpp

    • Property svn:keywords set to Date Author Id Revision HeadURL
    r176156 r176157  
    11/*
    2  * Copyright (C) 2007, 2008, 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2008, 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2525
    2626#include "config.h"
    27 #include "WebKitCSSKeyframesRule.h"
    28 
     27#include "CSSKeyframesRule.h"
     28
     29#include "CSSKeyframeRule.h"
    2930#include "CSSParser.h"
    3031#include "CSSRuleList.h"
     
    3334#include "StyleProperties.h"
    3435#include "StyleSheet.h"
    35 #include "WebKitCSSKeyframeRule.h"
    3636#include <wtf/text/StringBuilder.h>
    3737
     
    8888}
    8989
    90 WebKitCSSKeyframesRule::WebKitCSSKeyframesRule(StyleRuleKeyframes& keyframesRule, CSSStyleSheet* parent)
     90CSSKeyframesRule::CSSKeyframesRule(StyleRuleKeyframes& keyframesRule, CSSStyleSheet* parent)
    9191    : CSSRule(parent)
    9292    , m_keyframesRule(keyframesRule)
     
    9595}
    9696
    97 WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule()
     97CSSKeyframesRule::~CSSKeyframesRule()
    9898{
    9999    ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
     
    105105}
    106106
    107 void WebKitCSSKeyframesRule::setName(const String& name)
     107void CSSKeyframesRule::setName(const String& name)
    108108{
    109109    CSSStyleSheet::RuleMutationScope mutationScope(this);
     
    112112}
    113113
    114 void WebKitCSSKeyframesRule::appendRule(const String& ruleText)
     114void CSSKeyframesRule::appendRule(const String& ruleText)
    115115{
    116116    if (CSSStyleSheet* parent = parentStyleSheet()) {
     
    121121}
    122122
    123 void WebKitCSSKeyframesRule::insertRule(const String& ruleText)
     123void CSSKeyframesRule::insertRule(const String& ruleText)
    124124{
    125125    ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
     
    138138}
    139139
    140 void WebKitCSSKeyframesRule::deleteRule(const String& s)
     140void CSSKeyframesRule::deleteRule(const String& s)
    141141{
    142142    ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
     
    155155}
    156156
    157 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::findRule(const String& s)
     157CSSKeyframeRule* CSSKeyframesRule::findRule(const String& s)
    158158{
    159159    int i = m_keyframesRule->findKeyframeIndex(s);
     
    161161}
    162162
    163 String WebKitCSSKeyframesRule::cssText() const
     163String CSSKeyframesRule::cssText() const
    164164{
    165165    StringBuilder result;
     
    178178}
    179179
    180 unsigned WebKitCSSKeyframesRule::length() const
     180unsigned CSSKeyframesRule::length() const
    181181{
    182182    return m_keyframesRule->keyframes().size();
    183183}
    184184
    185 WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::item(unsigned index) const
     185CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const
    186186{
    187187    if (index >= length())
     
    189189
    190190    ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
    191     RefPtr<WebKitCSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index];
     191    RefPtr<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index];
    192192    if (!rule)
    193         rule = adoptRef(new WebKitCSSKeyframeRule(*m_keyframesRule->keyframes()[index], const_cast<WebKitCSSKeyframesRule*>(this)));
     193        rule = adoptRef(new CSSKeyframeRule(*m_keyframesRule->keyframes()[index], const_cast<CSSKeyframesRule*>(this)));
    194194
    195195    return rule.get();
    196196}
    197197
    198 CSSRuleList& WebKitCSSKeyframesRule::cssRules()
     198CSSRuleList& CSSKeyframesRule::cssRules()
    199199{
    200200    if (!m_ruleListCSSOMWrapper)
    201         m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<WebKitCSSKeyframesRule>>(this);
     201        m_ruleListCSSOMWrapper = std::make_unique<LiveCSSRuleList<CSSKeyframesRule>>(this);
    202202    return *m_ruleListCSSOMWrapper;
    203203}
    204204
    205 void WebKitCSSKeyframesRule::reattach(StyleRuleBase& rule)
     205void CSSKeyframesRule::reattach(StyleRuleBase& rule)
    206206{
    207207    ASSERT_WITH_SECURITY_IMPLICATION(rule.isKeyframesRule());
Note: See TracChangeset for help on using the changeset viewer.