bool WEnvironment::supportsCss3Animations() const { return ((agentIsGecko() && static_cast<unsigned int>(agent_) >= static_cast<unsigned int>(UserAgent::Firefox5_0)) || (agentIsIE() && static_cast<unsigned int>(agent_) >= static_cast<unsigned int>(UserAgent::IE10)) || agentIsWebKit()); }
bool WEnvironment::supportsCss3Animations() const { return ((agentIsGecko() && agent_ >= Firefox5_0) || (agentIsIE() && agent_ >= IE10) || agentIsWebKit()); }
void WEnvironment::init(const WebRequest& request) { Configuration& conf = session_->controller()->configuration(); queryString_ = request.queryString(); parameters_ = request.getParameterMap(); urlScheme_ = request.urlScheme(); referer_ = request.headerValue("Referer"); accept_ = request.headerValue("Accept"); serverSignature_ = request.envValue("SERVER_SIGNATURE"); serverSoftware_ = request.envValue("SERVER_SOFTWARE"); serverAdmin_ = request.envValue("SERVER_ADMIN"); pathInfo_ = request.pathInfo(); setUserAgent(request.headerValue("User-Agent")); LOG_INFO("UserAgent: " << userAgent_); /* * Determine server host name */ if (conf.behindReverseProxy()) { /* * Take the last entry in X-Forwarded-Host, assuming that we are only * behind 1 proxy */ std::string forwardedHost = request.headerValue("X-Forwarded-Host"); if (!forwardedHost.empty()) { std::string::size_type i = forwardedHost.rfind(','); if (i == std::string::npos) host_ = forwardedHost; else host_ = forwardedHost.substr(i+1); } else host_ = request.headerValue("Host"); } else host_ = request.headerValue("Host"); if (host_.empty()) { /* * HTTP 1.0 doesn't require it: guess from config */ host_ = request.serverName(); if (!request.serverPort().empty()) host_ += ":" + request.serverPort(); } clientAddress_ = getClientAddress(request, conf); std::string cookie = request.headerValue("Cookie"); doesCookies_ = !cookie.empty(); if (doesCookies_) parseCookies(cookie, cookies_); locale_ = request.parseLocale(); /* * checked=\"checked\" seems not to work with IE9 XHTML mode */ if (conf.sendXHTMLMimeType() && (accept_.find("application/xhtml+xml") != std::string::npos) && !agentIsIE()) contentType_ = XHTML1; }