https://bugs.webkit.org/show_bug.cgi?id=150689
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-11-03
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
* inspector/protocol/Timeline.json:
Source/WebCore:
Remove ParseHTML nesting recordings. We were not using them
and for most pages their self-time is very small in comparison
to other events. We may consider adding it back later for
UI purposes but for now the frontend doesn't use the records
so lets remove it.
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
(WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
(WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
(WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
(WebCore::toProtocol): Deleted.
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
* inspector/TimelineRecordFactory.h:
Source/WebInspectorUI:
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._processRecord):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191967
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-11-03 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Handle or Remove ParseHTML Timeline Event Records
+ https://bugs.webkit.org/show_bug.cgi?id=150689
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/Timeline.json:
+
2015-11-03 Michael Saboff <msaboff@apple.com>
Rename InlineCallFrame:: getCallerSkippingDeadFrames to something more descriptive
"Paint",
"Composite",
"RenderingFrame",
- "ParseHTML",
"TimerInstall",
"TimerRemove",
"TimerFire",
+2015-11-03 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Handle or Remove ParseHTML Timeline Event Records
+ https://bugs.webkit.org/show_bug.cgi?id=150689
+
+ Reviewed by Timothy Hatcher.
+
+ Remove ParseHTML nesting recordings. We were not using them
+ and for most pages their self-time is very small in comparison
+ to other events. We may consider adding it back later for
+ UI purposes but for now the frontend doesn't use the records
+ so lets remove it.
+
+ * html/parser/HTMLDocumentParser.cpp:
+ (WebCore::HTMLDocumentParser::pumpTokenizer): Deleted.
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::willWriteHTMLImpl): Deleted.
+ (WebCore::InspectorInstrumentation::didWriteHTMLImpl): Deleted.
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::willWriteHTML): Deleted.
+ (WebCore::InspectorInstrumentation::didWriteHTML): Deleted.
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::willWriteHTML): Deleted.
+ (WebCore::InspectorTimelineAgent::didWriteHTML): Deleted.
+ (WebCore::toProtocol): Deleted.
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::TimelineRecordFactory::createParseHTMLData): Deleted.
+ * inspector/TimelineRecordFactory.h:
+
2015-11-03 Keith Rollin <krollin@apple.com>
HTMLOptionElement.text should never return the value of label
#include "HTMLDocumentParser.h"
#include "DocumentFragment.h"
+#include "Frame.h"
+#include "HTMLDocument.h"
#include "HTMLParserScheduler.h"
#include "HTMLPreloadScanner.h"
#include "HTMLScriptRunner.h"
#include "HTMLTreeBuilder.h"
-#include "HTMLDocument.h"
-#include "InspectorInstrumentation.h"
namespace WebCore {
PumpSession session(m_pumpSessionNestingLevel, contextForParsingSession());
- // We tell the InspectorInstrumentation about every pump, even if we
- // end up pumping nothing. It can filter out empty pumps itself.
- // FIXME: m_input.current().length() is only accurate if we
- // end up parsing the whole buffer in this pump. We should pass how
- // much we parsed as part of didWriteHTML instead of willWriteHTML.
- auto cookie = InspectorInstrumentation::willWriteHTML(document(), m_input.current().currentLine().zeroBasedInt());
-
m_xssAuditor.init(document(), &m_xssAuditorDelegate);
while (canTakeNextToken(mode, session) && !session.needsYield) {
}
m_preloadScanner->scan(*m_preloader, *document());
}
-
- InspectorInstrumentation::didWriteHTML(cookie, m_input.current().currentLine().zeroBasedInt());
}
void HTMLDocumentParser::constructTreeFromHTMLToken(HTMLTokenizer::TokenPtr& rawToken)
}
}
-InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTMLImpl(InstrumentingAgents& instrumentingAgents, unsigned startLine, Frame* frame)
-{
- int timelineAgentId = 0;
- if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.inspectorTimelineAgent()) {
- timelineAgent->willWriteHTML(startLine, frame);
- timelineAgentId = timelineAgent->id();
- }
- return InspectorInstrumentationCookie(instrumentingAgents, timelineAgentId);
-}
-
-void InspectorInstrumentation::didWriteHTMLImpl(const InspectorInstrumentationCookie& cookie, unsigned endLine)
-{
- if (InspectorTimelineAgent* timelineAgent = retrieveTimelineAgent(cookie))
- timelineAgent->didWriteHTML(endLine);
-}
-
// JavaScriptCore InspectorDebuggerAgent should know Console MessageTypes.
static bool isConsoleAssertMessage(MessageSource source, MessageType type)
{
static void didRunJavaScriptDialog(const InspectorInstrumentationCookie&);
static void willDestroyCachedResource(CachedResource&);
- static InspectorInstrumentationCookie willWriteHTML(Document*, unsigned startLine);
- static void didWriteHTML(const InspectorInstrumentationCookie&, unsigned endLine);
-
static void addMessageToConsole(Page&, std::unique_ptr<Inspector::ConsoleMessage>);
// FIXME: Convert to ScriptArguments to match non-worker context.
static void didRunJavaScriptDialogImpl(const InspectorInstrumentationCookie&);
static void willDestroyCachedResourceImpl(CachedResource&);
- static InspectorInstrumentationCookie willWriteHTMLImpl(InstrumentingAgents&, unsigned startLine, Frame*);
- static void didWriteHTMLImpl(const InspectorInstrumentationCookie&, unsigned endLine);
-
static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
static void consoleCountImpl(InstrumentingAgents&, JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&);
willDestroyCachedResourceImpl(cachedResource);
}
-inline InspectorInstrumentationCookie InspectorInstrumentation::willWriteHTML(Document* document, unsigned startLine)
-{
- FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
- if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(document))
- return willWriteHTMLImpl(*instrumentingAgents, startLine, document->frame());
- return InspectorInstrumentationCookie();
-}
-
-inline void InspectorInstrumentation::didWriteHTML(const InspectorInstrumentationCookie& cookie, unsigned endLine)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
- if (cookie.isValid())
- didWriteHTMLImpl(cookie, endLine);
-}
-
inline void InspectorInstrumentation::didOpenDatabase(ScriptExecutionContext* context, RefPtr<Database>&& database, const String& domain, const String& name, const String& version)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
didCompleteCurrentRecord(TimelineRecordType::Paint);
}
-void InspectorTimelineAgent::willWriteHTML(unsigned startLine, Frame* frame)
-{
- pushCurrentRecord(TimelineRecordFactory::createParseHTMLData(startLine), TimelineRecordType::ParseHTML, true, frame);
-}
-
-void InspectorTimelineAgent::didWriteHTML(unsigned endLine)
-{
- if (!m_recordStack.isEmpty()) {
- const TimelineRecordEntry& entry = m_recordStack.last();
- entry.data->setInteger("endLine", endLine);
- didCompleteCurrentRecord(TimelineRecordType::ParseHTML);
- }
-}
-
void InspectorTimelineAgent::didInstallTimer(int timerId, int timeout, bool singleShot, Frame* frame)
{
appendRecord(TimelineRecordFactory::createTimerInstallData(timerId, timeout, singleShot), TimelineRecordType::TimerInstall, true, frame);
case TimelineRecordType::RenderingFrame:
return Inspector::Protocol::Timeline::EventType::RenderingFrame;
- case TimelineRecordType::ParseHTML:
- return Inspector::Protocol::Timeline::EventType::ParseHTML;
-
case TimelineRecordType::TimerInstall:
return Inspector::Protocol::Timeline::EventType::TimerInstall;
case TimelineRecordType::TimerRemove:
Composite,
RenderingFrame,
- ParseHTML,
-
TimerInstall,
TimerRemove,
TimerFire,
void willRecalculateStyle(Frame*);
void didRecalculateStyle();
void didScheduleStyleRecalculation(Frame*);
- void willWriteHTML(unsigned startLine, Frame*);
- void didWriteHTML(unsigned endLine);
void didTimeStamp(Frame&, const String&);
void didRequestAnimationFrame(int callbackId, Frame*);
void didCancelAnimationFrame(int callbackId, Frame*);
return WTF::move(data);
}
-Ref<InspectorObject> TimelineRecordFactory::createParseHTMLData(unsigned startLine)
-{
- Ref<InspectorObject> data = InspectorObject::create();
- data->setInteger(ASCIILiteral("startLine"), startLine);
- return WTF::move(data);
-}
-
Ref<InspectorObject> TimelineRecordFactory::createAnimationFrameData(int callbackId)
{
Ref<InspectorObject> data = InspectorObject::create();
static Ref<Inspector::InspectorObject> createTimerInstallData(int timerId, int timeout, bool singleShot);
static Ref<Inspector::InspectorObject> createEvaluateScriptData(const String&, double lineNumber);
static Ref<Inspector::InspectorObject> createTimeStampData(const String&);
- static Ref<Inspector::InspectorObject> createParseHTMLData(unsigned startLine);
static Ref<Inspector::InspectorObject> createAnimationFrameData(int callbackId);
static Ref<Inspector::InspectorObject> createPaintData(const FloatQuad&);
+2015-11-03 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Handle or Remove ParseHTML Timeline Event Records
+ https://bugs.webkit.org/show_bug.cgi?id=150689
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager.prototype._processRecord):
+
2015-11-02 Andy Estes <aestes@apple.com>
[Cocoa] Add tvOS and watchOS to SUPPORTED_PLATFORMS
return new WebInspector.RenderingFrameTimelineRecord(startTime, endTime);
- case TimelineAgent.EventType.ParseHTML:
- // FIXME: <https://webkit.org/b/150689> Web Inspector: Handle or Remove ParseHTML Timeline Event Records
- return null;
-
case TimelineAgent.EventType.EvaluateScript:
if (!sourceCodeLocation) {
var mainFrame = WebInspector.frameResourceManager.mainFrame;