void reportViewportWarning(Document* document, ViewportErrorCode errorCode, const String& replacement) { Frame* frame = document->frame(); if (!frame) return; String message = viewportErrorMessageTemplate(errorCode); message.replace("%replacement", replacement); frame->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, viewportErrorMessageLevel(errorCode), message, parserLineNumber(document), document->url().string()); }
void reportViewportWarning(Document* document, ViewportErrorCode errorCode, const String& replacement1, const String& replacement2) { Frame* frame = document->frame(); if (!frame) return; String message = viewportErrorMessageTemplate(errorCode); if (!replacement1.isNull()) message.replace("%replacement1", replacement1); if (!replacement2.isNull()) message.replace("%replacement2", replacement2); if ((errorCode == UnrecognizedViewportArgumentValueError || errorCode == TruncatedViewportArgumentValueError) && replacement1.find(';') != WTF::notFound) message.append(" Note that ';' is not a separator in viewport values. The list should be comma-separated."); document->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, viewportErrorMessageLevel(errorCode), message, document->url().string(), parserLineNumber(document)); }
void reportViewportWarning(Document* document, ViewportErrorCode errorCode, const String& replacement1, const String& replacement2) { Frame* frame = document->frame(); if (!frame) return; String message = viewportErrorMessageTemplate(errorCode); // SAMSUNG_CHANGES >> MPSG100005911 Removing URL exposure in logs String blockUrlDisplay = ""; if (!replacement1.isNull()) message.replace("%replacement1", replacement1); if (!replacement2.isNull()) message.replace("%replacement2", replacement2); frame->domWindow()->console()->addMessage(HTMLMessageSource, LogMessageType, viewportErrorMessageLevel(errorCode), message, parserLineNumber(document), blockUrlDisplay); // SAMSUNG_CHANGES << }
void reportViewportWarning(Document* document, ViewportErrorCode errorCode, const String& replacement1, const String& replacement2) { Frame* frame = document->frame(); if (!frame) return; String message = viewportErrorMessageTemplate(errorCode); if (!replacement1.isNull()) message.replace("%replacement1", replacement1); if (!replacement2.isNull()) message.replace("%replacement2", replacement2); if ((errorCode == UnrecognizedViewportArgumentValueError || errorCode == TruncatedViewportArgumentValueError) && replacement1.find(';') != WTF::notFound) message.append(" Note that ';' is not a separator in viewport values. The list should be comma-separated."); // FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists. document->addConsoleMessage(RenderingMessageSource, viewportErrorMessageLevel(errorCode), message); }