Title: [179212] branches/safari-600.1.4.15-branch/Source/WebCore
- Revision
- 179212
- Author
- [email protected]
- Date
- 2015-01-27 13:37:11 -0800 (Tue, 27 Jan 2015)
Log Message
Merged r177504. rdar://problem/19445872
Modified Paths
Diff
Modified: branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog (179211 => 179212)
--- branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog 2015-01-27 21:34:32 UTC (rev 179211)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/ChangeLog 2015-01-27 21:37:11 UTC (rev 179212)
@@ -1,5 +1,26 @@
2015-01-27 Lucas Forschler <[email protected]>
+ Merge r177504
+
+ 2014-12-18 Chris Dumez <[email protected]>
+
+ [iOS] Log navigation types using FeatureCounter API
+ https://bugs.webkit.org/show_bug.cgi?id=139753
+
+ Reviewed by Darin Adler.
+
+ Log navigation types using FeatureCounter API.
+
+ No new tests, no behavior change other than additional feature
+ counting.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::logNavigationWithFeatureCounter):
+ (WebCore::FrameLoader::loadWithDocumentLoader):
+ * platform/FeatureCounterKeys.h:
+
+2015-01-27 Lucas Forschler <[email protected]>
+
Merge r177499
2014-12-18 Chris Dumez <[email protected]>
Modified: branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp (179211 => 179212)
--- branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp 2015-01-27 21:34:32 UTC (rev 179211)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/loader/FrameLoader.cpp 2015-01-27 21:37:11 UTC (rev 179212)
@@ -56,6 +56,7 @@
#include "Event.h"
#include "EventHandler.h"
#include "EventNames.h"
+#include "FeatureCounter.h"
#include "FloatRect.h"
#include "FormState.h"
#include "FormSubmission.h"
@@ -1420,6 +1421,39 @@
loadWithDocumentLoader(newDocumentLoader, type, 0);
}
+static void logNavigationWithFeatureCounter(Page* page, FrameLoadType type)
+{
+ const char* key;
+ switch (type) {
+ case FrameLoadType::Standard:
+ key = FeatureCounterNavigationStandard;
+ break;
+ case FrameLoadType::Back:
+ key = FeatureCounterNavigationBack;
+ break;
+ case FrameLoadType::Forward:
+ key = FeatureCounterNavigationForward;
+ break;
+ case FrameLoadType::IndexedBackForward:
+ key = FeatureCounterNavigationIndexedBackForward;
+ break;
+ case FrameLoadType::Reload:
+ key = FeatureCounterNavigationReload;
+ break;
+ case FrameLoadType::Same:
+ key = FeatureCounterNavigationSame;
+ break;
+ case FrameLoadType::ReloadFromOrigin:
+ key = FeatureCounterNavigationReloadFromOrigin;
+ break;
+ case FrameLoadType::Replace:
+ case FrameLoadType::RedirectWithLockedBackForwardList:
+ // Not logging those for now.
+ return;
+ }
+ FEATURE_COUNTER_INCREMENT_KEY(page, key);
+}
+
void FrameLoader::loadWithDocumentLoader(DocumentLoader* loader, FrameLoadType type, PassRefPtr<FormState> prpFormState)
{
// Retain because dispatchBeforeLoadEvent may release the last reference to it.
@@ -1438,6 +1472,10 @@
if (m_frame.document())
m_previousURL = m_frame.document()->url();
+ // Log main frame navigation types.
+ if (m_frame.isMainFrame())
+ logNavigationWithFeatureCounter(m_frame.page(), type);
+
policyChecker().setLoadType(type);
RefPtr<FormState> formState = prpFormState;
bool isFormSubmission = formState;
Modified: branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h (179211 => 179212)
--- branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h 2015-01-27 21:34:32 UTC (rev 179211)
+++ branches/safari-600.1.4.15-branch/Source/WebCore/platform/FeatureCounterKeys.h 2015-01-27 21:37:11 UTC (rev 179212)
@@ -70,6 +70,15 @@
static const char FeatureCounterCachedResourceRevalidationReasonMustRevalidateIsExpiredKey[] = "com.apple.WebKit.cachedResourceRevalidation.reason.mustRevalidateIsExpired";
static const char FeatureCounterCachedResourceRevalidationReasonIsExpiredKey[] = "com.apple.WebKit.cachedResourceRevalidation.reason.isExpired";
+// Navigation types.
+static const char FeatureCounterNavigationStandard[] = "com.apple.WebKit.navigation.standard";
+static const char FeatureCounterNavigationBack[] = "com.apple.WebKit.navigation.back";
+static const char FeatureCounterNavigationForward[] = "com.apple.WebKit.navigation.forward";
+static const char FeatureCounterNavigationIndexedBackForward[] = "com.apple.WebKit.navigation.indexedBackForward";
+static const char FeatureCounterNavigationReload[] = "com.apple.WebKit.navigation.reload";
+static const char FeatureCounterNavigationSame[] = "com.apple.WebKit.navigation.same";
+static const char FeatureCounterNavigationReloadFromOrigin[] = "com.apple.WebKit.navigation.reloadFromOrigin";
+
} // namespace WebCore
#endif // FeatureCounterKeys_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes