Index: webkit/support/webkit_support.cc |
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc |
index 7fd667835d7b9936a5fd45a0e9a74ac0f4b77e8b..ad9ccfb341e2cdd351b851812d35cbf8148839e0 100644 |
--- a/webkit/support/webkit_support.cc |
+++ b/webkit/support/webkit_support.cc |
@@ -187,11 +187,20 @@ FilePath GetWebKitRootDirFilePath() { |
FilePath basePath; |
PathService::Get(base::DIR_SOURCE_ROOT, &basePath); |
if (file_util::PathExists(basePath.Append(FILE_PATH_LITERAL("chrome")))) { |
+ // We're in a WebKit-in-chrome checkout. |
return basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")); |
- } else { |
- // WebKit/Source/WebKit/chromium/ -> WebKit/ |
+ } else if (file_util::PathExists( |
+ basePath.Append(FILE_PATH_LITERAL("chromium")))) { |
+ // We're in a WebKit-only checkout on Windows. |
+ return basePath.Append(FILE_PATH_LITERAL("../..")); |
+ } else if (file_util::PathExists( |
+ basePath.Append(FILE_PATH_LITERAL("webkit/support")))) { |
+ // We're in a WebKit-only/xcodebuild checkout on Mac |
return basePath.Append(FILE_PATH_LITERAL("../../..")); |
} |
+ // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the |
+ // WebKit root. That, or we have no idea where we are. |
+ return basePath; |
} |
class WebKitClientMessageLoopImpl |