Diff
Modified: trunk/Source/WebCore/ChangeLog (160752 => 160753)
--- trunk/Source/WebCore/ChangeLog 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/ChangeLog 2013-12-18 06:27:44 UTC (rev 160753)
@@ -1,5 +1,38 @@
2013-12-17 Joseph Pecoraro <[email protected]>
+ Web Inspector: Remove InspectorAgent::hasFrontend
+ https://bugs.webkit.org/show_bug.cgi?id=125907
+
+ Reviewed by Timothy Hatcher.
+
+ Remove InspectorAgent::hasFrontend only used by
+ InspectorInstrumentation::collectingHTMLParseErrors. However,
+ following the single callers of that, the result is unused
+ in the HTMLDocumentParser and HTMLTreeBuilder. So remove
+ more stale / unused code.
+
+ * html/FTPDirectoryDocument.cpp:
+ (WebCore::FTPDirectoryDocumentParser::FTPDirectoryDocumentParser):
+ * html/HTMLDocument.cpp:
+ (WebCore::HTMLDocument::createParser):
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::HTMLDocumentParser):
+ * html/parser/HTMLDocumentParser.h:
+ (WebCore::HTMLDocumentParser::create):
+ * html/parser/HTMLTreeBuilder.cpp:
+ (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
+ * html/parser/HTMLTreeBuilder.h:
+ (WebCore::HTMLTreeBuilder::create):
+ * html/parser/TextDocumentParser.cpp:
+ (WebCore::TextDocumentParser::TextDocumentParser):
+ * inspector/DOMPatchSupport.cpp:
+ (WebCore::DOMPatchSupport::patchDocument):
+ * inspector/InspectorAgent.h:
+ * inspector/InspectorInstrumentation.cpp:
+ * inspector/InspectorInstrumentation.h:
+
+2013-12-17 Joseph Pecoraro <[email protected]>
+
Web Inspector: Some basic InjectedScriptHost cleanup
https://bugs.webkit.org/show_bug.cgi?id=125902
Modified: trunk/Source/WebCore/html/FTPDirectoryDocument.cpp (160752 => 160753)
--- trunk/Source/WebCore/html/FTPDirectoryDocument.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/FTPDirectoryDocument.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -96,7 +96,7 @@
};
FTPDirectoryDocumentParser::FTPDirectoryDocumentParser(HTMLDocument& document)
- : HTMLDocumentParser(document, false)
+ : HTMLDocumentParser(document)
, m_skipLF(false)
, m_size(254)
, m_buffer(static_cast<UChar*>(fastMalloc(sizeof(UChar) * m_size)))
Modified: trunk/Source/WebCore/html/HTMLDocument.cpp (160752 => 160753)
--- trunk/Source/WebCore/html/HTMLDocument.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/HTMLDocument.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -70,7 +70,6 @@
#include "HTMLFrameOwnerElement.h"
#include "HTMLFrameSetElement.h"
#include "HTMLNames.h"
-#include "InspectorInstrumentation.h"
#include "JSDOMBinding.h"
#include "Page.h"
#include "ScriptController.h"
@@ -249,8 +248,7 @@
PassRefPtr<DocumentParser> HTMLDocument::createParser()
{
- bool reportErrors = InspectorInstrumentation::collectingHTMLParseErrors(this->page());
- return HTMLDocumentParser::create(*this, reportErrors);
+ return HTMLDocumentParser::create(*this);
}
// --------------------------------------------------------------------------
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp (160752 => 160753)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -69,13 +69,13 @@
return HTMLTokenizer::DataState;
}
-HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document, bool reportErrors)
+HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document)
: ScriptableDocumentParser(document)
, m_options(document)
, m_token(m_options.useThreading ? nullptr : adoptPtr(new HTMLToken))
, m_tokenizer(m_options.useThreading ? nullptr : HTMLTokenizer::create(m_options))
, m_scriptRunner(HTMLScriptRunner::create(document, *this))
- , m_treeBuilder(HTMLTreeBuilder::create(*this, document, parserContentPolicy(), reportErrors, m_options))
+ , m_treeBuilder(HTMLTreeBuilder::create(*this, document, parserContentPolicy(), m_options))
, m_parserScheduler(HTMLParserScheduler::create(*this))
, m_xssAuditorDelegate(document)
#if ENABLE(THREADED_HTML_PARSER)
Modified: trunk/Source/WebCore/html/parser/HTMLDocumentParser.h (160752 => 160753)
--- trunk/Source/WebCore/html/parser/HTMLDocumentParser.h 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/parser/HTMLDocumentParser.h 2013-12-18 06:27:44 UTC (rev 160753)
@@ -66,9 +66,9 @@
class HTMLDocumentParser : public ScriptableDocumentParser, HTMLScriptRunnerHost, CachedResourceClient {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassRefPtr<HTMLDocumentParser> create(HTMLDocument& document, bool reportErrors)
+ static PassRefPtr<HTMLDocumentParser> create(HTMLDocument& document)
{
- return adoptRef(new HTMLDocumentParser(document, reportErrors));
+ return adoptRef(new HTMLDocumentParser(document));
}
virtual ~HTMLDocumentParser();
@@ -102,7 +102,7 @@
virtual void append(PassRefPtr<StringImpl>) OVERRIDE;
virtual void finish() OVERRIDE;
- HTMLDocumentParser(HTMLDocument&, bool reportErrors);
+ explicit HTMLDocumentParser(HTMLDocument&);
HTMLDocumentParser(DocumentFragment&, Element* contextElement, ParserContentPolicy);
HTMLTreeBuilder* treeBuilder() const { return m_treeBuilder.get(); }
Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp (160752 => 160753)
--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -269,7 +269,7 @@
};
-HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser& parser, HTMLDocument& document, ParserContentPolicy parserContentPolicy, bool, const HTMLParserOptions& options)
+HTMLTreeBuilder::HTMLTreeBuilder(HTMLDocumentParser& parser, HTMLDocument& document, ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options)
: m_framesetOk(true)
#ifndef NDEBUG
, m_isAttached(true)
Modified: trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h (160752 => 160753)
--- trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/parser/HTMLTreeBuilder.h 2013-12-18 06:27:44 UTC (rev 160753)
@@ -57,9 +57,9 @@
class HTMLTreeBuilder {
WTF_MAKE_NONCOPYABLE(HTMLTreeBuilder); WTF_MAKE_FAST_ALLOCATED;
public:
- static OwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser& parser, HTMLDocument& document, ParserContentPolicy parserContentPolicy, bool reportErrors, const HTMLParserOptions& options)
+ static OwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser& parser, HTMLDocument& document, ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options)
{
- return adoptPtr(new HTMLTreeBuilder(parser, document, parserContentPolicy, reportErrors, options));
+ return adoptPtr(new HTMLTreeBuilder(parser, document, parserContentPolicy, options));
}
static OwnPtr<HTMLTreeBuilder> create(HTMLDocumentParser& parser, DocumentFragment& fragment, Element* contextElement, ParserContentPolicy parserContentPolicy, const HTMLParserOptions& options)
{
@@ -120,7 +120,7 @@
AfterAfterFramesetMode,
};
- HTMLTreeBuilder(HTMLDocumentParser&, HTMLDocument&, ParserContentPolicy, bool reportErrors, const HTMLParserOptions&);
+ HTMLTreeBuilder(HTMLDocumentParser&, HTMLDocument&, ParserContentPolicy, const HTMLParserOptions&);
HTMLTreeBuilder(HTMLDocumentParser&, DocumentFragment&, Element* contextElement, ParserContentPolicy, const HTMLParserOptions&);
#if PLATFORM(IOS)
Modified: trunk/Source/WebCore/html/parser/TextDocumentParser.cpp (160752 => 160753)
--- trunk/Source/WebCore/html/parser/TextDocumentParser.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/html/parser/TextDocumentParser.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -33,7 +33,7 @@
using namespace HTMLNames;
TextDocumentParser::TextDocumentParser(HTMLDocument& document)
- : HTMLDocumentParser(document, false)
+ : HTMLDocumentParser(document)
, m_haveInsertedFakePreElement(false)
{
}
Modified: trunk/Source/WebCore/inspector/DOMPatchSupport.cpp (160752 => 160753)
--- trunk/Source/WebCore/inspector/DOMPatchSupport.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/inspector/DOMPatchSupport.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -100,7 +100,7 @@
ASSERT(newDocument);
RefPtr<DocumentParser> parser;
if (newDocument->isHTMLDocument())
- parser = HTMLDocumentParser::create(static_cast<HTMLDocument&>(*newDocument), false);
+ parser = HTMLDocumentParser::create(static_cast<HTMLDocument&>(*newDocument));
else
parser = XMLDocumentParser::create(*newDocument, 0);
parser->insert(markup); // Use insert() so that the parser will not yield.
Modified: trunk/Source/WebCore/inspector/InspectorAgent.h (160752 => 160753)
--- trunk/Source/WebCore/inspector/InspectorAgent.h 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/inspector/InspectorAgent.h 2013-12-18 06:27:44 UTC (rev 160753)
@@ -71,8 +71,6 @@
virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
virtual void willDestroyFrontendAndBackend() OVERRIDE;
- bool hasFrontend() const { return !!m_frontendDispatcher; }
-
// Generic code called from custom implementations.
void evaluateForTestInFrontend(long testCallId, const String& script);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (160752 => 160753)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2013-12-18 06:27:44 UTC (rev 160753)
@@ -50,7 +50,6 @@
#include "InspectorCSSAgent.h"
#include "InspectorCanvasAgent.h"
#include "InspectorConsoleAgent.h"
-#include "InspectorController.h"
#include "InspectorDOMAgent.h"
#include "InspectorDOMDebuggerAgent.h"
#include "InspectorDOMStorageAgent.h"
@@ -76,7 +75,6 @@
#include "StyleResolver.h"
#include "StyleRule.h"
#include "WorkerGlobalScope.h"
-#include "WorkerInspectorController.h"
#include "WorkerRuntimeAgent.h"
#include "WorkerThread.h"
#include "XMLHttpRequest.h"
@@ -1209,13 +1207,6 @@
applicationCacheAgent->updateApplicationCacheStatus(frame);
}
-bool InspectorInstrumentation::collectingHTMLParseErrors(InstrumentingAgents* instrumentingAgents)
-{
- if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent())
- return inspectorAgent->hasFrontend();
- return false;
-}
-
bool InspectorInstrumentation::canvasAgentEnabled(ScriptExecutionContext* scriptExecutionContext)
{
InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(scriptExecutionContext);
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (160752 => 160753)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2013-12-18 06:24:10 UTC (rev 160752)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2013-12-18 06:27:44 UTC (rev 160753)
@@ -294,14 +294,12 @@
static bool canvasAgentEnabled(ScriptExecutionContext*);
static bool consoleAgentEnabled(ScriptExecutionContext*);
static bool timelineAgentEnabled(ScriptExecutionContext*);
- static bool collectingHTMLParseErrors(Page*);
#else
static bool hasFrontends() { return false; }
static bool canvasAgentEnabled(ScriptExecutionContext*) { return false; }
static bool consoleAgentEnabled(ScriptExecutionContext*) { return false; }
static bool runtimeAgentEnabled(Frame*) { return false; }
static bool timelineAgentEnabled(ScriptExecutionContext*) { return false; }
- static bool collectingHTMLParseErrors(Page*) { return false; }
#endif
#if ENABLE(GEOLOCATION)
@@ -491,7 +489,6 @@
static InstrumentingAgents* instrumentingAgentsForWorkerGlobalScope(WorkerGlobalScope*);
static InstrumentingAgents* instrumentingAgentsForNonDocumentContext(ScriptExecutionContext*);
- static bool collectingHTMLParseErrors(InstrumentingAgents*);
static void pauseOnNativeEventIfNeeded(InstrumentingAgents*, bool isDOMEvent, const String& eventName, bool synchronous);
static void cancelPauseOnNativeEvent(InstrumentingAgents*);
static InspectorTimelineAgent* retrieveTimelineAgent(const InspectorInstrumentationCookie&);
@@ -2075,14 +2072,6 @@
#endif
#if ENABLE(INSPECTOR)
-inline bool InspectorInstrumentation::collectingHTMLParseErrors(Page* page)
-{
- FAST_RETURN_IF_NO_FRONTENDS(false);
- if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForPage(page))
- return collectingHTMLParseErrors(instrumentingAgents);
- return false;
-}
-
inline InstrumentingAgents* InspectorInstrumentation::instrumentingAgentsForContext(ScriptExecutionContext* context)
{
if (!context)