diff options
author | Kristian Monsen <kristianm@google.com> | 2011-05-31 20:30:28 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2011-06-14 20:31:41 -0700 |
commit | 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801 (patch) | |
tree | 382278a54ce7a744d62fa510a9a80688cc12434b /webkit | |
parent | c4becdd46e31d261b930e4b5a539cbc1d45c23a6 (diff) | |
download | external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.zip external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.gz external_chromium-72a454cd3513ac24fbdd0e0cb9ad70b86a99b801.tar.bz2 |
Merge Chromium.org at r11.0.672.0: Initial merge by git.
Change-Id: I8b4aaf611a2a405fe3fe10e8a94ea7658645c192
Diffstat (limited to 'webkit')
118 files changed, 2170 insertions, 1037 deletions
diff --git a/webkit/glue/DEPS b/webkit/glue/DEPS index 0a36ef7..e4479d5 100644 --- a/webkit/glue/DEPS +++ b/webkit/glue/DEPS @@ -4,6 +4,7 @@ include_rules = [ "+media", "+skia/ext", "+skia/include", + "+ui", "+webkit/tools/test_shell", # Needed for test shell tests. # This is not actually a directory, but npruntime_util.cc includes a file diff --git a/webkit/glue/alt_error_page_resource_fetcher.h b/webkit/glue/alt_error_page_resource_fetcher.h index 86671df..3cccaf4 100644 --- a/webkit/glue/alt_error_page_resource_fetcher.h +++ b/webkit/glue/alt_error_page_resource_fetcher.h @@ -8,7 +8,7 @@ #include "base/callback.h" #include "base/scoped_ptr.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" namespace WebKit { class WebFrame; diff --git a/webkit/glue/context_menu.cc b/webkit/glue/context_menu.cc index bdfe790..6db5c51 100644 --- a/webkit/glue/context_menu.cc +++ b/webkit/glue/context_menu.cc @@ -4,6 +4,15 @@ #include "webkit/glue/context_menu.h" +namespace webkit_glue { + +CustomContextMenuContext::CustomContextMenuContext() + : is_pepper_menu(false), + request_id(0) { +} + +} // namespace webkit_glue + ContextMenuParams::ContextMenuParams() { } @@ -30,6 +39,7 @@ ContextMenuParams::ContextMenuParams(const WebKit::WebContextMenuData& data) edit_flags(data.editFlags), security_info(data.securityInfo), frame_charset(data.frameEncoding.utf8()) { + custom_context.is_pepper_menu = false; for (size_t i = 0; i < data.customItems.size(); ++i) custom_items.push_back(WebMenuItem(data.customItems[i])); } diff --git a/webkit/glue/context_menu.h b/webkit/glue/context_menu.h index c87de41..2f38807 100644 --- a/webkit/glue/context_menu.h +++ b/webkit/glue/context_menu.h @@ -12,8 +12,20 @@ #include "googleurl/src/gurl.h" #include "webkit/glue/webmenuitem.h" -#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" +namespace webkit_glue { + +struct CustomContextMenuContext { + bool is_pepper_menu; + int request_id; + + CustomContextMenuContext(); +}; + +} // namespace webkit_glue + +// TODO(viettrungluu): Put this in the webkit_glue namespace. // Parameters structure for ViewHostMsg_ContextMenu. // FIXME(beng): This would be more useful in the future and more efficient // if the parameters here weren't so literally mapped to what @@ -94,6 +106,7 @@ struct ContextMenuParams { // The character encoding of the frame on which the menu is invoked. std::string frame_charset; + webkit_glue::CustomContextMenuContext custom_context; std::vector<WebMenuItem> custom_items; ContextMenuParams(); diff --git a/webkit/glue/context_menu_unittest.cc b/webkit/glue/context_menu_unittest.cc index 9cefc9f..7f54afd 100644 --- a/webkit/glue/context_menu_unittest.cc +++ b/webkit/glue/context_menu_unittest.cc @@ -11,7 +11,8 @@ #include "base/file_util.h" #include "base/message_loop.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/test_shell_test.h" #include "webkit/tools/test_shell/test_webview_delegate.h" diff --git a/webkit/glue/cpp_bound_class.cc b/webkit/glue/cpp_bound_class.cc index c5d15b6..9688e4d 100644 --- a/webkit/glue/cpp_bound_class.cc +++ b/webkit/glue/cpp_bound_class.cc @@ -15,9 +15,9 @@ #include "base/compiler_specific.h" #include "base/logging.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/glue/cpp_bound_class.h" using WebKit::WebBindings; diff --git a/webkit/glue/cpp_bound_class_unittest.cc b/webkit/glue/cpp_bound_class_unittest.cc index f2ef018..fd6691f 100644 --- a/webkit/glue/cpp_bound_class_unittest.cc +++ b/webkit/glue/cpp_bound_class_unittest.cc @@ -10,10 +10,10 @@ #include "base/message_loop.h" #include "base/string_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/cpp_binding_example.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/test_shell_test.h" @@ -230,8 +230,7 @@ TEST_F(CppBoundClassTest, SetAndGetPropertiesWithCallbacks) { CheckJavaScriptSuccess(js); } -// Disabled, http://crbug.com/68445. -TEST_F(CppBoundClassTest, DISABLED_InvokeMethods) { +TEST_F(CppBoundClassTest, InvokeMethods) { // The expression on the left is expected to return the value on the right. static const std::string tests[] = { "example.echoValue(true)", "true", diff --git a/webkit/glue/cpp_variant.cc b/webkit/glue/cpp_variant.cc index 0d16cdd..699f7f1 100644 --- a/webkit/glue/cpp_variant.cc +++ b/webkit/glue/cpp_variant.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file contains definitions for CppVariant. #include <limits> -#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "webkit/glue/cpp_variant.h" #include "base/logging.h" #include "base/string_util.h" @@ -211,14 +211,14 @@ bool CppVariant::ToBoolean() const { return value.boolValue; } -std::vector<std::string> CppVariant::ToStringVector() const { +std::vector<CppVariant> CppVariant::ToVector() const { DCHECK(isObject()); - std::vector<std::string> string_vector; + std::vector<CppVariant> vector; NPObject* np_value = value.objectValue; NPIdentifier length_id = WebBindings::getStringIdentifier("length"); if (WebBindings::hasProperty(NULL, np_value, length_id)) { - NPVariant length_value; + CppVariant length_value; if (WebBindings::getProperty(NULL, np_value, length_id, &length_value)) { int length = 0; // The length is a double in some cases. @@ -226,30 +226,25 @@ std::vector<std::string> CppVariant::ToStringVector() const { length = static_cast<int>(NPVARIANT_TO_DOUBLE(length_value)); else if (NPVARIANT_IS_INT32(length_value)) length = NPVARIANT_TO_INT32(length_value); - WebBindings::releaseVariantValue(&length_value); + else + NOTREACHED(); // For sanity, only allow 60000 items. length = std::min(60000, length); for (int i = 0; i < length; ++i) { // Get each of the items. - std::string index = base::StringPrintf("%d", i); - NPIdentifier index_id = WebBindings::getStringIdentifier(index.c_str()); - if (WebBindings::hasProperty(NULL, np_value, index_id)) { - NPVariant index_value; - if (WebBindings::getProperty(NULL, np_value, index_id, &index_value)) { - if (NPVARIANT_IS_STRING(index_value)) { - std::string string( - NPVARIANT_TO_STRING(index_value).UTF8Characters, - NPVARIANT_TO_STRING(index_value).UTF8Length); - string_vector.push_back(string); - } - WebBindings::releaseVariantValue(&index_value); - } + NPIdentifier index = WebBindings::getIntIdentifier(i); + if (WebBindings::hasProperty(NULL, np_value, index)) { + CppVariant index_value; + if (WebBindings::getProperty(NULL, np_value, index, &index_value)) + vector.push_back(index_value); } } } + } else { + NOTREACHED(); } - return string_vector; + return vector; } bool CppVariant::Invoke(const std::string& method, const CppVariant* args, diff --git a/webkit/glue/cpp_variant.h b/webkit/glue/cpp_variant.h index 34f843a..01efd7d 100644 --- a/webkit/glue/cpp_variant.h +++ b/webkit/glue/cpp_variant.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -89,14 +89,15 @@ class CppVariant : public NPVariant { bool isObject() const { return (type == NPVariantType_Object); } // Converters. The CppVariant must be of a type convertible to these values. - // For example, ToInteger() works only if isNumber() is true. + // For example, ToInt32() works only if isNumber() is true. std::string ToString() const; int32_t ToInt32() const; double ToDouble() const; bool ToBoolean() const; - // Returns a vector of strings for the specified argument. This is useful - // for converting a JavaScript array of strings into a vector of strings. - std::vector<std::string> ToStringVector() const; + // Returns a vector of CppVariant for the specified variant. This should only + // be called on an Object. If the object has no "length" property an empty + // vector is returned. + std::vector<CppVariant> ToVector() const; // Invoke method of the given name on an object with the supplied arguments. // The first argument should be the object on which the method is to be diff --git a/webkit/glue/cpp_variant_unittest.cc b/webkit/glue/cpp_variant_unittest.cc index 43c78de..f3c6b61 100644 --- a/webkit/glue/cpp_variant_unittest.cc +++ b/webkit/glue/cpp_variant_unittest.cc @@ -1,10 +1,13 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <vector> + #include "base/compiler_specific.h" +#include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "webkit/glue/cpp_variant.h" using WebKit::WebBindings; @@ -273,7 +276,7 @@ TEST(CppVariantTest, SetsSimpleTypesAndValues) { CppVariant cpp; cpp.Set(true); EXPECT_EQ(NPVariantType_Bool, cpp.type); - EXPECT_EQ(true, cpp.value.boolValue); + EXPECT_TRUE(cpp.value.boolValue); cpp.Set(5); EXPECT_EQ(NPVariantType_Int32, cpp.type); @@ -424,3 +427,67 @@ TEST(CppVariantTest, IsTypeFunctionsWork) { WebBindings::releaseObject(obj); CheckObject(cpp); } + +bool MockNPHasPropertyFunction(NPObject *npobj, NPIdentifier name) { + return true; +} + +bool MockNPGetPropertyFunction(NPObject *npobj, NPIdentifier name, + NPVariant *result) { + if (WebBindings::getStringIdentifier("length") == name) { + DOUBLE_TO_NPVARIANT(4, *result); + } else if (WebBindings::getIntIdentifier(0) == name) { + DOUBLE_TO_NPVARIANT(0, *result); + } else if (WebBindings::getIntIdentifier(1) == name) { + BOOLEAN_TO_NPVARIANT(true, *result); + } else if (WebBindings::getIntIdentifier(2) == name) { + NULL_TO_NPVARIANT(*result); + } else if (WebBindings::getIntIdentifier(3) == name) { + const char* s = "string"; + size_t length = strlen(s); + char* mem = static_cast<char*>(malloc(length + 1)); + base::strlcpy(mem, s, length + 1); + STRINGZ_TO_NPVARIANT(mem, *result); + } + + return true; +} + +TEST(CppVariantTest, ToVector) { + NPClass array_like_class = { + NP_CLASS_STRUCT_VERSION, + 0, // NPAllocateFunctionPtr allocate; + 0, // NPDeallocateFunctionPtr deallocate; + 0, // NPInvalidateFunctionPtr invalidate; + 0, // NPHasMethodFunctionPtr hasMethod; + 0, // NPInvokeFunctionPtr invoke; + 0, // NPInvokeDefaultFunctionPtr invokeDefault; + MockNPHasPropertyFunction, // NPHasPropertyFunctionPtr hasProperty; + MockNPGetPropertyFunction, // NPGetPropertyFunctionPtr getProperty; + 0, // NPSetPropertyFunctionPtr setProperty; + 0, // NPRemovePropertyFunctionPtr removeProperty; + 0, // NPEnumerationFunctionPtr enumerate; + 0 // NPConstructFunctionPtr construct; + }; + + NPObject* obj = WebBindings::createObject(NULL, &array_like_class); + + CppVariant cpp; + cpp.Set(obj); + + std::vector<CppVariant> cpp_vector = cpp.ToVector(); + EXPECT_EQ(4u, cpp_vector.size()); + + EXPECT_TRUE(cpp_vector[0].isDouble()); + EXPECT_EQ(0, cpp_vector[0].ToDouble()); + + EXPECT_TRUE(cpp_vector[1].isBool()); + EXPECT_EQ(true, cpp_vector[1].ToBoolean()); + + EXPECT_TRUE(cpp_vector[2].isNull()); + + EXPECT_TRUE(cpp_vector[3].isString()); + CheckString("string", cpp_vector[3]); + + WebBindings::releaseObject(obj); +} diff --git a/webkit/glue/devtools_strings.grd b/webkit/glue/devtools_strings.grd deleted file mode 100644 index 36f14ca..0000000 --- a/webkit/glue/devtools_strings.grd +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- This file contains definitions of strings that are specific to -Google Chrome Developer Tools. --> - -<grit base_dir="." latest_public_release="0" current_release="1" - source_lang_id="en" enc_check="möl"> - <outputs> - <output filename="devtoolsStrings_am.js" type="js_map_format" lang="am" /> - <output filename="devtoolsStrings_ar.js" type="js_map_format" lang="ar" /> - <output filename="devtoolsStrings_bg.js" type="js_map_format" lang="bg" /> - <output filename="devtoolsStrings_bn.js" type="js_map_format" lang="bn" /> - <output filename="devtoolsStrings_ca.js" type="js_map_format" lang="ca" /> - <output filename="devtoolsStrings_cs.js" type="js_map_format" lang="cs" /> - <output filename="devtoolsStrings_da.js" type="js_map_format" lang="da" /> - <output filename="devtoolsStrings_de.js" type="js_map_format" lang="de" /> - <output filename="devtoolsStrings_el.js" type="js_map_format" lang="el" /> - <output filename="devtoolsStrings_en-GB.js" type="js_map_format" lang="en-GB" /> - <output filename="devtoolsStrings_en-US.js" type="js_map_format" lang="en" /> - <output filename="devtoolsStrings_es.js" type="js_map_format" lang="es" /> - <output filename="devtoolsStrings_es-419.js" type="js_map_format" lang="es-419" /> - <output filename="devtoolsStrings_et.js" type="js_map_format" lang="et" /> - <output filename="devtoolsStrings_fa.js" type="js_map_format" lang="fa" /> - <output filename="devtoolsStrings_fi.js" type="js_map_format" lang="fi" /> - <output filename="devtoolsStrings_fil.js" type="js_map_format" lang="fil" /> - <output filename="devtoolsStrings_fr.js" type="js_map_format" lang="fr" /> - <output filename="devtoolsStrings_gu.js" type="js_map_format" lang="gu" /> - <output filename="devtoolsStrings_he.js" type="js_map_format" lang="he" /> - <output filename="devtoolsStrings_hi.js" type="js_map_format" lang="hi" /> - <output filename="devtoolsStrings_hr.js" type="js_map_format" lang="hr" /> - <output filename="devtoolsStrings_hu.js" type="js_map_format" lang="hu" /> - <output filename="devtoolsStrings_id.js" type="js_map_format" lang="id" /> - <output filename="devtoolsStrings_it.js" type="js_map_format" lang="it" /> - <output filename="devtoolsStrings_ja.js" type="js_map_format" lang="ja" /> - <output filename="devtoolsStrings_kn.js" type="js_map_format" lang="kn" /> - <output filename="devtoolsStrings_ko.js" type="js_map_format" lang="ko" /> - <output filename="devtoolsStrings_lt.js" type="js_map_format" lang="lt" /> - <output filename="devtoolsStrings_lv.js" type="js_map_format" lang="lv" /> - <output filename="devtoolsStrings_ml.js" type="js_map_format" lang="ml" /> - <output filename="devtoolsStrings_mr.js" type="js_map_format" lang="mr" /> - <output filename="devtoolsStrings_nl.js" type="js_map_format" lang="nl" /> - <!-- The translation console uses 'no' for Norwegian Bokmål. It should - be 'nb'. --> - <output filename="devtoolsStrings_nb.js" type="js_map_format" lang="no" /> - <output filename="devtoolsStrings_or.js" type="js_map_format" lang="or" /> - <output filename="devtoolsStrings_pl.js" type="js_map_format" lang="pl" /> - <output filename="devtoolsStrings_pt-BR.js" type="js_map_format" lang="pt-BR" /> - <output filename="devtoolsStrings_pt-PT.js" type="js_map_format" lang="pt-PT" /> - <output filename="devtoolsStrings_ro.js" type="js_map_format" lang="ro" /> - <output filename="devtoolsStrings_ru.js" type="js_map_format" lang="ru" /> - <output filename="devtoolsStrings_sk.js" type="js_map_format" lang="sk" /> - <output filename="devtoolsStrings_sl.js" type="js_map_format" lang="sl" /> - <output filename="devtoolsStrings_sr.js" type="js_map_format" lang="sr" /> - <output filename="devtoolsStrings_sv.js" type="js_map_format" lang="sv" /> - <output filename="devtoolsStrings_sw.js" type="js_map_format" lang="sw" /> - <output filename="devtoolsStrings_ta.js" type="js_map_format" lang="ta" /> - <output filename="devtoolsStrings_te.js" type="js_map_format" lang="te" /> - <output filename="devtoolsStrings_th.js" type="js_map_format" lang="th" /> - <output filename="devtoolsStrings_tr.js" type="js_map_format" lang="tr" /> - <output filename="devtoolsStrings_uk.js" type="js_map_format" lang="uk" /> - <output filename="devtoolsStrings_vi.js" type="js_map_format" lang="vi" /> - <output filename="devtoolsStrings_zh-CN.js" type="js_map_format" lang="zh-CN" /> - <output filename="devtoolsStrings_zh-TW.js" type="js_map_format" lang="zh-TW" /> - </outputs> - <translations> - <!-- TODO add references to each of the XTB files (from the Translation - Console) that contain translations of messages in your project. Each - takes a form like <file path="english.xtb" />. Remember that all file - references are relative to this .grd file. --> - </translations> - <release seq="1"> - <messages fallback_to_english="true"> - <message name="IDS_FAILED_TO_RESOLVE_CHILDREN" desc="Message indicating that resolving element children has failed."> - Failed to resolve children: <ph name="ERROR">%s<ex>Allocation failure</ex></ph> - </message> - <message name="IDS_CORRUPT_OBJECT" desc="Error message showing corrupt object."> - Corrupted object: <ph name="OBJECT">%s<ex>bad</ex></ph> - </message> - <message name="IDS_SCOPE_VARS_FAILURE" desc="Error message indicating failure to resolve scope variables."> - Failed to resolve scope variables: <ph name="ERROR">%s<ex>Undefined variable</ex></ph> - </message> - <message name="IDS_PROCESSING_PROFILE" desc="Message indicating that profile is being processed."> - Processing... - </message> - <message name="IDS_PROFILE_TICKS_PROCESSED" desc="Message showing how many ticks are already processed."> - <ph name="COUNT">%d<ex>1000</ex></ph> ticks processed - </message> - <message name="IDS_NO_SOURCE" desc="Label for a script with no source."> - <source is not available> - </message> - <message name="IDS_UNKNOWN_SCOPE_TYPE" desc="Label for an unknown scope type."> - <Unknown scope type> - </message> - <message name="IDS_WINDOW_HEADER" desc="DevTools window header."> - Developer Tools - <ph name="URL">%s<ex>http://www.example.com/</ex></ph> - </message> - <message name="IDS_HEAP_TAB_TITLE" desc="Title of the heap profiler tab."> - Heap - </message> - <message name="IDS_TAKE_HEAP_SNAPSHOT" desc="Title of a button that takes heap snapshot."> - Take heap snapshot. - </message> - <message name="IDS_HEAP_SNAPSHOT" desc="Heap snapshot title."> - Snapshot <ph name="COUNT">%d<ex>1</ex></ph> - </message> - <message name="IDS_HEAP_USAGE" desc="Heap usage."> - Used <ph name="USED">%1$s<ex>100MB</ex></ph> of <ph name="CAPACITY">%2$s<ex>200MB</ex></ph> (<ph name="PERCENT">%3$.0f<ex>50</ex></ph>%%) - </message> - <message name="IDS_HEAP_SNAPSHOT_GRID_CONSTRUCTOR" desc="Title of a heap snapshot grid column showing object's constructor name."> - Constructor - </message> - <message name="IDS_HEAP_SNAPSHOT_GRID_COUNT" desc="Title of a heap snapshot grid column showing objects count."> - Count - </message> - <message name="IDS_HEAP_SNAPSHOT_GRID_COUNT_DELTA" desc="Title of a heap snapshot grid column showing delta of objects count."> - ± Count - </message> - <message name="IDS_HEAP_SNAPSHOT_GRID_SIZE_DELTA" desc="Title of a heap snapshot grid column showing delta of objects size."> - ± Size - </message> - <message name="IDS_HEAP_SNAPSHOT_COMPARED_TO" desc="An option to choose a snapshot to compare current snapshot with."> - Compared to <ph name="BASE">%s<ex>Snapshot 1</ex></ph> - </message> - <message name="IDS_ABSOLUTE_OBJ_COUNTS_AND_SIZES" desc="An option to show absolute objects counts and sizes."> - Show absolute counts and sizes. - </message> - <message name="IDS_PERCENTAGE_OBJ_COUNTS_AND_SIZES" desc="An option to show objects counts and sizes as percentages."> - Show counts and sizes as percentages. - </message> - <message name="IDS_NEW_OBJECTS_IN_DELTA" desc="Indicates that object instances are new compared to base state."> - new - </message> - <message name="IDS_DELETED_OBJECTS_IN_DELTA" desc="Indicates that object instances have disappeared compared to base state."> - deleted - </message> - <message name="IDS_VERY_LARGE_DELTA" desc="Shows very large delta in percents"> - <ph name="SIGN">%s<ex>+</ex></ph> >1000%% - </message> - <message name="IDS_SHARE_IN_PERCENTS_SIGNED" desc="Share in percents, with sign."> - <ph name="SIGN">%$1s<ex>+</ex></ph><ph name="SHARE">%$2.2f<ex>5</ex></ph>%% - </message> - <message name="IDS_SIGNED_DELTA" desc="Signed delta."> - %$1s%$2d - </message> - <message name="IDS_SIGNED_STRING_DELTA" desc="Signed string delta."> - %$1s%$2s - </message> - <message name="IDS_OBJECTS_AND_DATA_SIZE_LABEL" desc="Label for objects and data size legend item."> - Objects and Data - </message> - <message name="IDS_CODE_SIZE_LABEL" desc="Label for code size legend item."> - Code - </message> - </messages> - </release> -</grit> diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index 07c43b2..2533f57 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -9,17 +9,17 @@ #include "base/compiler_specific.h" #include "base/logging.h" #include "base/string_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAnimationController.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNode.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNodeCollection.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAnimationController.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" using WebKit::WebAnimationController; using WebKit::WebDocument; diff --git a/webkit/glue/dom_operations_unittest.cc b/webkit/glue/dom_operations_unittest.cc index fac49c6..8d8d96b 100644 --- a/webkit/glue/dom_operations_unittest.cc +++ b/webkit/glue/dom_operations_unittest.cc @@ -8,7 +8,7 @@ #include "base/utf_string_conversions.h" #include "net/base/net_util.h" #include "net/url_request/url_request_context.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/dom_operations.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_shell_test.h" diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc index 62b5a3d..7bf3f62 100644 --- a/webkit/glue/dom_serializer_unittest.cc +++ b/webkit/glue/dom_serializer_unittest.cc @@ -10,20 +10,20 @@ #include "base/utf_string_conversions.h" #include "net/base/net_util.h" #include "net/url_request/url_request_context.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNode.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNodeCollection.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNodeList.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPageSerializer.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPageSerializerClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/dom_operations.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" diff --git a/webkit/glue/form_field.cc b/webkit/glue/form_field.cc index bcc9926..82cac6a 100644 --- a/webkit/glue/form_field.cc +++ b/webkit/glue/form_field.cc @@ -6,9 +6,9 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebOptionElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSelectElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebOptionElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSelectElement.h" using WebKit::WebFormControlElement; using WebKit::WebElement; diff --git a/webkit/glue/form_field.h b/webkit/glue/form_field.h index 23b7380..1874c44 100644 --- a/webkit/glue/form_field.h +++ b/webkit/glue/form_field.h @@ -8,7 +8,7 @@ #include <vector> #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFormControlElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement.h" namespace webkit_glue { diff --git a/webkit/glue/ftp_directory_listing_response_delegate.cc b/webkit/glue/ftp_directory_listing_response_delegate.cc index 80737db..0a2542b 100644 --- a/webkit/glue/ftp_directory_listing_response_delegate.cc +++ b/webkit/glue/ftp_directory_listing_response_delegate.cc @@ -18,8 +18,8 @@ #include "net/base/net_util.h" #include "net/ftp/ftp_directory_listing_parser.h" #include "net/ftp/ftp_server_type_histograms.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" using net::FtpDirectoryListingEntry; diff --git a/webkit/glue/ftp_directory_listing_response_delegate.h b/webkit/glue/ftp_directory_listing_response_delegate.h index e259c1e..9502761 100644 --- a/webkit/glue/ftp_directory_listing_response_delegate.h +++ b/webkit/glue/ftp_directory_listing_response_delegate.h @@ -11,7 +11,7 @@ #include <string> #include "net/ftp/ftp_directory_listing_buffer.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" namespace WebKit { class WebURLLoader; diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc index 5b76784..df055fe 100644 --- a/webkit/glue/glue_serialize.cc +++ b/webkit/glue/glue_serialize.cc @@ -9,14 +9,14 @@ #include "base/pickle.h" #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebData; diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h index 303fe3a..3c5ee31 100644 --- a/webkit/glue/glue_serialize.h +++ b/webkit/glue/glue_serialize.h @@ -11,7 +11,7 @@ #define WEBKIT_GLUE_GLUE_SERIALIZE_H_ #include <string> -#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" namespace webkit_glue { diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc index 342696d..eebd9bf 100644 --- a/webkit/glue/glue_serialize_unittest.cc +++ b/webkit/glue/glue_serialize_unittest.cc @@ -7,9 +7,9 @@ #include "base/pickle.h" #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" #include "webkit/glue/glue_serialize.h" #include "webkit/glue/web_io_operators.h" diff --git a/webkit/glue/idb_bindings.cc b/webkit/glue/idb_bindings.cc index 4af085f..c565f94 100644 --- a/webkit/glue/idb_bindings.cc +++ b/webkit/glue/idb_bindings.cc @@ -8,10 +8,10 @@ #include "base/scoped_ptr.h" #include "base/string16.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h" -#include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyPath.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "v8/include/v8.h" namespace webkit_glue { diff --git a/webkit/glue/iframe_redirect_unittest.cc b/webkit/glue/iframe_redirect_unittest.cc index 9170d19..de98175 100644 --- a/webkit/glue/iframe_redirect_unittest.cc +++ b/webkit/glue/iframe_redirect_unittest.cc @@ -6,12 +6,12 @@ #include "base/file_util.h" #include "base/string_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/test_shell_test.h" diff --git a/webkit/glue/image_decoder.cc b/webkit/glue/image_decoder.cc index 6850909..2982961 100644 --- a/webkit/glue/image_decoder.cc +++ b/webkit/glue/image_decoder.cc @@ -4,9 +4,9 @@ #include "webkit/glue/image_decoder.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" #include "third_party/skia/include/core/SkBitmap.h" #if WEBKIT_USING_CG diff --git a/webkit/glue/image_decoder.h b/webkit/glue/image_decoder.h index 62d9253..b19c8ef 100644 --- a/webkit/glue/image_decoder.h +++ b/webkit/glue/image_decoder.h @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "base/basictypes.h" -#include "gfx/size.h" +#include "ui/gfx/size.h" class SkBitmap; diff --git a/webkit/glue/image_resource_fetcher.cc b/webkit/glue/image_resource_fetcher.cc index 6185834..65d80bd 100644 --- a/webkit/glue/image_resource_fetcher.cc +++ b/webkit/glue/image_resource_fetcher.cc @@ -5,8 +5,8 @@ #include "webkit/glue/image_resource_fetcher.h" #include "base/callback.h" -#include "gfx/size.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "ui/gfx/size.h" #include "webkit/glue/image_decoder.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -47,8 +47,12 @@ void ImageResourceFetcher::OnURLFetchComplete( // If we get here, it means no image from server or couldn't decode the // response as an image. The delegate will see a null image, indicating // that an error occurred. - callback_->Run(this, bitmap); - callback_.reset(); + + // Take care to clear callback_ before running the callback as it may lead to + // our destruction. + scoped_ptr<Callback> callback; + callback.swap(callback_); + callback->Run(this, bitmap); } } // namespace webkit_glue diff --git a/webkit/glue/inspector_strings.grd b/webkit/glue/inspector_strings.grd index 22f147d..54fe5c6 100644 --- a/webkit/glue/inspector_strings.grd +++ b/webkit/glue/inspector_strings.grd @@ -4,8 +4,8 @@ each locale. Specifically, these are UI strings that are used by WebKit Inspector that need to be translated for each locale.--> -<!-- These strings and string descriptions were taken from -WebKit/WebCore/English.lproj/localizedStrings.js @ revision 46732 +<!-- These strings and string descriptions were taken from WebKit +Source/WebCore/English.lproj/localizedStrings.js @ revision 76508 so we include the original license below: /* @@ -43,6 +43,9 @@ so we include the original license below: <outputs> <output filename="inspectorStrings_am.js" type="js_map_format" lang="am" /> <output filename="inspectorStrings_ar.js" type="js_map_format" lang="ar" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_ast.js" type="js_map_format" lang="ast" /> + </if> <output filename="inspectorStrings_bg.js" type="js_map_format" lang="bg" /> <output filename="inspectorStrings_bn.js" type="js_map_format" lang="bn" /> <output filename="inspectorStrings_ca.js" type="js_map_format" lang="ca" /> @@ -55,10 +58,16 @@ so we include the original license below: <output filename="inspectorStrings_es.js" type="js_map_format" lang="es" /> <output filename="inspectorStrings_es-419.js" type="js_map_format" lang="es-419" /> <output filename="inspectorStrings_et.js" type="js_map_format" lang="et" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_eu.js" type="js_map_format" lang="eu" /> + </if> <output filename="inspectorStrings_fa.js" type="js_map_format" lang="fa" /> <output filename="inspectorStrings_fi.js" type="js_map_format" lang="fi" /> <output filename="inspectorStrings_fil.js" type="js_map_format" lang="fil" /> <output filename="inspectorStrings_fr.js" type="js_map_format" lang="fr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_gl.js" type="js_map_format" lang="gl" /> + </if> <output filename="inspectorStrings_gu.js" type="js_map_format" lang="gu" /> <output filename="inspectorStrings_he.js" type="js_map_format" lang="he" /> <output filename="inspectorStrings_hi.js" type="js_map_format" lang="hi" /> @@ -67,8 +76,14 @@ so we include the original license below: <output filename="inspectorStrings_id.js" type="js_map_format" lang="id" /> <output filename="inspectorStrings_it.js" type="js_map_format" lang="it" /> <output filename="inspectorStrings_ja.js" type="js_map_format" lang="ja" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_ka.js" type="js_map_format" lang="ka" /> + </if> <output filename="inspectorStrings_kn.js" type="js_map_format" lang="kn" /> <output filename="inspectorStrings_ko.js" type="js_map_format" lang="ko" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_ku.js" type="js_map_format" lang="ku" /> + </if> <output filename="inspectorStrings_lt.js" type="js_map_format" lang="lt" /> <output filename="inspectorStrings_lv.js" type="js_map_format" lang="lv" /> <output filename="inspectorStrings_ml.js" type="js_map_format" lang="ml" /> @@ -77,7 +92,6 @@ so we include the original license below: <!-- The translation console uses 'no' for Norwegian Bokmål. It should be 'nb'. --> <output filename="inspectorStrings_nb.js" type="js_map_format" lang="no" /> - <output filename="inspectorStrings_or.js" type="js_map_format" lang="or" /> <output filename="inspectorStrings_pl.js" type="js_map_format" lang="pl" /> <output filename="inspectorStrings_pt-BR.js" type="js_map_format" lang="pt-BR" /> <output filename="inspectorStrings_pt-PT.js" type="js_map_format" lang="pt-PT" /> @@ -92,28 +106,59 @@ so we include the original license below: <output filename="inspectorStrings_te.js" type="js_map_format" lang="te" /> <output filename="inspectorStrings_th.js" type="js_map_format" lang="th" /> <output filename="inspectorStrings_tr.js" type="js_map_format" lang="tr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="inspectorStrings_ug.js" type="js_map_format" lang="ug" /> + </if> <output filename="inspectorStrings_uk.js" type="js_map_format" lang="uk" /> <output filename="inspectorStrings_vi.js" type="js_map_format" lang="vi" /> <output filename="inspectorStrings_zh-CN.js" type="js_map_format" lang="zh-CN" /> <output filename="inspectorStrings_zh-TW.js" type="js_map_format" lang="zh-TW" /> </outputs> <translations> - <!-- TODO add references to each of the XTB files (from the Translation - Console) that contain translations of messages in your project. Each - takes a form like <file path="english.xtb" />. Remember that all file - references are relative to this .grd file. --> + <if expr="pp_ifdef('use_third_party_translations')"> + <file path="../../third_party/launchpad_translations/inspector_strings_ast.xtb" lang="ast" /> + <file path="../../third_party/launchpad_translations/inspector_strings_ca.xtb" lang="ca" /> + <file path="../../third_party/launchpad_translations/inspector_strings_de.xtb" lang="de" /> + <file path="../../third_party/launchpad_translations/inspector_strings_es.xtb" lang="es" /> + <file path="../../third_party/launchpad_translations/inspector_strings_eu.xtb" lang="eu" /> + <file path="../../third_party/launchpad_translations/inspector_strings_fi.xtb" lang="fi" /> + <file path="../../third_party/launchpad_translations/inspector_strings_fr.xtb" lang="fr" /> + <file path="../../third_party/launchpad_translations/inspector_strings_gl.xtb" lang="gl" /> + <file path="../../third_party/launchpad_translations/inspector_strings_he.xtb" lang="he" /> + <file path="../../third_party/launchpad_translations/inspector_strings_id.xtb" lang="id" /> + <file path="../../third_party/launchpad_translations/inspector_strings_it.xtb" lang="it" /> + <file path="../../third_party/launchpad_translations/inspector_strings_ku.xtb" lang="ku" /> + <file path="../../third_party/launchpad_translations/inspector_strings_nl.xtb" lang="nl" /> + <file path="../../third_party/launchpad_translations/inspector_strings_no.xtb" lang="no" /> + <file path="../../third_party/launchpad_translations/inspector_strings_pt-BR.xtb" lang="pt-BR" /> + <file path="../../third_party/launchpad_translations/inspector_strings_ro.xtb" lang="ro" /> + <file path="../../third_party/launchpad_translations/inspector_strings_ru.xtb" lang="ru" /> + <file path="../../third_party/launchpad_translations/inspector_strings_sl.xtb" lang="sl" /> + <file path="../../third_party/launchpad_translations/inspector_strings_sv.xtb" lang="sv" /> + <file path="../../third_party/launchpad_translations/inspector_strings_ug.xtb" lang="ug" /> + <file path="../../third_party/launchpad_translations/inspector_strings_zh-CN.xtb" lang="zh-CN" /> + </if> </translations> <release seq="1"> <messages fallback_to_english="true"> - <message name="IDS_HEADERS_COUNT" desc="Headers count."> - ''' (<ph name="COUNT">%d<ex>1</ex></ph>) + <message name="IDS_HEADERS_COUNT" desc="Request headers count."> + ''' (<ph name="COUNT">%d<ex>2</ex></ph>) </message> - <message name="IDS_MESSAGE_REPEAT_COUNT" desc="Message repeat count."> - ''' (repeated <ph name="COUNT">%d<ex>2</ex></ph> times) + <message name="IDS_MESSAGE_REPEATED_TIMES" desc="The number of times a message got repeated."> + ''' (repeated <ph name="TIMES">%d<ex>3</ex></ph> times) + </message> + <message name="IDS_LINES_RANGE" desc="Source code lines range"> + 1 - <ph name="LAST_LINE">%d<ex>1000</ex></ph> </message> <message name="IDS_SIZE_IN_BYTES" desc="Size in bytes."> <ph name="SIZE">%.0f<ex>100</ex></ph>B </message> + <message name="IDS_SIZE_IN_KILOBYTES_ROUNDED" desc="Size in kilobytes."> + <ph name="SIZE">%.0f<ex>100</ex></ph>KB + </message> + <message name="IDS_SIZE_IN_MEGABYTES_ROUNDED" desc="Size in megabytes."> + <ph name="SIZE">%.0f<ex>100</ex></ph>MB + </message> <message name="IDS_DURATION_IN_MILLISECONDS" desc="Duration in milliseconds."> <ph name="DURATION">%.0f<ex>100</ex></ph>ms </message> @@ -132,15 +177,21 @@ so we include the original license below: <message name="IDS_SIZE_IN_KILOBYTES" desc="Size in kilobytes."> <ph name="SIZE">%.2f<ex>5</ex></ph>KB </message> + <message name="IDS_SIZE_IN_MEGABYTES" desc="Size in megabytes."> + <ph name="SIZE">%.2f<ex>100</ex></ph>MB + </message> <message name="IDS_DURATION_IN_SECONDS" desc="Duration in seconds."> <ph name="DURATION">%.2f<ex>5</ex></ph>s </message> - <message name="IDS_SIZE_IN_MEGABYTES" desc="Size in megabytes."> - <ph name="DURATION">%.3f<ex>5</ex></ph>MB - </message> <message name="IDS_DURATION_IN_MILLISECONDS_HIGH_PRECISION" desc="Duration in milliseconds, high precision."> <ph name="DURATION">%.3f<ex>5</ex></ph>ms </message> + <message name="IDS_NUMBER_OF_HIDDEN_CONSOLE_MESSAGES" desc="The number of hidden console messages."> + <ph name="NUMBER">%d<ex>10</ex></ph> console messages are not shown. + </message> + <message name="IDS_COOKIES_COUNT_AND_SIZE" desc="Cookies count and size."> + <ph name="COUNT">%1$d<ex>10</ex></ph> cookies (<ph name="SIZE">%2$s<ex>10KB</ex></ph>) + </message> <message name="IDS_ERRORS_COUNT_SINGULAR" desc="Errors count, singular."> <ph name="COUNT">%d<ex>1</ex></ph> error </message> @@ -162,6 +213,9 @@ so we include the original license below: <message name="IDS_MATCHES_COUNT_PLURAL" desc="Matches count, plural."> <ph name="COUNT">%d<ex>2</ex></ph> matches </message> + <message name="IDS_COUNTS_OF_CAPTURED_RECORDS" desc="Displayed and total counts of captured records."> + <ph name="DISPLAYED_COUNT">%1$d<ex>10</ex></ph> of <ph name="TOTAL_COUNT">%2$d<ex>100</ex></ph> captured records are visible + </message> <message name="IDS_STYLE_CHANGE_SINGULAR" desc="Style changes count, singular."> <ph name="COUNT">%d<ex>1</ex></ph> style change </message> @@ -174,12 +228,33 @@ so we include the original license below: <message name="IDS_WARNINGS_COUNT_PLURAL" desc="Warnings count, plural."> <ph name="COUNT">%d<ex>2</ex></ph> warnings </message> + <message name="IDS_IMAGE_DIMENSIONS_PIXELS_WITH_NATURAL_SIZE" desc="Image dimensions (uses mutiplication symbol, not x), with natural size."> + <ph name="WIDTH">%1$d<ex>100</ex></ph> × <ph name="HEIGHT">%2$d<ex>100</ex></ph> pixels (Natural: <ph name="NATURAL_WIDTH">%3$d<ex>100</ex></ph> × <ph name="NATURAL_HEIGHT">%4$d<ex>100</ex></ph> pixels) + </message> + <message name="IDS_IMAGE_DIMENSIONS_PIXELS" desc="Image dimensions in pixels (uses mutiplication symbol, not x.)"> + <ph name="WIDTH">%1$d<ex>100</ex></ph> × <ph name="HEIGHT">%2$d<ex>100</ex></ph> pixels + </message> <message name="IDS_IMAGE_DIMENSIONS" desc="Image dimensions (uses mutiplication symbol, not x.)"> <ph name="WIDTH">%1$d<ex>100</ex></ph> × <ph name="HEIGHT">%2$d<ex>100</ex></ph> </message> + <message name="IDS_RESOURCE_NAME_AND_SIZE" desc="Resource name ans size."> + <ph name="NAME">%1$s<ex>foo.html</ex></ph> (<ph name="SIZE">%2$s<ex>10KB</ex></ph>) + </message> + <message name="IDS_DURATION_AND_TIME" desc="Event duration and time."> + <ph name="DURATION">%1$s<ex>5 seconds</ex></ph> (at <ph name="TIME">%2$s<ex>10:25</ex></ph>) + </message> <message name="IDS_INDICATES_THAT_RESOURCE_IS_RETRIEVED_FROM_CACHE" desc="Indicates that resource is retrieved from cache."> <ph name="RESOURCE_NAME">%s<ex>picture.gif</ex></ph> (from cache) </message> + <message name="IDS_EVENT_DETAILS_TITLE" desc="Event details title."> + <ph name="EVENT">%s<ex>Paint</ex></ph> - Details + </message> + <message name="IDS_BIG_DELTA" desc="Big delta value."> + <ph name="SIGN">%s<ex>+</ex></ph> >1000%% + </message> + <message name="IDS_BYTES_COLLECTED_DURING_GC" desc="Bytes collected during garbage collection."> + <ph name="BYTES">%s<ex>10KB</ex></ph> collected + </message> <message name="IDS_INDICATES_DURATION_OF_RESOURCE_DOWNLOAD" desc="Indicates duration of resource download."> <ph name="DURATION">%s<ex>5ms</ex></ph> download </message> @@ -189,24 +264,84 @@ so we include the original license below: <message name="IDS_INDICATES_DURATION_AND_LATENCY_OF_RESOURCE_DOWNLOAD" desc="Indicates duration and latency of resource download."> <ph name="LATENCY">%1$s<ex>5ms</ex></ph> latency, <ph name="DURATION">%2$s<ex>5ms</ex></ph> download (<ph name="TOTAL">%3$s<ex>10ms</ex></ph> total) </message> + <message name="IDS_USED_HEAP_SIZE_VALUES" desc="Used heap size values."> + <ph name="USED">%1$s<ex>10MB</ex></ph> of <ph name="TOTAL">%2$s<ex>20MB</ex></ph> + </message> + <message name="IDS_SIGNED_FLOAT_VALUE" desc="Signed value (float)."> + <ph name="SIGN">%1$s<ex>+</ex></ph><ph name="VALUE">%2$.2f<ex>100</ex></ph>%% + </message> + <message name="IDS_SIGNED_INTEGER_VALUE" desc="Signed value (integer)."> + <ph name="SIGN">%1$s<ex>+</ex></ph><ph name="VALUE">%2$d<ex>10</ex></ph> + </message> + <message name="IDS_SIGNED_SIZE" desc="Signed size."> + <ph name="SIGN">%1$s<ex>+</ex></ph><ph name="VALUE">%2$s<ex>10KB</ex></ph> + </message> <message name="IDS_LABELS_AN_ANONYMOUS_JAVASCRIPT_FUNCTION" desc="Labels an anonymous JavaScript function."> (anonymous function) </message> + <message name="IDS_INTERNAL_SCRIPT" desc="A label for an internal script."> + (internal script) + </message> + <message name="IDS_RESOURCE_FROM_CACHE" desc="A label for a resource from cache."> + (from cache) + </message> <message name="IDS_LABELS_PROGRAM_AS_A_WHOLE" desc="Labels program as a whole."> (program) </message> - <message name="IDS_LABELS_A_SCRIPT_WITH_URL" desc="Labels a script with URL."> - (program): <ph name="URL">%s<ex>http://site/script.js</ex></ph> - </message> <message name="IDS_LABELS_A_TEXT_NODE_IN_HTML_TREE" desc="Labels a text node in HTML tree."> (text) </message> + <message name="IDS_UNABLE_DECODE_VALUE" desc="A message for an undecoded value."> + (unable to decode value) + </message> <message name="IDS_LABELS_A_WHITESPACE_NODE_IN_HTML_TREE" desc="Labels a whitespace node in HTML tree."> (whitespace) </message> <message name="IDS_MATCHES_COUNT_SINGULAR" desc="Matches count, singular."> 1 match </message> + <message name="IDS_SOURCE_IS_NOT_AVAILABLE" desc="A message indicating that script source isn't available."> + <source is not available> + </message> + <message name="IDS_APPLICATION_CACHE" desc="Application Cache label."> + Application Cache + </message> + <message name="IDS_ACCEPT_SUGGESTION" desc="Description for an action of accepting a command suggestion."> + Accept suggestion + </message> + <message name="IDS_ACTIVATE_ALL_BREAKPOINTS" desc="A command for activating all breakpoints."> + Activate all breakpoints. + </message> + <message name="IDS_ADD_ATTRIBUTE" desc="A command for adding an attribute."> + Add Attribute + </message> + <message name="IDS_ADD_BREAKPOINT" desc="A command for adding a breakpoint."> + Add Breakpoint + </message> + <message name="IDS_ADD_CONDITIONAL_BREAKPOINT" desc="A command for adding a conditional breakpoint."> + Add Conditional Breakpoint… + </message> + <message name="IDS_ADD_NEW_ROW" desc="A command for adding a row in a table."> + Add New + </message> + <message name="IDS_ADD_WATCH_EXPRESSION" desc="A command for adding a watch expression."> + Add + </message> + <message name="IDS_AGGREGATED_TIME" desc="A label for event aggregated time."> + Aggregated Time + </message> + <message name="IDS_EVENTS_FOR_ALL_NODES" desc="An option to view events for all nodes."> + All Nodes + </message> + <message name="IDS_ALL_PANELS" desc="A label for shortcuts available in all panels."> + All Panels + </message> + <message name="IDS_SHOW_ALL" desc="An option to show all elements (w/o filtering)."> + All + </message> + <message name="IDS_ALLOW_DEBUGGING_WORKERS" desc="Allow debugging Web workers."> + Allow debugging workers. Enabling this option will replace native workers with the iframe-based JavaScript implementation + </message> <message name="IDS_SPECIFIES_THAT_SOME_FEATURE_IS_ALWAYS_ENABLED" desc="Specifies that some feature is always enabled."> Always enable </message> @@ -216,176 +351,491 @@ so we include the original license below: <message name="IDS_ERROR_MESSAGE_DISPLAYED_WHEN_AN_UNEXPECTED_ERROR_OCCURS_DURING_DATABASE_QUERY" desc="Error message displayed when an unexpected error occurs during database query."> An unexpected error <ph name="ERROR">%s<ex>No memory</ex></ph> occurred. </message> + <message name="IDS_BREAK_ON_ANY_XHR" desc="Debugger should break on any XHR request."> + Any XHR + </message> + <message name="IDS_COLOR_AS_AUTHORED" desc="An option to show color value as authored in the stylesheet."> + As Authored + </message> + <message name="IDS_ASSERTION_FAILED" desc="A prefix for an assertion failure message."> + Assertion failed: + </message> + <message name="IDS_BREAK_ON_ATTRIBUTE_MODIFIED" desc="A condition for breaking execution on DOM node attribute modification."> + Attribute Modified + </message> + <message name="IDS_AUDIT_PRESENT_STATE" desc="A label for checkbox enabling audit of page's present state."> + Audit Present State + </message> + <message name="IDS_AUDITS_PANEL" desc="Audits panel label."> + Audits + </message> <message name="IDS_LABEL_OF_A_GRID_COLUMN_SHOWING_AVERAGE_FUNCTION_EXECUTION_TIME" desc="Label of a grid column showing average function execution time."> Average </message> + <message name="IDS_BLOCKING_DURATION" desc="A label for the duration of connection blocking state."> + Blocking + </message> <message name="IDS_LABEL_OF_A_SIDE_PANEL_SHOWING_BREAKPOINTS" desc="Label of a side panel showing breakpoints."> Breakpoints </message> + <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_COOKIES" desc="Label for a section showing cookies."> + Cookies + </message> + <message name="IDS_CPU_PROFILES" desc="A label for the CPU profiles list (all caps)."> + CPU PROFILES + </message> + <message name="IDS_CALL_SITE_STACK" desc="A label for event call stack."> + Call Site stack + </message> <message name="IDS_LABEL_OF_A_SIDE_PANEL_SHOWING_CALL_STACK" desc="Label of a side panel showing call stack."> Call Stack </message> <message name="IDS_LABEL_OF_A_GRID_COLUMN_SHOWING_FUNCTION_CALL_COUNT" desc="Label of a grid column showing function call count."> Calls </message> + <message name="IDS_CLEAR_CPU_PROFILES" desc="Label of the button for clearing all CPU profiles."> + Clear CPU profiles. + </message> + <message name="IDS_CLEAR_CONSOLE" desc="Label of the button that clears console messages."> + Clear Console + </message> + <message name="IDS_CLEAR_AUDIT_RESULTS" desc="Label of the button cleaning up audits results."> + Clear audit results. + </message> <message name="IDS_HINT_FOR_A_BUTTON_CLEARING_CHANGES_LOG" desc="Hint for a button clearing changes log."> Clear changes log. </message> <message name="IDS_HINT_FOR_A_BUTTON_CLEARING_CONSOLE_LOG" desc="Hint for a button clearing console log."> Clear console log. </message> + <message name="IDS_CLEAR" desc="A label for a button that clears a list."> + Clear + </message> + <message name="IDS_CLICK_TO_CHANGE_COLOR_FORMAT" desc="Click to change color format."> + Click to change color format + </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_CLOSURE_VARIABLES" desc="Label for a section in the scope chain sidebar that shows closure's variables."> Closure </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_COOKIES_CAPS" desc="Label for a section showing cookies."> - COOKIES + <message name="IDS_RESOURCE_TYPE_CODE" desc="Resource type: Code"> + Code + </message> + <message name="IDS_COLLECTED" desc="A label for a column displaying the size of collected garbage."> + Collected + </message> + <message name="IDS_COMPARED_TO" desc="A selector of a heap profile to compare with."> + Compared to <ph name="PROFILE_NAME">%s<ex>Snapshot 1</ex></ph> </message> <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_COMPUTED_STYLE" desc="Label for a section showing computed style."> Computed Style </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_COOKIES" desc="Label for a section showing cookies."> - Cookies + <message name="IDS_CONNECTING" desc="A label for the duration of connection connecting state."> + Connecting </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_DATABASES" desc="Label for a section showing databases."> - DATABASES + <message name="IDS_CONSOLE" desc="A label for the Console panel."> + Console </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_DOM" desc="Label for a section showing DOM."> - DOM + <message name="IDS_CONSTRUCTOR" desc="A label for a cell displaying object constructor name."> + Constructor </message> - <message name="IDS_ERROR_MESSAGE_INDICATING_DATABASE_VERSION_MISMATCH" desc="Error message indicating database version mismatch."> - Database no longer has expected version. + <message name="IDS_CONTENT" desc="A label for a tab displaying resource content."> + Content + </message> + <message name="IDS_CONTINUE_TO_HERE" desc="A command for continuing script execution up to specified position."> + Continue to Here + </message> + <message name="IDS_CONTINUE" desc="A command for continuing script execution."> + Continue + </message> + <message name="IDS_CONTROL_CPU_PROFILING" desc="An instruction on how to start CPU profiling."> + Control CPU profiling by pressing the <ph name="BUTTON">%s<ex>button glyph</ex></ph> button on the status bar. + </message> + <message name="IDS_COPY_AS_HTML" desc="A command for copying node contents as HTML."> + Copy as HTML + </message> + <message name="IDS_COUNT" desc="A label for a column with entities count."> + Count </message> <message name="IDS_LABEL_FOR_THE_TAB_SHOWING_DATABASES" desc="Label for the tab showing databases."> Databases </message> + <message name="IDS_DNS_LOOKUP" desc="A label for displaying DNS lookup time."> + DNS Lookup + </message> + <message name="IDS_DOM_CONTENT_EVENT_FIRED" desc="A label for the moment of time when DOMContent event fired."> + DOMContent event fired + </message> + <message name="IDS_DON_CONTENT_EVENT" desc="A label for the DOMContent event."> + DOMContent event + </message> + <message name="IDS_ERROR_MESSAGE_INDICATING_DATABASE_VERSION_MISMATCH" desc="Error message indicating database version mismatch."> + Database no longer has expected version. + </message> + <message name="IDS_DATABASE_NOT_FOUND" desc="Error message indicating that database is not found."> + Database not found. + </message> + <message name="IDS_DEACTIVATE_ALL_BREAKPOINTS" desc="A command for deactivating all breakpoints."> + Deactivate all breakpoints. + </message> + <message name="IDS_DEBUG_WORKERS" desc="A label for the checkbox enabling Web workers debugging."> + Debug + </message> <message name="IDS_MESSAGE_INDICATING_THAT_DEBUGGING_IS_DISABLED" desc="Message indicating that debugging is disabled."> Debugging disabled. Click to enable. </message> <message name="IDS_MESSAGE_INDICATING_THAT_DEBUGGING_IS_ENABLED" desc="Message indicating that debugging is enabled."> Debugging enabled. Click to disable. </message> - <message name="IDS_A_HINT_THAT_REMINDS_TO_TURN_ON_DEBUGGER" desc="A hint that reminds to turn on debugger."> - Debugging scripts requires you to start the debugger. + <message name="IDS_DELETE_NODE" desc="A command for deleting DOM node."> + Delete Node + </message> + <message name="IDS_DELETE_WATCH_EXPRESSION" desc="A command for deleting watch expression."> + Delete watch expression. </message> <message name="IDS_A_BUTTON_FOR_DELETING_DOM_STORAGE_ITEMS" desc="A button for deleting DOM storage items."> Delete </message> + <message name="IDS_DETAILS" desc="A label for additional details about timeline event."> + Details + </message> <message name="IDS_LABEL_OF_IMAGE_DIMENSIONS_GRID_COLUMN" desc="Label of image dimensions grid column."> Dimensions </message> + <message name="IDS_DISABLE_BREAKPOINT" desc="A command to disable a breakpoint."> + Disable Breakpoint + </message> <message name="IDS_HINT_FOR_A_BUTTON_THAT_DOCKS_INSPECTOR_TO_MAIN_WINDOW" desc="Hint for a button that docks Inspector to main window."> Dock to main window. </message> + <message name="IDS_DOCUMENT" desc="Title for the resources of the type Document."> + Document + </message> <message name="IDS_LABEL_FOR_DOCUMENTS_RESOURCE_SECTION" desc="Label for documents resource section."> Documents </message> - <message name="IDS_HINT_FOR_A_BUTTON_THAT_DISABLES_PAUSE_EXECUTION_ON_EXCEPTIONS" desc="Hint for a button that disables pause execution on exceptions."> - Don't pause on exceptions. + <message name="IDS_COOKIE_DOMAIN" desc="A label for the column displaying cookie's domain name."> + Domain </message> - <message name="IDS_DOUBLE_CLICK_TO_ADD" desc="Instruction on adding an element."> - Double-Click to Add + <message name="IDS_NO_PAUSE_ON_EXCEPTIONS" desc="The current state: don't pause on exception, after LF: a hint for a button that changes the state."> + Don't pause on exceptions.\nClick to Pause on all exceptions. + </message> + <message name="IDS_TOGGLE_URL_FORMAT" desc="A hint on how to toggle between URL formats."> + Double-Click to toggle between URL encoded and decoded formats + </message> + <message name="IDS_EDIT_ATTRIBUTE_CAPITALIZED" desc="Text for a shortcut for editing a DOM node attrubute."> + Edit Attribute + </message> + <message name="IDS_EDIT_BREAKPOINT" desc="A command for editing breakpoint properties."> + Edit Breakpoint… + </message> + <message name="IDS_EDIT_TEXT" desc="A command for editing DOM node text content."> + Edit Text + </message> + <message name="IDS_EDIT_AS_HTML" desc="A command for editing DOM node as HTML."> + Edit as HTML + </message> + <message name="IDS_EDIT_ATTRIBUTE" desc="A command for editing a DOM node attrubute."> + Edit attribute + </message> + <message name="IDS_EDIT" desc="A command for editing table's node contents."> + Edit + </message> + <message name="IDS_ELEMENTS_PANEL" desc="A label for the HTML elements panel."> + Elements Panel </message> <message name="IDS_LABEL_FOR_HTML_ELEMENTS_PANEL" desc="Label for HTML elements panel."> Elements </message> + <message name="IDS_ENABLE_BREAKPOINT" desc="A label for a checkbox that enables a breakpoint."> + Enable Breakpoint + </message> <message name="IDS_HINT_FOR_A_BUTTON_THAT_ENABLES_DEBUGGING" desc="Hint for a button that enables debugging."> Enable Debugging </message> <message name="IDS_HINT_FOR_A_BUTTON_THAT_ENABLES_PROFILING" desc="Hint for a button that enables profiling."> Enable Profiling </message> - <message name="IDS_HINT_FOR_A_BUTTON_THAT_ENABLES_RESOURCE_TRACKING" desc="Hint for a button that enables resource tracking."> - Enable resource tracking - </message> <message name="IDS_A_WARNING_MESSAGE_ABOUT_DEBUGGING" desc="A warning message about debugging."> Enabling debugging will make scripts run slower. </message> <message name="IDS_A_WARNING_MESSAGE_ABOUT_PROFILING" desc="A warning message about profiling."> Enabling profiling will make scripts run slower. </message> - <message name="IDS_A_WARNING_MESSAGE_ABOUT_RESOURCE_TRACKING" desc="A warning message about resource tracking."> - Enabling resource tracking will reload the page and make page loading slower. + <message name="IDS_ERRORS_FILTER" desc="A label for the filter in the Console."> + Errors + </message> + <message name="IDS_EVALUATE_SCRIPT_EVENT" desc="A label for the script evaluation event."> + Evaluate Script </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_EVENT_DOCUMENT_VARIABLES" desc="Label for a section in the scope chain sidebar that shows event document's variables."> Event Document </message> + <message name="IDS_EVENT_LISTENERS" desc="A label for the section showing event listeners."> + Event Listeners + </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_EVENT_TARGET_VARIABLES" desc="Label for a section in the scope chain sidebar that shows event target's variables."> Event Target </message> + <message name="IDS_EVENT_TYPE" desc="A label for the script events type."> + Event + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_EXCLUDES_A_FUNCTION_FROM_EXECUTION_PROFILE" desc="Label for a button that excludes a function from execution profile."> Exclude selected function. </message> + <message name="IDS_EXECUTE_COMMAND" desc="A label for the command for script execution."> + Execute command + </message> + <message name="IDS_EXPAND_COLLAPSE" desc="A command for expanding/collapsing DOM node."> + Expand/collapse + </message> + <message name="IDS_EXPECTED_CONTENT_LENGTH" desc="A label for resource's expected content length."> + Expected Content Length + </message> + <message name="IDS_COOKIE_EXPIRES" desc="A label for the column displaying cookie expiration time."> + Expires + </message> + <message name="IDS_EXPORT_ALL_TO_HAR" desc="A command for exporting all statistics to HAR format."> + Export all to HAR + </message> + <message name="IDS_EXPORT_TO_HAR" desc="A command for exporting certain records to HAR format."> + Export to HAR + </message> <message name="IDS_LABEL_OF_IMAGE_FILE_SIZE_GRID_COLUMN" desc="Label of image file size grid column."> File size </message> + <message name="IDS_STORAGE_FILE_SYSTEM" desc="Storage category: file system."> + File System + </message> + <message name="IDS_FIND_NEXT_PREVIOUS" desc="Title of help section displaying search-related shortcuts."> + Find next/previous + </message> + <message name="IDS_FINISH_LOADING" desc="A label for the page finished loading event."> + Finish Loading + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_FOCUSES_ON_A_FUNCTION_FROM_EXECUTION_PROFILE" desc="Label for a button that focuses on a function from execution profile."> Focus selected function. </message> + <message name="IDS_FONT_RESOURCE" desc="Font resource name."> + Font + </message> <message name="IDS_LABEL_FOR_FONTS_RESOURCE_SECTION" desc="Label for fonts resource section."> Fonts </message> + <message name="IDS_FORM_DATA" desc="A title for HTML form data."> + Form Data + </message> + <message name="IDS_FUNCTION_CALL_TIMELINE_EVENT" desc="Function call Timeline event."> + Function Call + </message> <message name="IDS_LABEL_OF_A_GRID_COLUMN_SHOWING_FUNCTION_NAME" desc="Label of a grid column showing function name."> Function </message> - <message name="IDS_LABEL_FOR_GRAPHS_SIDEBAR" desc="Label for graphs sidebar."> - GRAPHS + <message name="IDS_GC_TIMELINE_EVENT" desc="Garbage collection Timeline event."> + GC Event + </message> + <message name="IDS_HEAP_SNAPSHOT_HELP" desc="Help text on how to get a heap snapshot."> + Get a heap snapshot by pressing the <ph name="BUTTON">%s<ex>button glyph</ex></ph> button on the status bar. </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_GLOBAL_VARIABLES" desc="Label for a section in the scope chain sidebar that shows global variables."> Global </message> - <message name="IDS_LABEL_INDICATING_THAT_BOTTOM-UP_HEAVY_PROFILE_IS_SHOWN" desc="Label indicating that bottom-up (heavy) profile is shown."> + <message name="IDS_GO_TO_LINE_BUTTON" desc="A label for a button that takes you to designated line."> + Go + </message> + <message name="IDS_GO_TO_LINE_LABEL" desc="A label for the input box for enterting line number."> + Go to line: + </message> + <message name="IDS_HEAP_SNAPSHOTS" desc="A label for the heap snapshots list (all caps)."> + HEAP SNAPSHOTS + </message> + <message name="IDS_HSL_COLORS" desc="A label for the option to display colors in HSL format."> + HSL Colors + </message> + <message name="IDS_HTTP" desc="HTTP protocol label."> + HTTP + </message> + <message name="IDS_HEADERS" desc="A label for the section displaying HTTP headers."> + Headers + </message> + <message name="IDS_LABEL_INDICATING_THAT_BOTTOM_UP_HEAVY_PROFILE_IS_SHOWN" desc="Label indicating that bottom-up (heavy) profile is shown."> Heavy (Bottom Up) </message> + <message name="IDS_HEX_COLORS" desc="A label for the option to display colors in hexadecimal format."> + Hex Colors + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_HIDES_CHANGES" desc="Label for a button that hides changes view."> Hide changes view. </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_HIDES_CONSOLE" desc="Label for a button that hides console."> Hide console. </message> + <message name="IDS_HIDE_SHORT_RECORDS" desc="A label for hiding records that has shorter duration than specified."> + Hide the records that are shorter than <ph name="DURATION">%s<ex>15 ms</ex></ph> + </message> + <message name="IDS_IMAGE_RESOURCE" desc="Resource of image type."> + Image + </message> <message name="IDS_LABEL_FOR_IMAGES_RESOURCE_SECTION" desc="Label for images resource section."> Images </message> - <message name="IDS_LABEL_FOR_INLINE_STYLE_ATTRIBUTE" desc="Label for inline style attribute."> - Inline Style Attribute + <message name="IDS_INCREMENT_DECREMENT_HELP" desc="Help text for shortcuts that increment/decrement values."> + Increment/decrement by <ph name="VALUE">%f<ex>10</ex></ph> + </message> + <message name="IDS_INCREMENT_DECREMENT_HELP_2" desc="Help text for shortcuts that increment/decrement values."> + Increment/decrement value + </message> + <message name="IDS_STYLE_INHERITED_FROM" desc="A label for diplaying the ancestor of the current CSS style."> + Inherited from + </message> + <message name="IDS_INSTALL_TIMER_EVENT" desc="A label for the Install Timer event."> + Install Timer </message> <message name="IDS_LABEL_FOR_A_GRID_COLUMN_SHOWING_PROPERTY_KEY" desc="Label for a grid column showing property key."> Key </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_LOCAL_STORAGE" desc="Label for a section showing local storage."> - LOCAL STORAGE + <message name="IDS_KEYBOARD_SHORTCUTS" desc="A label for the keyboard shortcuts help card."> + Keyboard Shortcuts + </message> + <message name="IDS_LOCAL_STORAGE_LABEL" desc="A label for the section displaying page's local storage contents."> + Local Storage + </message> + <message name="IDS_LAYOUT_EVENT" desc="A label for the layout event."> + Layout + </message> + <message name="IDS_LOAD_EVENT_BAR" desc="A label for the bar indicating load event time."> + Load event fired + </message> + <message name="IDS_LOAD_EVENT" desc="A label for the load event."> + Load event + </message> + <message name="IDS_RESOURCES_LOADING_PROGRESS" desc="Progress for resources loading."> + Loading (<ph name="LOADED">%1$d<ex>5</ex></ph> of <ph name="TOTAL">%2$d<ex>10</ex></ph>) + </message> + <message name="IDS_LOADING_CATEGORY" desc="A label for loading-related category of events."> + Loading + </message> + <message name="IDS_LOCAL_FILES" desc="A label for the section showing local files."> + Local Files </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_LOCAL_VARIABLES" desc="Label for a section in the scope chain sidebar that shows local variables."> Local </message> + <message name="IDS_EVENT_LOCATION" desc="A label for the event source location."> + Location + </message> + <message name="IDS_LOGS_FILTER" desc="A label for the filter displaying log events."> + Logs + </message> + <message name="IDS_MIME_TYPE" desc="A label for the MIME type."> + MIME Type + </message> <message name="IDS_LABEL_OF_IMAGE_MIME_TYPE_GRID_COLUMN" desc="Label of image MIME type grid column."> MIME type </message> + <message name="IDS_MARK_EVENT" desc="A label for the mark in Timeline events."> + Mark + </message> + <message name="IDS_MATCHED_CSS_RULES" desc="A label for the section displaying CSS rules that match the selected element."> + Matched CSS Rules + </message> + <message name="IDS_MEDIA_RESOURCE" desc="Resource type: Media."> + Media + </message> + <message name="IDS_MEMORY_GRAPH" desc="A label for the memory usage graph."> + Memory + </message> <message name="IDS_LABEL_FOR_HTML_ELEMENT_METRICS_SIDE_PANEL" desc="Label for HTML element metrics side panel."> Metrics </message> + <message name="IDS_NAME" desc="A label for the column displaying entity name."> + Name + </message> + <message name="IDS_NAVIGATE_ELEMENTS_HELP" desc="A title for the help section displaying elements navigation shortcuts."> + Navigate elements + </message> + <message name="IDS_NEW_STYLE_RULE" desc="A command for adding a new style rule."> + New Style Rule + </message> + <message name="IDS_NEXT_PREVIOUS_CALL_FRAME_HELP" desc="A title for the help section displaying call frames navigation shortcuts."> + Next/previous call frame + </message> + <message name="IDS_NEXT_PREVIOUS_COMMAND_HELP" desc="A title for the help section displaying console commands history navigation shortcuts."> + Next/previous command + </message> + <message name="IDS_NEXT_PREVIOUS_LINE_HELP" desc="A title for the help section displaying console lines navigation shortcuts."> + Next/previous line + </message> + <message name="IDS_NEXT_PREVIOUS_PANEL_HELP" desc="A title for the help section displaying panels navigation shortcuts."> + Next/previous panel + </message> + <message name="IDS_NEXT_PREVIOUS_PROPERTY_HELP" desc="A title for the help section displaying panels navigation shortcuts."> + Next/previous property + </message> + <message name="IDS_NEXT_PREVIOUS_SUGGESTION_HELP" desc="A title for the help section displaying panels navigation shortcuts."> + Next/previous suggestion + </message> + <message name="IDS_NO_APPLICATION_CACHE" desc="A message indicating that no Application Cache information is available"> + No Application Cache information available. + </message> <message name="IDS_MESSAGE_IN_BREAKPOINTS_SIDEBAR_PANEL_INDICATING_THAT_THERE_ARE_NO_BREAKPOINTS" desc="Message in breakpoints sidebar panel indicating that there are no breakpoints."> No Breakpoints </message> + <message name="IDS_NO_EVENT_LISTENERS" desc="A message indicating that the selected DOM node has no event listeners."> + No Event Listeners + </message> <message name="IDS_MESSAGE_IN_OBJECT_PROPERTIES_SIDEBAR_PANEL_INDICATING_THAT_THERE_ARE_NO_PROPERTIES" desc="Message in object properties sidebar panel indicating that there are no properties."> No Properties </message> <message name="IDS_MESSAGE_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_SHOWING_VARIABLES_ABSENCE" desc="Message for a section in the scope chain sidebar showing variables absence."> No Variables </message> - <message name="IDS_MESSAGE_INDICATING_THAT_SEARCHED_STRING_DOESN'T_FOUND" desc="Message indicating that searched string doesn't found."> + <message name="IDS_NO_AUDITS" desc="A message indicating that there are no audit rules to check against."> + No audits to run + </message> + <message name="IDS_NODE_REMOVED_BREAKPOINT" desc="Title for a breakpoint triggering on DOM node removal."> + Node Removed + </message> + <message name="IDS_MESSAGE_INDICATING_THAT_SEARCHED_STRING_DOES_NOT_FOUND" desc="Message indicating that searched string doesn't found."> Not Found </message> - <message name="IDS_MESSAGE_INDICATING_THAT_PROGRAM_ISN'T_PAUSED" desc="Message indicating that program isn't paused."> + <message name="IDS_MESSAGE_INDICATING_THAT_PROGRAM_IS_NOT_PAUSED" desc="Message indicating that program isn't paused."> Not Paused </message> + <message name="IDS_OBJECTS_COLUMN" desc="A title for the column displaying JavaScript object names."> + Objects + </message> + <message name="IDS_OFFLINE" desc="Browser state: offline"> + Offline + </message> + <message name="IDS_ONLINE" desc="Browser state: online"> + Online + </message> <message name="IDS_SPECIFIES_THAT_SOME_FEATURE_IS_ONLY_ENABLED_FOR_CURRENT_SESSION" desc="Specifies that some feature is only enabled for current session."> Only enable for this session </message> + <message name="IDS_OPEN_LINK_IN_NEW_WINDOW" desc="Action: open a link in a new window."> + Open Link in New Window + </message> + <message name="IDS_OPEN_LINK_IN_RESOURCES_PANEL" desc="Action: open a link in the resources panel."> + Open Link in Resources Panel + </message> <message name="IDS_LABEL_FOR_OTHER_RESOURCES_SECTION" desc="Label for other resources section."> Other </message> - <message name="IDS_HINT_FOR_A_BUTTON_THAT_ENABLES_PAUSE_EXECUTION_ON_EXCEPTIONS" desc="Hint for a button that enables pause execution on exceptions."> - Pause on exceptions. + <message name="IDS_PAINT_EVENT" desc="Paint event name."> + Paint + </message> + <message name="IDS_PARSE_EVENT" desc="Parse event name."> + Parse + </message> + <message name="IDS_PATH" desc="Path of a resource."> + Path + </message> + <message name="IDS_PAUSE_ON_ALL_EXCEPTIONS" desc="Current state: pause on all exceptions. After the \n separator: a hint on how to switch the state."> + Pause on all exceptions.\nClick to Pause on uncaught exceptions. + </message> + <message name="IDS_PAUSE_ON_UNHANDLED_EXCEPTIONS" desc="Current state: pause on unhandled exceptions. After the \n separator: a hint on how to switch the state."> + Pause on uncaught exceptions.\nClick to Not pause on exceptions. </message> <message name="IDS_HINT_FOR_A_BUTTON_THAT_PAUSES_SCRIPT_EXECUTION" desc="Hint for a button that pauses script execution."> Pause script execution. @@ -411,60 +861,168 @@ so we include the original license below: <message name="IDS_LABEL_FOR_OBJECT_PROPERTIES_SIDEBAR" desc="Label for object properties sidebar."> Properties </message> - <message name="IDS_LABEL_FOR_THE_PROTOTYPE_PROPERTY" desc="Label for the prototype property."> - Prototype + <message name="IDS_PROXY_TIMING" desc="A label for the time spent on interacting with proxy server."> + Proxy + </message> + <message name="IDS_PSEUDO_DOUBLE_COLON_ELEMENT" desc="A label for a pseudo element."> + Pseudo ::<ph name="NAME">%s<ex>above</ex></ph> element + </message> + <message name="IDS_PSEUDO_ELEMENT" desc="A label for a pseudo element."> + Pseudo element + </message> + <message name="IDS_HTTP_QUERY_PARAMETERS" desc="HTTP query parameters"> + Query String Parameters + </message> + <message name="IDS_TIMELINE_RECORDS_LIST_HEADER_ALL_CAPS" desc="Timeline records list header (all caps.)"> + RECORDS + </message> + <message name="IDS_AUDIT_RESULTS_ALL_CAPS" desc="Audit results (all caps.)"> + RESULTS </message> - <message name="IDS_LABEL_FOR_DATABASE_QUERY" desc="Label for database query."> - Query + <message name="IDS_SHOW_COLORS_IN_RGB_FORMAT" desc="Show colors in RGB format."> + RGB Colors </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_RESOURCES" desc="Label for a section showing resources."> - RESOURCES + <message name="IDS_RECALCULATE_STYLES_TIMELINE_EVENT" desc="Recalculate styles Timeline event."> + Recalculate Style + </message> + <message name="IDS_RECEIVE_DATA_TIMELINE_EVENT" desc="Receive data Timeline event."> + Receive Data + </message> + <message name="IDS_RECEIVE_RESPONSE_TIMELINE_EVENT" desc="Receive response Timeline event."> + Receive Response + </message> + <message name="IDS_TIME_SPENT_ON_RECEIVING_A_RESOURCE" desc="Time spent on receiving a resource."> + Receiving + </message> + <message name="IDS_RECORD_BUTTON_LABEL" desc="Record button label."> + Record + </message> + <message name="IDS_RECORDING_CPU_PROFILE_STATUS_MESSAGE" desc="Recording CPU profile (status message)."> + Recording… </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_REFRESHES_CURRENT_VIEW" desc="Label for a button that refreshes current view."> Refresh </message> + <message name="IDS_REMOVE_BREAKPOINT_COMMAND" desc="Remove breakpoint command."> + Remove Breakpoint + </message> + <message name="IDS_REMOVE_TIMER_TIMELINE_EVENT" desc="Remove timer Timeline event."> + Remove Timer + </message> + <message name="IDS_RENDERING_EVENTS_CATEGORY_IN_TIMELINE_PANEL" desc="Rendering events category in Timeline panel."> + Rendering + </message> + <message name="IDS_A_LABEL_FOR_REPEATING_TIMER" desc="A label for repeating timer."> + Repeats + </message> + <message name="IDS_LABEL_FOR_HTTP_REQUEST_COOKIES" desc="Label for HTTP request cookies."> + Request Cookies + </message> <message name="IDS_LABEL_FOR_HTTP_REQUEST_HEADERS" desc="Label for HTTP request headers."> Request Headers </message> + <message name="IDS_HTTP_REQUEST_METHOD" desc="HTTP request method."> + Request Method + </message> + <message name="IDS_A_LABEL_FOR_REQUEST_PAYLOAD" desc="A label for request payload."> + Request Payload + </message> + <message name="IDS_A_LABEL_FOR_REQUEST_URL" desc="A label for request URL."> + Request URL + </message> <message name="IDS_A_WARNING_ABOUT_RESOURCE_TYPE_MISMATCH" desc="A warning about resource type mismatch."> Resource interpreted as <ph name="REAL_TYPE">%1$s<ex>text/javascript</ex></ph> but transferred with MIME type <ph name="SPECIFIED_TYPE">%2$s<ex>text/javascript</ex></ph>. </message> - <message name="IDS_MESSAGE_INDICATING_THAT_RESOURCE_TRACKING_IS_DISABLED" desc="Message indicating that resource tracking is disabled."> - Resource tracking disabled. Click to enable. - </message> - <message name="IDS_MESSAGE_INDICATING_THAT_RESOURCE_TRACKING_IS_ENABLED" desc="Message indicating that resource tracking is enabled."> - Resource tracking enabled. Click to disable. + <message name="IDS_RESOURCE_IDENTIFIER_LABEL" desc="Resource identifier label."> + Resource </message> <message name="IDS_LABEL_FOR_RESOURCES_TAB" desc="Label for resources tab."> Resources </message> + <message name="IDS_LABEL_FOR_HTTP_REQUEST_RESPONSE_COOKIES" desc="Label for HTTP request response cookies."> + Response Cookies + </message> <message name="IDS_LABEL_FOR_HTTP_REQUEST_RESPONSE_HEADERS" desc="Label for HTTP request response headers."> Response Headers </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_SHOWS_ALL_FUNCTIONS_IN_PROFILER" desc="Label for a button that shows all functions in profiler."> Restore all functions. </message> + <message name="IDS_REVEAL_IN_ELEMENTS_PANEL" desc="Command to reveal a node in the Elements panel."> + Reveal in Elements Panel + </message> <message name="IDS_LABEL_FOR_NTH_PROFILER_RUN" desc="Label for Nth profiler run."> Run <ph name="ID">%d<ex>1</ex></ph> </message> - <message name="IDS_LABEL_FOR_A_SECTION_SHOWING_SESSION_STORAGE" desc="Label for a section showing session storage."> - SESSION STORAGE + <message name="IDS_RUN_AUDITS_COMMAND" desc="Run audits command."> + Run + </message> + <message name="IDS_LABEL_FOR_SESSION_ONLY_STORAGE" desc="Label for session-only storage."> + Session Storage + </message> + <message name="IDS_TIME_SPENT_ON_SSL_INTERACTION" desc="Time spent on SSL interaction."> + SSL + </message> + <message name="IDS_SCHEDULE_REQUEST_TIMELINE_EVENT" desc="Schedule Request Timeline event."> + Schedule Request </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_SCOPE_VARIABLES" desc="Label for a section in the scope chain sidebar that shows scope variables."> Scope Variables </message> + <message name="IDS_EVALUATE_SCRIPT_TIMELINE_EVENT" desc="Evaluate script Timeline event."> + Script + </message> + <message name="IDS_SCRIPTING_EVENTS_CATEGORY_IN_TIMELINE" desc="Scripting events category in Timeline."> + Scripting + </message> + <message name="IDS_SHORTCUTS_SECTION_FOR_THE_SCRIPTS_PANEL" desc="Shortcuts section for the Scripts Panel."> + Scripts Panel + </message> <message name="IDS_LABEL_FOR_SCRIPTS_RESOURCE_SECTION" desc="Label for scripts resource section."> Scripts </message> <message name="IDS_LABEL_INDICATING_CURRENT_SEARCH" desc="Label indicating current search."> Search <ph name="STRING">%s<ex>foo</ex></ph> </message> + <message name="IDS_LABEL_FOR_SEARCH_SHORTCUT" desc="Label for search shortcut."> + Search + </message> + <message name="IDS_COOKIE_SECURITY_ATTRIBUTE" desc="Cookie security attribute."> + Secure + </message> + <message name="IDS_SELECT_ALL_AUDIT_RULES" desc="Select all audit rules."> + Select All + </message> <message name="IDS_HINT_THAT_ELEMENT_SHOULD_BE_SELECTED" desc="Hint that element should be selected."> Select an element in the page to inspect it. </message> + <message name="IDS_HINT_ABOUT_THE_NEED_OF_SELECTING_AUDITS_TO_RUN" desc="Hint about the need of selecting audits to run."> + Select audits to run + </message> + <message name="IDS_DISPLAY_EVENTS_LISTENERS_FOR_SELECTED_NODE_ONLY" desc="Display events listeners for selected node only."> + Selected Node Only + </message> + <message name="IDS_FUNCTION_SELF_EXECUTION_TIME" desc="Function self-execution time."> + Self Time + </message> <message name="IDS_LABEL_OF_A_GRID_COLUMN_SHOWING_FUNCTION_SELF_EXECUTION_TIME" desc="Label of a grid column showing function self execution time."> Self </message> + <message name="IDS_SEND_REQUEST_TIMELINE_EVENT" desc="Send Request Timeline event."> + Send Request + </message> + <message name="IDS_RESOURCE_SENDING_TIME" desc="Resource sending time."> + Sending + </message> + <message name="IDS_LABEL_FOR_A_SESSION_ONLY_COOKIE" desc="Label for a session-only cookie."> + Session + </message> + <message name="IDS_COMMAND_FOR_SHOWING_MORE_HTML_NODES" desc="Command for showing more HTML nodes."> + Show All Nodes (<ph name="COUNT">%d<ex>100</ex></ph> More) + </message> + <message name="IDS_SHOW_ABSOLUTE_COUNTS_AND_SIZES" desc="Show absolute (not percents) counts and sizes for JavaScript objects."> + Show absolute counts and sizes. + </message> <message name="IDS_LABEL_FOR_A_BUTTON_TOGGLING_SHOWING_OF_ABSOLUTE_TIMES" desc="Label for a button toggling showing of absolute times."> Show absolute total and self times. </message> @@ -474,6 +1032,9 @@ so we include the original license below: <message name="IDS_LABEL_FOR_A_BUTTON_THAT_SHOWS_CONSOLE" desc="Label for a button that shows console."> Show console. </message> + <message name="IDS_SHOW_JAVASCRIPT_OBJECTS_COUNTS_AND_SIZES_IN_PERCENTS" desc="Show JavaScript objects counts and sizes in percents."> + Show counts and sizes as percentages. + </message> <message name="IDS_LABEL_FOR_A_BUTTON_ENABLING_SHOWING_OF_INHERITED_STYLES" desc="Label for a button enabling showing of inherited styles."> Show inherited </message> @@ -483,46 +1044,58 @@ so we include the original license below: <message name="IDS_LABEL_FOR_A_BUTTON_THAT_SHOWS_THE_PREVIOUS_SCRIPT_RESOURCE" desc="Label for a button that shows the previous script resource."> Show the previous script resource. </message> + <message name="IDS_LABEL_FOR_A_TIMELINE_EVENTS_FILTER_BASED_ON_EVENTS_DURATION" desc="Label for a Timeline events filter based on events duration."> + Show the records that are shorter than <ph name="TIME">%s<ex>15 ms</ex></ph> + </message> <message name="IDS_LABEL_FOR_A_BUTTON_TOGGLING_SHOWING_TIMES_AS_PERCENTAGES" desc="Label for a button toggling showing times as percentages."> Show total and self times as percentages. </message> <message name="IDS_LABEL_FOR_A_RESOURCE_SIZE_GRAPH_1" desc="Label for a resource size graph."> Size </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_2" desc="Sort option for resources graph."> - Sort by Duration - </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_3" desc="Sort option for resources graph."> - Sort by End Time + <message name="IDS_HEAP_SNAPSHOT_TITLE" desc="Heap snapshot title."> + Snapshot <ph name="NUMBER">%d<ex>1</ex></ph> </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_4" desc="Sort option for resources graph."> - Sort by Latency + <message name="IDS_NETWORK_SORT_DURATION" desc="Network resources timeline sorting: by duration."> + Duration </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_5" desc="Sort option for resources graph."> - Sort by Response Time + <message name="IDS_NETWORK_SORT_END_TIME" desc="Network resources timeline sorting: by loading end time."> + End Time </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_6" desc="Sort option for resources graph."> - Sort by Size + <message name="IDS_NETWORK_SORT_LATENCY" desc="Network resources timeline sorting: by latency."> + Latency </message> - <message name="IDS_SORT_OPTION_FOR_RESOURCES_GRAPH_7" desc="Sort option for resources graph."> - Sort by Start Time + <message name="IDS_NETWORK_SORT_RESPONSE_TIME" desc="Network resources timeline sorting: by response time."> + Response Time </message> - <message name="IDS_LABEL_FOR_SCRIPT_SOURCE" desc="Label for script source."> - Source + <message name="IDS_NETWORK_SORT_START_TIME" desc="Network resources timeline sorting: by start time."> + Start Time </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_STARTS_PROFILING" desc="Label for a button that starts profiling."> Start profiling. </message> + <message name="IDS_RESOURCE_STATUS_CODE" desc="Resource loading status code."> + Status Code + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_STEPS_INTO_NEXT_FUNCTION_CALL" desc="Label for a button that steps into next function call."> Step into next function call. </message> + <message name="IDS_STEP_INTO_LABEL" desc="Label for a button that steps into next function call."> + Step into + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_STEPS_OUT_OF_CURRENT_FUNCTION" desc="Label for a button that steps out of current function."> Step out of current function. </message> + <message name="IDS_STEP_OUT_LABEL" desc="Label for a button that steps out of current function."> + Step out + </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_STEPS_OVER_NEXT_FUNCTION_CALL" desc="Label for a button that steps over next function call."> Step over next function call. </message> - <message name="IDS_HINT_FOR_A_PAUSE_BUTTON_IN_DEBUGGER,_INDICATING_THAT_DEBUGGER_IS_STEPPING_INTO_NEXT_STATEMENT" desc="Hint for a pause button in debugger, indicating that debugger is stepping into next statement."> + <message name="IDS_STEP_OVER_LABEL" desc="Label for a button that steps over next function call."> + Step over + </message> + <message name="IDS_HINT_FOR_A_PAUSE_BUTTON_IN_DEBUGGER_INDICATING_THAT_DEBUGGER_IS_STEPPING_INTO_NEXT_STATEMENT" desc="Hint for a pause button in debugger, indicating that debugger is stepping into next statement."> Stepping </message> <message name="IDS_LABEL_FOR_A_BUTTON_THAT_STOPS_PROFILING" desc="Label for a button that stops profiling."> @@ -531,30 +1104,69 @@ so we include the original license below: <message name="IDS_LABEL_FOR_STYLE_ATTRIBUTE" desc="Label for style attribute."> Style Attribute </message> + <message name="IDS_CSS_STYLES_SIDEBAR_PANE" desc="Label for CSS styles sidebar pane."> + Styles Pane + </message> <message name="IDS_LABEL_FOR_CSS_STYLES_SIDE_PANEL" desc="Label for CSS styles side panel."> Styles </message> + <message name="IDS_RESOURCE_STYLESHEET" desc="Resource type: stylesheet."> + Stylesheet + </message> <message name="IDS_LABEL_FOR_STYLESHEETS_RESOURCE_SECTION" desc="Label for stylesheets resource section."> Stylesheets </message> + <message name="IDS_BREAK_WHEN_SUBTREE_MODIFIED" desc="Breakpoint condition: DOM subtree modified."> + Subtree Modified + </message> + <message name="IDS_TAKE_HEAP_SNAPSHOT_COMMAND" desc="Command: take heap snapshot."> + Take heap snapshot. + </message> + <message name="IDS_BP_CONDITION" desc="Breakpoint condition"> + The breakpoint on line <ph name="LINE_NUMBER">%d<ex>15</ex></ph> will stop only if this expression is true: + </message> <message name="IDS_MESSAGE_INDICATING_THAT_DATABASE_TABLE_IS_EMPTY" desc="Message indicating that database table is empty."> The “<ph name="TABLE_NAME">%s<ex>foo</ex></ph>”\ntable is empty. </message> - <message name="IDS_MESSAGE_INDICATING_THAT_CURRENT_SITE_DOESN'T_HAVE_COOKIES" desc="Message indicating that current site doesn't have cookies."> + <message name="IDS_MESSAGE_INDICATING_THAT_CURRENT_SITE_DOES_NOT_HAVE_COOKIES" desc="Message indicating that current site doesn't have cookies."> This site has no cookies. </message> - <message name="IDS_MESSAGE_INDICATING_THAT_STORAGE_IS_EMPTY" desc="Message indicating that storage is empty."> - This storage is empty. + <message name="IDS_NO_TIMING_INFO" desc="Message that a request has no detailed timing info."> + This request has no detailed timing info. </message> <message name="IDS_LABEL_FOR_A_RESOURCE_TIME_GRAPH" desc="Label for a resource time graph."> Time </message> + <message name="IDS_RESOURCES_LOADING_TIMELINE" desc="Resources loading timeline graph label."> + Timeline + </message> + <message name="IDS_TIMELINES_LABEL" desc="Timelines view label."> + Timelines + </message> + <message name="IDS_TIMER_TIMEOUT" desc="Label for timer's timeout value."> + Timeout + </message> + <message name="IDS_TIMER_FIRED_BREAKPOINT" desc="Breakpoint when timer fires."> + Timer Fired + </message> + <message name="IDS_TIMER_ID" desc="Label for timer's ID."> + Timer ID + </message> + <message name="IDS_TIMING_TAB" desc="Label for resources timing tab."> + Timing + </message> + <message name="IDS_TOGGLE_CONSOLE" desc="Label for a button that toggles console visibility."> + Toggle console + </message> <message name="IDS_LABEL_OF_A_GRID_COLUMN_SHOWING_FUNCTION_TOTAL_EXECUTION_TIME" desc="Label of a grid column showing function total execution time."> Total </message> - <message name="IDS_LABEL_INDICATING_THAT_TOP-DOWN_(TREE)_PROFILE_IS_SHOWN" desc="Label indicating that top-down (tree) profile is shown."> + <message name="IDS_LABEL_INDICATING_THAT_TOP_DOWN_TREE_PROFILE_IS_SHOWN" desc="Label indicating that top-down (tree) profile is shown."> Tree (Top Down) </message> + <message name="IDS_RESOURCE_TYPE" desc="Network resource type."> + Type + </message> <message name="IDS_HINT_FOR_A_BUTTON_THAT_UNDOCKS_INSPECTOR_FROM_MAIN_WINDOW" desc="Hint for a button that undocks Inspector from main window."> Undock into separate window. </message> @@ -564,15 +1176,42 @@ so we include the original license below: <message name="IDS_HINT_FOR_A_BUTTON_THAT_TOGGLES_SHOWING_SMALL_RESOURCE_ROWS" desc="Hint for a button that toggles showing small resource rows."> Use small resource rows. </message> + <message name="IDS_USED_HEAP_SIZE" desc="Label for a value showing used JavaScript heap size."> + Used Heap Size + </message> <message name="IDS_LABEL_FOR_A_GRID_COLUMN_SHOWING_PROPERTY_VALUE" desc="Label for a grid column showing property value."> Value </message> + <message name="IDS_RESOURCE_WAITING_TIME" desc="Label for the resource loading wait time."> + Waiting + </message> + <message name="IDS_WARNINGS_FILTER" desc="Console filter for showing warnings."> + Warnings + </message> + <message name="IDS_WATCH_EXPRESSION" desc="Watch expressions sidebar pane."> + Watch Expressions + </message> + <message name="IDS_WELCOME_TO_PROFILES" desc="Welcome message for the profiles panel."> + Welcome to the Profiles panel + </message> <message name="IDS_LABEL_FOR_A_SECTION_IN_THE_SCOPE_CHAIN_SIDEBAR_THAT_SHOWS_WITH_BLOCK_VARIABLES" desc="Label for a section in the scope chain sidebar that shows with block variables."> With Block </message> + <message name="IDS_WORKERS_SIDEBAR" desc="Web Workers sidebar pane label."> + Workers + </message> + <message name="IDS_TIMELINE_XHR_LOAD" desc="Timeline XHR request load event."> + XHR Load + </message> + <message name="IDS_BP_ON_XHR_READY_STATE_CHANGE" desc="Break script execution on XHR ready state change."> + XHR Ready State Change + </message> <message name="IDS_LABEL_FOR_XHR_RESOURCE_SECTION" desc="Label for XHR resource section."> XHR </message> + <message name="IDS_XHR_LOGGING" desc="Enable logging of XHR requests in the Console."> + XMLHttpRequest logging + </message> <message name="IDS_HINT_MESSAGE_ABOUT_POTENTIAL_RESOURCES_COMPRESSION" desc="Hint message about potential resources compression."> You could save bandwidth by having your web server compress this transfer with gzip or zlib. </message> @@ -582,8 +1221,14 @@ so we include the original license below: <message name="IDS_HINT_MESSAGE_ABOUT_NEED_FOR_ENABLING_PROFILING" desc="Hint message about need for enabling profiling."> You need to enable profiling before you can use the Profiles panel. </message> - <message name="IDS_HINT_MESSAGE_ABOUT_NEED_FOR_ENABLING_RESOURCE_TRACKING" desc="Hint message about need for enabling resource tracking."> - You need to enable resource tracking to use this panel. + <message name="IDS_AUDITS_NO_DOMAIN" desc="A message if a domain is absent in audit rule."> + [empty domain] + </message> + <message name="IDS_COUNTS_DELTA" desc="Objects count delta column label."> + \xb1 Count + </message> + <message name="IDS_SIZES_DELTA" desc="Objects sizes delta column label."> + \xb1 Size </message> <message name="IDS_LABEL_FOR_A_BOX_SHOWING_HTML_ELEMENT_BORDER_SIZE" desc="Label for a box showing HTML element border size."> border @@ -591,20 +1236,8 @@ so we include the original license below: <message name="IDS_LABEL_FOR_A_BOX_SHOWING_HTML_ELEMENT_CONTENT_SIZE" desc="Label for a box showing HTML element content size."> content </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE" desc="Label for a resource type."> - document - </message> - <message name="IDS_LABEL_FOR_HTML_ELEMENT'S_ATTRIBUTE" desc="Label for HTML element's attribute."> - element’s “<ph name="NAME">%s<ex>width</ex></ph>” attribute - </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_1" desc="Label for a resource type."> - font - </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_2" desc="Label for a resource type."> - image - </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_3" desc="Label for a resource type."> - inline stylesheet + <message name="IDS_DELETED_OBJECT" desc="JavaScript object deleted."> + deleted </message> <message name="IDS_LABEL_FOR_LINE_POSITION" desc="Label for line position."> line <ph name="LINE_NUMBER">%d<ex>25</ex></ph> @@ -612,8 +1245,11 @@ so we include the original license below: <message name="IDS_LABEL_FOR_A_BOX_SHOWING_HTML_ELEMENT_MARGIN_SIZE" desc="Label for a box showing HTML element margin size."> margin </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_4" desc="Label for a resource type."> - other + <message name="IDS_NEW_OBJECT" desc="New JavaScript object label."> + new + </message> + <message name="IDS_ALTERNATIVE_SHORTCUT" desc="An alternative for keyboard shortcuts."> + or </message> <message name="IDS_LABEL_FOR_A_BOX_SHOWING_HTML_ELEMENT_PADDING_SIZE" desc="Label for a box showing HTML element padding size."> padding @@ -621,12 +1257,6 @@ so we include the original license below: <message name="IDS_LABEL_FOR_A_POSITION" desc="Label for a position."> position </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_5" desc="Label for a resource type."> - script - </message> - <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_6" desc="Label for a resource type."> - stylesheet - </message> <message name="IDS_LABEL_FOR_A_RESOURCE_TYPE_7" desc="Label for a resource type."> user agent stylesheet </message> @@ -636,6 +1266,162 @@ so we include the original license below: <message name="IDS_LABEL_VIA_INSPECTOR" desc="Label for a style attribute added via Inspector."> via inspector </message> + <message name="IDS_BP_ON_ATTRIBUTES_MODIFICATIONS" desc="Set breakpoint on DOM node attributes modifications."> + Break on Attributes Modifications + </message> + <message name="IDS_BP_ON_NODE_REMOVAL" desc="Set breakpoint on DOM node removal."> + Break on Node Removal + </message> + <message name="IDS_BP_ON_SUBTREE_MODIFICATIONS" desc="Set breakpoint on DOM node subtree modifications."> + Break on Subtree Modifications + </message> + <message name="IDS_LINK_TO_NODE" desc="Link to DOM node."> + <node> + </message> + <message name="IDS_PAUSED_ON_CHILD_ADDITION_TO_DESCENDANT" desc="Info message for a script break."> + Paused on a \"<ph name="BREAKPOINT">%1$s<ex>foo</ex></ph>\" breakpoint set on <ph name="NODE">%2$s<ex>div</ex></ph>, because a new child was added to its descendant <ph name="CHILD">%3$s<ex>span</ex></ph>. + </message> + <message name="IDS_PAUSED_ON_CHILD_ADDITION" desc="Info message for a script break."> + Paused on a \"<ph name="BREAKPOINT">%1$s<ex>foo</ex></ph>\" breakpoint set on <ph name="NODE">%2$s<ex>div</ex></ph>, because a new child was added to that node. + </message> + <message name="IDS_PAUSED_ON_CHILD_REMOVE" desc="Info message for a script break."> + Paused on a \"<ph name="BREAKPOINT">%1$s<ex>foo</ex></ph>\" breakpoint set on <ph name="NODE">%2$s<ex>div</ex></ph>, because its descendant <ph name="CHILD">%3$s<ex>span</ex></ph> was removed. + </message> + <message name="IDS_PAUSED_ON_BREAKPOINT" desc="Info message for a script break."> + Paused on a \"<ph name="NAME">%1$s<ex>foo</ex></ph>\" breakpoint set on <ph name="LOCATION">%2$s<ex>foo.js:25</ex></ph>. + </message> + <message name="IDS_PAUSED_ON_XHR" desc="Info message for a script break."> + Paused on a XMLHttpRequest. + </message> + <message name="IDS_PAUSED_ON_EVENT_LISTENER" desc="Info message for a script break."> + Paused on a \"<ph name="NAME">%s<ex>click</ex></ph>\" Event Listener. + </message> + <message name="IDS_PAUSED_ON_BREAKPOINT_2" desc="Info message for a script break."> + Paused on a JavaScript breakpoint. + </message> + <message name="IDS_XHR_BREAKPOINT_CONDITION" desc="XHR breakpoint condition."> + URL contains \"<ph name="SUBSTRING">%s<ex>google</ex></ph>\" + </message> + <message name="IDS_NETWORK_PANEL_LABEL" desc="Network panel label."> + Network + </message> + <message name="IDS_RESOURCE_STATUS" desc="Resource status column label."> + Status + </message> + <message name="IDS_RESOURCE_METHOD" desc="Resource retrieve method column label."> + Method + </message> + <message name="IDS_PENDING_RESOURCE" desc="Resource loading is pending."> + Pending + </message> + <message name="IDS_REQUESTS_STATS" desc="Request statistics."> + <ph name="COUNT">%d<ex>100</ex></ph> requests + </message> + <message name="IDS_BYTES_STATISTICS" desc="Bytes statistics."> + <ph name="BYTES">%s<ex>100KB</ex></ph> transferred + </message> + <message name="IDS_LOAD_TIMING" desc="Page loading timing."> + <ph name="TOTAL_TIME">%1$s<ex>5s</ex></ph> (onload: <ph name="ONLOAD_TIME">%2$s<ex>1s</ex></ph>, DOMContentLoaded: <ph name="DOMCONTENT_TIME">%3$s<ex>3s</ex></ph>) + </message> + <message name="IDS_DOM_BREAKPOINTS_SIDEBAR_PANE" desc="DOM Breakpoints sidebar pane title."> + DOM Breakpoints + </message> + <message name="IDS_EVENT_LISTENER_BREAKPOINTS_SIDEBAR_PANE" desc="Event Listeners breakpoints sidebar pane."> + Event Listener Breakpoints + </message> + <message name="IDS_XHR_BREAKPOINTS_SIDEBAR_PANE" desc="XHR Breakpoints sidebar pane."> + XHR Breakpoints + </message> + <message name="IDS_MOUSE_EVENTS" desc="Mouse events category title."> + Mouse + </message> + <message name="IDS_DRAG_EVENTS" desc="Drag events category title."> + Drag + </message> + <message name="IDS_KEYBOARD_EVENTS" desc="Keyboard events category title."> + Keyboard + </message> + <message name="IDS_CLIPBOARD_EVENTS" desc="Clipboard events category title."> + Clipboard + </message> + <message name="IDS_DOM_MUTATION_EVENTS" desc="DOM Mutation events category title."> + DOM Mutation + </message> + <message name="IDS_DEVICE_EVENTS" desc="Device events category title."> + Device + </message> + <message name="IDS_LOAD_EVENTS" desc="Load events category title."> + Load + </message> + <message name="IDS_CONTROL_EVENTS" desc="Control events category title."> + Control + </message> + <message name="IDS_TIMER_EVENTS" desc="Timer events category title."> + Timer + </message> + <message name="IDS_SET_TIMER_BREAKPOINT" desc="Breakpoint on setting a timer."> + Set Timer + </message> + <message name="IDS_CLEAR_TIMER_BREAKPOINT" desc="Breakpoint on clearing a timer."> + Clear Timer + </message> + <message name="IDS_NO_REQUESTS" desc="Help message describing that page reload is needed to capture network requests."> + No requests captured. Reload the page to see detailed information on the network activity. + </message> + <message name="IDS_PERSISTENT_FILE_SYSTEM" desc="Persistent file system storage."> + Persistent File System + </message> + <message name="IDS_TEMPORARY_FILE_SYSTEM" desc="Temporary file system storage."> + Temporary File System + </message> + <message name="IDS_NO_FILE_SYSTEM_ROOT" desc="Error message telling that the root path of the File System storage isn't available."> + File System root path not available. + </message> + <message name="IDS_FILE_SYSTEM_DISABLED" desc="Info message telling that File System storage is disabled."> + File System is disabled. + </message> + <message name="IDS_FILE_SYSTEM_ROOT_ERROR" desc="There was an error retrieving root path for the file system storage."> + Error in fetching root path for file system. + </message> + <message name="IDS_REVEAL_FOLDER" desc="A command to reveal a folder in OS file manager."> + Reveal folder in OS + </message> + <message name="IDS_NO_COOKIES" desc="Message telling that a request has no cookies data."> + This request has no cookies. + </message> + <message name="IDS_ORIGINAL_RESOURCE" desc="A label for a resource indicating that this is an original revision."> + (original) + </message> + <message name="IDS_COORDINATES" desc="On-screen coordinates"> + (<ph name="X">%1$d<ex>100</ex></ph>, <ph name="Y">%2$d<ex>100</ex></ph>) + </message> + <message name="IDS_REVERT_TO_REVISION" desc="Revert resource to specified revision."> + Revert to this revision + </message> + <message name="IDS_STORAGE_CATEGOTY_WEBSOCKETS" desc="Storage category: WebSockets."> + WebSockets + </message> + <message name="IDS_STORAGE_CATEGORY_FRAMES" desc="Storage category: Frames."> + Frames + </message> + <message name="IDS_RESPONSE_TEXT_COLUMN" desc="A subtitle for the column showing response text."> + Text + </message> + <message name="IDS_TRANSFER_SIZE" desc="A subtitle for the column showing response transfer size."> + Transfer + </message> + <message name="IDS_PRESERVE_LOG" desc="Preserve network log upon page navigation."> + Preserve Log upon Navigation + </message> + <message name="IDS_GO_TO_LINE_COMMAND" desc="Go to Line command."> + Go to Line + </message> + <message name="IDS_URL" desc="An abbreviation of Uniform Resource Locator."> + URL + </message> + <message name="IDS_FORMAT_SCRIPT_COMMAND" desc="A command to format script source."> + Format script. + </message> </messages> </release> </grit> diff --git a/webkit/glue/media/audio_decoder.cc b/webkit/glue/media/audio_decoder.cc index 3fc05c9..0a236d2 100644 --- a/webkit/glue/media/audio_decoder.cc +++ b/webkit/glue/media/audio_decoder.cc @@ -9,7 +9,7 @@ #include "base/string_util.h" #include "base/time.h" #include "media/filters/audio_file_reader.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAudioBus.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioBus.h" using media::AudioFileReader; using media::InMemoryDataReader; diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc index b6efa16..913d400 100644 --- a/webkit/glue/media/buffered_data_source.cc +++ b/webkit/glue/media/buffered_data_source.cc @@ -38,7 +38,6 @@ BufferedDataSource::BufferedDataSource( loaded_(false), streaming_(false), frame_(frame), - single_origin_(true), loader_(NULL), network_activity_(false), initialize_callback_(NULL), @@ -115,7 +114,7 @@ bool BufferedDataSource::IsUrlSupported(const std::string& url) { void BufferedDataSource::Stop(media::FilterCallback* callback) { { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); stop_signal_received_ = true; } if (callback) { @@ -137,9 +136,25 @@ void BufferedDataSource::SetPlaybackRate(float playback_rate) { // media::DataSource implementation. void BufferedDataSource::Read(int64 position, size_t size, uint8* data, media::DataSource::ReadCallback* read_callback) { + DCHECK(read_callback); + + { + base::AutoLock auto_lock(lock_); + DCHECK(!read_callback_.get()); + + if (stop_signal_received_ || stopped_on_render_loop_) { + read_callback->RunWithParams( + Tuple1<size_t>(static_cast<size_t>(media::DataSource::kReadError))); + delete read_callback; + return; + } + + read_callback_.reset(read_callback); + } + render_loop_->PostTask(FROM_HERE, NewRunnableMethod(this, &BufferedDataSource::ReadTask, - position, static_cast<int>(size), data, read_callback)); + position, static_cast<int>(size), data)); } bool BufferedDataSource::GetSize(int64* size_out) { @@ -157,16 +172,18 @@ bool BufferedDataSource::IsStreaming() { bool BufferedDataSource::HasSingleOrigin() { DCHECK(MessageLoop::current() == render_loop_); - return single_origin_; + return loader_.get() ? loader_->HasSingleOrigin() : true; } void BufferedDataSource::Abort() { DCHECK(MessageLoop::current() == render_loop_); - // If we are told to abort, immediately return from any pending read - // with an error. - if (read_callback_.get()) { - AutoLock auto_lock(lock_); + { + base::AutoLock auto_lock(lock_); + + // If we are told to abort, immediately return from any pending read + // with an error. + if (read_callback_.get()) DoneRead_Locked(net::ERR_FAILED); } @@ -212,19 +229,21 @@ void BufferedDataSource::InitializeTask() { } void BufferedDataSource::ReadTask( - int64 position, int read_size, uint8* buffer, - media::DataSource::ReadCallback* read_callback) { + int64 position, + int read_size, + uint8* buffer) { DCHECK(MessageLoop::current() == render_loop_); - if (stopped_on_render_loop_) - return; + { + base::AutoLock auto_lock(lock_); + if (stopped_on_render_loop_) + return; - DCHECK(!read_callback_.get()); - DCHECK(read_callback); + DCHECK(read_callback_.get()); + } // Saves the read parameters. read_position_ = position; read_size_ = read_size; - read_callback_.reset(read_callback); read_buffer_ = buffer; read_submitted_time_ = base::Time::Now(); read_attempts_ = 0; @@ -235,8 +254,14 @@ void BufferedDataSource::ReadTask( void BufferedDataSource::CleanupTask() { DCHECK(MessageLoop::current() == render_loop_); - if (stopped_on_render_loop_) - return; + + { + base::AutoLock auto_lock(lock_); + if (stopped_on_render_loop_) + return; + + read_callback_.reset(); + } // Stop the watch dog. watch_dog_timer_.Stop(); @@ -246,7 +271,6 @@ void BufferedDataSource::CleanupTask() { loader_->Stop(); // Reset the parameters of the current read request. - read_callback_.reset(); read_position_ = 0; read_size_ = 0; read_buffer_ = 0; @@ -262,9 +286,12 @@ void BufferedDataSource::RestartLoadingTask() { if (stopped_on_render_loop_) return; - // If there's no outstanding read then return early. - if (!read_callback_.get()) - return; + { + // If there's no outstanding read then return early. + base::AutoLock auto_lock(lock_); + if (!read_callback_.get()) + return; + } loader_ = CreateResourceLoader(read_position_, kPositionNotSpecified); loader_->SetAllowDefer(!media_is_paused_); @@ -280,8 +307,11 @@ void BufferedDataSource::WatchDogTask() { return; // We only care if there is an active read request. - if (!read_callback_.get()) - return; + { + base::AutoLock auto_lock(lock_); + if (!read_callback_.get()) + return; + } DCHECK(loader_.get()); base::TimeDelta delta = base::Time::Now() - read_submitted_time_; @@ -375,9 +405,6 @@ void BufferedDataSource::HttpInitialStartCallback(int error) { DCHECK(MessageLoop::current() == render_loop_); DCHECK(loader_.get()); - // Check if the request ended up at a different origin via redirect. - single_origin_ = url_.GetOrigin() == loader_->url().GetOrigin(); - int64 instance_size = loader_->instance_size(); bool partial_response = loader_->partial_response(); bool success = error == net::OK; @@ -414,7 +441,7 @@ void BufferedDataSource::HttpInitialStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -444,9 +471,6 @@ void BufferedDataSource::NonHttpInitialStartCallback(int error) { DCHECK(MessageLoop::current() == render_loop_); DCHECK(loader_.get()); - // Check if the request ended up at a different origin via redirect. - single_origin_ = url_.GetOrigin() == loader_->url().GetOrigin(); - int64 instance_size = loader_->instance_size(); bool success = error == net::OK && instance_size != kPositionNotSpecified; @@ -465,7 +489,7 @@ void BufferedDataSource::NonHttpInitialStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -504,7 +528,7 @@ void BufferedDataSource::PartialReadStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is // safe because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; DoneRead_Locked(net::ERR_INVALID_RESPONSE); @@ -534,7 +558,7 @@ void BufferedDataSource::ReadCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -570,7 +594,7 @@ void BufferedDataSource::NetworkEventCallback() { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h index 1c4e3fa..895b259 100644 --- a/webkit/glue/media/buffered_data_source.h +++ b/webkit/glue/media/buffered_data_source.h @@ -8,8 +8,8 @@ #include <string> #include "base/callback.h" -#include "base/lock.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "webkit/glue/media/buffered_resource_loader.h" namespace webkit_glue { @@ -62,8 +62,7 @@ class BufferedDataSource : public WebDataSource { void InitializeTask(); // Task posted to perform actual reading on the render thread. - void ReadTask(int64 position, int read_size, uint8* read_buffer, - media::DataSource::ReadCallback* read_callback); + void ReadTask(int64 position, int read_size, uint8* read_buffer); // Task posted when Stop() is called. Stops |watch_dog_timer_| and // |loader_|, reset Read() variables, and set |stopped_on_render_loop_| @@ -138,9 +137,6 @@ class BufferedDataSource : public WebDataSource { // A webframe for loading. WebKit::WebFrame* frame_; - // True if the media resource has a single origin. - bool single_origin_; - // A resource loader for the media resource. scoped_refptr<BufferedResourceLoader> loader_; @@ -175,7 +171,7 @@ class BufferedDataSource : public WebDataSource { MessageLoop* render_loop_; // Protects |stopped_|. - Lock lock_; + base::Lock lock_; // Stop signal to suppressing activities. This variable is set on the pipeline // thread and read from the render thread. diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc index dcb11ec..f370803 100644 --- a/webkit/glue/media/buffered_data_source_unittest.cc +++ b/webkit/glue/media/buffered_data_source_unittest.cc @@ -1,15 +1,16 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <algorithm> #include "base/test/test_timeouts.h" +#include "media/base/mock_callback.h" #include "media/base/mock_filter_host.h" #include "media/base/mock_filters.h" #include "net/base/net_errors.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/media/buffered_data_source.h" #include "webkit/mocks/mock_webframe.h" @@ -104,7 +105,6 @@ class BufferedDataSourceTest : public testing::Test { } virtual ~BufferedDataSourceTest() { - ignore_result(frame_.release()); } void ExpectCreateAndStartResourceLoader(int start_error) { @@ -167,7 +167,6 @@ class BufferedDataSourceTest : public testing::Test { ON_CALL(*loader_, Read(_, _, _ , _)) .WillByDefault(DeleteArg<3>()); - StrictMock<media::MockFilterCallback> callback; ON_CALL(*loader_, instance_size()) .WillByDefault(Return(instance_size)); ON_CALL(*loader_, partial_response()) @@ -188,18 +187,13 @@ class BufferedDataSourceTest : public testing::Test { } else { EXPECT_CALL(host_, SetStreaming(true)); } - - EXPECT_CALL(callback, OnFilterCallback()); - EXPECT_CALL(callback, OnCallbackDestroyed()); } else { EXPECT_CALL(host_, SetError(media::PIPELINE_ERROR_NETWORK)); EXPECT_CALL(*loader_, Stop()); - EXPECT_CALL(callback, OnFilterCallback()); - EXPECT_CALL(callback, OnCallbackDestroyed()); } // Actual initialization of the data source. - data_source_->Initialize(url, callback.NewCallback()); + data_source_->Initialize(url, media::NewExpectedCallback()); message_loop_->RunAllPending(); if (initialized_ok) { @@ -220,10 +214,7 @@ class BufferedDataSourceTest : public testing::Test { EXPECT_CALL(*loader_, Stop()); } - StrictMock<media::MockFilterCallback> callback; - EXPECT_CALL(callback, OnFilterCallback()); - EXPECT_CALL(callback, OnCallbackDestroyed()); - data_source_->Stop(callback.NewCallback()); + data_source_->Stop(media::NewExpectedCallback()); message_loop_->RunAllPending(); } @@ -501,4 +492,70 @@ TEST_F(BufferedDataSourceTest, FileHasLoadedState) { StopDataSource(); } +// This test makes sure that Stop() does not require a task to run on +// |message_loop_| before it calls its callback. This prevents accidental +// introduction of a pipeline teardown deadlock. The pipeline owner blocks +// the render message loop while waiting for Stop() to complete. Since this +// object runs on the render message loop, Stop() will not complete if it +// requires a task to run on the the message loop that is being blocked. +TEST_F(BufferedDataSourceTest, StopDoesNotUseMessageLoopForCallback) { + InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED); + + // Create a callback that lets us verify that it was called before + // Stop() returns. This is to make sure that the callback does not + // require |message_loop_| to execute tasks before being called. + media::MockCallback* stop_callback = media::NewExpectedCallback(); + bool stop_done_called = false; + ON_CALL(*stop_callback, RunWithParams(_)) + .WillByDefault(Assign(&stop_done_called, true)); + + // Stop() the data source like normal. + data_source_->Stop(stop_callback); + + // Verify that the callback was called inside the Stop() call. + EXPECT_TRUE(stop_done_called); + + message_loop_->RunAllPending(); +} + +TEST_F(BufferedDataSourceTest, AbortDuringPendingRead) { + InitializeDataSource(kFileUrl, net::OK, true, 1024, LOADED); + + // Setup a way to verify that Read() is not called on the loader. + // We are doing this to make sure that the ReadTask() is still on + // the message loop queue when Abort() is called. + bool read_called = false; + ON_CALL(*loader_, Read(_, _, _ , _)) + .WillByDefault(DoAll(Assign(&read_called, true), + DeleteArg<3>())); + + // Initiate a Read() on the data source, but don't allow the + // message loop to run. + data_source_->Read( + 0, 10, buffer_, + NewCallback(static_cast<BufferedDataSourceTest*>(this), + &BufferedDataSourceTest::ReadCallback)); + + // Call Abort() with the read pending. + EXPECT_CALL(*this, ReadCallback(-1)); + EXPECT_CALL(*loader_, Stop()); + data_source_->Abort(); + + // Verify that Read()'s after the Abort() issue callback with an error. + EXPECT_CALL(*this, ReadCallback(-1)); + data_source_->Read( + 0, 10, buffer_, + NewCallback(static_cast<BufferedDataSourceTest*>(this), + &BufferedDataSourceTest::ReadCallback)); + + // Stop() the data source like normal. + data_source_->Stop(media::NewExpectedCallback()); + + // Allow cleanup task to run. + message_loop_->RunAllPending(); + + // Verify that Read() was not called on the loader. + EXPECT_FALSE(read_called); +} + } // namespace webkit_glue diff --git a/webkit/glue/media/buffered_resource_loader.cc b/webkit/glue/media/buffered_resource_loader.cc index 61aac72..a86d2dd 100644 --- a/webkit/glue/media/buffered_resource_loader.cc +++ b/webkit/glue/media/buffered_resource_loader.cc @@ -7,10 +7,10 @@ #include "base/format_macros.h" #include "base/string_util.h" #include "net/base/net_errors.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" #include "webkit/glue/multipart_response_delegate.h" #include "webkit/glue/webkit_glue.h" @@ -61,6 +61,7 @@ BufferedResourceLoader::BufferedResourceLoader( url_(url), first_byte_position_(first_byte_position), last_byte_position_(last_byte_position), + single_origin_(true), start_callback_(NULL), offset_(0), content_length_(kPositionNotSpecified), @@ -255,6 +256,10 @@ void BufferedResourceLoader::willSendRequest( return; } + // Only allow |single_origin_| if we haven't seen a different origin yet. + if (single_origin_) + single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); + url_ = newRequest.url(); } @@ -425,6 +430,10 @@ void BufferedResourceLoader::didFail( Release(); } +bool BufferedResourceLoader::HasSingleOrigin() const { + return single_origin_; +} + ///////////////////////////////////////////////////////////////////////////// // Helper methods. void BufferedResourceLoader::EnableDeferIfNeeded() { diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h index 09b05e6..fe01fb4 100644 --- a/webkit/glue/media/buffered_resource_loader.h +++ b/webkit/glue/media/buffered_resource_loader.h @@ -8,16 +8,15 @@ #include <string> #include "base/callback.h" -#include "base/lock.h" #include "base/scoped_ptr.h" #include "base/timer.h" #include "googleurl/src/gurl.h" #include "media/base/seekable_buffer.h" #include "net/base/file_stream.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" #include "webkit/glue/media/web_data_source.h" #include "webkit/glue/webmediaplayer_impl.h" @@ -140,6 +139,8 @@ class BufferedResourceLoader : WebKit::WebURLLoader* loader, const WebKit::WebURLError&); + bool HasSingleOrigin() const; + protected: friend class base::RefCountedThreadSafe<BufferedResourceLoader>; @@ -213,6 +214,7 @@ class BufferedResourceLoader : GURL url_; int64 first_byte_position_; int64 last_byte_position_; + bool single_origin_; // Callback method that listens to network events. scoped_ptr<NetworkEventCallback> event_callback_; diff --git a/webkit/glue/media/buffered_resource_loader_unittest.cc b/webkit/glue/media/buffered_resource_loader_unittest.cc index 8e64c26..dc67edf 100644 --- a/webkit/glue/media/buffered_resource_loader_unittest.cc +++ b/webkit/glue/media/buffered_resource_loader_unittest.cc @@ -8,11 +8,11 @@ #include "base/stringprintf.h" #include "net/base/net_errors.h" #include "net/http/http_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/media/buffered_resource_loader.h" #include "webkit/mocks/mock_webframe.h" #include "webkit/mocks/mock_weburlloader.h" @@ -41,6 +41,11 @@ using WebKit::WebView; namespace { const char* kHttpUrl = "http://test"; +const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing"; +const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; +const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; +const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing"; + const int kDataSize = 1024; const int kHttpOK = 200; const int kHttpPartialContent = 206; @@ -67,14 +72,11 @@ ACTION_P(RequestCanceled, loader) { class BufferedResourceLoaderTest : public testing::Test { public: BufferedResourceLoaderTest() { - url_loader_ = new NiceMock<MockWebURLLoader>(); - for (int i = 0; i < kDataSize; ++i) data_[i] = i; } virtual ~BufferedResourceLoaderTest() { - ignore_result(frame_.release()); } void Initialize(const char* url, int first_position, int last_position) { @@ -84,6 +86,7 @@ class BufferedResourceLoaderTest : public testing::Test { frame_.reset(new NiceMock<MockWebFrame>()); + url_loader_ = new NiceMock<MockWebURLLoader>(); loader_ = new BufferedResourceLoader(gurl_, first_position_, last_position_); loader_->SetURLLoaderForTest(url_loader_); @@ -138,11 +141,22 @@ class BufferedResourceLoaderTest : public testing::Test { EXPECT_TRUE(loader_->partial_response()); } + void Redirect(const char* url) { + GURL redirectUrl(url); + WebKit::WebURLRequest newRequest(redirectUrl); + WebKit::WebURLResponse redirectResponse(gurl_); + + loader_->willSendRequest(url_loader_, newRequest, redirectResponse); + + MessageLoop::current()->RunAllPending(); + } + void StopWhenLoad() { InSequence s; EXPECT_CALL(*url_loader_, cancel()) .WillOnce(RequestCanceled(loader_)); loader_->Stop(); + loader_ = NULL; } // Helper method to write to |loader_| from |data_|. @@ -480,7 +494,64 @@ TEST_F(BufferedResourceLoaderTest, AllowDefer_DeferredReadPastWindow) { ReadLoader(20, 5, buffer); StopWhenLoad(); } + +// NOTE: This test will need to be reworked a little once +// http://code.google.com/p/chromium/issues/detail?id=72578 +// is fixed. +TEST_F(BufferedResourceLoaderTest, HasSingleOrigin) { + // Make sure no redirect case works as expected. + Initialize(kHttpUrl, -1, -1); + Start(); + FullResponse(1024); + EXPECT_TRUE(loader_->HasSingleOrigin()); + StopWhenLoad(); + + // Test redirect to the same domain. + Initialize(kHttpUrl, -1, -1); + Start(); + Redirect(kHttpRedirectToSameDomainUrl1); + FullResponse(1024); + EXPECT_TRUE(loader_->HasSingleOrigin()); + StopWhenLoad(); + + // Test redirect twice to the same domain. + Initialize(kHttpUrl, -1, -1); + Start(); + Redirect(kHttpRedirectToSameDomainUrl1); + Redirect(kHttpRedirectToSameDomainUrl2); + FullResponse(1024); + EXPECT_TRUE(loader_->HasSingleOrigin()); + StopWhenLoad(); + + // Test redirect to a different domain. + Initialize(kHttpUrl, -1, -1); + Start(); + Redirect(kHttpRedirectToDifferentDomainUrl1); + FullResponse(1024); + EXPECT_FALSE(loader_->HasSingleOrigin()); + StopWhenLoad(); + + // Test redirect twice to a different domain. + Initialize(kHttpUrl, -1, -1); + Start(); + Redirect(kHttpRedirectToDifferentDomainUrl1); + Redirect(kHttpRedirectToDifferentDomainUrl2); + FullResponse(1024); + EXPECT_FALSE(loader_->HasSingleOrigin()); + StopWhenLoad(); + + // Test to a different domain and then back to the same domain. + // NOTE: A different origin was encountered at least once so that + // makes HasSingleOrigin() become false. + Initialize(kHttpUrl, -1, -1); + Start(); + Redirect(kHttpRedirectToDifferentDomainUrl1); + Redirect(kHttpRedirectToSameDomainUrl1); + FullResponse(1024); + EXPECT_FALSE(loader_->HasSingleOrigin()); + StopWhenLoad(); +} + // TODO(hclam): add unit test for defer loading. } // namespace webkit_glue - diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc index 8869e28..07f7587 100644 --- a/webkit/glue/media/simple_data_source.cc +++ b/webkit/glue/media/simple_data_source.cc @@ -10,8 +10,8 @@ #include "net/base/data_url.h" #include "net/base/load_flags.h" #include "net/url_request/url_request_status.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" #include "webkit/glue/webkit_glue.h" namespace { @@ -35,12 +35,12 @@ SimpleDataSource::SimpleDataSource( } SimpleDataSource::~SimpleDataSource() { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK(state_ == UNINITIALIZED || state_ == STOPPED); } void SimpleDataSource::Stop(media::FilterCallback* callback) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); state_ = STOPPED; if (callback) { callback->Run(); @@ -54,7 +54,7 @@ void SimpleDataSource::Stop(media::FilterCallback* callback) { void SimpleDataSource::Initialize(const std::string& url, media::FilterCallback* callback) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK_EQ(state_, UNINITIALIZED); DCHECK(callback); state_ = INITIALIZING; @@ -113,7 +113,10 @@ void SimpleDataSource::willSendRequest( WebKit::WebURLRequest& newRequest, const WebKit::WebURLResponse& redirectResponse) { DCHECK(MessageLoop::current() == render_loop_); - single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); + + // Only allow |single_origin_| if we haven't seen a different origin yet. + if (single_origin_) + single_origin_ = url_.GetOrigin() == GURL(newRequest.url()).GetOrigin(); url_ = newRequest.url(); } @@ -157,7 +160,7 @@ void SimpleDataSource::didFinishLoading( WebKit::WebURLLoader* loader, double finishTime) { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // It's possible this gets called after Stop(), in which case |host_| is no // longer valid. if (state_ == STOPPED) @@ -179,7 +182,7 @@ void SimpleDataSource::didFail( WebKit::WebURLLoader* loader, const WebKit::WebURLError& error) { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // It's possible this gets called after Stop(), in which case |host_| is no // longer valid. if (state_ == STOPPED) @@ -217,7 +220,7 @@ void SimpleDataSource::SetURL(const GURL& url) { void SimpleDataSource::StartTask() { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // We may have stopped. if (state_ == STOPPED) @@ -253,7 +256,7 @@ void SimpleDataSource::StartTask() { void SimpleDataSource::CancelTask() { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK_EQ(state_, STOPPED); // Cancel any pending requests. diff --git a/webkit/glue/media/simple_data_source.h b/webkit/glue/media/simple_data_source.h index f4c83e6..10d93ff 100644 --- a/webkit/glue/media/simple_data_source.h +++ b/webkit/glue/media/simple_data_source.h @@ -16,11 +16,11 @@ #include "base/message_loop.h" #include "base/scoped_ptr.h" #include "media/base/filters.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/media/web_data_source.h" class MessageLoop; @@ -120,7 +120,7 @@ class SimpleDataSource : public WebDataSource, State state_; // Used for accessing |state_|. - Lock lock_; + base::Lock lock_; // Filter callbacks. scoped_ptr<media::FilterCallback> initialize_callback_; diff --git a/webkit/glue/media/simple_data_source_unittest.cc b/webkit/glue/media/simple_data_source_unittest.cc index 55dc913..a9a70a4 100644 --- a/webkit/glue/media/simple_data_source_unittest.cc +++ b/webkit/glue/media/simple_data_source_unittest.cc @@ -1,17 +1,17 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/callback.h" #include "media/base/filters.h" +#include "media/base/mock_callback.h" #include "media/base/mock_filter_host.h" #include "media/base/mock_filters.h" #include "net/base/net_errors.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/media/simple_data_source.h" #include "webkit/mocks/mock_webframe.h" #include "webkit/mocks/mock_weburlloader.h" @@ -42,6 +42,10 @@ const char kDataUrl[] = "data:text/plain;base64,YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXoK"; const char kDataUrlDecoded[] = "abcdefghijklmnopqrstuvwxyz"; const char kInvalidUrl[] = "whatever://test"; +const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing"; +const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2"; +const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2"; +const char kHttpRedirectToDifferentDomainUrl2[] = "http://test2/ing"; } // namespace @@ -56,10 +60,10 @@ class SimpleDataSourceTest : public testing::Test { } virtual ~SimpleDataSourceTest() { - ignore_result(frame_.release()); } - void InitializeDataSource(const char* url) { + void InitializeDataSource(const char* url, + media::MockCallback* callback) { gurl_ = GURL(url); frame_.reset(new NiceMock<MockWebFrame>()); @@ -72,9 +76,7 @@ class SimpleDataSourceTest : public testing::Test { data_source_->set_host(&host_); data_source_->SetURLLoaderForTest(url_loader_); - InSequence s; - - data_source_->Initialize(url, callback_.NewCallback()); + data_source_->Initialize(url, callback); MessageLoop::current()->RunAllPending(); } @@ -96,8 +98,6 @@ class SimpleDataSourceTest : public testing::Test { InSequence s; EXPECT_CALL(host_, SetTotalBytes(kDataSize)); EXPECT_CALL(host_, SetBufferedBytes(kDataSize)); - EXPECT_CALL(callback_, OnFilterCallback()); - EXPECT_CALL(callback_, OnCallbackDestroyed()); data_source_->didFinishLoading(NULL, 0); @@ -108,8 +108,6 @@ class SimpleDataSourceTest : public testing::Test { void RequestFailed() { InSequence s; EXPECT_CALL(host_, SetError(media::PIPELINE_ERROR_NETWORK)); - EXPECT_CALL(callback_, OnFilterCallback()); - EXPECT_CALL(callback_, OnCallbackDestroyed()); WebURLError error; error.reason = net::ERR_FAILED; @@ -119,12 +117,18 @@ class SimpleDataSourceTest : public testing::Test { MessageLoop::current()->RunAllPending(); } - void DestroyDataSource() { - StrictMock<media::MockFilterCallback> callback; - EXPECT_CALL(callback, OnFilterCallback()); - EXPECT_CALL(callback, OnCallbackDestroyed()); + void Redirect(const char* url) { + GURL redirectUrl(url); + WebKit::WebURLRequest newRequest(redirectUrl); + WebKit::WebURLResponse redirectResponse(gurl_); + + data_source_->willSendRequest(url_loader_, newRequest, redirectResponse); + + MessageLoop::current()->RunAllPending(); + } - data_source_->Stop(callback.NewCallback()); + void DestroyDataSource() { + data_source_->Stop(media::NewExpectedCallback()); MessageLoop::current()->RunAllPending(); data_source_ = NULL; @@ -150,7 +154,6 @@ class SimpleDataSourceTest : public testing::Test { NiceMock<MockWebURLLoader>* url_loader_; scoped_refptr<SimpleDataSource> data_source_; StrictMock<media::MockFilterHost> host_; - StrictMock<media::MockFilterCallback> callback_; scoped_ptr<NiceMock<MockWebFrame> > frame_; char data_[kDataSize]; @@ -159,19 +162,19 @@ class SimpleDataSourceTest : public testing::Test { }; TEST_F(SimpleDataSourceTest, InitializeHTTP) { - InitializeDataSource(kHttpUrl); + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); RequestSucceeded(false); DestroyDataSource(); } TEST_F(SimpleDataSourceTest, InitializeHTTPS) { - InitializeDataSource(kHttpsUrl); + InitializeDataSource(kHttpsUrl, media::NewExpectedCallback()); RequestSucceeded(false); DestroyDataSource(); } TEST_F(SimpleDataSourceTest, InitializeFile) { - InitializeDataSource(kFileUrl); + InitializeDataSource(kFileUrl, media::NewExpectedCallback()); RequestSucceeded(true); DestroyDataSource(); } @@ -191,34 +194,88 @@ TEST_F(SimpleDataSourceTest, InitializeData) { EXPECT_CALL(host_, SetLoaded(true)); EXPECT_CALL(host_, SetTotalBytes(sizeof(kDataUrlDecoded))); EXPECT_CALL(host_, SetBufferedBytes(sizeof(kDataUrlDecoded))); - EXPECT_CALL(callback_, OnFilterCallback()); - EXPECT_CALL(callback_, OnCallbackDestroyed()); - data_source_->Initialize(kDataUrl, callback_.NewCallback()); + data_source_->Initialize(kDataUrl, media::NewExpectedCallback()); MessageLoop::current()->RunAllPending(); DestroyDataSource(); } TEST_F(SimpleDataSourceTest, RequestFailed) { - InitializeDataSource(kHttpUrl); + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); RequestFailed(); DestroyDataSource(); } TEST_F(SimpleDataSourceTest, StopWhenDownloading) { - InitializeDataSource(kHttpUrl); + // The callback should be deleted, but not executed. + // TODO(scherkus): should this really be the behaviour? Seems strange... + StrictMock<media::MockCallback>* callback = + new StrictMock<media::MockCallback>(); + EXPECT_CALL(*callback, Destructor()); + + InitializeDataSource(kHttpUrl, callback); EXPECT_CALL(*url_loader_, cancel()); - EXPECT_CALL(callback_, OnCallbackDestroyed()); DestroyDataSource(); } TEST_F(SimpleDataSourceTest, AsyncRead) { - InitializeDataSource(kFileUrl); + InitializeDataSource(kFileUrl, media::NewExpectedCallback()); RequestSucceeded(true); AsyncRead(); DestroyDataSource(); } +// NOTE: This test will need to be reworked a little once +// http://code.google.com/p/chromium/issues/detail?id=72578 +// is fixed. +TEST_F(SimpleDataSourceTest, HasSingleOrigin) { + // Make sure no redirect case works as expected. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + RequestSucceeded(false); + EXPECT_TRUE(data_source_->HasSingleOrigin()); + DestroyDataSource(); + + // Test redirect to the same domain. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + Redirect(kHttpRedirectToSameDomainUrl1); + RequestSucceeded(false); + EXPECT_TRUE(data_source_->HasSingleOrigin()); + DestroyDataSource(); + + // Test redirect twice to the same domain. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + Redirect(kHttpRedirectToSameDomainUrl1); + Redirect(kHttpRedirectToSameDomainUrl2); + RequestSucceeded(false); + EXPECT_TRUE(data_source_->HasSingleOrigin()); + DestroyDataSource(); + + // Test redirect to a different domain. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + Redirect(kHttpRedirectToDifferentDomainUrl1); + RequestSucceeded(false); + EXPECT_FALSE(data_source_->HasSingleOrigin()); + DestroyDataSource(); + + // Test redirect twice to a different domain. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + Redirect(kHttpRedirectToDifferentDomainUrl1); + Redirect(kHttpRedirectToDifferentDomainUrl2); + RequestSucceeded(false); + EXPECT_FALSE(data_source_->HasSingleOrigin()); + DestroyDataSource(); + + // Test to a different domain and then back to the same domain. + // NOTE: A different origin was encountered at least once so that + // makes HasSingleOrigin() become false. + InitializeDataSource(kHttpUrl, media::NewExpectedCallback()); + Redirect(kHttpRedirectToDifferentDomainUrl1); + Redirect(kHttpRedirectToSameDomainUrl1); + RequestSucceeded(false); + EXPECT_FALSE(data_source_->HasSingleOrigin()); + DestroyDataSource(); +} + } // namespace webkit_glue diff --git a/webkit/glue/media/video_renderer_impl.h b/webkit/glue/media/video_renderer_impl.h index 34c67d3..b73c099 100644 --- a/webkit/glue/media/video_renderer_impl.h +++ b/webkit/glue/media/video_renderer_impl.h @@ -10,13 +10,13 @@ #ifndef WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ #define WEBKIT_GLUE_MEDIA_VIDEO_RENDERER_IMPL_H_ -#include "gfx/rect.h" -#include "gfx/size.h" #include "media/base/buffers.h" #include "media/base/filters.h" #include "media/filters/video_renderer_base.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" #include "webkit/glue/media/web_video_renderer.h" #include "webkit/glue/webmediaplayer_impl.h" diff --git a/webkit/glue/mimetype_unittest.cc b/webkit/glue/mimetype_unittest.cc index 3f17e79..00be1a5 100644 --- a/webkit/glue/mimetype_unittest.cc +++ b/webkit/glue/mimetype_unittest.cc @@ -5,9 +5,9 @@ #include <string> #include "base/string_util.h" -#include "net/url_request/url_request_unittest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "net/url_request/url_request_test_util.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/unittest_test_server.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/test_shell_test.h" diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc index b8c7758..d2c47d7 100644 --- a/webkit/glue/multipart_response_delegate.cc +++ b/webkit/glue/multipart_response_delegate.cc @@ -9,10 +9,10 @@ #include "base/string_util.h" #include "net/base/net_util.h" #include "net/http/http_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" using WebKit::WebHTTPHeaderVisitor; using WebKit::WebString; @@ -291,9 +291,8 @@ bool MultipartResponseDelegate::ReadMultipartBoundary( response.httpHeaderField(WebString::fromUTF8("Content-Type")).utf8(); size_t boundary_start_offset = content_type.find("boundary="); - if (boundary_start_offset == std::wstring::npos) { + if (boundary_start_offset == std::string::npos) return false; - } boundary_start_offset += strlen("boundary="); diff --git a/webkit/glue/multipart_response_delegate.h b/webkit/glue/multipart_response_delegate.h index 0500983..d4583bb 100644 --- a/webkit/glue/multipart_response_delegate.h +++ b/webkit/glue/multipart_response_delegate.h @@ -52,7 +52,7 @@ #include <string> #include "base/basictypes.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" namespace WebKit { class WebURLLoader; diff --git a/webkit/glue/multipart_response_delegate_unittest.cc b/webkit/glue/multipart_response_delegate_unittest.cc index 1837cb5..fbefaaa 100644 --- a/webkit/glue/multipart_response_delegate_unittest.cc +++ b/webkit/glue/multipart_response_delegate_unittest.cc @@ -5,10 +5,10 @@ #include <vector> #include "base/basictypes.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/multipart_response_delegate.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/webkit/glue/npruntime_util.cc b/webkit/glue/npruntime_util.cc index dfc3a2b..a408770 100644 --- a/webkit/glue/npruntime_util.cc +++ b/webkit/glue/npruntime_util.cc @@ -5,7 +5,7 @@ #include "webkit/glue/npruntime_util.h" #include "base/pickle.h" -#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" using WebKit::WebBindings; diff --git a/webkit/glue/password_form.h b/webkit/glue/password_form.h index c2967a4..e48420c 100644 --- a/webkit/glue/password_form.h +++ b/webkit/glue/password_form.h @@ -10,7 +10,7 @@ #include "base/time.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPasswordFormData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPasswordFormData.h" namespace webkit_glue { diff --git a/webkit/glue/password_form_dom_manager.cc b/webkit/glue/password_form_dom_manager.cc index 97f3eef..be4bc76 100644 --- a/webkit/glue/password_form_dom_manager.cc +++ b/webkit/glue/password_form_dom_manager.cc @@ -5,8 +5,8 @@ #include "webkit/glue/password_form_dom_manager.h" #include "base/logging.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPasswordFormData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPasswordFormData.h" #include "webkit/glue/form_field.h" using WebKit::WebFormElement; diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h index 111e8fa..580d8dd 100644 --- a/webkit/glue/plugins/plugin_list.h +++ b/webkit/glue/plugins/plugin_list.h @@ -18,7 +18,6 @@ namespace NPAPI { typedef webkit::npapi::PluginEntryPoints PluginEntryPoints; -typedef webkit::npapi::PluginVersionInfo PluginVersionInfo; class PluginList { public: diff --git a/webkit/glue/regular_expression_unittest.cc b/webkit/glue/regular_expression_unittest.cc index 39741f8..9713c39 100644 --- a/webkit/glue/regular_expression_unittest.cc +++ b/webkit/glue/regular_expression_unittest.cc @@ -3,9 +3,9 @@ // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRegularExpression.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebTextCaseSensitivity.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivity.h" using namespace WebKit; diff --git a/webkit/glue/resource_fetcher.cc b/webkit/glue/resource_fetcher.cc index 9b00805..39cc59c 100644 --- a/webkit/glue/resource_fetcher.cc +++ b/webkit/glue/resource_fetcher.cc @@ -5,13 +5,13 @@ #include "webkit/glue/resource_fetcher.h" #include "base/logging.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" using base::TimeDelta; using WebKit::WebFrame; @@ -25,8 +25,8 @@ namespace webkit_glue { ResourceFetcher::ResourceFetcher(const GURL& url, WebFrame* frame, Callback* c) : url_(url), - callback_(c), - completed_(false) { + completed_(false), + callback_(c) { // Can't do anything without a frame. However, delegate can be NULL (so we // can do a http request and ignore the results). DCHECK(frame); @@ -53,6 +53,18 @@ void ResourceFetcher::Start(WebFrame* frame) { loader_->loadAsynchronously(request, this); } +void ResourceFetcher::RunCallback(const WebURLResponse& response, + const std::string& data) { + if (!callback_.get()) + return; + + // Take care to clear callback_ before running the callback as it may lead to + // our destruction. + scoped_ptr<Callback> callback; + callback.swap(callback_); + callback->Run(response, data); +} + ///////////////////////////////////////////////////////////////////////////// // WebURLLoaderClient methods @@ -93,10 +105,7 @@ void ResourceFetcher::didFinishLoading( DCHECK(!completed_); completed_ = true; - if (callback_.get()) { - callback_->Run(response_, data_); - callback_.reset(); - } + RunCallback(response_, data_); } void ResourceFetcher::didFail(WebURLLoader* loader, const WebURLError& error) { @@ -104,10 +113,7 @@ void ResourceFetcher::didFail(WebURLLoader* loader, const WebURLError& error) { completed_ = true; // Go ahead and tell our delegate that we're done. - if (callback_.get()) { - callback_->Run(WebURLResponse(), std::string()); - callback_.reset(); - } + RunCallback(WebURLResponse(), std::string()); } ///////////////////////////////////////////////////////////////////////////// diff --git a/webkit/glue/resource_fetcher.h b/webkit/glue/resource_fetcher.h index ff00939..eb9411b 100644 --- a/webkit/glue/resource_fetcher.h +++ b/webkit/glue/resource_fetcher.h @@ -19,8 +19,8 @@ #include "base/scoped_ptr.h" #include "base/timer.h" #include "googleurl/src/gurl.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" class GURL; @@ -75,9 +75,6 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { // URL we're fetching GURL url_; - // Callback when we're done - scoped_ptr<Callback> callback_; - // A copy of the original resource response WebKit::WebURLResponse response_; @@ -88,6 +85,12 @@ class ResourceFetcher : public WebKit::WebURLLoaderClient { // Start the actual download. void Start(WebKit::WebFrame* frame); + void RunCallback(const WebKit::WebURLResponse& response, + const std::string& data); + + // Callback when we're done + scoped_ptr<Callback> callback_; + // Buffer to hold the content from the server. std::string data_; diff --git a/webkit/glue/resource_fetcher_unittest.cc b/webkit/glue/resource_fetcher_unittest.cc index 3ac004e..965d285 100644 --- a/webkit/glue/resource_fetcher_unittest.cc +++ b/webkit/glue/resource_fetcher_unittest.cc @@ -6,17 +6,14 @@ #include "base/callback.h" #include "base/message_loop.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "base/timer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/unittest_test_server.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_shell_test.h" -#if defined(TOOLKIT_USES_GTK) -#include <gtk/gtk.h> -#endif - using WebKit::WebFrame; using WebKit::WebURLResponse; using webkit_glue::ResourceFetcher; @@ -30,35 +27,34 @@ class ResourceFetcherTests : public TestShellTest { }; static const int kMaxWaitTimeMs = 5000; -static const int kWaitIntervalMs = 100; class FetcherDelegate { public: FetcherDelegate() - : timer_id_(0), completed_(false), time_elapsed_ms_(0) { + : completed_(false), + timed_out_(false) { // Start a repeating timer waiting for the download to complete. The // callback has to be a static function, so we hold on to our instance. FetcherDelegate::instance_ = this; - CreateTimer(kWaitIntervalMs); + StartTimer(); } ResourceFetcher::Callback* NewCallback() { return ::NewCallback(this, &FetcherDelegate::OnURLFetchComplete); } - void OnURLFetchComplete(const WebURLResponse& response, - const std::string& data) { + virtual void OnURLFetchComplete(const WebURLResponse& response, + const std::string& data) { response_ = response; data_ = data; completed_ = true; - DestroyTimer(); + timer_.Stop(); MessageLoop::current()->Quit(); } bool completed() const { return completed_; } - bool timed_out() const { return time_elapsed_ms_ > kMaxWaitTimeMs; } + bool timed_out() const { return timed_out_; } - int time_elapsed_ms() const { return time_elapsed_ms_; } std::string data() const { return data_; } const WebURLResponse& response() const { return response_; } @@ -70,78 +66,26 @@ class FetcherDelegate { MessageLoop::current()->Run(); } - void CreateTimer(int interval) { -#if defined(OS_WIN) - timer_id_ = ::SetTimer(NULL, NULL, interval, - &FetcherDelegate::TimerCallback); -#elif defined(TOOLKIT_USES_GTK) - timer_id_ = g_timeout_add(interval, &FetcherDelegate::TimerCallback, NULL); -#elif defined(OS_MACOSX) - // CFAbsoluteTime is in seconds and |interval| is in ms, so make sure we - // keep the units correct. - CFTimeInterval interval_in_seconds = static_cast<double>(interval) / 1000.0; - CFAbsoluteTime fire_date = - CFAbsoluteTimeGetCurrent() + interval_in_seconds; - timer_id_ = CFRunLoopTimerCreate(NULL, fire_date, interval_in_seconds, 0, - 0, FetcherDelegate::TimerCallback, NULL); - CFRunLoopAddTimer(CFRunLoopGetCurrent(), timer_id_, kCFRunLoopCommonModes); -#endif - } - - void DestroyTimer() { -#if defined(OS_WIN) - ::KillTimer(NULL, timer_id_); -#elif defined(TOOLKIT_USES_GTK) - g_source_remove(timer_id_); -#elif defined(OS_MACOSX) - CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), timer_id_, - kCFRunLoopCommonModes); - CFRelease(timer_id_); -#endif - } - -#if defined(OS_WIN) - // Static timer callback, just passes through to instance version. - static VOID CALLBACK TimerCallback(HWND hwnd, UINT msg, UINT_PTR timer_id, - DWORD ms) { - instance_->TimerFired(); - } -#elif defined(TOOLKIT_USES_GTK) - static gboolean TimerCallback(gpointer data) { - instance_->TimerFired(); - return true; - } -#elif defined(OS_MACOSX) - static void TimerCallback(CFRunLoopTimerRef timer, void* info) { - instance_->TimerFired(); + void StartTimer() { + timer_.Start(base::TimeDelta::FromMilliseconds(kMaxWaitTimeMs), + this, + &FetcherDelegate::TimerFired); } -#endif void TimerFired() { ASSERT_FALSE(completed_); - if (timed_out()) { - DestroyTimer(); - MessageLoop::current()->Quit(); - FAIL() << "fetch timed out"; - return; - } - - time_elapsed_ms_ += kWaitIntervalMs; + timed_out_ = true; + MessageLoop::current()->Quit(); + FAIL() << "fetch timed out"; } static FetcherDelegate* instance_; private: -#if defined(OS_WIN) - UINT_PTR timer_id_; -#elif defined(TOOLKIT_USES_GTK) - guint timer_id_; -#elif defined(OS_MACOSX) - CFRunLoopTimerRef timer_id_; -#endif + base::OneShotTimer<FetcherDelegate> timer_; bool completed_; - int time_elapsed_ms_; + bool timed_out_; WebURLResponse response_; std::string data_; }; @@ -198,7 +142,7 @@ TEST_F(ResourceFetcherTests, FLAKY_ResourceFetcherDidFail) { EXPECT_TRUE(delegate->completed()); EXPECT_TRUE(delegate->response().isNull()); EXPECT_EQ(delegate->data(), std::string()); - EXPECT_TRUE(delegate->time_elapsed_ms() < kMaxWaitTimeMs); + EXPECT_FALSE(delegate->timed_out()); } TEST_F(ResourceFetcherTests, ResourceFetcherTimeout) { @@ -220,7 +164,42 @@ TEST_F(ResourceFetcherTests, ResourceFetcherTimeout) { EXPECT_TRUE(delegate->completed()); EXPECT_TRUE(delegate->response().isNull()); EXPECT_EQ(delegate->data(), std::string()); - EXPECT_TRUE(delegate->time_elapsed_ms() < kMaxWaitTimeMs); + EXPECT_FALSE(delegate->timed_out()); +} + +class EvilFetcherDelegate : public FetcherDelegate { + public: + void SetFetcher(ResourceFetcher* fetcher) { + fetcher_.reset(fetcher); + } + + void OnURLFetchComplete(const WebURLResponse& response, + const std::string& data) { + // Destroy the ResourceFetcher here. We are testing that upon returning + // to the ResourceFetcher that it does not crash. + fetcher_.reset(); + FetcherDelegate::OnURLFetchComplete(response, data); + } + + private: + scoped_ptr<ResourceFetcher> fetcher_; +}; + +TEST_F(ResourceFetcherTests, ResourceFetcherDeletedInCallback) { + ASSERT_TRUE(test_server_.Start()); + + WebFrame* frame = test_shell_->webView()->mainFrame(); + + // Grab a page that takes at least 1 sec to respond, but set the fetcher to + // timeout in 0 sec. + GURL url(test_server_.GetURL("slow?1")); + scoped_ptr<EvilFetcherDelegate> delegate(new EvilFetcherDelegate); + scoped_ptr<ResourceFetcher> fetcher(new ResourceFetcherWithTimeout( + url, frame, 0, delegate->NewCallback())); + delegate->SetFetcher(fetcher.release()); + + delegate->WaitForResponse(); + EXPECT_FALSE(delegate->timed_out()); } } // namespace diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h index 85facfa..23ebb35 100644 --- a/webkit/glue/resource_loader_bridge.h +++ b/webkit/glue/resource_loader_bridge.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -248,7 +248,7 @@ class ResourceLoaderBridge { ~SyncLoadResponse(); // The response status. - URLRequestStatus status; + net::URLRequestStatus status; // The final URL of the response. This may differ from the request URL in // the case of a server redirect. diff --git a/webkit/glue/resources/linux-checkbox-disabled-indeterminate.png b/webkit/glue/resources/linux-checkbox-disabled-indeterminate.png Binary files differdeleted file mode 100644 index 171d001..0000000 --- a/webkit/glue/resources/linux-checkbox-disabled-indeterminate.png +++ /dev/null diff --git a/webkit/glue/resources/linux-checkbox-disabled-off.png b/webkit/glue/resources/linux-checkbox-disabled-off.png Binary files differdeleted file mode 100644 index c916674..0000000 --- a/webkit/glue/resources/linux-checkbox-disabled-off.png +++ /dev/null diff --git a/webkit/glue/resources/linux-checkbox-disabled-on.png b/webkit/glue/resources/linux-checkbox-disabled-on.png Binary files differdeleted file mode 100644 index d9ff1c6..0000000 --- a/webkit/glue/resources/linux-checkbox-disabled-on.png +++ /dev/null diff --git a/webkit/glue/resources/linux-checkbox-indeterminate.png b/webkit/glue/resources/linux-checkbox-indeterminate.png Binary files differdeleted file mode 100644 index dcde3c1..0000000 --- a/webkit/glue/resources/linux-checkbox-indeterminate.png +++ /dev/null diff --git a/webkit/glue/resources/linux-checkbox-off.png b/webkit/glue/resources/linux-checkbox-off.png Binary files differdeleted file mode 100644 index 15cc949..0000000 --- a/webkit/glue/resources/linux-checkbox-off.png +++ /dev/null diff --git a/webkit/glue/resources/linux-checkbox-on.png b/webkit/glue/resources/linux-checkbox-on.png Binary files differdeleted file mode 100644 index 4c72e8a..0000000 --- a/webkit/glue/resources/linux-checkbox-on.png +++ /dev/null diff --git a/webkit/glue/resources/linux-progress-bar.png b/webkit/glue/resources/linux-progress-bar.png Binary files differdeleted file mode 100644 index 82a20f5..0000000 --- a/webkit/glue/resources/linux-progress-bar.png +++ /dev/null diff --git a/webkit/glue/resources/linux-progress-border-left.png b/webkit/glue/resources/linux-progress-border-left.png Binary files differdeleted file mode 100644 index 0dd0e50..0000000 --- a/webkit/glue/resources/linux-progress-border-left.png +++ /dev/null diff --git a/webkit/glue/resources/linux-progress-border-right.png b/webkit/glue/resources/linux-progress-border-right.png Binary files differdeleted file mode 100644 index d351b11..0000000 --- a/webkit/glue/resources/linux-progress-border-right.png +++ /dev/null diff --git a/webkit/glue/resources/linux-progress-value.png b/webkit/glue/resources/linux-progress-value.png Binary files differdeleted file mode 100644 index 251917b..0000000 --- a/webkit/glue/resources/linux-progress-value.png +++ /dev/null diff --git a/webkit/glue/resources/linux-radio-disabled-off.png b/webkit/glue/resources/linux-radio-disabled-off.png Binary files differdeleted file mode 100644 index 97aa6f9..0000000 --- a/webkit/glue/resources/linux-radio-disabled-off.png +++ /dev/null diff --git a/webkit/glue/resources/linux-radio-disabled-on.png b/webkit/glue/resources/linux-radio-disabled-on.png Binary files differdeleted file mode 100644 index 07aed36..0000000 --- a/webkit/glue/resources/linux-radio-disabled-on.png +++ /dev/null diff --git a/webkit/glue/resources/linux-radio-off.png b/webkit/glue/resources/linux-radio-off.png Binary files differdeleted file mode 100644 index 6a60a70..0000000 --- a/webkit/glue/resources/linux-radio-off.png +++ /dev/null diff --git a/webkit/glue/resources/linux-radio-on.png b/webkit/glue/resources/linux-radio-on.png Binary files differdeleted file mode 100644 index cb47411..0000000 --- a/webkit/glue/resources/linux-radio-on.png +++ /dev/null diff --git a/webkit/glue/scoped_clipboard_writer_glue.h b/webkit/glue/scoped_clipboard_writer_glue.h index 7460ddf..13b96a3 100644 --- a/webkit/glue/scoped_clipboard_writer_glue.h +++ b/webkit/glue/scoped_clipboard_writer_glue.h @@ -5,7 +5,7 @@ #ifndef SCOPED_CLIPBOARD_WRITER_GLUE_H_ #define SCOPED_CLIPBOARD_WRITER_GLUE_H_ -#include "app/clipboard/scoped_clipboard_writer.h" +#include "ui/base/clipboard/scoped_clipboard_writer.h" class SkBitmap; @@ -13,10 +13,10 @@ namespace base { class SharedMemory; } -class ScopedClipboardWriterGlue : public ScopedClipboardWriter { +class ScopedClipboardWriterGlue : public ui::ScopedClipboardWriter { public: - ScopedClipboardWriterGlue(Clipboard* clipboard) - : ScopedClipboardWriter(clipboard), + ScopedClipboardWriterGlue(ui::Clipboard* clipboard) + : ui::ScopedClipboardWriter(clipboard), shared_buf_(NULL) { } diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc index d878867..b785be7 100644 --- a/webkit/glue/simple_webmimeregistry_impl.cc +++ b/webkit/glue/simple_webmimeregistry_impl.cc @@ -8,7 +8,7 @@ #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #include "net/base/mime_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebString; diff --git a/webkit/glue/simple_webmimeregistry_impl.h b/webkit/glue/simple_webmimeregistry_impl.h index f4f4d74..9796894 100644 --- a/webkit/glue/simple_webmimeregistry_impl.h +++ b/webkit/glue/simple_webmimeregistry_impl.h @@ -5,7 +5,7 @@ #ifndef WEBMIMEREGISTRY_IMPL_H_ #define WEBMIMEREGISTRY_IMPL_H_ -#include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMimeRegistry.h" namespace webkit_glue { diff --git a/webkit/glue/site_isolation_metrics.cc b/webkit/glue/site_isolation_metrics.cc index ecc1464..0dca500 100644 --- a/webkit/glue/site_isolation_metrics.cc +++ b/webkit/glue/site_isolation_metrics.cc @@ -9,12 +9,12 @@ #include "base/hash_tables.h" #include "base/metrics/histogram.h" #include "net/base/mime_sniffer.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" using WebKit::WebFrame; using WebKit::WebSecurityOrigin; diff --git a/webkit/glue/site_isolation_metrics.h b/webkit/glue/site_isolation_metrics.h index 53f1630..c2bd275 100644 --- a/webkit/glue/site_isolation_metrics.h +++ b/webkit/glue/site_isolation_metrics.h @@ -5,7 +5,7 @@ #ifndef WEBKIT_GLUE_SITE_ISOLATION_METRICS_H_ #define WEBKIT_GLUE_SITE_ISOLATION_METRICS_H_ -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" namespace WebKit { class WebFrame; diff --git a/webkit/glue/user_agent.cc b/webkit/glue/user_agent.cc index 4867c27..afd1c83 100644 --- a/webkit/glue/user_agent.cc +++ b/webkit/glue/user_agent.cc @@ -22,8 +22,14 @@ namespace webkit_glue { std::string GetProductVersion(); std::string GetWebKitVersion() { - return base::StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR, - WEBKIT_VERSION_MINOR); + return base::StringPrintf("%d.%d (%s)", + WEBKIT_VERSION_MAJOR, + WEBKIT_VERSION_MINOR, + WEBKIT_SVN_REVISION); +} + +std::string GetWebKitRevision() { + return WEBKIT_SVN_REVISION; } std::string BuildOSCpuInfo() { diff --git a/webkit/glue/user_agent.h b/webkit/glue/user_agent.h index 3d1f788..62c8324 100644 --- a/webkit/glue/user_agent.h +++ b/webkit/glue/user_agent.h @@ -19,7 +19,7 @@ void BuildUserAgent(bool mimic_windows, std::string* result); // Builds a User-agent compatible string that describes the OS and CPU type. std::string BuildOSCpuInfo(); -// Returns the WebKit version (major.minor). +// Returns the WebKit version, in the form "major.minor (branch@revision)". std::string GetWebKitVersion(); } // namespace webkit_glue diff --git a/webkit/glue/web_io_operators.cc b/webkit/glue/web_io_operators.cc index 9a53212..c053863 100644 --- a/webkit/glue/web_io_operators.cc +++ b/webkit/glue/web_io_operators.cc @@ -4,14 +4,14 @@ #include "webkit/glue/web_io_operators.h" -#include "gfx/point.h" -#include "gfx/rect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "ui/gfx/point.h" +#include "ui/gfx/rect.h" #if defined(WCHAR_T_IS_UTF32) #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #endif // defined(WCHAR_T_IS_UTF32) namespace WebKit { diff --git a/webkit/glue/webaccessibility.cc b/webkit/glue/webaccessibility.cc index c3ef261..b96266b 100644 --- a/webkit/glue/webaccessibility.cc +++ b/webkit/glue/webaccessibility.cc @@ -7,20 +7,20 @@ #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityCache.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityRole.h" -#include "third_party/WebKit/WebKit/chromium/public/WebAttribute.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocumentType.h" -#include "third_party/WebKit/WebKit/chromium/public/WebElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFormControlElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNamedNodeMap.h" -#include "third_party/WebKit/WebKit/chromium/public/WebNode.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityCache.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObject.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityRole.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAttribute.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocumentType.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNamedNodeMap.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" using WebKit::WebAccessibilityCache; using WebKit::WebAccessibilityRole; diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h index c073502..081d156 100644 --- a/webkit/glue/webaccessibility.h +++ b/webkit/glue/webaccessibility.h @@ -9,7 +9,7 @@ #include <vector> #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" namespace WebKit { class WebAccessibilityCache; diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc index 8e3f87b..b917677 100644 --- a/webkit/glue/webclipboard_impl.cc +++ b/webkit/glue/webclipboard_impl.cc @@ -1,21 +1,21 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #include "webkit/glue/webclipboard_impl.h" -#include "app/clipboard/clipboard.h" #include "base/logging.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "googleurl/src/gurl.h" #include "net/base/escape.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "ui/base/clipboard/clipboard.h" #include "webkit/glue/scoped_clipboard_writer_glue.h" #include "webkit/glue/webkit_glue.h" @@ -62,19 +62,19 @@ WebClipboardImpl::~WebClipboardImpl() { } bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) { - Clipboard::FormatType format_type; - Clipboard::Buffer buffer_type; + ui::Clipboard::FormatType format_type; + ui::Clipboard::Buffer buffer_type; switch (format) { case FormatHTML: - format_type = Clipboard::GetHtmlFormatType(); + format_type = ui::Clipboard::GetHtmlFormatType(); break; case FormatSmartPaste: - format_type = Clipboard::GetWebKitSmartPasteFormatType(); + format_type = ui::Clipboard::GetWebKitSmartPasteFormatType(); break; case FormatBookmark: #if defined(OS_WIN) || defined(OS_MACOSX) - format_type = Clipboard::GetUrlWFormatType(); + format_type = ui::Clipboard::GetUrlWFormatType(); break; #endif default: @@ -89,11 +89,11 @@ bool WebClipboardImpl::isFormatAvailable(Format format, Buffer buffer) { } WebString WebClipboardImpl::readPlainText(Buffer buffer) { - Clipboard::Buffer buffer_type; + ui::Clipboard::Buffer buffer_type; if (!ConvertBufferType(buffer, &buffer_type)) return WebString(); - if (ClipboardIsFormatAvailable(Clipboard::GetPlainTextWFormatType(), + if (ClipboardIsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), buffer_type)) { string16 text; ClipboardReadText(buffer_type, &text); @@ -101,7 +101,7 @@ WebString WebClipboardImpl::readPlainText(Buffer buffer) { return text; } - if (ClipboardIsFormatAvailable(Clipboard::GetPlainTextFormatType(), + if (ClipboardIsFormatAvailable(ui::Clipboard::GetPlainTextFormatType(), buffer_type)) { std::string text; ClipboardReadAsciiText(buffer_type, &text); @@ -113,7 +113,7 @@ WebString WebClipboardImpl::readPlainText(Buffer buffer) { } WebString WebClipboardImpl::readHTML(Buffer buffer, WebURL* source_url) { - Clipboard::Buffer buffer_type; + ui::Clipboard::Buffer buffer_type; if (!ConvertBufferType(buffer, &buffer_type)) return WebString(); @@ -145,7 +145,7 @@ void WebClipboardImpl::writeURL(const WebURL& url, const WebString& title) { scw.WriteBookmark(title, url.spec()); scw.WriteHTML(UTF8ToUTF16(URLToMarkup(url, title)), ""); - scw.WriteText(UTF8ToUTF16(url.spec())); + scw.WriteText(UTF8ToUTF16(std::string(url.spec()))); } void WebClipboardImpl::writeImage( @@ -172,13 +172,15 @@ void WebClipboardImpl::writeImage( } } -void WebClipboardImpl::writeData(const WebKit::WebDragData& data) { +void WebClipboardImpl::writeData(const WebString& type, + const WebString& data, + const WebString& metadata) { // TODO(dcheng): Implement this stub. } WebVector<WebString> WebClipboardImpl::readAvailableTypes( Buffer buffer, bool* contains_filenames) { - Clipboard::Buffer buffer_type; + ui::Clipboard::Buffer buffer_type; std::vector<string16> types; if (ConvertBufferType(buffer, &buffer_type)) { ClipboardReadAvailableTypes(buffer_type, &types, contains_filenames); @@ -188,7 +190,7 @@ WebVector<WebString> WebClipboardImpl::readAvailableTypes( bool WebClipboardImpl::readData(Buffer buffer, const WebString& type, WebString* data, WebString* metadata) { - Clipboard::Buffer buffer_type; + ui::Clipboard::Buffer buffer_type; if (!ConvertBufferType(buffer, &buffer_type)) return false; @@ -203,7 +205,7 @@ bool WebClipboardImpl::readData(Buffer buffer, const WebString& type, } WebVector<WebString> WebClipboardImpl::readFilenames(Buffer buffer) { - Clipboard::Buffer buffer_type; + ui::Clipboard::Buffer buffer_type; std::vector<string16> filenames; if (ConvertBufferType(buffer, &buffer_type)) { ClipboardReadFilenames(buffer_type, &filenames); @@ -212,16 +214,16 @@ WebVector<WebString> WebClipboardImpl::readFilenames(Buffer buffer) { } bool WebClipboardImpl::ConvertBufferType(Buffer buffer, - Clipboard::Buffer* result) { + ui::Clipboard::Buffer* result) { switch (buffer) { case BufferStandard: - *result = Clipboard::BUFFER_STANDARD; + *result = ui::Clipboard::BUFFER_STANDARD; break; case BufferDrag: - *result = Clipboard::BUFFER_DRAG; + *result = ui::Clipboard::BUFFER_DRAG; case BufferSelection: #if defined(USE_X11) - *result = Clipboard::BUFFER_SELECTION; + *result = ui::Clipboard::BUFFER_SELECTION; break; #endif default: diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h index 6a83a6d..ba3e747 100644 --- a/webkit/glue/webclipboard_impl.h +++ b/webkit/glue/webclipboard_impl.h @@ -1,12 +1,12 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #ifndef WEBCLIPBOARD_IMPL_H_ #define WEBCLIPBOARD_IMPL_H_ -#include "app/clipboard/clipboard.h" -#include "third_party/WebKit/WebKit/chromium/public/WebClipboard.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebClipboard.h" +#include "ui/base/clipboard/clipboard.h" #include <string> @@ -38,7 +38,10 @@ class WebClipboardImpl : public WebKit::WebClipboard { const WebKit::WebImage&, const WebKit::WebURL& source_url, const WebKit::WebString& title); - virtual void writeData(const WebKit::WebDragData&); + virtual void writeData( + const WebKit::WebString& type, + const WebKit::WebString& data, + const WebKit::WebString& metadata); virtual WebKit::WebVector<WebKit::WebString> readAvailableTypes( Buffer, bool* contains_filenames); @@ -47,7 +50,7 @@ class WebClipboardImpl : public WebKit::WebClipboard { virtual WebKit::WebVector<WebKit::WebString> readFilenames(Buffer); private: - bool ConvertBufferType(Buffer, Clipboard::Buffer*); + bool ConvertBufferType(Buffer, ui::Clipboard::Buffer*); }; } // namespace webkit_glue diff --git a/webkit/glue/webcursor.cc b/webkit/glue/webcursor.cc index fb67b6b..50a0bb6 100644 --- a/webkit/glue/webcursor.cc +++ b/webkit/glue/webcursor.cc @@ -6,8 +6,8 @@ #include "base/logging.h" #include "base/pickle.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" using WebKit::WebCursorInfo; using WebKit::WebImage; diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h index daad15f..8fb6b9f 100644 --- a/webkit/glue/webcursor.h +++ b/webkit/glue/webcursor.h @@ -6,9 +6,9 @@ #define WEBKIT_GLUE_WEBCURSOR_H_ #include "base/basictypes.h" -#include "gfx/native_widget_types.h" -#include "gfx/point.h" -#include "gfx/size.h" +#include "ui/gfx/native_widget_types.h" +#include "ui/gfx/point.h" +#include "ui/gfx/size.h" #include <vector> diff --git a/webkit/glue/webcursor_gtk.cc b/webkit/glue/webcursor_gtk.cc index 1ff8316..ca3555a 100644 --- a/webkit/glue/webcursor_gtk.cc +++ b/webkit/glue/webcursor_gtk.cc @@ -8,8 +8,8 @@ #include <gtk/gtk.h> #include "base/logging.h" -#include "gfx/gtk_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "ui/gfx/gtk_util.h" using WebKit::WebCursorInfo; diff --git a/webkit/glue/webcursor_mac.mm b/webkit/glue/webcursor_mac.mm index 4c3d69a..680521d 100644 --- a/webkit/glue/webcursor_mac.mm +++ b/webkit/glue/webcursor_mac.mm @@ -10,9 +10,9 @@ #include "app/mac/nsimage_cache.h" #include "base/logging.h" #include "base/mac/scoped_cftyperef.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" using WebKit::WebCursorInfo; using WebKit::WebImage; diff --git a/webkit/glue/webcursor_unittest.cc b/webkit/glue/webcursor_unittest.cc index f449515..eea7926 100644 --- a/webkit/glue/webcursor_unittest.cc +++ b/webkit/glue/webcursor_unittest.cc @@ -4,7 +4,7 @@ #include "base/pickle.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" #include "webkit/glue/webcursor.h" #include "webkit/tools/test_shell/test_shell_test.h" diff --git a/webkit/glue/webcursor_win.cc b/webkit/glue/webcursor_win.cc index 2141969..3399c7c 100644 --- a/webkit/glue/webcursor_win.cc +++ b/webkit/glue/webcursor_win.cc @@ -4,10 +4,10 @@ #include "base/logging.h" #include "base/pickle.h" -#include "gfx/gdi_util.h" #include "grit/webkit_resources.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" +#include "ui/gfx/gdi_util.h" #include "webkit/glue/webcursor.h" using WebKit::WebCursorInfo; diff --git a/webkit/glue/webdropdata.cc b/webkit/glue/webdropdata.cc index cda887d..02c1a4c 100644 --- a/webkit/glue/webdropdata.cc +++ b/webkit/glue/webdropdata.cc @@ -4,11 +4,11 @@ #include "webkit/glue/webdropdata.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" using WebKit::WebData; using WebKit::WebDragData; diff --git a/webkit/glue/webdropdata_win.cc b/webkit/glue/webdropdata_win.cc index bd76090..b550eb9 100644 --- a/webkit/glue/webdropdata_win.cc +++ b/webkit/glue/webdropdata_win.cc @@ -8,26 +8,26 @@ #include <shellapi.h> #include <shlobj.h> -#include "app/clipboard/clipboard_util_win.h" #include "googleurl/src/gurl.h" +#include "ui/base/clipboard/clipboard_util_win.h" // static void WebDropData::PopulateWebDropData(IDataObject* data_object, WebDropData* drop_data) { std::wstring url_str; - if (ClipboardUtil::GetUrl(data_object, &url_str, &drop_data->url_title, - false)) { + if (ui::ClipboardUtil::GetUrl(data_object, &url_str, &drop_data->url_title, + false)) { GURL test_url(url_str); if (test_url.is_valid()) drop_data->url = test_url; } - ClipboardUtil::GetFilenames(data_object, &drop_data->filenames); - ClipboardUtil::GetPlainText(data_object, &drop_data->plain_text); + ui::ClipboardUtil::GetFilenames(data_object, &drop_data->filenames); + ui::ClipboardUtil::GetPlainText(data_object, &drop_data->plain_text); std::string base_url; - ClipboardUtil::GetHtml(data_object, &drop_data->text_html, &base_url); + ui::ClipboardUtil::GetHtml(data_object, &drop_data->text_html, &base_url); if (!base_url.empty()) { drop_data->html_base_url = GURL(base_url); } - ClipboardUtil::GetFileContents(data_object, + ui::ClipboardUtil::GetFileContents(data_object, &drop_data->file_description_filename, &drop_data->file_contents); } diff --git a/webkit/glue/webfileutilities_impl.cc b/webkit/glue/webfileutilities_impl.cc index 6cea225..5aeeb05 100644 --- a/webkit/glue/webfileutilities_impl.cc +++ b/webkit/glue/webfileutilities_impl.cc @@ -9,8 +9,8 @@ #include "base/logging.h" #include "net/base/file_stream.h" #include "net/base/net_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebString; diff --git a/webkit/glue/webfileutilities_impl.h b/webkit/glue/webfileutilities_impl.h index c1ef986..14d7a42 100644 --- a/webkit/glue/webfileutilities_impl.h +++ b/webkit/glue/webfileutilities_impl.h @@ -6,7 +6,7 @@ #define WEBFILEUTILITIES_IMPL_H_ #include "base/platform_file.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileUtilities.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileUtilities.h" namespace webkit_glue { diff --git a/webkit/glue/webframe_unittest.cc b/webkit/glue/webframe_unittest.cc index 6ffaf84..abe13c3 100644 --- a/webkit/glue/webframe_unittest.cc +++ b/webkit/glue/webframe_unittest.cc @@ -5,11 +5,11 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_shell/test_shell_test.h" using WebKit::WebFrame; diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index fe3edd9..6d76c71 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -26,20 +26,20 @@ #include "skia/ext/skia_utils_mac.h" #endif #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebGlyphCache.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h" -#include "third_party/WebKit/WebKit/chromium/public/WebImage.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebGlyphCache.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebImage.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #if defined(OS_WIN) -#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h" #endif #include "webkit/glue/glue_serialize.h" #include "webkit/glue/user_agent.h" @@ -240,21 +240,6 @@ string16 DumpHistoryState(const std::string& history_state, int indent, is_current)); } -void ResetBeforeTestRun(WebView* view) { - WebFrame* web_frame = view->mainFrame(); - - // Reset the main frame name since tests always expect it to be empty. It - // is normally not reset between page loads (even in IE and FF). - if (web_frame) - web_frame->setName(WebString()); - -#if defined(OS_WIN) - // Reset the last click information so the clicks generated from previous - // test aren't inherited (otherwise can mistake single/double/triple clicks) - WebKit::WebInputEventFactory::resetLastClickState(); -#endif -} - #ifndef NDEBUG // The log macro was having problems due to collisions with WTF, so we just // code here what that would have inlined. diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index e64f667..4a3d03f 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -6,7 +6,7 @@ 'variables': { 'conditions': [ ['inside_chromium_build==0', { - 'webkit_src_dir': '../../../..', + 'webkit_src_dir': '../../../../..', },{ 'webkit_src_dir': '../../third_party/WebKit', }], @@ -45,7 +45,7 @@ { 'action_name': 'webkit_chromium_resources', 'variables': { - 'input_path': '<(webkit_src_dir)/WebKit/chromium/WebKit.grd', + 'input_path': '<(webkit_src_dir)/Source/WebKit/chromium/WebKit.grd', }, 'inputs': [ '<!@(<(grit_info_cmd) --inputs <(input_path))', @@ -120,13 +120,23 @@ { 'action_name': 'webkit_version', 'inputs': [ - '../build/webkit_version.py', - '<(webkit_src_dir)/Source/WebCore/Configurations/Version.xcconfig', + '<(script)', + '<(webkit_src_dir)<(version_file)', + '../../build/util/lastchange.py', # Used by the script. ], 'outputs': [ '<(INTERMEDIATE_DIR)/webkit_version.h', ], - 'action': ['python', '<@(_inputs)', '<(INTERMEDIATE_DIR)'], + 'action': ['python', '<(script)', '<(webkit_src_dir)', + '<(version_file)', '<(INTERMEDIATE_DIR)'], + 'variables': { + 'script': '../build/webkit_version.py', + # version_file is a relative path from |webkit_src_dir| to + # the version file. But gyp will eat the variable unless + # it looks like an absolute path, so write it like one and + # then use it carefully above. + 'version_file': '/Source/WebCore/Configurations/Version.xcconfig', + }, }, ], 'include_dirs': [ @@ -182,7 +192,6 @@ '../plugins/npapi/gtk_plugin_container_manager.h', '../plugins/npapi/npapi_extension_thunk.cc', '../plugins/npapi/npapi_extension_thunk.h', - '../plugins/npapi/nphostapi.h', '../plugins/npapi/plugin_constants_win.cc', '../plugins/npapi/plugin_constants_win.h', '../plugins/npapi/plugin_group.cc', @@ -212,7 +221,6 @@ '../plugins/npapi/plugin_string_stream.h', '../plugins/npapi/plugin_web_event_converter_mac.h', '../plugins/npapi/plugin_web_event_converter_mac.mm', - '../plugins/npapi/ppb_private.h', '../plugins/npapi/quickdraw_drawing_manager_mac.cc', '../plugins/npapi/quickdraw_drawing_manager_mac.h', '../plugins/npapi/webplugin.cc', @@ -288,6 +296,8 @@ '../plugins/ppapi/ppb_flash_impl.cc', '../plugins/ppapi/ppb_flash_impl.h', '../plugins/ppapi/ppb_flash_impl_linux.cc', + '../plugins/ppapi/ppb_flash_menu_impl.cc', + '../plugins/ppapi/ppb_flash_menu_impl.h', '../plugins/ppapi/ppb_font_impl.cc', '../plugins/ppapi/ppb_font_impl.h', '../plugins/ppapi/ppb_gles_chromium_texture_mapping_impl.cc', @@ -302,7 +312,6 @@ '../plugins/ppapi/ppb_nacl_private_impl.h', '../plugins/ppapi/ppb_opengles_impl.cc', '../plugins/ppapi/ppb_opengles_impl.h', - '../plugins/ppapi/ppb_pdf.h', '../plugins/ppapi/ppb_pdf_impl.cc', '../plugins/ppapi/ppb_pdf_impl.h', '../plugins/ppapi/ppb_scrollbar_impl.cc', @@ -415,6 +424,7 @@ 'webkitclient_impl.h', 'webmediaplayer_impl.h', 'webmediaplayer_impl.cc', + 'webmenuitem.cc', 'webmenuitem.h', 'webmenurunner_mac.h', 'webmenurunner_mac.mm', @@ -473,7 +483,7 @@ 'sources/': [['exclude', '_mac\\.(cc|mm)$']], 'sources!': [ 'webthemeengine_impl_mac.cc', - ], + ], }, { # else: OS=="mac" 'sources/': [['exclude', 'plugin_(lib|list)_posix\\.cc$']], 'link_settings': { @@ -513,11 +523,11 @@ 'conditions': [ ['inside_chromium_build==1 and component=="shared_library"', { 'dependencies': [ - '<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', + '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', ], 'export_dependent_settings': [ - '<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', + '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', ], }], @@ -531,4 +541,41 @@ ], }, ], + 'conditions': [ + ['use_third_party_translations==1', { + 'targets': [ + { + 'target_name': 'inspector_strings', + 'type': 'none', + 'variables': { + 'grit_out_dir': '<(PRODUCT_DIR)/resources/inspector/l10n', + }, + 'actions': [ + { + 'action_name': 'inspector_strings', + 'variables': { + 'input_path': './inspector_strings.grd', + }, + 'inputs': [ + '<!@(<(grit_info_cmd) --inputs <(input_path))', + ], + 'outputs': [ + '<!@(<(grit_info_cmd) --outputs \'<(grit_out_dir)\' <(input_path))', + ], + 'action': ['<@(grit_cmd)', + '-i', '<(input_path)', 'build', + '-o', '<(grit_out_dir)', + '<@(grit_defines)'], + 'message': 'Generating resources from <(input_path)', + }, + ], + 'conditions': [ + ['OS=="win"', { + 'dependencies': ['<(DEPTH)/build/win/system.gyp:cygwin'], + }], + ], + }, + ], + }], + ], } diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 38ea659..5df2aea 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -14,12 +14,12 @@ #include <string> #include <vector> -#include "app/clipboard/clipboard.h" #include "base/file_path.h" #include "base/platform_file.h" #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" +#include "ui/base/clipboard/clipboard.h" class GURL; class SkBitmap; @@ -90,9 +90,6 @@ string16 DumpFrameScrollPosition(WebKit::WebFrame* web_frame, bool recursive); string16 DumpHistoryState(const std::string& history_state, int indent, bool is_current); -// Cleans up state left over from the previous test run. -void ResetBeforeTestRun(WebKit::WebView* view); - // Returns the WebKit version (major.minor). std::string GetWebKitVersion(); @@ -189,32 +186,33 @@ HCURSOR LoadCursor(int cursor_id); // Glue to access the clipboard. // Get a clipboard that can be used to construct a ScopedClipboardWriterGlue. -Clipboard* ClipboardGetClipboard(); +ui::Clipboard* ClipboardGetClipboard(); // Tests whether the clipboard contains a certain format -bool ClipboardIsFormatAvailable(const Clipboard::FormatType& format, - Clipboard::Buffer buffer); +bool ClipboardIsFormatAvailable(const ui::Clipboard::FormatType& format, + ui::Clipboard::Buffer buffer); // Reads UNICODE text from the clipboard, if available. -void ClipboardReadText(Clipboard::Buffer buffer, string16* result); +void ClipboardReadText(ui::Clipboard::Buffer buffer, string16* result); // Reads ASCII text from the clipboard, if available. -void ClipboardReadAsciiText(Clipboard::Buffer buffer, std::string* result); +void ClipboardReadAsciiText(ui::Clipboard::Buffer buffer, std::string* result); // Reads HTML from the clipboard, if available. -void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url); +void ClipboardReadHTML(ui::Clipboard::Buffer buffer, string16* markup, + GURL* url); // Reads the available types from the clipboard, if available. -bool ClipboardReadAvailableTypes(Clipboard::Buffer buffer, +bool ClipboardReadAvailableTypes(ui::Clipboard::Buffer buffer, std::vector<string16>* types, bool* contains_filenames); // Reads one type of data from the clipboard, if available. -bool ClipboardReadData(Clipboard::Buffer buffer, const string16& type, +bool ClipboardReadData(ui::Clipboard::Buffer buffer, const string16& type, string16* data, string16* metadata); // Reads filenames from the clipboard, if available. -bool ClipboardReadFilenames(Clipboard::Buffer buffer, +bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer, std::vector<string16>* filenames); // Gets the directory where the application data and libraries exist. This diff --git a/webkit/glue/webkit_resources.grd b/webkit/glue/webkit_resources.grd index 94d4286..a11dae9 100644 --- a/webkit/glue/webkit_resources.grd +++ b/webkit/glue/webkit_resources.grd @@ -64,7 +64,7 @@ <include name="IDR_PDF_BUTTON_ZOOMIN_PRESSED" file="resources\pdf_button_zoomin_pressed.png" type="BINDATA" /> <include name="IDR_PDF_BUTTON_ZOOMOUT" file="resources\pdf_button_zoomout.png" type="BINDATA" /> <include name="IDR_PDF_BUTTON_ZOOMOUT_HOVER" file="resources\pdf_button_zoomout_hover.png" type="BINDATA" /> - <include name="IDR_PDF_BUTTON_ZOOMOUT_PRESSED" file="resources\pdf_button_zoomout_pressed.png" type="BINDATA" /> + <include name="IDR_PDF_BUTTON_ZOOMOUT_PRESSED" file="resources\pdf_button_zoomout_pressed.png" type="BINDATA" /> <include name="IDR_PDF_THUMBNAIL_0" file="resources\pdf_thumbnail_0.png" type="BINDATA" /> <include name="IDR_PDF_THUMBNAIL_1" file="resources\pdf_thumbnail_1.png" type="BINDATA" /> <include name="IDR_PDF_THUMBNAIL_2" file="resources\pdf_thumbnail_2.png" type="BINDATA" /> @@ -76,23 +76,6 @@ <include name="IDR_PDF_THUMBNAIL_8" file="resources\pdf_thumbnail_8.png" type="BINDATA" /> <include name="IDR_PDF_THUMBNAIL_9" file="resources\pdf_thumbnail_9.png" type="BINDATA" /> <include name="IDR_PDF_THUMBNAIL_NUM_BACKGROUND" file="resources\pdf_thumbnail_num_background.png" type="BINDATA" /> - - <if expr="os == 'linux2' or os.find('bsd') != -1 or os == 'sunos5'"> - <include name="IDR_LINUX_CHECKBOX_DISABLED_INDETERMINATE" file="resources\linux-checkbox-disabled-indeterminate.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_DISABLED_OFF" file="resources\linux-checkbox-disabled-off.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_DISABLED_ON" file="resources\linux-checkbox-disabled-on.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_INDETERMINATE" file="resources\linux-checkbox-indeterminate.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_OFF" file="resources\linux-checkbox-off.png" type="BINDATA" /> - <include name="IDR_LINUX_CHECKBOX_ON" file="resources\linux-checkbox-on.png" type="BINDATA" /> - <include name="IDR_LINUX_RADIO_DISABLED_OFF" file="resources\linux-radio-disabled-off.png" type="BINDATA" /> - <include name="IDR_LINUX_RADIO_DISABLED_ON" file="resources\linux-radio-disabled-on.png" type="BINDATA" /> - <include name="IDR_LINUX_RADIO_OFF" file="resources\linux-radio-off.png" type="BINDATA" /> - <include name="IDR_LINUX_RADIO_ON" file="resources\linux-radio-on.png" type="BINDATA" /> - <include name="IDR_PROGRESS_BAR" file="resources\linux-progress-bar.png" type="BINDATA" /> - <include name="IDR_PROGRESS_BORDER_LEFT" file="resources\linux-progress-border-left.png" type="BINDATA" /> - <include name="IDR_PROGRESS_BORDER_RIGHT" file="resources\linux-progress-border-right.png" type="BINDATA" /> - <include name="IDR_PROGRESS_VALUE" file="resources\linux-progress-value.png" type="BINDATA" /> - </if> </includes> </release> </grit> diff --git a/webkit/glue/webkit_strings.grd b/webkit/glue/webkit_strings.grd index 651acf0..ae88dc9 100644 --- a/webkit/glue/webkit_strings.grd +++ b/webkit/glue/webkit_strings.grd @@ -102,6 +102,9 @@ below: <output filename="webkit_strings_am.pak" type="data_package" lang="am" /> <output filename="webkit_strings_ar.pak" type="data_package" lang="ar" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_ast.pak" type="data_package" lang="ast" /> + </if> <output filename="webkit_strings_bg.pak" type="data_package" lang="bg" /> <output filename="webkit_strings_bn.pak" type="data_package" lang="bn" /> <output filename="webkit_strings_ca.pak" type="data_package" lang="ca" /> @@ -114,10 +117,16 @@ below: <output filename="webkit_strings_es.pak" type="data_package" lang="es" /> <output filename="webkit_strings_es-419.pak" type="data_package" lang="es-419" /> <output filename="webkit_strings_et.pak" type="data_package" lang="et" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_eu.pak" type="data_package" lang="eu" /> + </if> <output filename="webkit_strings_fa.pak" type="data_package" lang="fa" /> <output filename="webkit_strings_fi.pak" type="data_package" lang="fi" /> <output filename="webkit_strings_fil.pak" type="data_package" lang="fil" /> <output filename="webkit_strings_fr.pak" type="data_package" lang="fr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_gl.pak" type="data_package" lang="gl" /> + </if> <output filename="webkit_strings_gu.pak" type="data_package" lang="gu" /> <output filename="webkit_strings_he.pak" type="data_package" lang="he" /> <output filename="webkit_strings_hi.pak" type="data_package" lang="hi" /> @@ -126,8 +135,14 @@ below: <output filename="webkit_strings_id.pak" type="data_package" lang="id" /> <output filename="webkit_strings_it.pak" type="data_package" lang="it" /> <output filename="webkit_strings_ja.pak" type="data_package" lang="ja" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_ka.pak" type="data_package" lang="ka" /> + </if> <output filename="webkit_strings_kn.pak" type="data_package" lang="kn" /> <output filename="webkit_strings_ko.pak" type="data_package" lang="ko" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_ku.pak" type="data_package" lang="ku" /> + </if> <output filename="webkit_strings_lt.pak" type="data_package" lang="lt" /> <output filename="webkit_strings_lv.pak" type="data_package" lang="lv" /> <output filename="webkit_strings_ml.pak" type="data_package" lang="ml" /> @@ -150,6 +165,9 @@ below: <output filename="webkit_strings_te.pak" type="data_package" lang="te" /> <output filename="webkit_strings_th.pak" type="data_package" lang="th" /> <output filename="webkit_strings_tr.pak" type="data_package" lang="tr" /> + <if expr="pp_ifdef('use_third_party_translations')"> + <output filename="webkit_strings_ug.pak" type="data_package" lang="ug" /> + </if> <output filename="webkit_strings_uk.pak" type="data_package" lang="uk" /> <output filename="webkit_strings_vi.pak" type="data_package" lang="vi" /> <output filename="webkit_strings_zh-CN.pak" type="data_package" lang="zh-CN" /> @@ -158,6 +176,7 @@ below: <translations> <file path="resources/webkit_strings_am.xtb" lang="am" /> <file path="resources/webkit_strings_ar.xtb" lang="ar" /> + <file path="../../third_party/launchpad_translations/webkit_strings_ast.xtb" lang="ast" /> <file path="resources/webkit_strings_bg.xtb" lang="bg" /> <file path="resources/webkit_strings_bn.xtb" lang="bn" /> <file path="resources/webkit_strings_ca.xtb" lang="ca" /> @@ -169,10 +188,12 @@ below: <file path="resources/webkit_strings_es.xtb" lang="es" /> <file path="resources/webkit_strings_es-419.xtb" lang="es-419" /> <file path="resources/webkit_strings_et.xtb" lang="et" /> + <file path="../../third_party/launchpad_translations/webkit_strings_eu.xtb" lang="eu" /> <file path="resources/webkit_strings_fa.xtb" lang="fa" /> <file path="resources/webkit_strings_fi.xtb" lang="fi" /> <file path="resources/webkit_strings_fil.xtb" lang="fil" /> <file path="resources/webkit_strings_fr.xtb" lang="fr" /> + <file path="../../third_party/launchpad_translations/webkit_strings_gl.xtb" lang="gl" /> <file path="resources/webkit_strings_gu.xtb" lang="gu" /> <file path="resources/webkit_strings_hi.xtb" lang="hi" /> <file path="resources/webkit_strings_hr.xtb" lang="hr" /> @@ -184,6 +205,7 @@ below: <file path="resources/webkit_strings_ja.xtb" lang="ja" /> <file path="resources/webkit_strings_kn.xtb" lang="kn" /> <file path="resources/webkit_strings_ko.xtb" lang="ko" /> + <file path="../../third_party/launchpad_translations/webkit_strings_ku.xtb" lang="ku" /> <file path="resources/webkit_strings_lt.xtb" lang="lt" /> <file path="resources/webkit_strings_lv.xtb" lang="lv" /> <file path="resources/webkit_strings_ml.xtb" lang="ml" /> @@ -204,6 +226,7 @@ below: <file path="resources/webkit_strings_te.xtb" lang="te" /> <file path="resources/webkit_strings_th.xtb" lang="th" /> <file path="resources/webkit_strings_tr.xtb" lang="tr" /> + <file path="../../third_party/launchpad_translations/webkit_strings_ug.xtb" lang="ug" /> <file path="resources/webkit_strings_uk.xtb" lang="uk" /> <file path="resources/webkit_strings_vi.xtb" lang="vi" /> <file path="resources/webkit_strings_zh-CN.xtb" lang="zh-CN" /> diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index faf2926..701d5c3 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -13,7 +13,6 @@ #include <vector> #include "base/debug/trace_event.h" -#include "base/lock.h" #include "base/message_loop.h" #include "base/metrics/stats_counters.h" #include "base/metrics/histogram.h" @@ -22,18 +21,20 @@ #include "base/singleton.h" #include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/synchronization/lock.h" #include "base/time.h" #include "base/utf_string_conversions.h" +#include "grit/webkit_chromium_resources.h" #include "grit/webkit_resources.h" #include "grit/webkit_strings.h" -#include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h" -#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVector.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCookie.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginListBuilder.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "webkit/glue/media/audio_decoder.h" #include "webkit/plugins/npapi/plugin_instance.h" #include "webkit/plugins/npapi/webplugininfo.h" @@ -78,7 +79,7 @@ class MemoryUsageCache { // Returns true if the cached value is fresh. // Returns false if the cached value is stale, or if |cached_value| is NULL. bool IsCachedValueValid(size_t* cached_value) { - AutoLock scoped_lock(lock_); + base::AutoLock scoped_lock(lock_); if (!cached_value) return false; if (base::Time::Now() - last_updated_time_ > cache_valid_time_) @@ -89,7 +90,7 @@ class MemoryUsageCache { // Setter for |memory_value_|, refreshes |last_updated_time_|. void SetMemoryValue(const size_t value) { - AutoLock scoped_lock(lock_); + base::AutoLock scoped_lock(lock_); memory_value_ = value; last_updated_time_ = base::Time::Now(); } @@ -104,7 +105,7 @@ class MemoryUsageCache { // The last time the cached value was updated. base::Time last_updated_time_; - Lock lock_; + base::Lock lock_; }; } // anonymous namespace @@ -291,6 +292,59 @@ void WebKitClientImpl::traceEventEnd(const char* name, void* id, TRACE_EVENT_END(name, id, extra); } +namespace { + +WebData loadAudioSpatializationResource(const char* name) { +#ifdef IDR_AUDIO_SPATIALIZATION_T000_P000 + const size_t kExpectedSpatializationNameLength = 31; + if (strlen(name) != kExpectedSpatializationNameLength) { + return WebData(); + } + + // Extract the azimuth and elevation from the resource name. + int azimuth = 0; + int elevation = 0; + int values_parsed = + sscanf(name, "IRC_Composite_C_R0195_T%3d_P%3d", &azimuth, &elevation); + if (values_parsed != 2) { + return WebData(); + } + + // The resource index values go through the elevations first, then azimuths. + const int kAngleSpacing = 15; + + // 0 <= elevation <= 90 (or 315 <= elevation <= 345) + // in increments of 15 degrees. + int elevation_index = + elevation <= 90 ? elevation / kAngleSpacing : + 7 + (elevation - 315) / kAngleSpacing; + bool is_elevation_index_good = 0 <= elevation_index && elevation_index < 10; + + // 0 <= azimuth < 360 in increments of 15 degrees. + int azimuth_index = azimuth / kAngleSpacing; + bool is_azimuth_index_good = 0 <= azimuth_index && azimuth_index < 24; + + const int kNumberOfElevations = 10; + const int kNumberOfAudioResources = 240; + int resource_index = kNumberOfElevations * azimuth_index + elevation_index; + bool is_resource_index_good = 0 <= resource_index && + resource_index < kNumberOfAudioResources; + + if (is_azimuth_index_good && is_elevation_index_good && + is_resource_index_good) { + const int kFirstAudioResourceIndex = IDR_AUDIO_SPATIALIZATION_T000_P000; + base::StringPiece resource = + GetDataResource(kFirstAudioResourceIndex + resource_index); + return WebData(resource.data(), resource.size()); + } +#endif // IDR_AUDIO_SPATIALIZATION_T000_P000 + + NOTREACHED(); + return WebData(); +} + +} // namespace + WebData WebKitClientImpl::loadResource(const char* name) { struct { const char* name; @@ -323,29 +377,17 @@ WebData WebKitClientImpl::loadResource(const char* name) { { "masterCardCC", IDR_AUTOFILL_CC_MASTERCARD }, { "soloCC", IDR_AUTOFILL_CC_SOLO }, { "visaCC", IDR_AUTOFILL_CC_VISA }, -#if defined(OS_POSIX) && !defined(OS_MACOSX) - // TODO(port): rename these to "skia" instead of "Linux". - { "linuxCheckboxDisabledIndeterminate", - IDR_LINUX_CHECKBOX_DISABLED_INDETERMINATE }, - { "linuxCheckboxDisabledOff", IDR_LINUX_CHECKBOX_DISABLED_OFF }, - { "linuxCheckboxDisabledOn", IDR_LINUX_CHECKBOX_DISABLED_ON }, - { "linuxCheckboxIndeterminate", IDR_LINUX_CHECKBOX_INDETERMINATE }, - { "linuxCheckboxOff", IDR_LINUX_CHECKBOX_OFF }, - { "linuxCheckboxOn", IDR_LINUX_CHECKBOX_ON }, - { "linuxRadioDisabledOff", IDR_LINUX_RADIO_DISABLED_OFF }, - { "linuxRadioDisabledOn", IDR_LINUX_RADIO_DISABLED_ON }, - { "linuxRadioOff", IDR_LINUX_RADIO_OFF }, - { "linuxRadioOn", IDR_LINUX_RADIO_ON }, - { "linuxProgressBar", IDR_PROGRESS_BAR }, - { "linuxProgressBorderLeft", IDR_PROGRESS_BORDER_LEFT }, - { "linuxProgressBorderRight", IDR_PROGRESS_BORDER_RIGHT }, - { "linuxProgressValue", IDR_PROGRESS_VALUE }, -#endif }; - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { - if (!strcmp(name, resources[i].name)) { - base::StringPiece resource = GetDataResource(resources[i].id); - return WebData(resource.data(), resource.size()); + + // Check the name prefix to see if it's an audio resource. + if (StartsWithASCII(name, "IRC_Composite", true)) { + return loadAudioSpatializationResource(name); + } else { + for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { + if (!strcmp(name, resources[i].name)) { + base::StringPiece resource = GetDataResource(resources[i].id); + return WebData(resource.data(), resource.size()); + } } } // TODO(jhawkins): Restore this NOTREACHED once WK stops sending in empty diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h index 42b436d..302a99f 100644 --- a/webkit/glue/webkitclient_impl.h +++ b/webkit/glue/webkitclient_impl.h @@ -7,7 +7,7 @@ #include "base/platform_file.h" #include "base/timer.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" #if defined(OS_WIN) #include "webkit/glue/webthemeengine_impl_win.h" #elif defined(OS_LINUX) diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index 005c7cf..9d51910 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,10 +19,10 @@ #include "media/filters/ffmpeg_video_decoder.h" #include "media/filters/null_audio_renderer.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVideoFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" #include "webkit/glue/media/buffered_data_source.h" #include "webkit/glue/media/simple_data_source.h" #include "webkit/glue/media/video_renderer_impl.h" @@ -59,6 +59,25 @@ const int kMaxOutstandingRepaints = 50; const float kMinRate = 0.0625f; const float kMaxRate = 16.0f; +// Platform independent method for converting and rounding floating point +// seconds to an int64 timestamp. +// +// Refer to https://bugs.webkit.org/show_bug.cgi?id=52697 for details. +base::TimeDelta ConvertSecondsToTimestamp(float seconds) { + float microseconds = seconds * base::Time::kMicrosecondsPerSecond; + float integer = ceilf(microseconds); + float difference = integer - microseconds; + + // Round down if difference is large enough. + if ((microseconds > 0 && difference > 0.5f) || + (microseconds <= 0 && difference >= 0.5f)) { + integer -= 1.0f; + } + + // Now we can safely cast to int64 microseconds. + return base::TimeDelta::FromMicroseconds(static_cast<int64>(integer)); +} + } // namespace namespace webkit_glue { @@ -80,7 +99,7 @@ WebMediaPlayerImpl::Proxy::~Proxy() { } void WebMediaPlayerImpl::Proxy::Repaint() { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (outstanding_repaints_ < kMaxOutstandingRepaints) { ++outstanding_repaints_; @@ -164,7 +183,7 @@ void WebMediaPlayerImpl::Proxy::NetworkEventCallback() { void WebMediaPlayerImpl::Proxy::RepaintTask() { DCHECK(MessageLoop::current() == render_loop_); { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); --outstanding_repaints_; DCHECK_GE(outstanding_repaints_, 0); } @@ -225,13 +244,14 @@ void WebMediaPlayerImpl::Proxy::PutCurrentFrame( WebMediaPlayerImpl::WebMediaPlayerImpl( WebKit::WebMediaPlayerClient* client, - media::FilterCollection* collection) + media::FilterCollection* collection, + media::MessageLoopFactory* message_loop_factory) : network_state_(WebKit::WebMediaPlayer::Empty), ready_state_(WebKit::WebMediaPlayer::HaveNothing), main_loop_(NULL), filter_collection_(collection), pipeline_(NULL), - pipeline_thread_("PipelineThread"), + message_loop_factory_(message_loop_factory), paused_(true), seeking_(false), playback_rate_(0.0f), @@ -247,13 +267,14 @@ bool WebMediaPlayerImpl::Initialize( WebKit::WebFrame* frame, bool use_simple_data_source, scoped_refptr<WebVideoRenderer> web_video_renderer) { - // Create the pipeline and its thread. - if (!pipeline_thread_.Start()) { + MessageLoop* pipeline_message_loop = + message_loop_factory_->GetMessageLoop("PipelineThread"); + if (!pipeline_message_loop) { NOTREACHED() << "Could not start PipelineThread"; return false; } - pipeline_ = new media::PipelineImpl(pipeline_thread_.message_loop()); + pipeline_ = new media::PipelineImpl(pipeline_message_loop); // Also we want to be notified of |main_loop_| destruction. main_loop_->AddDestructionObserver(this); @@ -290,9 +311,12 @@ bool WebMediaPlayerImpl::Initialize( } // Add in the default filter factories. - filter_collection_->AddDemuxer(new media::FFmpegDemuxer()); - filter_collection_->AddAudioDecoder(new media::FFmpegAudioDecoder()); - filter_collection_->AddVideoDecoder(new media::FFmpegVideoDecoder(NULL)); + filter_collection_->AddDemuxer(new media::FFmpegDemuxer( + message_loop_factory_->GetMessageLoop("DemuxThread"))); + filter_collection_->AddAudioDecoder(new media::FFmpegAudioDecoder( + message_loop_factory_->GetMessageLoop("AudioDecoderThread"))); + filter_collection_->AddVideoDecoder(new media::FFmpegVideoDecoder( + message_loop_factory_->GetMessageLoop("VideoDecoderThread"), NULL)); filter_collection_->AddAudioRenderer(new media::NullAudioRenderer()); return true; @@ -369,10 +393,7 @@ void WebMediaPlayerImpl::seek(float seconds) { return; } - // Try to preserve as much accuracy as possible. - float microseconds = seconds * base::Time::kMicrosecondsPerSecond; - base::TimeDelta seek_time = - base::TimeDelta::FromMicroseconds(static_cast<int64>(microseconds)); + base::TimeDelta seek_time = ConvertSecondsToTimestamp(seconds); // Update our paused time. if (paused_) { @@ -794,9 +815,10 @@ void WebMediaPlayerImpl::Destroy() { pipeline_->Stop(NewCallback(this, &WebMediaPlayerImpl::PipelineStoppedCallback)); pipeline_stopped_.Wait(); - pipeline_thread_.Stop(); } + message_loop_factory_.reset(); + // And then detach the proxy, it may live on the render thread for a little // longer until all the tasks are finished. if (proxy_) { diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index abb1c60..cfc200f 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -53,19 +53,20 @@ #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ #define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ -#include "base/lock.h" #include "base/message_loop.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/threading/thread.h" +#include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" -#include "gfx/rect.h" -#include "gfx/size.h" #include "media/base/filters.h" +#include "media/base/message_loop_factory.h" #include "media/base/pipeline.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayer.h" -#include "third_party/WebKit/WebKit/chromium/public/WebMediaPlayerClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/size.h" class GURL; @@ -148,7 +149,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, scoped_refptr<WebDataSource> data_source_; scoped_refptr<WebVideoRenderer> video_renderer_; - Lock lock_; + base::Lock lock_; int outstanding_repaints_; }; @@ -175,7 +176,8 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, // // Callers must call |Initialize()| before they can use the object. WebMediaPlayerImpl(WebKit::WebMediaPlayerClient* client, - media::FilterCollection* collection); + media::FilterCollection* collection, + media::MessageLoopFactory* message_loop_factory); virtual ~WebMediaPlayerImpl(); // Finalizes initialization of the object. @@ -288,7 +290,8 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, // The actual pipeline and the thread it runs on. scoped_refptr<media::Pipeline> pipeline_; - base::Thread pipeline_thread_; + + scoped_ptr<media::MessageLoopFactory> message_loop_factory_; // Playback state. // diff --git a/webkit/glue/webmenuitem.h b/webkit/glue/webmenuitem.h index 4b0fdc3..685033e 100644 --- a/webkit/glue/webmenuitem.h +++ b/webkit/glue/webmenuitem.h @@ -1,12 +1,14 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBMENUITEM_H_ #define WEBMENUITEM_H_ +#include <vector> + #include "base/string16.h" -#include "third_party/WebKit/WebKit/chromium/public/WebMenuItemInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" // Container for information about entries in an HTML select popup menu and // custom entries of the context menu. @@ -15,25 +17,23 @@ struct WebMenuItem { OPTION = WebKit::WebMenuItemInfo::Option, CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption, GROUP = WebKit::WebMenuItemInfo::Group, - SEPARATOR = WebKit::WebMenuItemInfo::Separator + SEPARATOR = WebKit::WebMenuItemInfo::Separator, + SUBMENU // This is currently only used by Pepper, not by WebKit. }; + WebMenuItem(); + WebMenuItem(const WebKit::WebMenuItemInfo& item); + WebMenuItem(const WebMenuItem& item); + ~WebMenuItem(); + string16 label; Type type; unsigned action; + bool rtl; + bool has_directional_override; bool enabled; bool checked; - - WebMenuItem() : type(OPTION), action(0), enabled(false), checked(false) { - } - - WebMenuItem(const WebKit::WebMenuItemInfo& item) - : label(item.label), - type(static_cast<Type>(item.type)), - action(item.action), - enabled(item.enabled), - checked(item.checked) { - } + std::vector<WebMenuItem> submenu; }; #endif // WEBMENUITEM_H_ diff --git a/webkit/glue/webmenurunner_mac.h b/webkit/glue/webmenurunner_mac.h index c56eeeb..eccb1ef 100644 --- a/webkit/glue/webmenurunner_mac.h +++ b/webkit/glue/webmenurunner_mac.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -33,6 +33,9 @@ // The font size being used for the menu. CGFloat fontSize_; + + // Whether the menu should be displayed right-aligned. + BOOL rightAligned_; } // Initializes the MenuDelegate with a list of items sent from WebKit. diff --git a/webkit/glue/webmenurunner_mac.mm b/webkit/glue/webmenurunner_mac.mm index 3e1376a..7dce0a6 100644 --- a/webkit/glue/webmenurunner_mac.mm +++ b/webkit/glue/webmenurunner_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,28 +6,31 @@ #include "base/sys_string_conversions.h" -namespace { - -const CGFloat kPopupXOffset = -10.0f; -BOOL gNewNSMenuAPI; - -} // namespace - #if !defined(MAC_OS_X_VERSION_10_6) || \ MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 -@interface NSMenu (SnowLeopardSDKDeclarations) -- (BOOL)popUpMenuPositioningItem:(NSMenuItem *)item - atLocation:(NSPoint)location - inView:(NSView *)view; -- (void)setFont:(NSFont *)font; +enum { + NSUserInterfaceLayoutDirectionLeftToRight = 0, + NSUserInterfaceLayoutDirectionRightToLeft = 1 +}; +typedef NSInteger NSUserInterfaceLayoutDirection; + +@interface NSCell (SnowLeopardSDKDeclarations) +- (void)setUserInterfaceLayoutDirection: + (NSUserInterfaceLayoutDirection)layoutDirection; @end + +enum { + NSTextWritingDirectionEmbedding = (0 << 1), + NSTextWritingDirectionOverride = (1 << 1) +}; + +static NSString* NSWritingDirectionAttributeName = @"NSWritingDirection"; #endif @interface WebMenuRunner (PrivateAPI) // Worker function used during initialization. -- (void)addItem:(const WebMenuItem&)item - withAttributes:(NSDictionary*)attrs; +- (void)addItem:(const WebMenuItem&)item; // A callback for the menu controller object to call when an item is selected // from the menu. This is not called if the menu is dismissed without a @@ -41,39 +44,19 @@ BOOL gNewNSMenuAPI; - (id)initWithItems:(const std::vector<WebMenuItem>&)items fontSize:(CGFloat)fontSize rightAligned:(BOOL)rightAligned { - static BOOL newNSMenuAPIInitialized = NO; - if (!newNSMenuAPIInitialized) { - newNSMenuAPIInitialized = YES; - gNewNSMenuAPI = [NSMenu instancesRespondToSelector: - @selector(popUpMenuPositioningItem:atLocation:inView:)] && - [NSMenu instancesRespondToSelector:@selector(setFont:)]; - } - if ((self = [super init])) { menu_.reset([[NSMenu alloc] initWithTitle:@""]); - if (gNewNSMenuAPI) - [menu_ setFont:[NSFont menuFontOfSize:fontSize]]; [menu_ setAutoenablesItems:NO]; index_ = -1; fontSize_ = fontSize; - scoped_nsobject<NSDictionary> attrs; - if (rightAligned) { - // NB: Right-aligning menu items in this manner is known to not work in - // Mac OS X 10.5. - scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( - [[NSMutableParagraphStyle alloc] init]); - [paragraphStyle setAlignment:NSRightTextAlignment]; - attrs.reset([[NSDictionary alloc] initWithObjectsAndKeys: - paragraphStyle, NSParagraphStyleAttributeName, nil]); - } + rightAligned_ = rightAligned; for (size_t i = 0; i < items.size(); ++i) - [self addItem:items[i] withAttributes:attrs]; + [self addItem:items[i]]; } return self; } -- (void)addItem:(const WebMenuItem&)item - withAttributes:(NSDictionary*)attrs { +- (void)addItem:(const WebMenuItem&)item { if (item.type == WebMenuItem::SEPARATOR) { [menu_ addItem:[NSMenuItem separatorItem]]; return; @@ -85,12 +68,38 @@ BOOL gNewNSMenuAPI; keyEquivalent:@""]; [menuItem setEnabled:(item.enabled && item.type != WebMenuItem::GROUP)]; [menuItem setTarget:self]; - if (attrs) { - scoped_nsobject<NSAttributedString> attrTitle( - [[NSAttributedString alloc] initWithString:title - attributes:attrs]); - [menuItem setAttributedTitle:attrTitle]; + + // Set various alignment/language attributes. Note that many (if not most) of + // these attributes are functional only on 10.6 and above. + scoped_nsobject<NSMutableDictionary> attrs( + [[NSMutableDictionary alloc] initWithCapacity:3]); + scoped_nsobject<NSMutableParagraphStyle> paragraphStyle( + [[NSMutableParagraphStyle alloc] init]); + [paragraphStyle setAlignment:rightAligned_ ? NSRightTextAlignment + : NSLeftTextAlignment]; + NSWritingDirection writingDirection = + item.rtl ? NSWritingDirectionRightToLeft + : NSWritingDirectionLeftToRight; + [paragraphStyle setBaseWritingDirection:writingDirection]; + [attrs setObject:paragraphStyle forKey:NSParagraphStyleAttributeName]; + + if (item.has_directional_override) { + scoped_nsobject<NSNumber> directionValue( + [[NSNumber alloc] initWithInteger: + writingDirection + NSTextWritingDirectionOverride]); + scoped_nsobject<NSArray> directionArray( + [[NSArray alloc] initWithObjects:directionValue.get(), nil]); + [attrs setObject:directionArray forKey:NSWritingDirectionAttributeName]; } + + [attrs setObject:[NSFont menuFontOfSize:fontSize_] + forKey:NSFontAttributeName]; + + scoped_nsobject<NSAttributedString> attrTitle( + [[NSAttributedString alloc] initWithString:title + attributes:attrs]); + [menuItem setAttributedTitle:attrTitle]; + [menuItem setTag:[menu_ numberOfItems] - 1]; } @@ -104,53 +113,41 @@ BOOL gNewNSMenuAPI; - (void)menuItemSelected:(id)sender { menuItemWasChosen_ = YES; - if (gNewNSMenuAPI) - index_ = [sender tag]; } - (void)runMenuInView:(NSView*)view withBounds:(NSRect)bounds initialIndex:(int)index { - if (gNewNSMenuAPI) { - // index might be out of bounds, in which case we set no selection. - NSMenuItem* selectedItem = [menu_ itemWithTag:index]; - if (selectedItem) { - [selectedItem setState:NSOnState]; - } else { - selectedItem = [menu_ itemWithTag:0]; - } - NSPoint anchor = NSMakePoint(NSMinX(bounds) + kPopupXOffset, - NSMaxY(bounds)); - [menu_ popUpMenuPositioningItem:selectedItem - atLocation:anchor - inView:view]; - } else { - // Set up the button cell, converting to NSView coordinates. The menu is - // positioned such that the currently selected menu item appears over the - // popup button, which is the expected Mac popup menu behavior. - NSPopUpButtonCell* button = [[NSPopUpButtonCell alloc] initTextCell:@"" - pullsDown:NO]; - [button autorelease]; - [button setMenu:menu_]; - // We use selectItemWithTag below so if the index is out-of-bounds nothing - // bad happens. - [button selectItemWithTag:index]; - [button setFont:[NSFont menuFontOfSize:fontSize_]]; - - // Create a dummy view to associate the popup with, since the OS will use - // that view for positioning the menu. - NSView* dummyView = [[[NSView alloc] initWithFrame:bounds] autorelease]; - [view addSubview:dummyView]; - NSRect dummyBounds = [dummyView convertRect:bounds fromView:view]; - - // Display the menu, and set a flag if a menu item was chosen. - [button performClickWithFrame:dummyBounds inView:dummyView]; - - if ([self menuItemWasChosen]) - index_ = [button indexOfSelectedItem]; - - [dummyView removeFromSuperview]; + // Set up the button cell, converting to NSView coordinates. The menu is + // positioned such that the currently selected menu item appears over the + // popup button, which is the expected Mac popup menu behavior. + NSPopUpButtonCell* button = [[NSPopUpButtonCell alloc] initTextCell:@"" + pullsDown:NO]; + [button autorelease]; + [button setMenu:menu_]; + // We use selectItemWithTag below so if the index is out-of-bounds nothing + // bad happens. + [button selectItemWithTag:index]; + + if (rightAligned_ && + [button respondsToSelector:@selector(setUserInterfaceLayoutDirection:)]) { + [button setUserInterfaceLayoutDirection: + NSUserInterfaceLayoutDirectionRightToLeft]; } + + // Create a dummy view to associate the popup with, since the OS will use + // that view for positioning the menu. + NSView* dummyView = [[[NSView alloc] initWithFrame:bounds] autorelease]; + [view addSubview:dummyView]; + NSRect dummyBounds = [dummyView convertRect:bounds fromView:view]; + + // Display the menu, and set a flag if a menu item was chosen. + [button performClickWithFrame:dummyBounds inView:dummyView]; + + if ([self menuItemWasChosen]) + index_ = [button indexOfSelectedItem]; + + [dummyView removeFromSuperview]; } - (int)indexOfSelectedItem { diff --git a/webkit/glue/webpasswordautocompletelistener_impl.cc b/webkit/glue/webpasswordautocompletelistener_impl.cc index 280ce43..20ecf60 100644 --- a/webkit/glue/webpasswordautocompletelistener_impl.cc +++ b/webkit/glue/webpasswordautocompletelistener_impl.cc @@ -10,9 +10,9 @@ #include <vector> #include "base/string_util.h" -#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h" -#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" using WebKit::WebFrame; using WebKit::WebView; diff --git a/webkit/glue/webpasswordautocompletelistener_impl.h b/webkit/glue/webpasswordautocompletelistener_impl.h index 6badcb7..067c6c2 100644 --- a/webkit/glue/webpasswordautocompletelistener_impl.h +++ b/webkit/glue/webpasswordautocompletelistener_impl.h @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "base/scoped_ptr.h" -#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h" -#include "third_party/WebKit/WebKit/chromium/public/WebPasswordAutocompleteListener.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebPasswordAutocompleteListener.h" #include "webkit/glue/password_form_dom_manager.h" using WebKit::WebInputElement; diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc index 02092de..03c87bf 100644 --- a/webkit/glue/webpreferences.cc +++ b/webkit/glue/webpreferences.cc @@ -6,12 +6,12 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h" -#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSettings.h" -#include "third_party/WebKit/WebKit/chromium/public/WebString.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/glue/webkit_glue.h" using WebKit::WebRuntimeFeatures; @@ -60,13 +60,17 @@ WebPreferences::WebPreferences() frame_flattening_enabled(false), allow_universal_access_from_file_urls(false), allow_file_access_from_file_urls(false), + webaudio_enabled(false), experimental_webgl_enabled(false), + gl_multisampling_enabled(true), show_composited_layer_borders(false), accelerated_compositing_enabled(false), accelerated_layers_enabled(false), accelerated_video_enabled(false), accelerated_2d_canvas_enabled(false), - memory_info_enabled(false) { + accelerated_plugins_enabled(false), + memory_info_enabled(false), + interactive_form_validation_enabled(true) { } WebPreferences::~WebPreferences() { @@ -140,12 +144,18 @@ void WebPreferences::Apply(WebView* web_view) const { // but also because it cause a possible crash in Editor::hasBidiSelection(). settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); + // Enable the web audio API if requested on the command line. + settings->setWebAudioEnabled(webaudio_enabled); + // Enable experimental WebGL support if requested on command line // and support is compiled in. bool enable_webgl = WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; settings->setExperimentalWebGLEnabled(enable_webgl); + // Disable GL multisampling if requested on command line. + settings->setOpenGLMultisamplingEnabled(gl_multisampling_enabled); + // Display colored borders around composited render layers if requested // on command line. settings->setShowDebugBorders(show_composited_layer_borders); @@ -157,16 +167,18 @@ void WebPreferences::Apply(WebView* web_view) const { settings->setAccelerated2dCanvasEnabled(accelerated_2d_canvas_enabled); // Enabling accelerated layers from the command line enabled accelerated - // 3D CSS, Video, Plugins, and Animations. + // 3D CSS, Video, and Animations. settings->setAcceleratedCompositingFor3DTransformsEnabled( accelerated_layers_enabled); settings->setAcceleratedCompositingForVideoEnabled( accelerated_video_enabled); - settings->setAcceleratedCompositingForPluginsEnabled( - accelerated_layers_enabled); settings->setAcceleratedCompositingForAnimationEnabled( accelerated_layers_enabled); + // Enabling accelerated plugins if specified from the command line. + settings->setAcceleratedCompositingForPluginsEnabled( + accelerated_plugins_enabled); + // WebGL and accelerated 2D canvas are always gpu composited. settings->setAcceleratedCompositingForCanvasEnabled( enable_webgl || accelerated_2d_canvas_enabled); @@ -182,4 +194,7 @@ void WebPreferences::Apply(WebView* web_view) const { // Tabs to link is not part of the settings. WebCore calls // ChromeClient::tabsToLinks which is part of the glue code. web_view->setTabsToLinks(tabs_to_links); + + settings->setInteractiveFormValidationEnabled( + interactive_form_validation_enabled); } diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h index b14d323..468e9b4 100644 --- a/webkit/glue/webpreferences.h +++ b/webkit/glue/webpreferences.h @@ -5,8 +5,8 @@ // A struct for managing webkit's settings. // // Adding new values to this class probably involves updating -// WebKit::WebSettings, common/render_messages.h, and -// browser/profile.cc. +// WebKit::WebSettings, common/render_messages.cc, browser/tab_contents/ +// render_view_host_delegate_helper.cc, and browser/profiles/profile.cc. #ifndef WEBKIT_GLUE_WEBPREFERENCES_H__ #define WEBKIT_GLUE_WEBPREFERENCES_H__ @@ -66,13 +66,17 @@ struct WebPreferences { bool frame_flattening_enabled; bool allow_universal_access_from_file_urls; bool allow_file_access_from_file_urls; + bool webaudio_enabled; bool experimental_webgl_enabled; + bool gl_multisampling_enabled; bool show_composited_layer_borders; bool accelerated_compositing_enabled; bool accelerated_layers_enabled; bool accelerated_video_enabled; bool accelerated_2d_canvas_enabled; + bool accelerated_plugins_enabled; bool memory_info_enabled; + bool interactive_form_validation_enabled; // We try to keep the default values the same as the default values in // chrome, except for the cases where it would require lots of extra work for diff --git a/webkit/glue/websocketstreamhandle_impl.cc b/webkit/glue/websocketstreamhandle_impl.cc index 6a56393..d1c7ba0 100644 --- a/webkit/glue/websocketstreamhandle_impl.cc +++ b/webkit/glue/websocketstreamhandle_impl.cc @@ -12,9 +12,9 @@ #include "base/logging.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" -#include "third_party/WebKit/WebKit/chromium/public/WebData.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSocketStreamHandleClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandleClient.h" #include "webkit/glue/websocketstreamhandle_bridge.h" #include "webkit/glue/websocketstreamhandle_delegate.h" diff --git a/webkit/glue/websocketstreamhandle_impl.h b/webkit/glue/websocketstreamhandle_impl.h index f8a08f4..81ae68c 100644 --- a/webkit/glue/websocketstreamhandle_impl.h +++ b/webkit/glue/websocketstreamhandle_impl.h @@ -6,7 +6,7 @@ #define WEBKIT_GLUE_WEBSOCKETSTREAMHANDLE_IMPL_H_ #include "base/ref_counted.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSocketStreamHandle.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandle.h" namespace webkit_glue { diff --git a/webkit/glue/webthemeengine_impl_linux.cc b/webkit/glue/webthemeengine_impl_linux.cc index d5cc9b4..6d9fc5b 100644 --- a/webkit/glue/webthemeengine_impl_linux.cc +++ b/webkit/glue/webthemeengine_impl_linux.cc @@ -4,10 +4,10 @@ #include "webkit/glue/webthemeengine_impl_linux.h" -#include "gfx/native_theme_linux.h" #include "skia/ext/platform_canvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSize.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" +#include "ui/gfx/native_theme_linux.h" using WebKit::WebCanvas; using WebKit::WebColor; @@ -34,10 +34,28 @@ static gfx::NativeThemeLinux::Part NativeThemePart( return gfx::NativeThemeLinux::kScrollbarHorizontalThumb; case WebKit::WebThemeEngine::PartScrollbarVerticalThumb: return gfx::NativeThemeLinux::kScrollbarVerticalThumb; - case WebKit::WebThemeEngine::PartScrollbarHoriztonalTrack: + case WebKit::WebThemeEngine::PartScrollbarHorizontalTrack: return gfx::NativeThemeLinux::kScrollbarHorizontalTrack; case WebKit::WebThemeEngine::PartScrollbarVerticalTrack: return gfx::NativeThemeLinux::kScrollbarVerticalTrack; + case WebKit::WebThemeEngine::PartCheckbox: + return gfx::NativeThemeLinux::kCheckbox; + case WebKit::WebThemeEngine::PartRadio: + return gfx::NativeThemeLinux::kRadio; + case WebKit::WebThemeEngine::PartButton: + return gfx::NativeThemeLinux::kPushButton; + case WebKit::WebThemeEngine::PartTextField: + return gfx::NativeThemeLinux::kTextField; + case WebKit::WebThemeEngine::PartMenuList: + return gfx::NativeThemeLinux::kMenuList; + case WebKit::WebThemeEngine::PartSliderTrack: + return gfx::NativeThemeLinux::kSliderTrack; + case WebKit::WebThemeEngine::PartSliderThumb: + return gfx::NativeThemeLinux::kSliderThumb; + case WebKit::WebThemeEngine::PartInnerSpinButton: + return gfx::NativeThemeLinux::kInnerSpinButton; + case WebKit::WebThemeEngine::PartProgressBar: + return gfx::NativeThemeLinux::kProgressBar; default: return gfx::NativeThemeLinux::kScrollbarDownArrow; } @@ -49,7 +67,7 @@ static gfx::NativeThemeLinux::State NativeThemeState( case WebKit::WebThemeEngine::StateDisabled: return gfx::NativeThemeLinux::kDisabled; case WebKit::WebThemeEngine::StateHover: - return gfx::NativeThemeLinux::kHover; + return gfx::NativeThemeLinux::kHovered; case WebKit::WebThemeEngine::StateNormal: return gfx::NativeThemeLinux::kNormal; case WebKit::WebThemeEngine::StatePressed: @@ -64,21 +82,79 @@ static void GetNativeThemeExtraParams( WebKit::WebThemeEngine::State state, const WebKit::WebThemeEngine::ExtraParams* extra_params, gfx::NativeThemeLinux::ExtraParams* native_theme_extra_params) { - if (part == WebKit::WebThemeEngine::PartScrollbarHoriztonalTrack || - part == WebKit::WebThemeEngine::PartScrollbarVerticalTrack) { - native_theme_extra_params->scrollbar_track.track_x = - extra_params->scrollbarTrack.trackX; - native_theme_extra_params->scrollbar_track.track_y = - extra_params->scrollbarTrack.trackY; - native_theme_extra_params->scrollbar_track.track_width = - extra_params->scrollbarTrack.trackWidth; - native_theme_extra_params->scrollbar_track.track_height = - extra_params->scrollbarTrack.trackHeight; + switch (part) { + case WebKit::WebThemeEngine::PartScrollbarHorizontalTrack: + case WebKit::WebThemeEngine::PartScrollbarVerticalTrack: + native_theme_extra_params->scrollbar_track.track_x = + extra_params->scrollbarTrack.trackX; + native_theme_extra_params->scrollbar_track.track_y = + extra_params->scrollbarTrack.trackY; + native_theme_extra_params->scrollbar_track.track_width = + extra_params->scrollbarTrack.trackWidth; + native_theme_extra_params->scrollbar_track.track_height = + extra_params->scrollbarTrack.trackHeight; + break; + case WebKit::WebThemeEngine::PartCheckbox: + native_theme_extra_params->button.checked = extra_params->button.checked; + native_theme_extra_params->button.indeterminate = + extra_params->button.indeterminate; + break; + case WebKit::WebThemeEngine::PartRadio: + native_theme_extra_params->button.checked = extra_params->button.checked; + break; + case WebKit::WebThemeEngine::PartButton: + native_theme_extra_params->button.is_default = + extra_params->button.isDefault; + native_theme_extra_params->button.background_color = + extra_params->button.backgroundColor; + break; + case WebKit::WebThemeEngine::PartTextField: + native_theme_extra_params->text_field.is_text_area = + extra_params->textField.isTextArea; + native_theme_extra_params->text_field.is_listbox = + extra_params->textField.isListbox; + native_theme_extra_params->text_field.background_color = + extra_params->textField.backgroundColor; + break; + case WebKit::WebThemeEngine::PartMenuList: + native_theme_extra_params->menu_list.arrow_x = + extra_params->menuList.arrowX; + native_theme_extra_params->menu_list.arrow_y = + extra_params->menuList.arrowY; + native_theme_extra_params->menu_list.background_color = + extra_params->menuList.backgroundColor; + break; + case WebKit::WebThemeEngine::PartSliderTrack: + case WebKit::WebThemeEngine::PartSliderThumb: + native_theme_extra_params->slider.vertical = + extra_params->slider.vertical; + native_theme_extra_params->slider.in_drag = extra_params->slider.inDrag; + break; + case WebKit::WebThemeEngine::PartInnerSpinButton: + native_theme_extra_params->inner_spin.spin_up = + extra_params->innerSpin.spinUp; + native_theme_extra_params->inner_spin.read_only = + extra_params->innerSpin.readOnly; + break; + case WebKit::WebThemeEngine::PartProgressBar: + native_theme_extra_params->progress_bar.determinate = + extra_params->progressBar.determinate; + native_theme_extra_params->progress_bar.value_rect_x = + extra_params->progressBar.valueRectX; + native_theme_extra_params->progress_bar.value_rect_y = + extra_params->progressBar.valueRectY; + native_theme_extra_params->progress_bar.value_rect_width = + extra_params->progressBar.valueRectWidth; + native_theme_extra_params->progress_bar.value_rect_height = + extra_params->progressBar.valueRectHeight; + break; + default: + break; // Parts that have no extra params get here. } } WebKit::WebSize WebThemeEngineImpl::getSize(WebKit::WebThemeEngine::Part part) { - return gfx::NativeThemeLinux::instance()->GetSize(NativeThemePart(part)); + return gfx::NativeThemeLinux::instance()->GetPartSize(NativeThemePart(part)); } void WebThemeEngineImpl::paint( diff --git a/webkit/glue/webthemeengine_impl_linux.h b/webkit/glue/webthemeengine_impl_linux.h index 265b80c..3dcba6d 100644 --- a/webkit/glue/webthemeengine_impl_linux.h +++ b/webkit/glue/webthemeengine_impl_linux.h @@ -5,7 +5,7 @@ #ifndef WEBTHEMEENGINE_IMPL_LINUX_H_ #define WEBTHEMEENGINE_IMPL_LINUX_H_ -#include "third_party/WebKit/WebKit/chromium/public/linux/WebThemeEngine.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/linux/WebThemeEngine.h" namespace webkit_glue { diff --git a/webkit/glue/webthemeengine_impl_mac.cc b/webkit/glue/webthemeengine_impl_mac.cc index ac28334..cafc316 100644 --- a/webkit/glue/webthemeengine_impl_mac.cc +++ b/webkit/glue/webthemeengine_impl_mac.cc @@ -6,8 +6,8 @@ #include <Carbon/Carbon.h> -#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebCanvas.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" using WebKit::WebCanvas; using WebKit::WebRect; diff --git a/webkit/glue/webthemeengine_impl_mac.h b/webkit/glue/webthemeengine_impl_mac.h index 788cba3..6b0415f 100644 --- a/webkit/glue/webthemeengine_impl_mac.h +++ b/webkit/glue/webthemeengine_impl_mac.h @@ -5,7 +5,7 @@ #ifndef WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_MAC_H_ #define WEBKIT_GLUE_WEBTHEMEENGINE_IMPL_MAC_H_ -#include "third_party/WebKit/WebKit/chromium/public/mac/WebThemeEngine.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebThemeEngine.h" namespace webkit_glue { diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc index 85dc113..a6344b6 100644 --- a/webkit/glue/webthemeengine_impl_win.cc +++ b/webkit/glue/webthemeengine_impl_win.cc @@ -4,10 +4,10 @@ #include "webkit/glue/webthemeengine_impl_win.h" -#include "gfx/native_theme_win.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/skia_utils_win.h" -#include "third_party/WebKit/WebKit/chromium/public/WebRect.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" +#include "ui/gfx/native_theme_win.h" using WebKit::WebCanvas; using WebKit::WebColor; diff --git a/webkit/glue/webthemeengine_impl_win.h b/webkit/glue/webthemeengine_impl_win.h index 6e749c4..ecdbec2 100644 --- a/webkit/glue/webthemeengine_impl_win.h +++ b/webkit/glue/webthemeengine_impl_win.h @@ -5,7 +5,7 @@ #ifndef WEBTHEMEENGINE_IMPL_WIN_H_ #define WEBTHEMEENGINE_IMPL_WIN_H_ -#include "third_party/WebKit/WebKit/chromium/public/win/WebThemeEngine.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebThemeEngine.h" namespace webkit_glue { diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 0372567..d4b5162 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,15 +18,15 @@ #include "net/base/net_errors.h" #include "net/base/net_util.h" #include "net/http/http_response_headers.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h" -#include "third_party/WebKit/WebKit/chromium/public/WebHTTPLoadInfo.h" -#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoadTiming.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPLoadInfo.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoadTiming.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h" #include "webkit/glue/ftp_directory_listing_response_delegate.h" #include "webkit/glue/multipart_response_delegate.h" #include "webkit/glue/resource_loader_bridge.h" @@ -69,10 +69,8 @@ class HeaderFlattener : public WebHTTPHeaderVisitor { const std::string& value_utf8 = value.utf8(); // Skip over referrer headers found in the header map because we already - // pulled it out as a separate parameter. We likewise prune the UA since - // that will be added back by the network layer. - if (LowerCaseEqualsASCII(name_utf8, "referer") || - LowerCaseEqualsASCII(name_utf8, "user-agent")) + // pulled it out as a separate parameter. + if (LowerCaseEqualsASCII(name_utf8, "referer")) return; // Skip over "Cache-Control: max-age=0" header if the corresponding @@ -146,11 +144,12 @@ ResourceType::Type FromTargetType(WebURLRequest::TargetType type) { // Extracts the information from a data: url. bool GetInfoFromDataURL(const GURL& url, ResourceResponseInfo* info, - std::string* data, URLRequestStatus* status) { + std::string* data, + net::URLRequestStatus* status) { std::string mime_type; std::string charset; if (net::DataURL::Parse(url, &mime_type, &charset, data)) { - *status = URLRequestStatus(URLRequestStatus::SUCCESS, 0); + *status = net::URLRequestStatus(net::URLRequestStatus::SUCCESS, 0); info->request_time = Time::Now(); info->response_time = Time::Now(); info->headers = NULL; @@ -162,7 +161,8 @@ bool GetInfoFromDataURL(const GURL& url, return true; } - *status = URLRequestStatus(URLRequestStatus::FAILED, net::ERR_INVALID_URL); + *status = net::URLRequestStatus(net::URLRequestStatus::FAILED, + net::ERR_INVALID_URL); return false; } @@ -244,8 +244,8 @@ void PopulateURLResponse( // pass it to GetSuggestedFilename. std::string value; if (headers->EnumerateHeader(NULL, "content-disposition", &value)) { - response->setSuggestedFileName(FilePathToWebString( - net::GetSuggestedFilename(url, value, "", FilePath()))); + response->setSuggestedFileName( + net::GetSuggestedFilename(url, value, "", string16())); } Time time_val; @@ -294,10 +294,9 @@ class WebURLLoaderImpl::Context : public base::RefCounted<Context>, virtual void OnDownloadedData(int len); virtual void OnReceivedData(const char* data, int len); virtual void OnReceivedCachedMetadata(const char* data, int len); - virtual void OnCompletedRequest( - const URLRequestStatus& status, - const std::string& security_info, - const base::Time& completion_time); + virtual void OnCompletedRequest(const net::URLRequestStatus& status, + const std::string& security_info, + const base::Time& completion_time); private: friend class base::RefCounted<Context>; @@ -404,12 +403,6 @@ void WebURLLoaderImpl::Context::Start( if (!request.allowStoredCredentials()) load_flags |= net::LOAD_DO_NOT_SEND_AUTH_DATA; - // TODO(jcampan): in the non out-of-process plugin case the request does not - // have a requestor_pid. Find a better place to set this. - int requestor_pid = request.requestorProcessID(); - if (requestor_pid == 0) - requestor_pid = base::GetCurrentProcId(); - HeaderFlattener flattener(load_flags); request.visitHTTPHeaderFields(&flattener); @@ -430,7 +423,10 @@ void WebURLLoaderImpl::Context::Start( request_info.main_frame_origin = main_frame_origin; request_info.headers = flattener.GetBuffer(); request_info.load_flags = load_flags; - request_info.requestor_pid = requestor_pid; + // requestor_pid only needs to be non-zero if the request originates outside + // the render process, so we can use requestorProcessID even for requests + // from in-process plugins. + request_info.requestor_pid = request.requestorProcessID(); request_info.request_type = FromTargetType(request.targetType()); request_info.appcache_host_id = request.appCacheHostID(); request_info.routing_id = request.requestorID(); @@ -621,7 +617,7 @@ void WebURLLoaderImpl::Context::OnReceivedCachedMetadata( } void WebURLLoaderImpl::Context::OnCompletedRequest( - const URLRequestStatus& status, + const net::URLRequestStatus& status, const std::string& security_info, const base::Time& completion_time) { if (ftp_listing_delegate_.get()) { @@ -638,9 +634,9 @@ void WebURLLoaderImpl::Context::OnCompletedRequest( completed_bridge_.swap(bridge_); if (client_) { - if (status.status() != URLRequestStatus::SUCCESS) { + if (status.status() != net::URLRequestStatus::SUCCESS) { int error_code; - if (status.status() == URLRequestStatus::HANDLED_EXTERNALLY) { + if (status.status() == net::URLRequestStatus::HANDLED_EXTERNALLY) { // By marking this request as aborted we insure that we don't navigate // to an error page. error_code = net::ERR_ABORTED; @@ -691,7 +687,7 @@ bool WebURLLoaderImpl::Context::CanHandleDataURL(const GURL& url) const { void WebURLLoaderImpl::Context::HandleDataURL() { ResourceResponseInfo info; - URLRequestStatus status; + net::URLRequestStatus status; std::string data; if (GetInfoFromDataURL(request_.url(), &info, &data, &status)) { @@ -724,9 +720,10 @@ void WebURLLoaderImpl::loadSynchronously(const WebURLRequest& request, // TODO(tc): For file loads, we may want to include a more descriptive // status code or status text. - const URLRequestStatus::Status& status = sync_load_response.status.status(); - if (status != URLRequestStatus::SUCCESS && - status != URLRequestStatus::HANDLED_EXTERNALLY) { + const net::URLRequestStatus::Status& status = + sync_load_response.status.status(); + if (status != net::URLRequestStatus::SUCCESS && + status != net::URLRequestStatus::HANDLED_EXTERNALLY) { response.setURL(final_url); error.domain = WebString::fromUTF8(net::kErrorDomain); error.reason = sync_load_response.status.os_error(); diff --git a/webkit/glue/weburlloader_impl.h b/webkit/glue/weburlloader_impl.h index f9e5a0b..9a39911 100644 --- a/webkit/glue/weburlloader_impl.h +++ b/webkit/glue/weburlloader_impl.h @@ -6,7 +6,7 @@ #define WEBKIT_GLUE_WEBURLLOADER_IMPL_H_ #include "base/ref_counted.h" -#include "third_party/WebKit/WebKit/chromium/public/WebURLLoader.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoader.h" namespace webkit_glue { diff --git a/webkit/glue/webvideoframe_impl.cc b/webkit/glue/webvideoframe_impl.cc index bfb1d53..c2e115d 100644 --- a/webkit/glue/webvideoframe_impl.cc +++ b/webkit/glue/webvideoframe_impl.cc @@ -5,7 +5,7 @@ #include "webkit/glue/webvideoframe_impl.h" #include "media/base/video_frame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVideoFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" using namespace WebKit; diff --git a/webkit/glue/webvideoframe_impl.h b/webkit/glue/webvideoframe_impl.h index 5454089..0aca052 100644 --- a/webkit/glue/webvideoframe_impl.h +++ b/webkit/glue/webvideoframe_impl.h @@ -6,7 +6,7 @@ #define WEBKIT_GLUE_WEBVIDEOFRAME_IMPL_H_ #include "media/base/video_frame.h" -#include "third_party/WebKit/WebKit/chromium/public/WebVideoFrame.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" using namespace WebKit; diff --git a/webkit/glue/webview_unittest.cc b/webkit/glue/webview_unittest.cc index 22c9cea..1d3d2ea 100644 --- a/webkit/glue/webview_unittest.cc +++ b/webkit/glue/webview_unittest.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/WebKit/WebKit/chromium/public/WebView.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" #include "webkit/tools/test_shell/test_shell_test.h" using WebKit::WebView; diff --git a/webkit/glue/window_open_disposition.h b/webkit/glue/window_open_disposition.h index 24495f1..c9bfa0a 100644 --- a/webkit/glue/window_open_disposition.h +++ b/webkit/glue/window_open_disposition.h @@ -5,7 +5,7 @@ #ifndef WEBKIT_GLUE_WINDOW_OPEN_DISPOSITION_H_ #define WEBKIT_GLUE_WINDOW_OPEN_DISPOSITION_H_ -#include "third_party/WebKit/WebKit/chromium/public/WebNavigationPolicy.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNavigationPolicy.h" enum WindowOpenDisposition { SUPPRESS_OPEN, |