Commit 6f601c10 authored by akling@apple.com's avatar akling@apple.com

Remove the CSS selector profiler.

<https://webkit.org/b/127039>

Source/WebCore:

The selector profiler was painting a mostly fictional picture of what
selectors we were spending time on. It never really grokked the fast
path selectors, nor did it understand recent additions like the extra
cascading pass or the selector JIT.

Somewhat ironically, this may end up making some selectors run faster
since it removes a number of brances in hot code.

Reviewed by Sam Weinig.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/protocol/CSS.json:

Source/WebInspectorUI:

Purge selector profiler code from the new Web Inspector UI.

Reviewed by Sam Weinig.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/CSSSelectorProfileObject.js: Removed.
* UserInterface/CSSSelectorProfileType.js: Removed.
* UserInterface/CSSSelectorProfileView.js: Removed.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/InspectorWebBackendCommands.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked):
(WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected):
(WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
* UserInterface/Main.html:
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager):
(WebInspector.ProfileManager.prototype.initialize):
(WebInspector.ProfileManager.prototype._checkForInterruptions):
(WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 13974d01
2014-01-15 Andreas Kling <akling@apple.com>
Remove the CSS selector profiler.
<https://webkit.org/b/127039>
The selector profiler was painting a mostly fictional picture of what
selectors we were spending time on. It never really grokked the fast
path selectors, nor did it understand recent additions like the extra
cascading pass or the selector JIT.
Somewhat ironically, this may end up making some selectors run faster
since it removes a number of brances in hot code.
Reviewed by Sam Weinig.
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRulesForList):
* css/ElementRuleCollector.h:
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
* inspector/InspectorCSSAgent.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/protocol/CSS.json:
2014-01-15 Frédéric Wang <fred.wang@free.fr>
[SVG] Accept HTML and MathML namespaces as valid requiredExtensions
......@@ -360,16 +360,6 @@ inline bool ElementRuleCollector::ruleMatches(const RuleData& ruleData, PseudoId
}
void ElementRuleCollector::collectMatchingRulesForList(const Vector<RuleData>* rules, const MatchRequest& matchRequest, StyleResolver::RuleRange& ruleRange)
{
if (UNLIKELY(InspectorInstrumentation::hasFrontends())) {
doCollectMatchingRulesForList<true>(rules, matchRequest, ruleRange);
return;
}
doCollectMatchingRulesForList<false>(rules, matchRequest, ruleRange);
}
template<bool hasInspectorFrontends>
void ElementRuleCollector::doCollectMatchingRulesForList(const Vector<RuleData>* rules, const MatchRequest& matchRequest, StyleResolver::RuleRange& ruleRange)
{
if (!rules)
return;
......@@ -382,9 +372,6 @@ void ElementRuleCollector::doCollectMatchingRulesForList(const Vector<RuleData>*
continue;
StyleRule* rule = ruleData.rule();
InspectorInstrumentationCookie cookie;
if (hasInspectorFrontends)
cookie = InspectorInstrumentation::willMatchRule(&document(), rule, m_inspectorCSSOMWrappers, document().styleSheetCollection());
PseudoId dynamicPseudo = NOPSEUDO;
if (ruleMatches(ruleData, dynamicPseudo)) {
// For SharingRules testing, any match is good enough, we don't care what is matched.
......@@ -395,25 +382,16 @@ void ElementRuleCollector::doCollectMatchingRulesForList(const Vector<RuleData>*
// If the rule has no properties to apply, then ignore it in the non-debug mode.
const StyleProperties& properties = rule->properties();
if (properties.isEmpty() && !matchRequest.includeEmptyRules) {
if (hasInspectorFrontends)
InspectorInstrumentation::didMatchRule(cookie, false);
if (properties.isEmpty() && !matchRequest.includeEmptyRules)
continue;
}
// FIXME: Exposing the non-standard getMatchedCSSRules API to web is the only reason this is needed.
if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin()) {
if (hasInspectorFrontends)
InspectorInstrumentation::didMatchRule(cookie, false);
if (m_sameOriginOnly && !ruleData.hasDocumentSecurityOrigin())
continue;
}
// If we're matching normal rules, set a pseudo bit if
// we really just matched a pseudo-element.
if (dynamicPseudo != NOPSEUDO && m_pseudoStyleRequest.pseudoId == NOPSEUDO) {
if (m_mode == SelectorChecker::CollectingRules) {
if (hasInspectorFrontends)
InspectorInstrumentation::didMatchRule(cookie, false);
if (m_mode == SelectorChecker::CollectingRules)
continue;
}
if (dynamicPseudo < FIRST_INTERNAL_PSEUDOID)
state.style()->setHasPseudoStyle(dynamicPseudo);
} else {
......@@ -424,13 +402,9 @@ void ElementRuleCollector::doCollectMatchingRulesForList(const Vector<RuleData>*
// Add this rule to our list of matched rules.
addMatchedRule(&ruleData);
if (hasInspectorFrontends)
InspectorInstrumentation::didMatchRule(cookie, true);
continue;
}
}
if (hasInspectorFrontends)
InspectorInstrumentation::didMatchRule(cookie, false);
}
}
......
......@@ -44,7 +44,6 @@ public:
: m_state(state)
, m_ruleSets(styleResolver->ruleSets())
, m_selectorFilter(styleResolver->selectorFilter())
, m_inspectorCSSOMWrappers(styleResolver->inspectorCSSOMWrappers())
, m_scopeResolver(styleResolver->scopeResolver())
, m_isPrintStyle(false)
, m_regionForStyling(0)
......@@ -88,13 +87,9 @@ private:
void addMatchedRule(const RuleData*);
void clearMatchedRules();
template<bool hasInspectorFrontends>
void doCollectMatchingRulesForList(const Vector<RuleData>*, const MatchRequest&, StyleResolver::RuleRange&);
const StyleResolver::State& m_state;
DocumentRuleSets& m_ruleSets;
SelectorFilter& m_selectorFilter;
InspectorCSSOMWrappers& m_inspectorCSSOMWrappers;
StyleScopeResolver* m_scopeResolver;
bool m_isPrintStyle;
......
......@@ -76,61 +76,6 @@ enum ForcePseudoClassFlags {
PseudoVisited = 1 << 3
};
struct RuleMatchData {
String selector;
String url;
unsigned lineNumber;
double startTime;
};
struct RuleMatchingStats {
RuleMatchingStats()
: lineNumber(0), totalTime(0.0), hits(0), matches(0)
{
}
RuleMatchingStats(const RuleMatchData& data, double totalTime, unsigned hits, unsigned matches)
: selector(data.selector), url(data.url), lineNumber(data.lineNumber), totalTime(totalTime), hits(hits), matches(matches)
{
}
String selector;
String url;
unsigned lineNumber;
double totalTime;
unsigned hits;
unsigned matches;
};
class SelectorProfile {
WTF_MAKE_FAST_ALLOCATED;
public:
SelectorProfile()
: m_totalMatchingTimeMS(0.0)
{
}
virtual ~SelectorProfile()
{
}
double totalMatchingTimeMs() const { return m_totalMatchingTimeMS; }
String makeKey();
void startSelector(const CSSStyleRule*);
void commitSelector(bool);
void commitSelectorTime();
PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> toInspectorObject() const;
private:
// Key is "selector?url:line".
typedef HashMap<String, RuleMatchingStats> RuleMatchingStatsMap;
double m_totalMatchingTimeMS;
RuleMatchingStatsMap m_ruleMatchingStats;
RuleMatchData m_currentMatchData;
};
static unsigned computePseudoClassMask(InspectorArray* pseudoClassArray)
{
DEFINE_STATIC_LOCAL(String, active, (ASCIILiteral("active")));
......@@ -160,72 +105,6 @@ static unsigned computePseudoClassMask(InspectorArray* pseudoClassArray)
return result;
}
inline String SelectorProfile::makeKey()
{
return makeString(m_currentMatchData.selector, "?", m_currentMatchData.url, ":", String::number(m_currentMatchData.lineNumber));
}
inline void SelectorProfile::startSelector(const CSSStyleRule* rule)
{
m_currentMatchData.selector = rule->selectorText();
CSSStyleSheet* styleSheet = rule->parentStyleSheet();
String url = emptyString();
if (styleSheet) {
url = InspectorStyleSheet::styleSheetURL(styleSheet);
if (url.isEmpty())
url = InspectorDOMAgent::documentURLString(styleSheet->ownerDocument());
}
m_currentMatchData.url = url;
m_currentMatchData.lineNumber = rule->styleRule()->sourceLine();
m_currentMatchData.startTime = monotonicallyIncreasingTimeMS();
}
inline void SelectorProfile::commitSelector(bool matched)
{
double matchTimeMS = monotonicallyIncreasingTimeMS() - m_currentMatchData.startTime;
m_totalMatchingTimeMS += matchTimeMS;
RuleMatchingStatsMap::AddResult result = m_ruleMatchingStats.add(makeKey(), RuleMatchingStats(m_currentMatchData, matchTimeMS, 1, matched ? 1 : 0));
if (!result.isNewEntry) {
result.iterator->value.totalTime += matchTimeMS;
result.iterator->value.hits += 1;
if (matched)
result.iterator->value.matches += 1;
}
}
inline void SelectorProfile::commitSelectorTime()
{
double processingTimeMS = monotonicallyIncreasingTimeMS() - m_currentMatchData.startTime;
m_totalMatchingTimeMS += processingTimeMS;
RuleMatchingStatsMap::iterator it = m_ruleMatchingStats.find(makeKey());
if (it == m_ruleMatchingStats.end())
return;
it->value.totalTime += processingTimeMS;
}
PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> SelectorProfile::toInspectorObject() const
{
RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::SelectorProfileEntry>> selectorProfileData = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::SelectorProfileEntry>::create();
for (RuleMatchingStatsMap::const_iterator it = m_ruleMatchingStats.begin(); it != m_ruleMatchingStats.end(); ++it) {
RefPtr<Inspector::TypeBuilder::CSS::SelectorProfileEntry> entry = Inspector::TypeBuilder::CSS::SelectorProfileEntry::create()
.setSelector(it->value.selector)
.setUrl(it->value.url)
.setLineNumber(it->value.lineNumber)
.setTime(it->value.totalTime)
.setHitCount(it->value.hits)
.setMatchCount(it->value.matches);
selectorProfileData->addItem(entry.release());
}
RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> result = Inspector::TypeBuilder::CSS::SelectorProfile::create()
.setTotalTime(totalMatchingTimeMs())
.setData(selectorProfileData);
return result.release();
}
class UpdateRegionLayoutTask {
public:
UpdateRegionLayoutTask(InspectorCSSAgent*);
......@@ -642,8 +521,6 @@ void InspectorCSSAgent::willDestroyFrontendAndBackend()
m_backendDispatcher.clear();
resetNonPersistentData();
String errorString;
stopSelectorProfilerImpl(&errorString, false);
}
void InspectorCSSAgent::discardAgent()
......@@ -1082,52 +959,6 @@ void InspectorCSSAgent::getNamedFlowCollection(ErrorString* errorString, int doc
result = namedFlows.release();
}
void InspectorCSSAgent::startSelectorProfiler(ErrorString*)
{
m_currentSelectorProfile = adoptPtr(new SelectorProfile());
}
void InspectorCSSAgent::stopSelectorProfiler(ErrorString* errorString, RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile>& result)
{
result = stopSelectorProfilerImpl(errorString, true);
}
PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> InspectorCSSAgent::stopSelectorProfilerImpl(ErrorString*, bool needProfile)
{
if (!m_currentSelectorProfile)
return 0;
RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> result;
if (m_frontendDispatcher && needProfile)
result = m_currentSelectorProfile->toInspectorObject();
m_currentSelectorProfile.clear();
return result.release();
}
void InspectorCSSAgent::willMatchRule(StyleRule* rule, InspectorCSSOMWrappers& inspectorCSSOMWrappers, DocumentStyleSheetCollection& styleSheetCollection)
{
// printf("InspectorCSSAgent::willMatchRule %s\n", rule->selectorList().selectorsText().utf8().data());
if (m_currentSelectorProfile)
m_currentSelectorProfile->startSelector(inspectorCSSOMWrappers.getWrapperForRuleInSheets(rule, styleSheetCollection));
}
void InspectorCSSAgent::didMatchRule(bool matched)
{
if (m_currentSelectorProfile)
m_currentSelectorProfile->commitSelector(matched);
}
void InspectorCSSAgent::willProcessRule(StyleRule* rule, StyleResolver& styleResolver)
{
if (m_currentSelectorProfile)
m_currentSelectorProfile->startSelector(styleResolver.inspectorCSSOMWrappers().getWrapperForRuleInSheets(rule, styleResolver.document().styleSheetCollection()));
}
void InspectorCSSAgent::didProcessRule()
{
if (m_currentSelectorProfile)
m_currentSelectorProfile->commitSelectorTime();
}
InspectorStyleSheetForInlineStyle* InspectorCSSAgent::asInspectorStyleSheet(Element* element)
{
NodeToInspectorStyleSheet::iterator it = m_nodeToInspectorStyleSheet.find(element);
......
......@@ -58,7 +58,6 @@ class InstrumentingAgents;
class NameNodeMap;
class Node;
class NodeList;
class SelectorProfile;
class StyleResolver;
class StyleRule;
class UpdateRegionLayoutTask;
......@@ -128,15 +127,6 @@ public:
virtual void forcePseudoState(ErrorString*, int nodeId, const RefPtr<Inspector::InspectorArray>& forcedPseudoClasses);
virtual void getNamedFlowCollection(ErrorString*, int documentNodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::NamedFlow>>& result);
virtual void startSelectorProfiler(ErrorString*);
virtual void stopSelectorProfiler(ErrorString*, RefPtr<Inspector::TypeBuilder::CSS::SelectorProfile>&);
PassRefPtr<Inspector::TypeBuilder::CSS::SelectorProfile> stopSelectorProfilerImpl(ErrorString*, bool needProfile);
void willMatchRule(StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection&);
void didMatchRule(bool);
void willProcessRule(StyleRule*, StyleResolver&);
void didProcessRule();
private:
class StyleSheetAction;
class SetStyleSheetTextAction;
......@@ -195,8 +185,6 @@ private:
OwnPtr<ChangeRegionOversetTask> m_changeRegionOversetTask;
int m_lastStyleSheetId;
OwnPtr<SelectorProfile> m_currentSelectorProfile;
};
#endif
......
......@@ -550,42 +550,6 @@ void InspectorInstrumentation::didScheduleStyleRecalculationImpl(InstrumentingAg
resourceAgent->didScheduleStyleRecalculation(document);
}
InspectorInstrumentationCookie InspectorInstrumentation::willMatchRuleImpl(InstrumentingAgents* instrumentingAgents, StyleRule* rule, InspectorCSSOMWrappers& inspectorCSSOMWrappers, DocumentStyleSheetCollection& sheetCollection)
{
InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent();
if (cssAgent) {
cssAgent->willMatchRule(rule, inspectorCSSOMWrappers, sheetCollection);
return InspectorInstrumentationCookie(instrumentingAgents, 1);
}
return InspectorInstrumentationCookie();
}
void InspectorInstrumentation::didMatchRuleImpl(const InspectorInstrumentationCookie& cookie, bool matched)
{
InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgent();
if (cssAgent)
cssAgent->didMatchRule(matched);
}
InspectorInstrumentationCookie InspectorInstrumentation::willProcessRuleImpl(InstrumentingAgents* instrumentingAgents, StyleRule* rule, StyleResolver& styleResolver)
{
InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent();
if (cssAgent) {
cssAgent->willProcessRule(rule, styleResolver);
return InspectorInstrumentationCookie(instrumentingAgents, 1);
}
return InspectorInstrumentationCookie();
}
void InspectorInstrumentation::didProcessRuleImpl(const InspectorInstrumentationCookie& cookie)
{
InspectorCSSAgent* cssAgent = cookie.instrumentingAgents()->inspectorCSSAgent();
if (cssAgent)
cssAgent->didProcessRule();
}
void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents* instrumentingAgents, String* media)
{
if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
......
......@@ -159,10 +159,6 @@ public:
static InspectorInstrumentationCookie willRecalculateStyle(Document*);
static void didRecalculateStyle(const InspectorInstrumentationCookie&);
static void didScheduleStyleRecalculation(Document*);
static InspectorInstrumentationCookie willMatchRule(Document*, StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection&);
static void didMatchRule(const InspectorInstrumentationCookie&, bool matched);
static InspectorInstrumentationCookie willProcessRule(Document*, StyleRule*, StyleResolver&);
static void didProcessRule(const InspectorInstrumentationCookie&);
static void applyEmulatedMedia(Frame*, String*);
static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
......@@ -349,10 +345,6 @@ private:
static InspectorInstrumentationCookie willRecalculateStyleImpl(InstrumentingAgents*, Frame*);
static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&);
static void didScheduleStyleRecalculationImpl(InstrumentingAgents*, Document*);
static InspectorInstrumentationCookie willMatchRuleImpl(InstrumentingAgents*, StyleRule*, InspectorCSSOMWrappers&, DocumentStyleSheetCollection&);
static void didMatchRuleImpl(const InspectorInstrumentationCookie&, bool matched);
static InspectorInstrumentationCookie willProcessRuleImpl(InstrumentingAgents*, StyleRule*, StyleResolver&);
static void didProcessRuleImpl(const InspectorInstrumentationCookie&);
static void applyEmulatedMediaImpl(InstrumentingAgents*, String*);
static void willSendRequestImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
......@@ -1172,60 +1164,6 @@ inline void InspectorInstrumentation::didScheduleStyleRecalculation(Document* do
#endif
}
inline InspectorInstrumentationCookie InspectorInstrumentation::willMatchRule(Document* document, StyleRule* rule, InspectorCSSOMWrappers& inspectorCSSOMWrappers, DocumentStyleSheetCollection& styleSheetCollection)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
return willMatchRuleImpl(instrumentingAgents, rule, inspectorCSSOMWrappers, styleSheetCollection);
#else
UNUSED_PARAM(document);
UNUSED_PARAM(rule);
UNUSED_PARAM(inspectorCSSOMWrappers);
UNUSED_PARAM(styleSheetCollection);
#endif
return InspectorInstrumentationCookie();
}
inline void InspectorInstrumentation::didMatchRule(const InspectorInstrumentationCookie& cookie, bool matched)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(void());
if (cookie.isValid())
didMatchRuleImpl(cookie, matched);
#else
UNUSED_PARAM(cookie);
UNUSED_PARAM(matched);
#endif
}
inline InspectorInstrumentationCookie InspectorInstrumentation::willProcessRule(Document* document, StyleRule* rule, StyleResolver& styleResolver)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
if (!rule)
return InspectorInstrumentationCookie();
if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
return willProcessRuleImpl(instrumentingAgents, rule, styleResolver);
#else
UNUSED_PARAM(document);
UNUSED_PARAM(rule);
UNUSED_PARAM(styleResolver);
#endif
return InspectorInstrumentationCookie();
}
inline void InspectorInstrumentation::didProcessRule(const InspectorInstrumentationCookie& cookie)
{
#if ENABLE(INSPECTOR)
FAST_RETURN_IF_NO_FRONTENDS(void());
if (cookie.isValid())
didProcessRuleImpl(cookie);
#else
UNUSED_PARAM(cookie);
#endif
}
inline void InspectorInstrumentation::applyEmulatedMedia(Frame* frame, String* media)
{
#if ENABLE(INSPECTOR)
......
......@@ -188,27 +188,6 @@
],
"description": "CSS media query descriptor."
},
{
"id": "SelectorProfileEntry",
"type": "object",
"properties": [
{ "name": "selector", "type": "string", "description": "CSS selector of the corresponding rule." },
{ "name": "url", "type": "string", "description": "URL of the resource containing the corresponding rule." },
{ "name": "lineNumber", "type": "integer", "description": "Selector line number in the resource for the corresponding rule." },
{ "name": "time", "type": "number", "description": "Total time this rule handling contributed to the browser running time during profiling (in milliseconds.)" },
{ "name": "hitCount", "type": "integer", "description": "Number of times this rule was considered a candidate for matching against DOM elements." },
{ "name": "matchCount", "type": "integer", "description": "Number of times this rule actually matched a DOM element." }
],
"description": "CSS selector profile entry."
},
{
"id": "SelectorProfile",
"type": "object",
"properties": [
{ "name": "totalTime", "type": "number", "description": "Total processing time for all selectors in the profile (in milliseconds.)" },
{ "name": "data", "type": "array", "items": { "$ref": "SelectorProfileEntry" }, "description": "CSS selector profile entries." }
]
},
{
"id": "Region",
"type": "object",
......@@ -383,15 +362,6 @@
],
"description": "Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser."
},
{
"name": "startSelectorProfiler"
},
{
"name": "stopSelectorProfiler",
"returns": [
{ "name": "profile", "$ref": "SelectorProfile" }
]
},
{
"name": "getNamedFlowCollection",
"parameters": [
......
2014-01-15 Andreas Kling <akling@apple.com>
Remove the CSS selector profiler.
<https://webkit.org/b/127039>
Purge selector profiler code from the new Web Inspector UI.
Reviewed by Sam Weinig.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/CSSSelectorProfileObject.js: Removed.
* UserInterface/CSSSelectorProfileType.js: Removed.
* UserInterface/CSSSelectorProfileView.js: Removed.
* UserInterface/ContentView.js:
(WebInspector.ContentView):
(WebInspector.ContentView.isViewable):
* UserInterface/InspectorWebBackendCommands.js:
* UserInterface/InstrumentSidebarPanel.js:
(WebInspector.InstrumentSidebarPanel):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown):
(WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked):
(WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected):
(WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
* UserInterface/Main.html:
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager):
(WebInspector.ProfileManager.prototype.initialize):
(WebInspector.ProfileManager.prototype._checkForInterruptions):
(WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2014-01-13 Timothy Hatcher <timothy@apple.com>
Snap time dividers to nearest numbers instead of just dividing the time span into max density slices.
......
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
WebInspector.CSSSelectorProfileObject = function(title, id, recording, data, totalTime)
{
WebInspector.ProfileObject.call(this, WebInspector.CSSSelectorProfileType.TypeId, title, id, recording);
this._data = data || [];
this._totalTime = totalTime || 0;
};
WebInspector.CSSSelectorProfileObject.prototype = {
constructor: WebInspector.CSSSelectorProfileObject,
get data()
{
return this._data;
},
set data(data)
{
this._data = data;
},
get totalTime()
{
return this._totalTime;
},
set totalTime(totalTime)
{
this._totalTime = totalTime;
}
};
WebInspector.CSSSelectorProfileObject.prototype.__proto__ = WebInspector.ProfileObject.prototype;
/*
* Copyright (C) 2011 Google Inc. All Rights Reserved.
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @constructor
*/
WebInspector.CSSSelectorProfileType = function()
{
WebInspector.