Title: [154597] trunk/Source/WebCore
- Revision
- 154597
- Author
- [email protected]
- Date
- 2013-08-26 04:13:11 -0700 (Mon, 26 Aug 2013)
Log Message
Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
<https://webkit.org/b/120281>
Reviewed by Anders Carlsson.
Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
filling it in if we're not building like that.
* dom/Document.cpp:
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* dom/DocumentTiming.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (154596 => 154597)
--- trunk/Source/WebCore/ChangeLog 2013-08-26 10:43:40 UTC (rev 154596)
+++ trunk/Source/WebCore/ChangeLog 2013-08-26 11:13:11 UTC (rev 154597)
@@ -1,3 +1,19 @@
+2013-08-26 Andreas Kling <[email protected]>
+
+ Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
+ <https://webkit.org/b/120281>
+
+ Reviewed by Anders Carlsson.
+
+ Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
+ filling it in if we're not building like that.
+
+ * dom/Document.cpp:
+ (WebCore::Document::setReadyState):
+ (WebCore::Document::finishedParsing):
+ * dom/Document.h:
+ * dom/DocumentTiming.h:
+
2013-08-26 Carlos Garcia Campos <[email protected]>
[GTK] Fix compile warning in WebKitDOMCustom
Modified: trunk/Source/WebCore/dom/Document.cpp (154596 => 154597)
--- trunk/Source/WebCore/dom/Document.cpp 2013-08-26 10:43:40 UTC (rev 154596)
+++ trunk/Source/WebCore/dom/Document.cpp 2013-08-26 11:13:11 UTC (rev 154597)
@@ -1199,6 +1199,7 @@
if (readyState == m_readyState)
return;
+#if ENABLE(WEB_TIMING)
switch (readyState) {
case Loading:
if (!m_documentTiming.domLoading)
@@ -1213,6 +1214,7 @@
m_documentTiming.domComplete = monotonicallyIncreasingTime();
break;
}
+#endif
m_readyState = readyState;
dispatchEvent(Event::create(eventNames().readystatechangeEvent, false, false));
@@ -4396,11 +4398,18 @@
ASSERT(!scriptableDocumentParser() || !m_parser->isParsing());
ASSERT(!scriptableDocumentParser() || m_readyState != Loading);
setParsing(false);
+
+#if ENABLE(WEB_TIMING)
if (!m_documentTiming.domContentLoadedEventStart)
m_documentTiming.domContentLoadedEventStart = monotonicallyIncreasingTime();
+#endif
+
dispatchEvent(Event::create(eventNames().DOMContentLoadedEvent, true, false));
+
+#if ENABLE(WEB_TIMING)
if (!m_documentTiming.domContentLoadedEventEnd)
m_documentTiming.domContentLoadedEventEnd = monotonicallyIncreasingTime();
+#endif
if (RefPtr<Frame> f = frame()) {
// FrameLoader::finishedParsing() might end up calling Document::implicitClose() if all
Modified: trunk/Source/WebCore/dom/Document.h (154596 => 154597)
--- trunk/Source/WebCore/dom/Document.h 2013-08-26 10:43:40 UTC (rev 154596)
+++ trunk/Source/WebCore/dom/Document.h 2013-08-26 11:13:11 UTC (rev 154597)
@@ -1074,7 +1074,9 @@
PassRefPtr<Touch> createTouch(DOMWindow*, EventTarget*, int identifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY, float rotationAngle, float force, ExceptionCode&) const;
#endif
+#if ENABLE(WEB_TIMING)
const DocumentTiming* timing() const { return &m_documentTiming; }
+#endif
#if ENABLE(REQUEST_ANIMATION_FRAME)
int requestAnimationFrame(PassRefPtr<RequestAnimationFrameCallback>);
@@ -1494,7 +1496,10 @@
bool m_directionSetOnDocumentElement;
bool m_writingModeSetOnDocumentElement;
+#if ENABLE(WEB_TIMING)
DocumentTiming m_documentTiming;
+#endif
+
RefPtr<MediaQueryMatcher> m_mediaQueryMatcher;
bool m_writeRecursionIsTooDeep;
unsigned m_writeRecursionDepth;
Modified: trunk/Source/WebCore/dom/DocumentTiming.h (154596 => 154597)
--- trunk/Source/WebCore/dom/DocumentTiming.h 2013-08-26 10:43:40 UTC (rev 154596)
+++ trunk/Source/WebCore/dom/DocumentTiming.h 2013-08-26 11:13:11 UTC (rev 154597)
@@ -26,6 +26,8 @@
#ifndef DocumentTiming_h
#define DocumentTiming_h
+#if ENABLE(WEB_TIMING)
+
namespace WebCore {
struct DocumentTiming {
@@ -48,3 +50,5 @@
}
#endif
+
+#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes