X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Finspector%2FContentSearchUtils.cpp;h=e7bce5484cf6821734f02eaa94e3ad9b5af33938;hb=8be7648e3bc188a587d5050c5a945c1099957e8b;hp=af65fb6cbb25d13979372d5281cde200f6ffa4cf;hpb=3cb1527a1d0111fd75188ac2c34c117944473076;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/inspector/ContentSearchUtils.cpp b/src/third_party/WebKit/Source/core/inspector/ContentSearchUtils.cpp index af65fb6..e7bce54 100644 --- a/src/third_party/WebKit/Source/core/inspector/ContentSearchUtils.cpp +++ b/src/third_party/WebKit/Source/core/inspector/ContentSearchUtils.cpp @@ -164,8 +164,6 @@ static String findMagicComment(const String& content, const String& name, MagicC closingCommentPos = content.find("*/", equalSignPos + 1); if (closingCommentPos == kNotFound) return String(); - if (!content.substring(closingCommentPos + 2).containsOnlyWhitespace()) - return String(); } break; @@ -180,12 +178,16 @@ static String findMagicComment(const String& content, const String& name, MagicC String match = commentType == CSSMagicComment ? content.substring(urlPos, closingCommentPos - urlPos) : content.substring(urlPos); + + size_t newLine = match.find("\n"); + if (newLine != kNotFound) + match = match.substring(0, newLine); match = match.stripWhiteSpace(); - String disallowedChars("\"' \t\n\r"); + String disallowedChars("\"' \t"); for (unsigned i = 0; i < match.length(); ++i) { if (disallowedChars.find(match[i]) != kNotFound) - return String(); + return ""; } return match;