Need a mechanism to override navigator.userAgent
[WebKit-https.git] / Source / WebCore / page / Navigator.cpp
index a1aaf8f..91e3f4d 100644 (file)
@@ -92,7 +92,7 @@ const String& Navigator::userAgent() const
     if (RuntimeEnabledFeatures::sharedFeatures().webAPIStatisticsEnabled())
         ResourceLoadObserver::shared().logNavigatorAPIAccessed(*frame->document(), ResourceLoadStatistics::NavigatorAPI::UserAgent);
     if (m_userAgent.isNull())
-        m_userAgent = frame->loader().userAgent(frame->document()->url());
+        m_userAgent = frame->loader().userAgentForJavaScript(frame->document()->url());
     return m_userAgent;
 }