<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[163962] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163962">163962</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-12 10:15:23 -0800 (Wed, 12 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Modernize missed inspector files
https://bugs.webkit.org/show_bug.cgi?id=128661
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-02-12
Reviewed by Anders Carlsson.
Add final, override, and use nullptr where appropriate.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::asCSSStyleRule):
(WebCore::InspectorCSSAgent::discardAgent):
(WebCore::InspectorCSSAgent::disable):
(WebCore::InspectorCSSAgent::getInlineStylesForNode):
(WebCore::InspectorCSSAgent::getComputedStyleForNode):
(WebCore::InspectorCSSAgent::asInspectorStyleSheet):
(WebCore::InspectorCSSAgent::elementForId):
(WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
(WebCore::InspectorCSSAgent::assertStyleSheetForId):
(WebCore::InspectorCSSAgent::buildObjectForRule):
(WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
* inspector/InspectorFrontendClientLocal.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorCSSAgentcpp">trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorFrontendClientLocalh">trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163961 => 163962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-12 17:57:05 UTC (rev 163961)
+++ trunk/Source/WebCore/ChangeLog        2014-02-12 18:15:23 UTC (rev 163962)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-02-12 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Modernize missed inspector files
+ https://bugs.webkit.org/show_bug.cgi?id=128661
+
+ Reviewed by Anders Carlsson.
+
+ Add final, override, and use nullptr where appropriate.
+
+ * inspector/InspectorCSSAgent.cpp:
+ (WebCore::InspectorCSSAgent::asCSSStyleRule):
+ (WebCore::InspectorCSSAgent::discardAgent):
+ (WebCore::InspectorCSSAgent::disable):
+ (WebCore::InspectorCSSAgent::getInlineStylesForNode):
+ (WebCore::InspectorCSSAgent::getComputedStyleForNode):
+ (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
+ (WebCore::InspectorCSSAgent::elementForId):
+ (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
+ (WebCore::InspectorCSSAgent::assertStyleSheetForId):
+ (WebCore::InspectorCSSAgent::buildObjectForRule):
+ (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
+ * inspector/InspectorFrontendClientLocal.h:
+
</ins><span class="cx"> 2014-02-11 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove some unintended copies in ranged for loops
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorCSSAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp (163961 => 163962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-02-12 17:57:05 UTC (rev 163961)
+++ trunk/Source/WebCore/inspector/InspectorCSSAgent.cpp        2014-02-12 18:15:23 UTC (rev 163962)
</span><span class="lines">@@ -227,23 +227,23 @@
</span><span class="cx"> RefPtr<InspectorStyleSheet> m_styleSheet;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::SetStyleSheetTextAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::SetStyleSheetTextAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(SetStyleSheetTextAction);
</span><span class="cx"> public:
</span><span class="cx"> SetStyleSheetTextAction(InspectorStyleSheet* styleSheet, const String& text)
</span><del>- : InspectorCSSAgent::StyleSheetAction("SetStyleSheetText", styleSheet)
</del><ins>+ : InspectorCSSAgent::StyleSheetAction(ASCIILiteral("SetStyleSheetText"), styleSheet)
</ins><span class="cx"> , m_text(text)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_styleSheet->getText(&m_oldText))
</span><span class="cx"> return false;
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> if (m_styleSheet->setText(m_oldText, ec)) {
</span><span class="cx"> m_styleSheet->reparseStyleSheet(m_oldText);
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> if (m_styleSheet->setText(m_text, ec)) {
</span><span class="cx"> m_styleSheet->reparseStyleSheet(m_text);
</span><span class="lines">@@ -261,12 +261,12 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String mergeId()
</del><ins>+ virtual String mergeId() override
</ins><span class="cx"> {
</span><span class="cx"> return String::format("SetStyleSheetText %s", m_styleSheet->id().utf8().data());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void merge(PassOwnPtr<Action> action)
</del><ins>+ virtual void merge(PassOwnPtr<Action> action) override
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(action->mergeId() == mergeId());
</span><span class="cx">
</span><span class="lines">@@ -279,7 +279,7 @@
</span><span class="cx"> String m_oldText;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::SetStyleTextAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::SetStyleTextAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(SetStyleTextAction);
</span><span class="cx"> public:
</span><span class="cx"> SetStyleTextAction(InspectorStyleSheet* styleSheet, const InspectorCSSId& cssId, const String& text)
</span><span class="lines">@@ -289,28 +289,28 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><del>- return m_styleSheet->setStyleText(m_cssId, m_oldText, 0, ec);
</del><ins>+ return m_styleSheet->setStyleText(m_cssId, m_oldText, nullptr, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->setStyleText(m_cssId, m_text, &m_oldText, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String mergeId()
</del><ins>+ virtual String mergeId() override
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_styleSheet->id() == m_cssId.styleSheetId());
</span><span class="cx"> return String::format("SetStyleText %s:%u", m_styleSheet->id().utf8().data(), m_cssId.ordinal());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void merge(PassOwnPtr<Action> action)
</del><ins>+ virtual void merge(PassOwnPtr<Action> action) override
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(action->mergeId() == mergeId());
</span><span class="cx">
</span><span class="lines">@@ -324,11 +324,11 @@
</span><span class="cx"> String m_oldText;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::SetPropertyTextAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::SetPropertyTextAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(SetPropertyTextAction);
</span><span class="cx"> public:
</span><span class="cx"> SetPropertyTextAction(InspectorStyleSheet* styleSheet, const InspectorCSSId& cssId, unsigned propertyIndex, const String& text, bool overwrite)
</span><del>- : InspectorCSSAgent::StyleSheetAction("SetPropertyText", styleSheet)
</del><ins>+ : InspectorCSSAgent::StyleSheetAction(ASCIILiteral("SetPropertyText"), styleSheet)
</ins><span class="cx"> , m_cssId(cssId)
</span><span class="cx"> , m_propertyIndex(propertyIndex)
</span><span class="cx"> , m_text(text)
</span><span class="lines">@@ -336,23 +336,23 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String toString()
</del><ins>+ virtual String toString() override
</ins><span class="cx"> {
</span><span class="cx"> return mergeId() + ": " + m_oldText + " -> " + m_text;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> String placeholder;
</span><span class="cx"> return m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_overwrite ? m_oldText : "", true, &placeholder, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> String oldText;
</span><span class="cx"> bool result = m_styleSheet->setPropertyText(m_cssId, m_propertyIndex, m_text, m_overwrite, &oldText, ec);
</span><span class="lines">@@ -364,12 +364,12 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String mergeId()
</del><ins>+ virtual String mergeId() override
</ins><span class="cx"> {
</span><span class="cx"> return String::format("SetPropertyText %s:%u:%s", m_styleSheet->id().utf8().data(), m_propertyIndex, m_overwrite ? "true" : "false");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void merge(PassOwnPtr<Action> action)
</del><ins>+ virtual void merge(PassOwnPtr<Action> action) override
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(action->mergeId() == mergeId());
</span><span class="cx">
</span><span class="lines">@@ -385,28 +385,28 @@
</span><span class="cx"> bool m_overwrite;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::TogglePropertyAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::TogglePropertyAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(TogglePropertyAction);
</span><span class="cx"> public:
</span><span class="cx"> TogglePropertyAction(InspectorStyleSheet* styleSheet, const InspectorCSSId& cssId, unsigned propertyIndex, bool disable)
</span><del>- : InspectorCSSAgent::StyleSheetAction("ToggleProperty", styleSheet)
</del><ins>+ : InspectorCSSAgent::StyleSheetAction(ASCIILiteral("ToggleProperty"), styleSheet)
</ins><span class="cx"> , m_cssId(cssId)
</span><span class="cx"> , m_propertyIndex(propertyIndex)
</span><span class="cx"> , m_disable(disable)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, !m_disable, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->toggleProperty(m_cssId, m_propertyIndex, m_disable, ec);
</span><span class="cx"> }
</span><span class="lines">@@ -417,17 +417,17 @@
</span><span class="cx"> bool m_disable;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::SetRuleSelectorAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::SetRuleSelectorAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(SetRuleSelectorAction);
</span><span class="cx"> public:
</span><span class="cx"> SetRuleSelectorAction(InspectorStyleSheet* styleSheet, const InspectorCSSId& cssId, const String& selector)
</span><del>- : InspectorCSSAgent::StyleSheetAction("SetRuleSelector", styleSheet)
</del><ins>+ : InspectorCSSAgent::StyleSheetAction(ASCIILiteral("SetRuleSelector"), styleSheet)
</ins><span class="cx"> , m_cssId(cssId)
</span><span class="cx"> , m_selector(selector)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> m_oldSelector = m_styleSheet->ruleSelector(m_cssId, ec);
</span><span class="cx"> if (ec)
</span><span class="lines">@@ -435,12 +435,12 @@
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->setRuleSelector(m_cssId, m_oldSelector, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->setRuleSelector(m_cssId, m_selector, ec);
</span><span class="cx"> }
</span><span class="lines">@@ -451,26 +451,26 @@
</span><span class="cx"> String m_oldSelector;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class InspectorCSSAgent::AddRuleAction : public InspectorCSSAgent::StyleSheetAction {
</del><ins>+class InspectorCSSAgent::AddRuleAction final : public InspectorCSSAgent::StyleSheetAction {
</ins><span class="cx"> WTF_MAKE_NONCOPYABLE(AddRuleAction);
</span><span class="cx"> public:
</span><span class="cx"> AddRuleAction(InspectorStyleSheet* styleSheet, const String& selector)
</span><del>- : InspectorCSSAgent::StyleSheetAction("AddRule", styleSheet)
</del><ins>+ : InspectorCSSAgent::StyleSheetAction(ASCIILiteral("AddRule"), styleSheet)
</ins><span class="cx"> , m_selector(selector)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool perform(ExceptionCode& ec)
</del><ins>+ virtual bool perform(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return redo(ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool undo(ExceptionCode& ec)
</del><ins>+ virtual bool undo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> return m_styleSheet->deleteRule(m_newId, ec);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool redo(ExceptionCode& ec)
</del><ins>+ virtual bool redo(ExceptionCode& ec) override
</ins><span class="cx"> {
</span><span class="cx"> CSSStyleRule* cssStyleRule = m_styleSheet->addRule(m_selector, ec);
</span><span class="cx"> if (ec)
</span><span class="lines">@@ -491,7 +491,7 @@
</span><span class="cx"> CSSStyleRule* InspectorCSSAgent::asCSSStyleRule(CSSRule* rule)
</span><span class="cx"> {
</span><span class="cx"> if (rule->type() != CSSRule::STYLE_RULE)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> return static_cast<CSSStyleRule*>(rule);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -525,8 +525,8 @@
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::discardAgent()
</span><span class="cx"> {
</span><del>- m_domAgent->setDOMListener(0);
- m_domAgent = 0;
</del><ins>+ m_domAgent->setDOMListener(nullptr);
+ m_domAgent = nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::reset()
</span><span class="lines">@@ -555,7 +555,7 @@
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::disable(ErrorString*)
</span><span class="cx"> {
</span><del>- m_instrumentingAgents->setInspectorCSSAgent(0);
</del><ins>+ m_instrumentingAgents->setInspectorCSSAgent(nullptr);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::mediaQueryResultChanged()
</span><span class="lines">@@ -750,7 +750,7 @@
</span><span class="cx">
</span><span class="cx"> inlineStyle = styleSheet->buildObjectForStyle(element->style());
</span><span class="cx"> RefPtr<Inspector::TypeBuilder::CSS::CSSStyle> attributes = buildObjectForAttributesStyle(element);
</span><del>- attributesStyle = attributes ? attributes.release() : 0;
</del><ins>+ attributesStyle = attributes ? attributes.release() : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void InspectorCSSAgent::getComputedStyleForNode(ErrorString* errorString, int nodeId, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSComputedStyleProperty>>& style)
</span><span class="lines">@@ -760,7 +760,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSComputedStyleDeclaration> computedStyleInfo = CSSComputedStyleDeclaration::create(element, true);
</span><del>- RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), computedStyleInfo, 0);
</del><ins>+ RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), computedStyleInfo, nullptr);
</ins><span class="cx"> style = inspectorStyle->buildArrayForComputedStyle();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -963,9 +963,9 @@
</span><span class="cx"> {
</span><span class="cx"> NodeToInspectorStyleSheet::iterator it = m_nodeToInspectorStyleSheet.find(element);
</span><span class="cx"> if (it == m_nodeToInspectorStyleSheet.end()) {
</span><del>- CSSStyleDeclaration* style = element->isStyledElement() ? element->style() : 0;
</del><ins>+ CSSStyleDeclaration* style = element->isStyledElement() ? element->style() : nullptr;
</ins><span class="cx"> if (!style)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> String newStyleSheetId = String::number(m_lastStyleSheetId++);
</span><span class="cx"> RefPtr<InspectorStyleSheetForInlineStyle> inspectorStyleSheet = InspectorStyleSheetForInlineStyle::create(m_domAgent->pageAgent(), newStyleSheetId, element, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Regular, this);
</span><span class="lines">@@ -982,11 +982,11 @@
</span><span class="cx"> Node* node = m_domAgent->nodeForId(nodeId);
</span><span class="cx"> if (!node) {
</span><span class="cx"> *errorString = "No node with given id found";
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> if (!node->isElementNode()) {
</span><span class="cx"> *errorString = "Not an element node";
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> return toElement(node);
</span><span class="cx"> }
</span><span class="lines">@@ -1031,11 +1031,11 @@
</span><span class="cx"> {
</span><span class="cx"> if (!document) {
</span><span class="cx"> ASSERT(!createIfAbsent);
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!document->isHTMLDocument() && !document->isSVGDocument())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> RefPtr<InspectorStyleSheet> inspectorStyleSheet = m_documentToInspectorStyleSheet.get(document);
</span><span class="cx"> if (inspectorStyleSheet || !createIfAbsent)
</span><span class="lines">@@ -1053,22 +1053,22 @@
</span><span class="cx"> else if (document->body())
</span><span class="cx"> targetNode = document->body();
</span><span class="cx"> else
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> InlineStyleOverrideScope overrideScope(document);
</span><span class="cx"> targetNode->appendChild(styleElement, ec);
</span><span class="cx"> }
</span><span class="cx"> if (ec)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><del>- CSSStyleSheet* cssStyleSheet = 0;
</del><ins>+ CSSStyleSheet* cssStyleSheet = nullptr;
</ins><span class="cx"> if (styleElement->isHTMLElement())
</span><span class="cx"> cssStyleSheet = toHTMLStyleElement(styleElement.get())->sheet();
</span><span class="cx"> else if (styleElement->isSVGElement())
</span><span class="cx"> cssStyleSheet = toSVGStyleElement(styleElement.get())->sheet();
</span><span class="cx">
</span><span class="cx"> if (!cssStyleSheet)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> String id = String::number(m_lastStyleSheetId++);
</span><span class="cx"> inspectorStyleSheet = InspectorStyleSheet::create(m_domAgent->pageAgent(), id, cssStyleSheet, Inspector::TypeBuilder::CSS::StyleSheetOrigin::Inspector, InspectorDOMAgent::documentURLString(document), this);
</span><span class="lines">@@ -1083,7 +1083,7 @@
</span><span class="cx"> IdToInspectorStyleSheet::iterator it = m_idToInspectorStyleSheet.find(styleSheetId);
</span><span class="cx"> if (it == m_idToInspectorStyleSheet.end()) {
</span><span class="cx"> *errorString = "No style sheet with given id found";
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> return it->value.get();
</span><span class="cx"> }
</span><span class="lines">@@ -1106,25 +1106,25 @@
</span><span class="cx"> PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(StyleRule* styleRule, StyleResolver& styleResolver)
</span><span class="cx"> {
</span><span class="cx"> if (!styleRule)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> // StyleRules returned by StyleResolver::styleRulesForElement lack parent pointers since that infomation is not cheaply available.
</span><span class="cx"> // Since the inspector wants to walk the parent chain, we construct the full wrappers here.
</span><span class="cx"> CSSStyleRule* cssomWrapper = styleResolver.inspectorCSSOMWrappers().getWrapperForRuleInSheets(styleRule, styleResolver.document().styleSheetCollection());
</span><span class="cx"> if (!cssomWrapper)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx"> InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(cssomWrapper->parentStyleSheet());
</span><del>- return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(cssomWrapper) : 0;
</del><ins>+ return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(cssomWrapper) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<Inspector::TypeBuilder::CSS::CSSRule> InspectorCSSAgent::buildObjectForRule(CSSStyleRule* rule)
</span><span class="cx"> {
</span><span class="cx"> if (!rule)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ASSERT(rule->parentStyleSheet());
</span><span class="cx"> InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(rule->parentStyleSheet());
</span><del>- return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(rule) : 0;
</del><ins>+ return inspectorStyleSheet ? inspectorStyleSheet->buildObjectForRule(rule) : nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::CSS::CSSRule>> InspectorCSSAgent::buildArrayForRuleList(CSSRuleList* ruleList)
</span><span class="lines">@@ -1175,17 +1175,17 @@
</span><span class="cx"> PassRefPtr<Inspector::TypeBuilder::CSS::CSSStyle> InspectorCSSAgent::buildObjectForAttributesStyle(Element* element)
</span><span class="cx"> {
</span><span class="cx"> if (!element->isStyledElement())
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> // FIXME: Ugliness below.
</span><span class="cx"> StyleProperties* attributeStyle = const_cast<StyleProperties*>(toStyledElement(element)->presentationAttributeStyle());
</span><span class="cx"> if (!attributeStyle)
</span><del>- return 0;
</del><ins>+ return nullptr;
</ins><span class="cx">
</span><span class="cx"> ASSERT_WITH_SECURITY_IMPLICATION(attributeStyle->isMutable());
</span><span class="cx"> MutableStyleProperties* mutableAttributeStyle = static_cast<MutableStyleProperties*>(attributeStyle);
</span><span class="cx">
</span><del>- RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), mutableAttributeStyle->ensureCSSStyleDeclaration(), 0);
</del><ins>+ RefPtr<InspectorStyle> inspectorStyle = InspectorStyle::create(InspectorCSSId(), mutableAttributeStyle->ensureCSSStyleDeclaration(), nullptr);
</ins><span class="cx"> return inspectorStyle->buildObjectForStyle();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorFrontendClientLocalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h (163961 => 163962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h        2014-02-12 17:57:05 UTC (rev 163961)
+++ trunk/Source/WebCore/inspector/InspectorFrontendClientLocal.h        2014-02-12 18:15:23 UTC (rev 163962)
</span><span class="lines">@@ -58,25 +58,25 @@
</span><span class="cx"> InspectorFrontendClientLocal(InspectorController*, Page*, PassOwnPtr<Settings>);
</span><span class="cx"> virtual ~InspectorFrontendClientLocal();
</span><span class="cx">
</span><del>- virtual void windowObjectCleared();
- virtual void frontendLoaded();
</del><ins>+ virtual void windowObjectCleared() override;
+ virtual void frontendLoaded() override;
</ins><span class="cx">
</span><del>- virtual void moveWindowBy(float x, float y);
</del><ins>+ virtual void moveWindowBy(float x, float y) override;
</ins><span class="cx">
</span><del>- virtual void requestSetDockSide(DockSide);
- virtual void changeAttachedWindowHeight(unsigned);
- virtual void changeAttachedWindowWidth(unsigned);
- virtual void openInNewTab(const String& url);
- virtual bool canSave() { return false; }
- virtual void save(const String&, const String&, bool, bool) { }
- virtual void append(const String&, const String&) { }
</del><ins>+ virtual void requestSetDockSide(DockSide) override;
+ virtual void changeAttachedWindowHeight(unsigned) override;
+ virtual void changeAttachedWindowWidth(unsigned) override;
+ virtual void openInNewTab(const String& url) override;
+ virtual bool canSave() override { return false; }
+ virtual void save(const String&, const String&, bool, bool) override { }
+ virtual void append(const String&, const String&) override { }
</ins><span class="cx">
</span><span class="cx"> virtual void attachWindow(DockSide) = 0;
</span><span class="cx"> virtual void detachWindow() = 0;
</span><span class="cx">
</span><del>- virtual void sendMessageToBackend(const String& message);
</del><ins>+ virtual void sendMessageToBackend(const String& message) override;
</ins><span class="cx">
</span><del>- virtual bool isUnderTest();
</del><ins>+ virtual bool isUnderTest() override;
</ins><span class="cx">
</span><span class="cx"> bool canAttachWindow();
</span><span class="cx"> void setDockingUnavailable(bool);
</span></span></pre>
</div>
</div>
</body>
</html>