diff --git a/chrome/app/bookmarks_strings.grdp b/chrome/app/bookmarks_strings.grdp index d22fc9f..5a930588 100644 --- a/chrome/app/bookmarks_strings.grdp +++ b/chrome/app/bookmarks_strings.grdp
@@ -327,6 +327,9 @@ <message name="IDS_MD_BOOKMARK_MANAGER_CLEAR_SEARCH" desc="Title of the button in the bookmark manager that stops a search."> Clear search </message> + <message name="IDS_MD_BOOKMARK_MANAGER_EMPTY_LIST" desc="Text on the bookmarks list that indicates that a folder has no bookmarks."> + This folder is empty + </message> <message name="IDS_MD_BOOKMARK_MANAGER_MENU_ADD_BOOKMARK" desc="Title of the bookmark toolbar dropdown menu item that adds a new bookmark."> Add new bookmark </message>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 87e08200b..23dffc02 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -3636,10 +3636,6 @@ } } - if (android_java_ui) { - deps += [ "//third_party/WebKit/public:android_mojo_bindings" ] - } - if (enable_plugin_installation) { sources += [ "plugins/plugin_installer.cc",
diff --git a/chrome/browser/resources/md_bookmarks/list.html b/chrome/browser/resources/md_bookmarks/list.html index 9098d7c..2d9b163 100644 --- a/chrome/browser/resources/md_bookmarks/list.html +++ b/chrome/browser/resources/md_bookmarks/list.html
@@ -20,6 +20,16 @@ min-width: var(--card-min-width); padding: 8px 0; } + + .centered-message { + align-items: center; + color: #6e6e6e; + display: flex; + font-size: 14px; + font-weight: 500; + height: 100%; + justify-content: center; + } </style> <dialog is="cr-action-menu" id="dropdown"> <button class="dropdown-item" on-tap="onEditTap_"> @@ -32,12 +42,16 @@ $i18n{menuDelete} </button> </dialog> - <div id="bookmarks-card"> - <!-- TODO(angelayang): handle empty folders --> + <div id="bookmarks-card" + hidden$="[[isListEmpty_(selectedNode.children.length)]]"> <template is="dom-repeat" items="[[selectedNode.children]]" as="item"> <bookmarks-item item="[[item]]"></bookmarks-item> </template> </div> + <div class="centered-message" + hidden$="[[!isListEmpty_(selectedNode.children.length)]]"> + $i18n{emptyList} + </div> </template> <script src="chrome://bookmarks/list.js"></script> </dom-module>
diff --git a/chrome/browser/resources/md_bookmarks/list.js b/chrome/browser/resources/md_bookmarks/list.js index ea6cb45..59dda20 100644 --- a/chrome/browser/resources/md_bookmarks/list.js +++ b/chrome/browser/resources/md_bookmarks/list.js
@@ -62,5 +62,10 @@ var menu = /** @type {!CrActionMenuElement} */ ( this.$.dropdown); menu.close(); + }, + + /** @private */ + isListEmpty_: function() { + return this.selectedNode.children.length == 0; } });
diff --git a/chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc b/chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc index 5027fa4..0c03939 100644 --- a/chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc +++ b/chrome/browser/ui/webui/md_bookmarks/md_bookmarks_ui.cc
@@ -34,6 +34,8 @@ // Localized strings (alphabetical order). AddLocalizedString(source, "clearSearch", IDS_MD_BOOKMARK_MANAGER_CLEAR_SEARCH); + AddLocalizedString(source, "emptyList", + IDS_MD_BOOKMARK_MANAGER_EMPTY_LIST); AddLocalizedString(source, "menuAddBookmark", IDS_MD_BOOKMARK_MANAGER_MENU_ADD_BOOKMARK); AddLocalizedString(source, "menuAddFolder",
diff --git a/chrome/common/extensions/api/automation.idl b/chrome/common/extensions/api/automation.idl index f9dc153..f0fba7fd 100644 --- a/chrome/common/extensions/api/automation.idl +++ b/chrome/common/extensions/api/automation.idl
@@ -101,6 +101,7 @@ div, document, embeddedObject, + feed, figcaption, figure, footer, @@ -177,6 +178,7 @@ tab, tableHeaderContainer, table, + term, textField, time, timer,
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 041793a..896f4ad 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -1470,6 +1470,9 @@ case ui::AX_ROLE_SWITCH: return base::SysUTF16ToNSString(content_client->GetLocalizedString( IDS_AX_ROLE_SWITCH)); + case ui::AX_ROLE_TERM: + return base::SysUTF16ToNSString(content_client->GetLocalizedString( + IDS_AX_ROLE_DESCRIPTION_TERM)); case ui::AX_ROLE_TOGGLE_BUTTON: return base::SysUTF16ToNSString(content_client->GetLocalizedString( IDS_AX_ROLE_TOGGLE_BUTTON));
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc index 6331c616..680f26f2 100644 --- a/content/browser/accessibility/browser_accessibility_win.cc +++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -5349,6 +5349,9 @@ case ui::AX_ROLE_FIGURE: ia_role = ROLE_SYSTEM_GROUPING; break; + case ui::AX_ROLE_FEED: + ia_role = ROLE_SYSTEM_GROUPING; + break; case ui::AX_ROLE_FORM: role_name = L"form"; ia2_role = IA2_ROLE_FORM; @@ -5606,6 +5609,10 @@ case ui::AX_ROLE_TAB_PANEL: ia_role = ROLE_SYSTEM_PROPERTYPAGE; break; + case ui::AX_ROLE_TERM: + ia_role = ROLE_SYSTEM_LISTITEM; + ia_state |= STATE_SYSTEM_READONLY; + break; case ui::AX_ROLE_TOGGLE_BUTTON: ia_role = ROLE_SYSTEM_PUSHBUTTON; ia2_role = IA2_ROLE_TOGGLE_BUTTON;
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 7bcb594..908393d 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -216,6 +216,10 @@ RunAriaTest(FILE_PATH_LITERAL("aria-button.html")); } +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCell) { + RunAriaTest(FILE_PATH_LITERAL("aria-cell.html")); +} + IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaCheckBox) { RunAriaTest(FILE_PATH_LITERAL("aria-checkbox.html")); } @@ -291,6 +295,14 @@ RunAriaTest(FILE_PATH_LITERAL("aria-expanded.html")); } +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaFeed) { + RunAriaTest(FILE_PATH_LITERAL("aria-feed.html")); +} + +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaFigure) { + RunAriaTest(FILE_PATH_LITERAL("aria-figure.html")); +} + IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaHasPopup) { RunAriaTest(FILE_PATH_LITERAL("aria-haspopup.html")); } @@ -593,6 +605,10 @@ RunAriaTest(FILE_PATH_LITERAL("aria-tab.html")); } +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaTable) { + RunAriaTest(FILE_PATH_LITERAL("aria-table.html")); +} + IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaTabList) { RunAriaTest(FILE_PATH_LITERAL("aria-tablist.html")); } @@ -601,6 +617,10 @@ RunAriaTest(FILE_PATH_LITERAL("aria-tabpanel.html")); } +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaTerm) { + RunAriaTest(FILE_PATH_LITERAL("aria-term.html")); +} + IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, AccessibilityAriaTextbox) { RunAriaTest(FILE_PATH_LITERAL("aria-textbox.html")); }
diff --git a/content/renderer/accessibility/blink_ax_enum_conversion.cc b/content/renderer/accessibility/blink_ax_enum_conversion.cc index 1ebdb18..e581c51 100644 --- a/content/renderer/accessibility/blink_ax_enum_conversion.cc +++ b/content/renderer/accessibility/blink_ax_enum_conversion.cc
@@ -157,6 +157,8 @@ return ui::AX_ROLE_DOCUMENT; case blink::WebAXRoleEmbeddedObject: return ui::AX_ROLE_EMBEDDED_OBJECT; + case blink::WebAXRoleFeed: + return ui::AX_ROLE_FEED; case blink::WebAXRoleFigcaption: return ui::AX_ROLE_FIGCAPTION; case blink::WebAXRoleFigure: @@ -305,6 +307,8 @@ return ui::AX_ROLE_TABLE; case blink::WebAXRoleTableHeaderContainer: return ui::AX_ROLE_TABLE_HEADER_CONTAINER; + case blink::WebAXRoleTerm: + return ui::AX_ROLE_TERM; case blink::WebAXRoleTextField: return ui::AX_ROLE_TEXT_FIELD; case blink::WebAXRoleTime:
diff --git a/content/test/data/accessibility/aria/aria-cell-expected-win.txt b/content/test/data/accessibility/aria/aria-cell-expected-win.txt new file mode 100644 index 0000000..42b593d --- /dev/null +++ b/content/test/data/accessibility/aria/aria-cell-expected-win.txt
@@ -0,0 +1,12 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_TABLE xml-roles:table +++++ROLE_SYSTEM_ROW xml-roles:row +++++++ROLE_SYSTEM_COLUMNHEADER xml-roles:columnheader +++++++++ROLE_SYSTEM_STATICTEXT name='Browser' +++++++ROLE_SYSTEM_COLUMNHEADER xml-roles:columnheader +++++++++ROLE_SYSTEM_STATICTEXT name='Rendering Engine' +++++ROLE_SYSTEM_ROW xml-roles:row +++++++ROLE_SYSTEM_CELL xml-roles:cell +++++++++ROLE_SYSTEM_STATICTEXT name='Chrome' +++++++ROLE_SYSTEM_CELL xml-roles:cell +++++++++ROLE_SYSTEM_STATICTEXT name='Blink' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-cell.html b/content/test/data/accessibility/aria/aria-cell.html new file mode 100644 index 0000000..23f93f7 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-cell.html
@@ -0,0 +1,20 @@ +<!-- +@MAC-ALLOW:AXRole* +@WIN-ALLOW:*SELECTABLE +@WIN-ALLOW:xml-roles* +--> +<!DOCTYPE html> +<html> +<body> +<div role="table"> + <div role="row"> + <span role="columnheader">Browser</span> + <span role="columnheader">Rendering Engine</span> + </div> + <div role="row"> + <span role="cell">Chrome</span> + <span role="cell">Blink</span> + </div> +</div> +</body> +</html>
diff --git a/content/test/data/accessibility/aria/aria-feed-expected-mac.txt b/content/test/data/accessibility/aria/aria-feed-expected-mac.txt new file mode 100644 index 0000000..5ebaf24 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-feed-expected-mac.txt
@@ -0,0 +1,6 @@ +AXWebArea AXRoleDescription='HTML content' +++AXUnknown AXRoleDescription='unknown' +++++AXGroup AXRoleDescription='article' AXDescription='First' +++++++AXStaticText AXRoleDescription='text' AXValue='First' +++++AXGroup AXRoleDescription='article' AXDescription='Second' +++++++AXStaticText AXRoleDescription='text' AXValue='Second' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-feed-expected-win.txt b/content/test/data/accessibility/aria/aria-feed-expected-win.txt new file mode 100644 index 0000000..8d8a657 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-feed-expected-win.txt
@@ -0,0 +1,6 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_GROUPING xml-roles:feed +++++ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE xml-roles:article +++++++ROLE_SYSTEM_STATICTEXT name='First' +++++ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE xml-roles:article +++++++ROLE_SYSTEM_STATICTEXT name='Second'
diff --git a/content/test/data/accessibility/aria/aria-feed.html b/content/test/data/accessibility/aria/aria-feed.html new file mode 100644 index 0000000..2507820 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-feed.html
@@ -0,0 +1,15 @@ +<!-- +@MAC-ALLOW:AXRole* +@WIN-ALLOW:xml-roles* +@WIN-ALLOW:setsize* +@WIN-ALLOW:posinset* +--> +<!DOCTYPE html> +<html> +<body> + <div role="feed" aria-setsize=3> + <div role="article" tabindex=0 aria-posinset=2>First</div> + <div role="article" tabindex=0 aria-posinset=3>Second</div> + </div> +</body> +</html>
diff --git a/content/test/data/accessibility/aria/aria-figure-expected-mac.txt b/content/test/data/accessibility/aria/aria-figure-expected-mac.txt new file mode 100644 index 0000000..27476bc85 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-figure-expected-mac.txt
@@ -0,0 +1,3 @@ +AXWebArea AXRoleDescription='HTML content' +++AXGroup AXRoleDescription='figure' +++++AXStaticText AXRoleDescription='text' AXValue='Figure' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-figure-expected-win.txt b/content/test/data/accessibility/aria/aria-figure-expected-win.txt new file mode 100644 index 0000000..1a4efc66f --- /dev/null +++ b/content/test/data/accessibility/aria/aria-figure-expected-win.txt
@@ -0,0 +1,3 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_GROUPING xml-roles:figure +++++ROLE_SYSTEM_STATICTEXT name='Figure' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-figure.html b/content/test/data/accessibility/aria/aria-figure.html new file mode 100644 index 0000000..196aba9 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-figure.html
@@ -0,0 +1,10 @@ +<!-- +@MAC-ALLOW:AXRole* +@WIN-ALLOW:xml-roles* +--> +<!DOCTYPE html> +<html> +<body> + <div role="figure">Figure</div> +</body> +</html>
diff --git a/content/test/data/accessibility/aria/aria-table-expected-mac.txt b/content/test/data/accessibility/aria/aria-table-expected-mac.txt new file mode 100644 index 0000000..bf295d1 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-table-expected-mac.txt
@@ -0,0 +1,12 @@ +AXWebArea AXRoleDescription='HTML content' +++AXTable AXRoleDescription='table' +++++AXRow AXRoleDescription='row' +++++++AXCell AXRoleDescription='cell' +++++++++AXStaticText AXRoleDescription='text' AXValue='Browser' +++++++AXCell AXRoleDescription='cell' +++++++++AXStaticText AXRoleDescription='text' AXValue='Rendering Engine' +++++AXRow AXRoleDescription='row' +++++++AXCell AXRoleDescription='cell' +++++++++AXStaticText AXRoleDescription='text' AXValue='Chrome' +++++++AXCell AXRoleDescription='cell' +++++++++AXStaticText AXRoleDescription='text' AXValue='Blink' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-table-expected-win.txt b/content/test/data/accessibility/aria/aria-table-expected-win.txt new file mode 100644 index 0000000..42b593d --- /dev/null +++ b/content/test/data/accessibility/aria/aria-table-expected-win.txt
@@ -0,0 +1,12 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_TABLE xml-roles:table +++++ROLE_SYSTEM_ROW xml-roles:row +++++++ROLE_SYSTEM_COLUMNHEADER xml-roles:columnheader +++++++++ROLE_SYSTEM_STATICTEXT name='Browser' +++++++ROLE_SYSTEM_COLUMNHEADER xml-roles:columnheader +++++++++ROLE_SYSTEM_STATICTEXT name='Rendering Engine' +++++ROLE_SYSTEM_ROW xml-roles:row +++++++ROLE_SYSTEM_CELL xml-roles:cell +++++++++ROLE_SYSTEM_STATICTEXT name='Chrome' +++++++ROLE_SYSTEM_CELL xml-roles:cell +++++++++ROLE_SYSTEM_STATICTEXT name='Blink' \ No newline at end of file
diff --git a/content/test/data/accessibility/aria/aria-table.html b/content/test/data/accessibility/aria/aria-table.html new file mode 100644 index 0000000..79de857 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-table.html
@@ -0,0 +1,19 @@ +<!-- +@MAC-ALLOW:AXRole* +@WIN-ALLOW:xml-roles* +--> +<!DOCTYPE html> +<html> +<body> +<div role="table"> + <div role="row"> + <span role="columnheader">Browser</span> + <span role="columnheader">Rendering Engine</span> + </div> + <div role="row"> + <span role="cell">Chrome</span> + <span role="cell">Blink</span> + </div> +</div> +</body> +</html>
diff --git a/content/test/data/accessibility/aria/aria-term-expected-mac.txt b/content/test/data/accessibility/aria/aria-term-expected-mac.txt new file mode 100644 index 0000000..853394ef --- /dev/null +++ b/content/test/data/accessibility/aria/aria-term-expected-mac.txt
@@ -0,0 +1,10 @@ +AXWebArea AXRoleDescription='HTML content' +++AXList AXRoleDescription='list' +++++AXGroup AXSubrole=AXTerm AXRoleDescription='term' +++++++AXStaticText AXRoleDescription='text' AXValue='Term1' +++++AXGroup AXRoleDescription='definition' +++++++AXStaticText AXRoleDescription='text' AXValue='Definition1' +++++AXGroup AXSubrole=AXTerm AXRoleDescription='term' +++++++AXStaticText AXRoleDescription='text' AXValue='Term2' +++++AXGroup AXRoleDescription='definition' +++++++AXStaticText AXRoleDescription='text' AXValue='Definition2'
diff --git a/content/test/data/accessibility/aria/aria-term-expected-win.txt b/content/test/data/accessibility/aria/aria-term-expected-win.txt new file mode 100644 index 0000000..e84d86ab --- /dev/null +++ b/content/test/data/accessibility/aria/aria-term-expected-win.txt
@@ -0,0 +1,10 @@ +ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE +++ROLE_SYSTEM_LIST READONLY xml-roles:list +++++ROLE_SYSTEM_LISTITEM READONLY xml-roles:term +++++++ROLE_SYSTEM_STATICTEXT name='Term1' +++++IA2_ROLE_PARAGRAPH READONLY xml-roles:definition +++++++ROLE_SYSTEM_STATICTEXT name='Definition1' +++++ROLE_SYSTEM_LISTITEM READONLY xml-roles:term +++++++ROLE_SYSTEM_STATICTEXT name='Term2' +++++IA2_ROLE_PARAGRAPH READONLY xml-roles:definition +++++++ROLE_SYSTEM_STATICTEXT name='Definition2'
diff --git a/content/test/data/accessibility/aria/aria-term.html b/content/test/data/accessibility/aria/aria-term.html new file mode 100644 index 0000000..6f67b61 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-term.html
@@ -0,0 +1,17 @@ +<!-- +@MAC-ALLOW:AXRole* +@MAC-ALLOW:AXSubrole=AXTerm +@MAC-DENY:AXTitle* +@WIN-ALLOW:xml-roles* +--> +<!DOCTYPE html> +<html> +<body> + <div role="list"> + <div role="term">Term1</div> + <div role="definition">Definition1</div> + <div role="term">Term2</div> + <div role="definition">Definition2</div> + </div> +</body> +</html>
diff --git a/device/generic_sensor/public/interfaces/BUILD.gn b/device/generic_sensor/public/interfaces/BUILD.gn index b9671e5..8093ccaf 100644 --- a/device/generic_sensor/public/interfaces/BUILD.gn +++ b/device/generic_sensor/public/interfaces/BUILD.gn
@@ -5,6 +5,8 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("interfaces") { + visibility = [ "//device/generic_sensor/public/cpp" ] + visibility_blink = [ "//third_party/WebKit/Source/*" ] export_class_attribute = "DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT" export_define = "DEVICE_GENERIC_SENSOR_PUBLIC_IMPLEMENTATION=1" export_header =
diff --git a/mojo/public/BUILD.gn b/mojo/public/BUILD.gn index 9b76102..3baf6670 100644 --- a/mojo/public/BUILD.gn +++ b/mojo/public/BUILD.gn
@@ -23,7 +23,6 @@ deps = [ "c/system", "cpp/bindings", - "interfaces/bindings", "js", ] }
diff --git a/mojo/public/interfaces/bindings/BUILD.gn b/mojo/public/interfaces/bindings/BUILD.gn index 706e3ef..eab75c1e 100644 --- a/mojo/public/interfaces/bindings/BUILD.gn +++ b/mojo/public/interfaces/bindings/BUILD.gn
@@ -5,6 +5,7 @@ import("../../tools/bindings/mojom.gni") mojom("bindings") { + visibility = [] sources = [ "interface_control_messages.mojom", "pipe_control_messages.mojom",
diff --git a/mojo/public/interfaces/bindings/tests/BUILD.gn b/mojo/public/interfaces/bindings/tests/BUILD.gn index d3b964d..9b10db0 100644 --- a/mojo/public/interfaces/bindings/tests/BUILD.gn +++ b/mojo/public/interfaces/bindings/tests/BUILD.gn
@@ -61,10 +61,10 @@ export_header_blink = "mojo/public/cpp/bindings/tests/mojo_test_blink_export.h" } - visibility = [ - ":test_export_component", - ":test_export_blink_component", - ] + visibility = [ ":test_export_component" ] + if (!is_ios) { + visibility_blink = [ ":test_export_blink_component" ] + } } mojom("test_exported_import") {
diff --git a/mojo/public/tools/bindings/mojom.gni b/mojo/public/tools/bindings/mojom.gni index 65f60be3..e7ed6ec 100644 --- a/mojo/public/tools/bindings/mojom.gni +++ b/mojo/public/tools/bindings/mojom.gni
@@ -87,6 +87,10 @@ # # visibility (optional) # +# visibility_blink (optional) +# The value to use for visibility for the blink variant. If unset, +# |visibility| is used. +# # use_once_callback (optional) # If set to true, generated classes will use base::OnceCallback instead of # base::RepeatingCallback. @@ -435,7 +439,11 @@ } source_set("${target_name}${variant_suffix}") { - if (defined(invoker.visibility)) { + if (defined(bindings_configuration.for_blink) && + bindings_configuration.for_blink && + defined(invoker.visibility_blink)) { + visibility = invoker.visibility_blink + } else if (defined(invoker.visibility)) { visibility = invoker.visibility } if (defined(invoker.testonly)) {
diff --git a/remoting/host/host_experiment_session_plugin.h b/remoting/host/host_experiment_session_plugin.h index 2062742..dc5fc974 100644 --- a/remoting/host/host_experiment_session_plugin.h +++ b/remoting/host/host_experiment_session_plugin.h
@@ -9,7 +9,7 @@ #include <string> #include "remoting/protocol/session_plugin.h" -#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" +#include "third_party/libjingle_xmpp/xmllite/xmlelement.h" namespace remoting {
diff --git a/remoting/host/host_experiment_session_plugin_unittest.cc b/remoting/host/host_experiment_session_plugin_unittest.cc index cc6b5a5..ecef19a 100644 --- a/remoting/host/host_experiment_session_plugin_unittest.cc +++ b/remoting/host/host_experiment_session_plugin_unittest.cc
@@ -10,7 +10,7 @@ #include "remoting/base/constants.h" #include "remoting/host/host_attributes.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" +#include "third_party/libjingle_xmpp/xmllite/xmlelement.h" using buzz::QName; using buzz::XmlElement;
diff --git a/third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html b/third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html index 8118465..c704405 100644 --- a/third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html +++ b/third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html
@@ -8,11 +8,14 @@ --color: red; } #outer { + --length: 77px; --color: blue; } </style> -<div id=inner></div> +<div id=outer> + <div id=inner></div> +</div> <script> var computedStyle = getComputedStyle(inner); @@ -40,7 +43,7 @@ assert_equals(inlineStyle.getPropertyValue('--length'), '5'); assert_equals(inlineStyle.getPropertyValue('--color'), 'hello'); assert_equals(computedStyle.getPropertyValue('--length'), '0px'); - assert_equals(computedStyle.getPropertyValue('--color'), 'white'); + assert_equals(computedStyle.getPropertyValue('--color'), 'blue'); }, "Formerly valid values are still readable from inline styles but are computed as the unset value"); test(function() {
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt index 96dc975..68cfd2c 100644 --- a/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector-protocol/accessibility/accessibility-nameSources-img-figure-expected.txt
@@ -2,8 +2,8 @@ "nodeId": "<string>", "ignored": false, "role": { - "type": "internalRole", - "value": "Figure" + "type": "role", + "value": "figure" }, "name": { "type": "computedString", @@ -34,8 +34,8 @@ "nodeId": "<string>", "ignored": false, "role": { - "type": "internalRole", - "value": "Figure" + "type": "role", + "value": "figure" }, "name": { "type": "computedString", @@ -70,8 +70,8 @@ "nodeId": "<string>", "ignored": false, "role": { - "type": "internalRole", - "value": "Figure" + "type": "role", + "value": "figure" }, "name": { "type": "computedString", @@ -137,8 +137,8 @@ "nodeId": "<string>", "ignored": false, "role": { - "type": "internalRole", - "value": "Figure" + "type": "role", + "value": "figure" }, "name": { "type": "computedString", @@ -200,8 +200,8 @@ "nodeId": "<string>", "ignored": false, "role": { - "type": "internalRole", - "value": "Figure" + "type": "role", + "value": "figure" }, "name": { "type": "computedString",
diff --git a/third_party/WebKit/LayoutTests/inspector/initial-modules-load-expected.txt b/third_party/WebKit/LayoutTests/inspector/initial-modules-load-expected.txt index 03533b8..b394b091 100644 --- a/third_party/WebKit/LayoutTests/inspector/initial-modules-load-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/initial-modules-load-expected.txt
@@ -40,6 +40,7 @@ Loaded modules: animation bindings + cm common components components_lazy @@ -67,6 +68,7 @@ Loaded modules: animation bindings + cm common components components_lazy @@ -94,6 +96,7 @@ Loaded modules: animation bindings + cm common components components_lazy
diff --git a/third_party/WebKit/Source/bindings/modules/BUILD.gn b/third_party/WebKit/Source/bindings/modules/BUILD.gn index 37c9fb3d..c038ddf 100644 --- a/third_party/WebKit/Source/bindings/modules/BUILD.gn +++ b/third_party/WebKit/Source/bindings/modules/BUILD.gn
@@ -70,7 +70,6 @@ ] deps = make_core_generated_deps + [ "//third_party/WebKit/Source/bindings/modules:modules_bindings_generated_event_interfaces" ] deps += [ - "//device/generic_sensor/public/interfaces", "//device/generic_sensor/public/interfaces:interfaces_blink", "//device/vr:mojo_bindings_blink", "//media/midi:mojo_blink",
diff --git a/third_party/WebKit/Source/core/animation/BUILD.gn b/third_party/WebKit/Source/core/animation/BUILD.gn index 029004a..e1109ccc 100644 --- a/third_party/WebKit/Source/core/animation/BUILD.gn +++ b/third_party/WebKit/Source/core/animation/BUILD.gn
@@ -197,7 +197,6 @@ "SizeListPropertyFunctions.h", "StringKeyframe.cpp", "StringKeyframe.h", - "StyleInterpolation.h", "Timing.cpp", "Timing.h", "TimingCalculations.h",
diff --git a/third_party/WebKit/Source/core/animation/Interpolation.h b/third_party/WebKit/Source/core/animation/Interpolation.h index 80e9efc..702d01d8 100644 --- a/third_party/WebKit/Source/core/animation/Interpolation.h +++ b/third_party/WebKit/Source/core/animation/Interpolation.h
@@ -25,7 +25,6 @@ virtual void interpolate(int iteration, double fraction); - virtual bool isStyleInterpolation() const { return false; } virtual bool isInvalidatableInterpolation() const { return false; } virtual bool isLegacyStyleInterpolation() const { return false; }
diff --git a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h index c45d3a08..7f7cc0d0 100644 --- a/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h +++ b/third_party/WebKit/Source/core/animation/InvalidatableInterpolation.h
@@ -5,10 +5,10 @@ #ifndef InvalidatableInterpolation_h #define InvalidatableInterpolation_h +#include "core/animation/Interpolation.h" #include "core/animation/InterpolationType.h" #include "core/animation/InterpolationTypesMap.h" #include "core/animation/PrimitiveInterpolation.h" -#include "core/animation/StyleInterpolation.h" #include "core/animation/TypedInterpolationValue.h" #include <memory>
diff --git a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h index 5d9dc21..ef9d80c 100644 --- a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h +++ b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
@@ -5,13 +5,18 @@ #ifndef LegacyStyleInterpolation_h #define LegacyStyleInterpolation_h -#include "core/animation/StyleInterpolation.h" +#include "core/CSSPropertyNames.h" +#include "core/CoreExport.h" +#include "core/animation/Interpolation.h" +#include "core/animation/PropertyHandle.h" #include "core/css/resolver/AnimatedStyleBuilder.h" #include <memory> namespace blink { -class LegacyStyleInterpolation : public StyleInterpolation { +class StyleResolverState; + +class CORE_EXPORT LegacyStyleInterpolation : public Interpolation { public: static PassRefPtr<LegacyStyleInterpolation> create( PassRefPtr<AnimatableValue> start, @@ -22,20 +27,34 @@ InterpolableAnimatableValue::create(std::move(end)), id)); } - void apply(StyleResolverState& state) const override { + // 1) convert m_cachedValue into an X + // 2) shove X into StyleResolverState + // X can be: + // (1) a CSSValue (and applied via StyleBuilder::applyProperty) + // (2) an AnimatableValue (and applied via + // AnimatedStyleBuilder::applyProperty) + // (3) a custom value that is inserted directly into the StyleResolverState. + void apply(StyleResolverState& state) const { AnimatedStyleBuilder::applyProperty(m_id, state, currentValue().get()); } bool isLegacyStyleInterpolation() const final { return true; } + PassRefPtr<AnimatableValue> currentValue() const { return toInterpolableAnimatableValue(m_cachedValue.get())->value(); } + CSSPropertyID id() const { return m_id; } + + PropertyHandle getProperty() const final { return PropertyHandle(id()); } + private: + CSSPropertyID m_id; + LegacyStyleInterpolation(std::unique_ptr<InterpolableValue> start, std::unique_ptr<InterpolableValue> end, CSSPropertyID id) - : StyleInterpolation(std::move(start), std::move(end), id) {} + : Interpolation(std::move(start), std::move(end)), m_id(id) {} }; DEFINE_TYPE_CASTS(LegacyStyleInterpolation,
diff --git a/third_party/WebKit/Source/core/animation/StyleInterpolation.h b/third_party/WebKit/Source/core/animation/StyleInterpolation.h deleted file mode 100644 index bbaffaafa..0000000 --- a/third_party/WebKit/Source/core/animation/StyleInterpolation.h +++ /dev/null
@@ -1,52 +0,0 @@ -// Copyright 2014 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 StyleInterpolation_h -#define StyleInterpolation_h - -#include "core/CSSPropertyNames.h" -#include "core/CoreExport.h" -#include "core/animation/Interpolation.h" -#include "core/animation/PropertyHandle.h" -#include <memory> - -namespace blink { - -class StyleResolverState; - -class CORE_EXPORT StyleInterpolation : public Interpolation { - public: - // 1) convert m_cachedValue into an X - // 2) shove X into StyleResolverState - // X can be: - // (1) a CSSValue (and applied via StyleBuilder::applyProperty) - // (2) an AnimatableValue (and applied via - // AnimatedStyleBuilder::applyProperty) - // (3) a custom value that is inserted directly into the StyleResolverState. - virtual void apply(StyleResolverState&) const = 0; - - bool isStyleInterpolation() const final { return true; } - - CSSPropertyID id() const { return m_id; } - - PropertyHandle getProperty() const final { return PropertyHandle(id()); } - - protected: - CSSPropertyID m_id; - - StyleInterpolation(std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end, - CSSPropertyID id) - : Interpolation(std::move(start), std::move(end)), m_id(id) {} -}; - -DEFINE_TYPE_CASTS(StyleInterpolation, - Interpolation, - value, - value->isStyleInterpolation(), - value.isStyleInterpolation()); - -} // namespace blink - -#endif
diff --git a/third_party/WebKit/Source/core/css/BUILD.gn b/third_party/WebKit/Source/core/css/BUILD.gn index 56c3da37..70154f7 100644 --- a/third_party/WebKit/Source/core/css/BUILD.gn +++ b/third_party/WebKit/Source/core/css/BUILD.gn
@@ -345,6 +345,7 @@ "parser/SizesCalcParser.cpp", "properties/CSSPropertyAPI.h", "properties/CSSPropertyAPISize.cpp", + "properties/CSSPropertyAPITextDecorationColor.cpp", "properties/CSSPropertyAPITextUnderlinePosition.cpp", "properties/CSSPropertyAPITransformOrigin.cpp", "properties/CSSPropertyAPITranslate.cpp",
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.in b/third_party/WebKit/Source/core/css/CSSProperties.in index a477943..19d117bca 100644 --- a/third_party/WebKit/Source/core/css/CSSProperties.in +++ b/third_party/WebKit/Source/core/css/CSSProperties.in
@@ -374,7 +374,7 @@ text-combine-upright inherited, type_name=TextCombine, name_for_methods=TextCombine // FIXME: We shouldn't switch between shorthand/not shorthand based on a runtime flag text-decoration use_handlers_for=CSSPropertyTextDecorationLine, longhands=text-decoration-line;text-decoration-style;text-decoration-color -text-decoration-color runtime_flag=CSS3TextDecorations, interpolable, custom_all +text-decoration-color runtime_flag=CSS3TextDecorations, interpolable, custom_all, api_class text-decoration-line runtime_flag=CSS3TextDecorations, name_for_methods=TextDecoration, type_name=TextDecoration, converter=convertFlags<TextDecoration> text-decoration-skip runtime_flag=CSS3TextDecorations, inherited, type_name=TextDecorationSkip, converter=convertFlags<TextDecorationSkip> text-decoration-style runtime_flag=CSS3TextDecorations, type_name=TextDecorationStyle
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp index d260622..13def8e6 100644 --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -3471,9 +3471,6 @@ case CSSPropertyOrphans: case CSSPropertyWidows: return consumePositiveInteger(m_range); - case CSSPropertyTextDecorationColor: - ASSERT(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); - return consumeColor(m_range, m_context.mode()); case CSSPropertyWebkitTextStrokeWidth: return consumeTextStrokeWidth(m_range, m_context.mode()); case CSSPropertyWebkitTextFillColor:
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationColor.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationColor.cpp new file mode 100644 index 0000000..2b7bf9d --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPITextDecorationColor.cpp
@@ -0,0 +1,20 @@ +// Copyright 2017 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 "core/css/properties/CSSPropertyAPITextDecorationColor.h" + +#include "core/css/parser/CSSParserContext.h" +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "platform/RuntimeEnabledFeatures.h" + +namespace blink { + +const CSSValue* CSSPropertyAPITextDecorationColor::parseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext& context) { + DCHECK(RuntimeEnabledFeatures::css3TextDecorationsEnabled()); + return CSSPropertyParserHelpers::consumeColor(range, context.mode()); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp index 81148bff..4f13cd4e 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -40,7 +40,7 @@ #include "core/animation/InterpolationEnvironment.h" #include "core/animation/InvalidatableInterpolation.h" #include "core/animation/KeyframeEffect.h" -#include "core/animation/StyleInterpolation.h" +#include "core/animation/LegacyStyleInterpolation.h" #include "core/animation/animatable/AnimatableValue.h" #include "core/animation/css/CSSAnimatableValueFactory.h" #include "core/animation/css/CSSAnimations.h" @@ -1187,7 +1187,7 @@ } else { // TODO(alancutter): Remove this old code path once animations have // completely migrated to InterpolationTypes. - toStyleInterpolation(interpolation).apply(state); + toLegacyStyleInterpolation(interpolation).apply(state); } } }
diff --git a/third_party/WebKit/Source/devtools/.eslintignore b/third_party/WebKit/Source/devtools/.eslintignore index 07e344c..38702d3 100644 --- a/third_party/WebKit/Source/devtools/.eslintignore +++ b/third_party/WebKit/Source/devtools/.eslintignore
@@ -4,6 +4,7 @@ front_end/cm/* front_end/cm_headless/* front_end/cm_modes/* +front_end/cm_web_modes/* front_end/diff/diff_match_patch.js front_end/formatter_worker/acorn/acorn.js front_end/gonzales/*
diff --git a/third_party/WebKit/Source/devtools/BUILD.gn b/third_party/WebKit/Source/devtools/BUILD.gn index 64c6442..a97ca989 100644 --- a/third_party/WebKit/Source/devtools/BUILD.gn +++ b/third_party/WebKit/Source/devtools/BUILD.gn
@@ -62,6 +62,18 @@ "front_end/bindings/SASSSourceMapping.js", "front_end/bindings/StylesSourceMapping.js", "front_end/bindings/TempFile.js", + "front_end/cm/activeline.js", + "front_end/cm/closebrackets.js", + "front_end/cm/codemirror.css", + "front_end/cm/codemirror.js", + "front_end/cm/comment.js", + "front_end/cm/markselection.js", + "front_end/cm/matchbrackets.js", + "front_end/cm/module.json", + "front_end/cm/multiplex.js", + "front_end/cm/overlay.js", + "front_end/cm_headless/headlesscodemirror.js", + "front_end/cm_headless/module.json", "front_end/cm_modes/clike.js", "front_end/cm_modes/clojure.js", "front_end/cm_modes/coffeescript.js", @@ -71,23 +83,11 @@ "front_end/cm_modes/php.js", "front_end/cm_modes/python.js", "front_end/cm_modes/shell.js", - "front_end/cm/activeline.js", - "front_end/cm/closebrackets.js", - "front_end/cm/codemirror.css", - "front_end/cm/codemirror.js", - "front_end/cm/comment.js", - "front_end/cm/css.js", - "front_end/cm/htmlembedded.js", - "front_end/cm/htmlmixed.js", - "front_end/cm/javascript.js", - "front_end/cm/markselection.js", - "front_end/cm/matchbrackets.js", - "front_end/cm/multiplex.js", - "front_end/cm/overlay.js", - "front_end/cm/simple.js", - "front_end/cm/xml.js", - "front_end/cm_headless/headlesscodemirror.js", - "front_end/cm_headless/module.json", + "front_end/cm_web_modes/css.js", + "front_end/cm_web_modes/htmlembedded.js", + "front_end/cm_web_modes/htmlmixed.js", + "front_end/cm_web_modes/javascript.js", + "front_end/cm_web_modes/xml.js", "front_end/common/CharacterIdMap.js", "front_end/common/Color.js", "front_end/common/Console.js", @@ -793,6 +793,7 @@ "$resources_out_dir/animation/animation_module.js", "$resources_out_dir/audits/audits_module.js", "$resources_out_dir/audits2/audits2_module.js", + "$resources_out_dir/cm/cm_module.js", "$resources_out_dir/components_lazy/components_lazy_module.js", "$resources_out_dir/console/console_module.js", "$resources_out_dir/css_tracker/css_tracker_module.js",
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/module.json b/third_party/WebKit/Source/devtools/front_end/cm/module.json new file mode 100644 index 0000000..7ed2f5e --- /dev/null +++ b/third_party/WebKit/Source/devtools/front_end/cm/module.json
@@ -0,0 +1,25 @@ +{ + "scripts": [ + "codemirror.js", + "multiplex.js", + "matchbrackets.js", + "closebrackets.js", + "markselection.js", + "comment.js", + "overlay.js", + "activeline.js" + ], + "skip_compilation": [ + "codemirror.js", + "multiplex.js", + "matchbrackets.js", + "closebrackets.js", + "markselection.js", + "comment.js", + "overlay.js", + "activeline.js" + ], + "resources": [ + "codemirror.css" + ] +}
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/css.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/css.js similarity index 100% rename from third_party/WebKit/Source/devtools/front_end/cm/css.js rename to third_party/WebKit/Source/devtools/front_end/cm_web_modes/css.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/htmlembedded.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlembedded.js similarity index 100% rename from third_party/WebKit/Source/devtools/front_end/cm/htmlembedded.js rename to third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlembedded.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/htmlmixed.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js similarity index 100% rename from third_party/WebKit/Source/devtools/front_end/cm/htmlmixed.js rename to third_party/WebKit/Source/devtools/front_end/cm_web_modes/htmlmixed.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/javascript.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/javascript.js similarity index 100% rename from third_party/WebKit/Source/devtools/front_end/cm/javascript.js rename to third_party/WebKit/Source/devtools/front_end/cm_web_modes/javascript.js
diff --git a/third_party/WebKit/Source/devtools/front_end/cm/xml.js b/third_party/WebKit/Source/devtools/front_end/cm_web_modes/xml.js similarity index 100% rename from third_party/WebKit/Source/devtools/front_end/cm/xml.js rename to third_party/WebKit/Source/devtools/front_end/cm_web_modes/xml.js
diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/module.json b/third_party/WebKit/Source/devtools/front_end/formatter_worker/module.json index 414563f6..623c2fd0 100644 --- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/module.json +++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/module.json
@@ -4,8 +4,8 @@ "cm_headless" ], "scripts": [ - "../cm/css.js", - "../cm/xml.js", + "../cm_web_modes/css.js", + "../cm_web_modes/xml.js", "../common/Text.js", "../common/TextRange.js", "ESTreeWalker.js", @@ -23,7 +23,7 @@ ], "skip_compilation": [ "acorn/acorn.js", - "../cm/css.js", - "../cm/xml.js" + "../cm_web_modes/css.js", + "../cm_web_modes/xml.js" ] }
diff --git a/third_party/WebKit/Source/devtools/front_end/inspector.json b/third_party/WebKit/Source/devtools/front_end/inspector.json index 978168d..f19defff 100644 --- a/third_party/WebKit/Source/devtools/front_end/inspector.json +++ b/third_party/WebKit/Source/devtools/front_end/inspector.json
@@ -30,6 +30,7 @@ { "name": "console" }, { "name": "source_frame" }, { "name": "text_editor" }, + { "name": "cm" }, { "name": "cm_modes", "type": "remote" }, { "name": "settings" }, { "name": "layers", "condition": "!v8only" },
diff --git a/third_party/WebKit/Source/devtools/front_end/text_editor/module.json b/third_party/WebKit/Source/devtools/front_end/text_editor/module.json index 770c408..8cd4f93 100644 --- a/third_party/WebKit/Source/devtools/front_end/text_editor/module.json +++ b/third_party/WebKit/Source/devtools/front_end/text_editor/module.json
@@ -16,45 +16,28 @@ "dependencies": [ "ui", "platform", - "common" + "common", + "cm" ], "scripts": [ - "../cm/codemirror.js", - "../cm/css.js", - "../cm/javascript.js", - "../cm/simple.js", - "../cm/xml.js", - "../cm/multiplex.js", - "../cm/htmlmixed.js", - "../cm/htmlembedded.js", - "../cm/matchbrackets.js", - "../cm/closebrackets.js", - "../cm/markselection.js", - "../cm/comment.js", - "../cm/overlay.js", - "../cm/activeline.js", + "../cm_web_modes/css.js", + "../cm_web_modes/javascript.js", + "../cm_web_modes/xml.js", + "../cm_web_modes/htmlmixed.js", + "../cm_web_modes/htmlembedded.js", "CodeMirrorUtils.js", "TextEditorAutocompleteController.js", "CodeMirrorTextEditor.js" ], - "skip_compilation": [ - "../cm/codemirror.js", - "../cm/css.js", - "../cm/javascript.js", - "../cm/simple.js", - "../cm/xml.js", - "../cm/multiplex.js", - "../cm/htmlmixed.js", - "../cm/htmlembedded.js", - "../cm/matchbrackets.js", - "../cm/closebrackets.js", - "../cm/markselection.js", - "../cm/comment.js", - "../cm/overlay.js", - "../cm/activeline.js" - ], "resources": [ - "../cm/codemirror.css", "cmdevtools.css" + ], + "skip_compilation": [ + "acorn/acorn.js", + "../cm_web_modes/css.js", + "../cm_web_modes/javascript.js", + "../cm_web_modes/xml.js", + "../cm_web_modes/htmlmixed.js", + "../cm_web_modes/htmlembedded.js" ] } \ No newline at end of file
diff --git a/third_party/WebKit/Source/devtools/front_end/unit_test_runner.json b/third_party/WebKit/Source/devtools/front_end/unit_test_runner.json index 7356125..63512ef0 100644 --- a/third_party/WebKit/Source/devtools/front_end/unit_test_runner.json +++ b/third_party/WebKit/Source/devtools/front_end/unit_test_runner.json
@@ -7,6 +7,7 @@ { "name": "workspace", "type": "autostart" }, { "name": "source_frame", "type": "autostart" }, { "name": "text_editor", "type": "autostart" }, + { "name": "cm", "type": "autostart" }, { "name": "cm_modes", "type": "autostart" }, { "name": "diff", "type": "autostart" }, { "name": "shell", "type": "autostart" },
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp index f61d69c..fe84d52 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -68,6 +68,7 @@ {"article", ArticleRole}, {"banner", BannerRole}, {"button", ButtonRole}, + {"cell", CellRole}, {"checkbox", CheckBoxRole}, {"columnheader", ColumnHeaderRole}, {"combobox", ComboBoxRole}, @@ -77,6 +78,8 @@ {"dialog", DialogRole}, {"directory", DirectoryRole}, {"document", DocumentRole}, + {"feed", FeedRole}, + {"figure", FigureRole}, {"form", FormRole}, {"grid", GridRole}, {"gridcell", CellRole}, @@ -116,8 +119,10 @@ {"status", StatusRole}, {"switch", SwitchRole}, {"tab", TabRole}, + {"table", TableRole}, {"tablist", TabListRole}, {"tabpanel", TabPanelRole}, + {"term", TermRole}, {"text", StaticTextRole}, {"textbox", TextFieldRole}, {"timer", TimerRole}, @@ -169,6 +174,7 @@ {DivRole, "Div"}, {DocumentRole, "Document"}, {EmbeddedObjectRole, "EmbeddedObject"}, + {FeedRole, "feed"}, {FigcaptionRole, "Figcaption"}, {FigureRole, "Figure"}, {FooterRole, "Footer"}, @@ -244,6 +250,7 @@ {TabRole, "Tab"}, {TableHeaderContainerRole, "TableHeaderContainer"}, {TableRole, "Table"}, + {TermRole, "Term"}, {TextFieldRole, "TextField"}, {TimeRole, "Time"}, {TimerRole, "Timer"},
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h index 4f65993d..1473866ab 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXObject.h +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -91,8 +91,9 @@ DivRole, // No mapping to ARIA role. DocumentRole, EmbeddedObjectRole, // No mapping to ARIA role. - FigcaptionRole, // No mapping to ARIA role. - FigureRole, // No mapping to ARIA role. + FeedRole, + FigcaptionRole, // No mapping to ARIA role. + FigureRole, FooterRole, FormRole, GridRole, @@ -166,6 +167,7 @@ TabRole, TableHeaderContainerRole, // No mapping to ARIA role. TableRole, + TermRole, TextFieldRole, TimeRole, // No mapping to ARIA role. TimerRole,
diff --git a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp index 6b6c2e83..3e07f79 100644 --- a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp +++ b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
@@ -224,6 +224,7 @@ STATIC_ASSERT_ENUM(WebAXRoleDiv, DivRole); STATIC_ASSERT_ENUM(WebAXRoleDocument, DocumentRole); STATIC_ASSERT_ENUM(WebAXRoleEmbeddedObject, EmbeddedObjectRole); +STATIC_ASSERT_ENUM(WebAXRoleFeed, FeedRole); STATIC_ASSERT_ENUM(WebAXRoleFigcaption, FigcaptionRole); STATIC_ASSERT_ENUM(WebAXRoleFigure, FigureRole); STATIC_ASSERT_ENUM(WebAXRoleFooter, FooterRole); @@ -299,6 +300,7 @@ STATIC_ASSERT_ENUM(WebAXRoleTab, TabRole); STATIC_ASSERT_ENUM(WebAXRoleTableHeaderContainer, TableHeaderContainerRole); STATIC_ASSERT_ENUM(WebAXRoleTable, TableRole); +STATIC_ASSERT_ENUM(WebAXRoleTerm, TermRole); STATIC_ASSERT_ENUM(WebAXRoleTextField, TextFieldRole); STATIC_ASSERT_ENUM(WebAXRoleTime, TimeRole); STATIC_ASSERT_ENUM(WebAXRoleTimer, TimerRole);
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py index cec54e9..c165c90 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py
@@ -30,6 +30,7 @@ """ self.host = host self.path = path + self.branch_name = 'chromium-export-try' if no_fetch: _log.info('Skipping remote WPT fetch') @@ -68,6 +69,8 @@ self.run(['git', 'reset', '--hard', 'HEAD']) self.run(['git', 'clean', '-fdx']) self.run(['git', 'checkout', 'origin/master']) + if self.branch_name in self.all_branches(): + self.run(['git', 'branch', '-D', self.branch_name]) def all_branches(self): """Returns a list of local and remote branches.""" @@ -82,20 +85,13 @@ """ self.clean() all_branches = self.all_branches() - branch_name = 'chromium-export-try' - remote_branch_name = 'remotes/github/%s' % branch_name - if branch_name in all_branches: - _log.info('Local branch %s already exists, deleting', branch_name) - self.run(['git', 'branch', '-D', branch_name]) + if self.branch_name in all_branches: + _log.info('Local branch %s already exists, deleting', self.branch_name) + self.run(['git', 'branch', '-D', self.branch_name]) - if remote_branch_name in all_branches: - _log.info('Remote branch %s already exists, deleting', branch_name) - # TODO(jeffcarp): Investigate what happens when remote branch exists. - self.run(['git', 'push', 'github', ':{}'.format(branch_name)]) - - _log.info('Creating local branch %s', branch_name) - self.run(['git', 'checkout', '-b', branch_name]) + _log.info('Creating local branch %s', self.branch_name) + self.run(['git', 'checkout', '-b', self.branch_name]) # Remove Chromium WPT directory prefix. patch = patch.replace(CHROMIUM_WPT_DIR, '') @@ -104,9 +100,9 @@ # or something not off-by-one. self.run(['git', 'apply', '-'], input=patch) self.run(['git', 'commit', '-am', message]) - self.run(['git', 'push', 'github', branch_name]) + self.run(['git', 'push', 'github', self.branch_name]) - return branch_name + return self.branch_name def test_patch(self, patch): """Returns the expected output of a patch against origin/master. @@ -127,7 +123,7 @@ self.run(['git', 'add', '.']) output = self.run(['git', 'diff', 'origin/master']) except ScriptError as error: - _log.error('Error while applying patch: %s', error) + _log.warning('Patch did not apply cleanly, skipping...') output = '' self.clean()
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py index e9edad6d..bba09a8 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt_unittest.py
@@ -85,6 +85,6 @@ local_wpt = LocalWPT(host) local_branch_name = local_wpt.create_branch_with_patch('message', 'patch') - self.assertEqual(len(host.executive.calls), 9) + self.assertEqual(len(host.executive.calls), 10) self.assertEqual(local_branch_name, 'chromium-export-try') # TODO(jeffcarp): Add more specific assertions
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py index 599b48d8..cf1c35be 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
@@ -8,46 +8,62 @@ from webkitpy.w3c.chromium_commit import ChromiumCommit _log = logging.getLogger(__name__) + CHROMIUM_WPT_DIR = 'third_party/WebKit/LayoutTests/imported/wpt/' +# TODO(jeffcarp): have the script running this fetch Chromium origin/master +# TODO(jeffcarp): move WPT fetch out of its constructor to match planned ChromiumWPT pattern class TestExporter(object): def __init__(self, host, wpt_github, dry_run=False): self.host = host self.wpt_github = wpt_github - self.local_wpt = LocalWPT(self.host) self.dry_run = dry_run + self.local_wpt = LocalWPT(self.host) def run(self): - # First, poll for an in-flight pull request and merge if exists + """Query in-flight pull requests, then merge PR or create one. + + This script assumes it will be run on a regular interval. On + each invocation, it will either attempt to merge or attempt to + create a PR, never both. + """ pull_requests = self.wpt_github.in_flight_pull_requests() if len(pull_requests) == 1: - pull_request = pull_requests.pop() - - _log.info('In-flight PR found: #%d', pull_request['number']) - _log.info(pull_request['title']) - - # TODO(jeffcarp): Check the PR status here - - if self.dry_run: - _log.info('[dry_run] Would have attempted to merge PR') - else: - _log.info('Merging...') - self.wpt_github.merge_pull_request(pull_request['number']) - _log.info('PR merged!') + self.merge_in_flight_pull_request(pull_requests.pop()) elif len(pull_requests) > 1: _log.error(pull_requests) # TODO(jeffcarp): Print links to PRs raise Exception('More than two in-flight PRs!') + else: + self.export_first_exportable_commit() - # Second, look for exportable commits in Chromium - # At this point, no in-flight PRs should exist - # If there was an issue merging, it should have errored out + def merge_in_flight_pull_request(self, pull_request): + """Attempt to merge an in-flight PR. - # TODO(jeffcarp): have the script running this fetch Chromium origin/master - # TODO(jeffcarp): move WPT fetch out of its constructor to match planned ChromiumWPT pattern + Args: + pull_request: a PR object returned from the GitHub API. + """ + + _log.info('In-flight PR found: #%d', pull_request['number']) + _log.info(pull_request['title']) + + # TODO(jeffcarp): Check the PR status here (for Travis CI, etc.) + + if self.dry_run: + _log.info('[dry_run] Would have attempted to merge PR') + return + + _log.info('Merging...') + self.wpt_github.merge_pull_request(pull_request['number']) + _log.info('PR merged! Deleting branch.') + self.wpt_github.delete_remote_branch('chromium-export-try') + _log.info('Branch deleted!') + + def export_first_exportable_commit(self): + """Looks for exportable commits in Chromium, creates PR if found.""" wpt_commit, chromium_commit = self.local_wpt.most_recent_chromium_commit() assert chromium_commit, 'No Chromium commit found, this is impossible' @@ -79,8 +95,6 @@ patch = outbound_commit.format_patch() message = outbound_commit.message() - # TODO: now do a test comparison of patch against local WPT - if self.dry_run: _log.info('[dry_run] Stopping before creating PR') _log.info('\n\n[dry_run] message:') @@ -89,10 +103,10 @@ _log.info(patch) return - local_branch_name = self.local_wpt.create_branch_with_patch(message, patch) + remote_branch_name = self.local_wpt.create_branch_with_patch(message, patch) response_data = self.wpt_github.create_pr( - local_branch_name=local_branch_name, + remote_branch_name=remote_branch_name, desc_title=outbound_commit.subject(), body=outbound_commit.body())
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py index 33c85ab..9dd97b2 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py
@@ -99,20 +99,21 @@ self.assertEqual(self.host.executive.calls, [ ['git', 'clone', 'https://chromium.googlesource.com/external/w3c/web-platform-tests.git', '/tmp/wpt'], ['git', 'rev-parse', '--show-toplevel'], - ['git', 'rev-list', 'beefcafe..HEAD', '--reverse', '--', - 'badbeef8/third_party/WebKit/LayoutTests/imported/wpt/'], - ['git', 'diff-tree', '--name-only', '--no-commit-id', '-r', - 'badbeef8', '--', '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt'], + ['git', 'rev-list', 'beefcafe..HEAD', '--reverse', '--', 'badbeef8/third_party/WebKit/LayoutTests/imported/wpt/'], + ['git', 'diff-tree', '--name-only', '--no-commit-id', '-r', 'badbeef8', '--', + '/mock-checkout/third_party/WebKit/LayoutTests/imported/wpt'], ['git', 'format-patch', '-1', '--stdout', 'badbeef8', '--', 'some', 'files'], ['git', 'reset', '--hard', 'HEAD'], ['git', 'clean', '-fdx'], ['git', 'checkout', 'origin/master'], + ['git', 'branch', '-a'], ['git', 'apply', '-'], ['git', 'add', '.'], ['git', 'diff', 'origin/master'], ['git', 'reset', '--hard', 'HEAD'], ['git', 'clean', '-fdx'], ['git', 'checkout', 'origin/master'], + ['git', 'branch', '-a'], ['git', 'show', '--format=%B', '--no-patch', 'badbeef8'], ['git', 'show', '--format=%B', '--no-patch', 'badbeef8']])
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py index 16a192df..f15dab5 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github.py
@@ -41,9 +41,12 @@ request.get_method = lambda: method response = opener.open(request) status_code = response.getcode() - return json.load(response), status_code + try: + return json.load(response), status_code + except ValueError: + return None, status_code - def create_pr(self, local_branch_name, desc_title, body): + def create_pr(self, remote_branch_name, desc_title, body): """Creates a PR on GitHub. API doc: https://developer.github.com/v3/pulls/#create-a-pull-request @@ -51,19 +54,17 @@ Returns: A raw response object if successful, None if not. """ - assert local_branch_name + assert remote_branch_name assert desc_title assert body - pr_branch_name = '{}:{}'.format(self.user, local_branch_name) - # TODO(jeffcarp): CC foolip and qyearsley on all PRs for now # TODO(jeffcarp): add HTTP to Host and use that here path = '/repos/w3c/web-platform-tests/pulls' body = { "title": desc_title, "body": body, - "head": pr_branch_name, + "head": remote_branch_name, "base": 'master', } data, status_code = self.request(path, method='POST', body=body) @@ -79,8 +80,7 @@ return self.request(path, method='POST', body=body) def in_flight_pull_requests(self): - url_encoded_label = EXPORT_LABEL.replace(' ', '%20') - path = '/search/issues?q=repo:w3c/web-platform-tests%20is:open%20type:pr%20labels:{}'.format(url_encoded_label) + path = '/search/issues?q=repo:w3c/web-platform-tests%20is:open%20type:pr%20label:{}'.format(EXPORT_LABEL) data, status_code = self.request(path, method='GET') if status_code == 200: return data['items'] @@ -90,9 +90,19 @@ def merge_pull_request(self, pull_request_number): path = '/repos/w3c/web-platform-tests/pulls/%d/merge' % pull_request_number body = {} - response, content = self.request(path, method='PUT', body=body) + data, status_code = self.request(path, method='PUT', body=body) - if response['status'] == '200': - return json.loads(content) + if status_code == 200: + return data else: raise Exception('PR could not be merged: %d' % pull_request_number) + + def delete_remote_branch(self, remote_branch_name): + path = '/repos/w3c/web-platform-tests/git/refs/heads/%s' % remote_branch_name + data, status_code = self.request(path, method='DELETE') + + if status_code != 200: + # TODO(jeffcarp): Raise more specific exception (create MergeError class?) + raise Exception('PR could not be merged') + + return data
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github_mock.py index 3f78dc7..e4dfec2 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github_mock.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/wpt_github_mock.py
@@ -15,13 +15,16 @@ if self.unsuccessful_merge: raise Exception('PR could not be merged: %d' % number) - def create_pr(self, local_branch_name, desc_title, body): + def create_pr(self, remote_branch_name, desc_title, body): self.calls.append('create_pr') - assert local_branch_name + assert remote_branch_name assert desc_title assert body - self.pull_requests_created.append((local_branch_name, desc_title, body)) + self.pull_requests_created.append((remote_branch_name, desc_title, body)) return {} + + def delete_remote_branch(self, _): + self.calls.append('delete_remote_branch')
diff --git a/third_party/WebKit/public/BUILD.gn b/third_party/WebKit/public/BUILD.gn index 139f1b6..cc54981 100644 --- a/third_party/WebKit/public/BUILD.gn +++ b/third_party/WebKit/public/BUILD.gn
@@ -640,6 +640,11 @@ } mojom("mojo_bindings") { + visibility = [ "//content/*" ] + visibility_blink = [ + "//content/common:mojo_bindings_blink", + "//third_party/WebKit/Source/platform", + ] sources = [ "platform/mime_registry.mojom", "platform/modules/app_banner/app_banner.mojom", @@ -689,6 +694,8 @@ } mojom("android_mojo_bindings") { + visibility = [ ":mojo_bindings" ] + visibility_blink = [ ":mojo_bindings_blink" ] sources = [ "platform/modules/installation/installation.mojom", "platform/modules/webshare/webshare.mojom", @@ -711,6 +718,8 @@ # because its deps contain too many files in Chromium that would pollute the # include paths in generated mojom-blink files for other services. mojom("offscreen_canvas_mojo_bindings") { + visibility = [ "//content/*" ] + visibility_blink = [ "//third_party/WebKit/Source/platform" ] sources = [ "platform/modules/offscreencanvas/offscreen_canvas_surface.mojom", ]
diff --git a/third_party/WebKit/public/web/WebAXEnums.h b/third_party/WebKit/public/web/WebAXEnums.h index 20f3e78..599dfd8 100644 --- a/third_party/WebKit/public/web/WebAXEnums.h +++ b/third_party/WebKit/public/web/WebAXEnums.h
@@ -111,6 +111,7 @@ WebAXRoleDiv, WebAXRoleDocument, WebAXRoleEmbeddedObject, + WebAXRoleFeed, WebAXRoleFigcaption, WebAXRoleFigure, WebAXRoleFooter, @@ -186,6 +187,7 @@ WebAXRoleTab, WebAXRoleTableHeaderContainer, WebAXRoleTable, + WebAXRoleTerm, WebAXRoleTextField, WebAXRoleTime, WebAXRoleTimer,
diff --git a/ui/accessibility/ax_enums.idl b/ui/accessibility/ax_enums.idl index 0336206c..20edb1e 100644 --- a/ui/accessibility/ax_enums.idl +++ b/ui/accessibility/ax_enums.idl
@@ -115,6 +115,7 @@ div, document, embedded_object, + feed, figcaption, figure, footer, @@ -191,6 +192,7 @@ tab, table_header_container, table, + term, text_field, time, timer,
diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm index b06cb439..7e4e171 100644 --- a/ui/accessibility/platform/ax_platform_node_mac.mm +++ b/ui/accessibility/platform/ax_platform_node_mac.mm
@@ -133,6 +133,7 @@ {ui::AX_ROLE_TABLE_HEADER_CONTAINER, NSAccessibilityGroupRole}, {ui::AX_ROLE_TAB_LIST, NSAccessibilityTabGroupRole}, {ui::AX_ROLE_TAB_PANEL, NSAccessibilityGroupRole}, + {ui::AX_ROLE_TERM, NSAccessibilityGroupRole}, {ui::AX_ROLE_TEXT_FIELD, NSAccessibilityTextFieldRole}, {ui::AX_ROLE_TIME, NSAccessibilityGroupRole}, {ui::AX_ROLE_TIMER, NSAccessibilityGroupRole}, @@ -185,6 +186,7 @@ {ui::AX_ROLE_STATUS, @"AXApplicationStatus"}, {ui::AX_ROLE_SWITCH, @"AXSwitch"}, {ui::AX_ROLE_TAB_PANEL, @"AXTabPanel"}, + {ui::AX_ROLE_TERM, @"AXTerm"}, {ui::AX_ROLE_TIMER, @"AXApplicationTimer"}, {ui::AX_ROLE_TOGGLE_BUTTON, @"AXToggleButton"}, {ui::AX_ROLE_TOOLTIP, @"AXUserInterfaceTooltip"},