1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941
|
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
edition = "2023";
package optimization_guide.proto;
option java_outer_classname = "CommonFeatureDataProto";
option java_package = "org.chromium.components.optimization_guide.features.proto";
option optimize_for = LITE_RUNTIME;
// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please refer to
// http://go/chrome-mqls-onboarding (Google-internal link), and then changes will
// be synced with Chrome automatically.
// Next ID: 2
message FloatArray {
repeated float values = 1;
}
// Next ID: 2
message Embedding {
// The embedding vector. Note that future versions of this proto might not
// have this field set, as a new field may be added for quantized embeddings.
FloatArray floats = 1 [features = { field_presence: EXPLICIT }];
}
// Accessibility tree snapshot
// See
// https://source.chromium.org/chromium/chromium/src/+/main:ui/accessibility/ax_tree_update.h
// for details of this and related messages.
//
// Next ID: 4
message AXTreeUpdate {
AXTreeData tree_data = 1 [features = { field_presence: EXPLICIT }];
uint32 root_id = 2 [features = { field_presence: EXPLICIT }];
repeated AXNodeData nodes = 3;
}
// AX tree metadata, part of the a11y snapshot.
// Next ID: 16
message AXTreeData {
string doctype = 1 [features = { field_presence: EXPLICIT }];
bool loaded = 2 [features = { field_presence: EXPLICIT }];
float loading_progress = 3 [features = { field_presence: EXPLICIT }];
string mimetype = 4 [features = { field_presence: EXPLICIT }];
string title = 5 [features = { field_presence: EXPLICIT }];
uint32 focus_id = 6 [features = { field_presence: EXPLICIT }];
bool sel_is_backward = 7 [features = { field_presence: EXPLICIT }];
uint32 sel_anchor_object_id = 8 [features = { field_presence: EXPLICIT }];
uint32 sel_anchor_offset = 9 [features = { field_presence: EXPLICIT }];
AXTextAffinity sel_anchor_affinity = 10 [features = { field_presence: EXPLICIT }];
uint32 sel_focus_object_id = 11 [features = { field_presence: EXPLICIT }];
uint32 sel_focus_offset = 12 [features = { field_presence: EXPLICIT }];
AXTextAffinity sel_focus_affinity = 13 [features = { field_presence: EXPLICIT }];
uint32 root_scroller_id = 14 [features = { field_presence: EXPLICIT }];
repeated string metadata = 15;
}
// Per node accessibility data, part of the a11y snapshot.
// Next ID: 8
message AXNodeData {
uint32 id = 1 [features = { field_presence: EXPLICIT }];
AXRole role = 2 [features = { field_presence: EXPLICIT }];
uint32 state = 3 [features = { field_presence: EXPLICIT }];
uint64 actions = 4 [features = { field_presence: EXPLICIT }];
repeated AXAttribute attributes = 5;
repeated int32 child_ids = 6;
AXRelativeBounds relative_bounds = 7 [features = { field_presence: EXPLICIT }];
}
// AX node attribute, part of the a11y snapshot.
// Next ID: 15
message AXAttribute {
oneof attribute_key {
AXStringAttribute string_type = 1;
AXIntAttribute int_type = 2;
AXFloatAttribute float_type = 3;
AXBoolAttribute bool_type = 4;
AXIntListAttribute intlist_type = 5;
AXStringListAttribute stringlist_type = 6;
string html_attribute_name = 7;
}
oneof attribute_value {
string string_value = 8;
int32 int_value = 9;
float float_value = 10;
bool bool_value = 11;
AXIntList int_list_value = 12;
AXStringList string_list_value = 13;
string html_attribute_value = 14;
}
}
// Helper message for AX IntList.
message AXIntList {
repeated int32 value = 1;
}
// Helper message for AX StringList.
message AXStringList {
repeated string value = 1;
}
// AX Relative bounds.
// Next ID: 7
message AXRelativeBounds {
int32 offset_container_id = 1 [features = { field_presence: EXPLICIT }];
float x = 2 [features = { field_presence: EXPLICIT }];
float y = 3 [features = { field_presence: EXPLICIT }];
float width = 4 [features = { field_presence: EXPLICIT }];
float height = 5 [features = { field_presence: EXPLICIT }];
// If present, represents the transform as 16 floats.
repeated float transform = 6;
}
// Next ID: 11
message PageContext {
// The URL of the page that the form is on.
string url = 1 [features = { field_presence: EXPLICIT }];
// The title of the page that the form is on.
string title = 2 [features = { field_presence: EXPLICIT }];
// The AX tree representation of the page.
AXTreeUpdate ax_tree_data = 3 [features = { field_presence: EXPLICIT }];
// The inner text of the page the model is acting on (excluding x-origin
// frames).
string inner_text = 4 [features = { field_presence: EXPLICIT }];
// The offset of the focused element into the |inner_text|.
uint64 inner_text_offset = 5 [features = { field_presence: EXPLICIT }];
// The text passages of the page. Those passages are the result of the
// HtmlChunker algorithm implemented in Chrome (used by the History Search
// feature). See
// https://github.com/google/labs-prototypes/tree/main/seeds/chunker-python
repeated string page_passages = 9;
// A base64 encoded PNG of the tab screenshot.
string tab_screenshot = 6 [features = { field_presence: EXPLICIT }];
// The base64 encoded PDF representation of the page.
string pdf_data = 7 [features = { field_presence: EXPLICIT }];
// The page content represented as a tree of semantic chunks and (in the
// future) annotated with additional information about the page.
AnnotatedPageContent annotated_page_content = 8 [features = { field_presence: EXPLICIT }];
}
// The page content represented as a tree of semantic chunks and (in the
// future) annotated with additional information about the page.
// Next ID: 7
message AnnotatedPageContent {
// The version of the proto. Each time a backwards incompatible change is made
// to the proto, the version should be incremented.
AnnotatedPageContentVersion version = 1 [features = { field_presence: EXPLICIT }];
// The mode used to extract this proto. The data in the proto depends on the
// mode. See comments to understand which data is available for each mode.
AnnotatedPageContentMode mode = 6 [features = { field_presence: EXPLICIT }];
// The root node of the ContentNode tree.
ContentNode root_node = 2 [features = { field_presence: EXPLICIT }];
// The data for the main frame of the page.
FrameData main_frame_data = 3 [features = { field_presence: EXPLICIT }];
// The interaction information for the page--the subtree represented by the
// AnnotatedPageContent. This is for top-level interactions, such as the mouse
// position and focused element, for which there can only be one unique value
// for the entire page. Includes interaction information for the main frame
// and embedded iframes.
PageInteractionInfo page_interaction_info = 4 [features = { field_presence: EXPLICIT }];
// The rect of the viewport for the tab. i.e., screenshot dimensions.
// Dimensions are in captured pixels.
BoundingRect viewport_geometry = 5 [features = { field_presence: EXPLICIT }];
}
// The ContentNode tree is a sparse representation of the DOM tree for a web
// page, i.e., not every DOM node generates a ContentNode. For example, a `div`
// used only for styling or layout the subtree will not generate a ContentNode.
//
// The ContentNode is roughly 1:1 with a DOM node but there are exceptions:
//
// - Some DOM nodes can generate multiple ContentNodes. For example, a
// `::before` pseudo-element would have text and image ContentNodes for it's
// content specified in CSS.
//
// - A form with `<input type="image">` will have ContentNodes for the input
// element and it's image.
//
// - We currently don't coalesce text content from multiple DOM nodes into a
// single ContentNode but that maybe added in the future.
//
// Note: The ContentNode tree including content from all embedded iframes.
// Next ID: 3
message ContentNode {
// Note: CONTENT_ATTRIBUTE_TEXT and CONTENT_ATTRIBUTE_IMAGE are leaf nodes
// which don't have any children nodes.
repeated ContentNode children_nodes = 1;
ContentAttributes content_attributes = 2 [features = { field_presence: EXPLICIT }];
}
// Next ID: 28
message ContentAttributes {
oneof content_data {
// Only set if attribute_type is CONTENT_ATTRIBUTE_TEXT.
TextInfo text_data = 10;
// Only set if attribute_type is CONTENT_ATTRIBUTE_IMAGE.
ImageInfo image_data = 11;
// Only set if attribute_type is CONTENT_ATTRIBUTE_SVG.
SVGData svg_data = 23;
// Only set if attribute_type is CONTENT_ATTRIBUTE_CANVAS.
CanvasData canvas_data = 24;
// Only set if attribute_type is CONTENT_ATTRIBUTE_VIDEO.
VideoData video_data = 27;
// Only set if attribute_type is CONTENT_ATTRIBUTE_ANCHOR.
AnchorData anchor_data = 14;
// Only set if attribute_type is CONTENT_ATTRIBUTE_FORM.
FormInfo form_data = 19;
// Only set if attribute_type is CONTENT_ATTRIBUTE_FORM_CONTROL.
FormControlData form_control_data = 20;
// Only set if attribute_type is CONTENT_ATTRIBUTE_TABLE.
TableData table_data = 8;
// Only set if attribute_type is CONTENT_ATTRIBUTE_IFRAME.
IframeData iframe_data = 9;
// Only set if attribute_type is CONTENT_ATTRIBUTE_TABLE_ROW.
TableRowData table_row_data = 13;
}
// If this content node has the content of an entire subtree, this is the ID
// of the common ancestor of all the nodes in the subtree.
int32 common_ancestor_dom_node_id = 2 [features = { field_presence: EXPLICIT }];
ContentAttributeType attribute_type = 3 [features = { field_presence: EXPLICIT }];
// This is the geometry of the common_ancestor_dom_node_id.
Geometry geometry = 4 [features = { field_presence: EXPLICIT }];
// The interaction information for the content node.
// Note: The information in InteractionInfo is configured based on the
// AnnotatedPageContentMode. See comments on the message definition for
// details.
InteractionInfo interaction_info = 21 [features = { field_presence: EXPLICIT }];
// These can come from the aria role, the html tag, or are assumed from some
// properties of the page.
repeated AnnotatedRole annotated_roles = 15;
// A textual description of the content node from sources that may not be part
// of the tree because the content is not rendered. For example, `aria-label`
// and `aria-labelledby` attributes.
//
// Only populated for ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS.`
string label = 16 [features = { field_presence: EXPLICIT }];
// If this is a label node associated with an input node using `for`, provides
// the DOM node ID of the input node. This will match the
// `common_ancestor_dom_node_id` of the ContentNode of the input node, if it
// exists.
// Note: The label may be an ancestor of the input node.
//
// Only populated for ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS.
int32 label_for_dom_node_id = 25 [features = { field_presence: EXPLICIT }];
// The role of this ContentNode derived from the aria-role attribute.
//
// Only populated for ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS.
AXRole aria_role = 26 [features = { field_presence: EXPLICIT }];
reserved 5, 6, 7, 17, 18, 1, 22;
}
// The geometry of the content, in the page coordinate system.
// Next ID: 6
// NOTE: If `visual_bounding_box` is empty, i.e., the content is offscreen and
// it's in an iframe, the `outer_bounding_box` may be incorrect. See crbug.com/384996050
// for details.
//
// Only populated for ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS.
message Geometry {
// The bounding box of the content node, in the page coordinate system. This
// roughly corresponds to the element's local box used for hit testing.
BoundingRect outer_bounding_box = 1 [features = { field_presence: EXPLICIT }];
// Denotes which subset of this node is visible, in the page coordinate
// system. If the content is offscreen, this field will be empty.
BoundingRect visible_bounding_box = 2 [features = { field_presence: EXPLICIT }];
// Whether the content node is fixed or sticky position. This may suggest
// that the node is a header, footer, or sidebar.
bool is_fixed_or_sticky_position = 3 [features = { field_presence: EXPLICIT }];
reserved 4, 5;
}
message BoundingRect {
int32 x = 1 [features = { field_presence: EXPLICIT }];
int32 y = 2 [features = { field_presence: EXPLICIT }];
int32 width = 3 [features = { field_presence: EXPLICIT }];
int32 height = 4 [features = { field_presence: EXPLICIT }];
}
// The interaction information for the content node. This indicates whether the
// node is interactive and what type of interaction it supports.
//
// Note: ScrollerInfo is populated for ANNOTATED_PAGE_CONTENT_MODE_DEFAULT. The
// rest of the fields are only populated for
// ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS.
// Next ID: 15
message InteractionInfo {
// Set if the content node is scrollable.
ScrollerInfo scroller_info = 12 [features = { field_presence: EXPLICIT }];
// Whether the content node is selectable.
bool is_selectable = 3 [features = { field_presence: EXPLICIT }];
// Whether the content node is editable; i.e. whether the user can type into
// it. This refers to the text actually being editable, not whether the
// content node is a text field.
bool is_editable = 4 [features = { field_presence: EXPLICIT }];
// Whether the content node can be resized. This is relevant for scroll
// containers and iframes which have the CSS resize behavior.
bool can_resize_horizontal = 5 [features = { field_presence: EXPLICIT }];
bool can_resize_vertical = 6 [features = { field_presence: EXPLICIT }];
// Whether the content node is focusable.
bool is_focusable = 7 [features = { field_presence: EXPLICIT }];
// Whether the content node is draggable.
bool is_draggable = 9 [features = { field_presence: EXPLICIT }];
// Whether the content node is clickable. This checks for whether the node is
// a clickable control (e.g. form control elements) or has activation
// behavior. It also checks for whether the node has a click handler.
bool is_clickable = 10 [features = { field_presence: EXPLICIT }];
// The z-order of the content node relative to other nodes in the same
// Document. A higher value means the node is in front of other nodes with
// lower values.
//
// Since all content within a Document is rendered as a single layer, nodes
// behind the iframe in the embedder draw behind all nodes inside the
// iframe's Document (similar for nodes on top of the iframe node).
//
// Note: This value is only set for nodes in the viewport.
int32 document_scoped_z_order = 13 [features = { field_presence: EXPLICIT }];
// If this node is detected to be is_clickable, provides the reason which
// caused that.
// Note: This may not capture all the reasons.
repeated ClickabilityReason debug_clickability_reasons = 14;
reserved 8, 1, 2, 11;
}
// The coordinate space for the dimensions here is physical coordinates (not
// logical coordinates). This means it's the same irrespective of the writing
// mode.
// The dimensions also exclude non-overlay scrollbars.
message ScrollerInfo {
// The complete layout dimensions of the scroller. This is the total area
// that can be revealed through a scroll operation.
BoundingSize scrolling_bounds = 1 [features = { field_presence: EXPLICIT }];
// The subset of this scroller's content which is currently scrolled to. This
// is relative to the origin of `scrolling_bounds`.
BoundingRect visible_area = 2 [features = { field_presence: EXPLICIT }];
// Indicates whether this can be scrolled by the user in horizontal or
// vertical directions. These nodes can still be scrolled by script.
bool user_scrollable_horizontal = 3 [features = { field_presence: EXPLICIT }];
bool user_scrollable_vertical = 4 [features = { field_presence: EXPLICIT }];
}
message BoundingSize {
int32 width = 1 [features = { field_presence: EXPLICIT }];
int32 height = 2 [features = { field_presence: EXPLICIT }];
}
// Next ID: 5
message TextInfo {
string text_content = 1 [features = { field_presence: EXPLICIT }];
TextStyle text_style = 3 [features = { field_presence: EXPLICIT }];
reserved 2, 4;
}
// Next ID: 5
message TextStyle {
// A crude approximation of text size. The default is M. An ML model doesn't
// need to know the precise size of the text; it just needs to know whether
// it's relatively small or large. The default is M.
TextSize text_size = 1 [features = { field_presence: EXPLICIT }];
// Whether the text has inline semantics that denote emphasis. For example:
// bold, italics, underline, super/subscript, etc. An ML model doesn't need
// to know which specific semantic was used; only that the website author
// chose to emphasize the text in some way. The default is false.
bool has_emphasis = 2 [features = { field_presence: EXPLICIT }];
// The color of the text in RGBA format.
uint32 color = 3 [features = { field_presence: EXPLICIT }];
}
// Information about the image. In the future, this may include a pixmap.
// Next ID: 5
message ImageInfo {
string image_caption = 2 [features = { field_presence: EXPLICIT }];
// Provides the source origin for the image.
SecurityOrigin security_origin = 4 [features = { field_presence: EXPLICIT }];
reserved 1, 3;
}
// The source origin for the web content in AnnotatedPageContent. This maps to
// the origin concept in the spec: https://url.spec.whatwg.org/#origin.
//
// This is distinct from URLs. There are cases where the URL for a Document,
// example about:blank, is different from the origin that the Document's data
// should be attributed to.
//
// Next ID: 3
message SecurityOrigin {
// Whether the origin is opaque.
bool opaque = 1 [features = { field_presence: EXPLICIT }];
// The raw value of the origin. It is set to the nonce for opaque origins and
// scheme-host-port string for non-opaque origins.
string value = 2 [features = { field_presence: EXPLICIT }];
}
message SVGData {
// The inner text for the SVG subtree.
string inner_text = 1 [features = { field_presence: EXPLICIT }];
}
message CanvasData {
int32 layout_width = 1 [features = { field_presence: EXPLICIT }];
int32 layout_height = 2 [features = { field_presence: EXPLICIT }];
}
message VideoData {
// The URL of the video.
string url = 1 [features = { field_presence: EXPLICIT }];
// The source origin for the video.
SecurityOrigin security_origin = 2 [features = { field_presence: EXPLICIT }];
}
message AnchorData {
string url = 1 [features = { field_presence: EXPLICIT }];
// The relationship between the linked URL and the current document.
repeated AnchorRel rel = 2;
}
message FormInfo {
// The of the form.
string form_name = 1 [features = { field_presence: EXPLICIT }];
}
// Next ID: 8
message FormControlData {
// The name for the field.
string field_name = 1 [features = { field_presence: EXPLICIT }];
// The value of the field.
string field_value = 2 [features = { field_presence: EXPLICIT }];
// The type of control for this form field.
FormControlType form_control_type = 3 [features = { field_presence: EXPLICIT }];
// The options for a select field, if applicable.
repeated SelectOption select_options = 4;
// The placeholder text for the field. This is only applicable to text fields.
string placeholder = 5 [features = { field_presence: EXPLICIT }];
// Whether the field is checked. This is only applicable to checkbox and radio
// button fields.
bool is_checked = 6 [features = { field_presence: EXPLICIT }];
// Whether the field is required.
bool is_required = 7 [features = { field_presence: EXPLICIT }];
}
// Represents an option in a select field. See below for example.
//
// HTML | value | text
// ------------------------------------------+--------+------
// <option value=Foo label=Bar>Baz</option> | "Foo" | "Bar"
// <option value=Foo>Bar</option> | "Foo" | "Bar"
// <option label=Bar>Foo</option> | "Foo" | "Bar"
// <option>Foo</option> | "Foo" | "Foo"
// <option value=Foo></option> | "Foo" | ""
// <option label=Bar></option> | "" | "Bar"
message SelectOption {
string value = 1 [features = { field_presence: EXPLICIT }];
string text = 2 [features = { field_presence: EXPLICIT }];
// Whether the option is selected.
// Not set for FormsAI purposes, but used in PCA.
bool is_selected = 3 [features = { field_presence: EXPLICIT }];
// Whether the option is disabled.
// Not set for FormsAI purposes, but used in PCA.
bool is_disabled = 4 [features = { field_presence: EXPLICIT }];
}
message TableData {
// The name of the table, coming from the caption.
string table_name = 1 [features = { field_presence: EXPLICIT }];
reserved 2, 3, 4;
}
message IframeData {
FrameData frame_data = 3 [features = { field_presence: EXPLICIT }];
// Indicates whether the iframe is likely to be an ad frame. This is set for
// both the root ad frame and its descendants.
bool likely_ad_frame = 2 [features = { field_presence: EXPLICIT }];
reserved 1;
}
// The data for a frame in the web page. This is the common data structure for
// both the root frame and embedded iframes.
// Next ID: 8
message FrameData {
// The security origin of the frame.
SecurityOrigin security_origin = 1 [features = { field_presence: EXPLICIT }];
// Interaction information for the frame.
FrameInteractionInfo frame_interaction_info = 2 [features = { field_presence: EXPLICIT }];
// Identifies the document in a frame.
DocumentIdentifier document_identifier = 3 [features = { field_presence: EXPLICIT }];
// The URL of the frame.
string url = 4 [features = { field_presence: EXPLICIT }];
// The title of the frame.
string title = 5 [features = { field_presence: EXPLICIT }];
// Information about paid content in the frame. Only set
// if paid content was checked.
PaidContentMetadata paid_content_metadata = 6 [features = { field_presence: EXPLICIT }];
reserved 7;
}
// The interaction information for the frame. This is for interactions that
// are specific to the frame, such as the current selection.
// Next ID: 2
message FrameInteractionInfo {
// The current selection.
Selection selection = 1 [features = { field_presence: EXPLICIT }];
}
// Represents a selection in the page. This is a frame-level concept.
message Selection {
// The content node ID of the start node. Note that this could be the same as
// the end node ID. This node is always before or equal to the end node.
int32 start_node_id = 1 [features = { field_presence: EXPLICIT }];
// The character offset of the start of the selection from the start of the
// text contained in start node.
int32 start_offset = 2 [features = { field_presence: EXPLICIT }];
// The content node ID of the end node. Note that this could be the same as
// the start node ID. This node is always after or equal to the start node.
int32 end_node_id = 3 [features = { field_presence: EXPLICIT }];
// The character offset of the end of the selection from the start of the
// text contained in end node.
int32 end_offset = 4 [features = { field_presence: EXPLICIT }];
// The selected text.
string selected_text = 5 [features = { field_presence: EXPLICIT }];
}
// Directs the action to a specific Document in a frame in Chrome.
// Next ID: 3
message DocumentIdentifier {
// A unique identifier for the frame that is not stable across APC
// calls/pages. Caller can map these to a client side frame id.
string serialized_token = 1 [features = { field_presence: EXPLICIT }];
}
// Metadata about paid content in the frame.
// Next ID: 2
message PaidContentMetadata {
// Whether the frame contains paid content.
bool contains_paid_content = 1 [features = { field_presence: EXPLICIT }];
}
message TableRowData {
TableRowType type = 1 [features = { field_presence: EXPLICIT }];
}
// Represents the interaction information for the page. This is for top-level
// interactions, such as the mouse position and focused element, for which
// there can only be one unique value. Includes interaction information for
// the main frame and embedded iframes.
// Next ID: 4
message PageInteractionInfo {
// The content node ID of the content node that is currently focused.
int32 focused_node_id = 1 [features = { field_presence: EXPLICIT }];
// The content node ID of the content node that is currently focused by a
// screen reader. If this is set, it means that a screen reader is being used.
int32 accessibility_focused_node_id = 2 [features = { field_presence: EXPLICIT }];
// The last known mouse position, in the page coordinate system.
Point mouse_position = 3 [features = { field_presence: EXPLICIT }];
}
message Point {
int32 x = 1 [features = { field_presence: EXPLICIT }];
int32 y = 2 [features = { field_presence: EXPLICIT }];
}
// Uniquely identifies a DOM elements across all frames.
message AutofillGlobalId {
string frame_token = 1 [features = { field_presence: EXPLICIT }];
uint64 renderer_id = 2 [features = { field_presence: EXPLICIT }];
}
message FormData {
// The name by which autofill knows this form. This is generally either the
// name attribute or the id_attribute value, which-ever is non-empty with
// priority given to the name_attribute.
string form_name = 1 [features = { field_presence: EXPLICIT }];
// The fields contained in this form.
repeated FormFieldData fields = 2;
// Only set during data collection, not in prediction requests.
AutofillGlobalId global_id = 3 [features = { field_presence: EXPLICIT }];
// Autofill's internal identifier for the form. Can change when the form
// changes dynamically.
// Only set during data collection, not in prediction requests.
uint64 form_signature = 4 [features = { field_presence: EXPLICIT }];
}
// Next ID: 14
message FormFieldData {
// The name for the field.
string field_name = 1 [features = { field_presence: EXPLICIT }];
// The label for the field.
string field_label = 2 [features = { field_presence: EXPLICIT }];
string field_value = 3 [
deprecated = true,
features = { field_presence: EXPLICIT }
];
bool is_visible = 4 [
deprecated = true,
features = { field_presence: EXPLICIT }
];
// Whether the field is focusable.
// Only set during data collection, not in prediction requests.
bool is_focusable = 5 [features = { field_presence: EXPLICIT }];
// The type of control for this form field.
FormControlType form_control_type = 6 [features = { field_presence: EXPLICIT }];
// The options for a select field, if applicable.
repeated SelectOption select_options = 7;
// The placeholder text for the field.
string placeholder = 8 [features = { field_presence: EXPLICIT }];
// The AX node ID of the form control for this field.
int32 form_control_ax_node_id = 9 [features = { field_presence: EXPLICIT }];
bool is_eligible = 10 [
deprecated = true,
features = { field_presence: EXPLICIT }
];
// Only set during data collection, not in prediction requests.
AutofillGlobalId global_id = 11 [features = { field_presence: EXPLICIT }];
// Autofill's internal identifier for the field. Can change when the form
// changes dynamically.
// Only set during data collection, not in prediction requests.
uint32 field_signature = 12 [features = { field_presence: EXPLICIT }];
// The text of the elements denoted by the aria-labelledby attribute of field
// or the value of its aria-label attribute, with priority given to the
// aria-labelledby attribute.
// TODO(crbug.com/389631485): The client doesn't set this for model requests at the
// moment. But it can and should be used for inference since it is contained
// in the metadata pipeline.
string aria_label = 13 [features = { field_presence: EXPLICIT }];
}
message TableRow {
repeated ContentNode cells = 1;
}
message UserAnnotationsEntry {
// The row ID of this entry from the user annotations database. This is
// immutable except when retrieving the row from the database.
int64 entry_id = 1 [features = { field_presence: EXPLICIT }];
// The key for this entry. Not necessarily unique.
string key = 2 [features = { field_presence: EXPLICIT }];
// The value for this entry.
string value = 3 [features = { field_presence: EXPLICIT }];
}
message TabGroup {
// The label that describes this tab group.
string label = 1 [features = { field_presence: EXPLICIT }];
// The tabs that belong in this group.
repeated Tab tabs = 2;
// The id of the pre-existing tab group this corresponds to, if any.
string group_id = 3 [features = { field_presence: EXPLICIT }];
}
message Tab {
// A unique identifier for the tab.
int64 tab_id = 1 [features = { field_presence: EXPLICIT }];
// The title of the tab.
string title = 2 [features = { field_presence: EXPLICIT }];
// The URL of the tab.
string url = 3 [features = { field_presence: EXPLICIT }];
// The page context of the tab.
PageContext page_context = 4 [features = { field_presence: EXPLICIT }];
}
// The site engagement information for a single site.
message SiteEngagementEntry {
// The URL of the site.
string url = 1 [features = { field_presence: EXPLICIT }];
// On a scale of 0 to 100, the relative score of engagement with the site.
float score = 2 [features = { field_presence: EXPLICIT }];
}
// The site engagement information for the user.
message SiteEngagement {
// The site engagement information for the user.
repeated SiteEngagementEntry entries = 1;
}
// The coordinates of a point.
// Next ID: 3
message Coordinate {
int32 x = 1 [features = { field_presence: EXPLICIT }];
int32 y = 2 [features = { field_presence: EXPLICIT }];
}
// Selection text affinity, part of the a11y snapshot.
// Next ID: 3
enum AXTextAffinity {
AX_TEXT_AFFINITY_NONE = 0;
AX_TEXT_AFFINITY_DOWNSTREAM = 1;
AX_TEXT_AFFINITY_UPSTREAM = 2;
}
// AX Role.
// Next ID: 213
enum AXRole {
AX_ROLE_NONE = 0;
AX_ROLE_ABBR = 1;
AX_ROLE_ALERT = 2;
AX_ROLE_ALERTDIALOG = 3;
AX_ROLE_APPLICATION = 4;
AX_ROLE_ARTICLE = 5;
AX_ROLE_AUDIO = 6;
AX_ROLE_BANNER = 7;
AX_ROLE_BLOCKQUOTE = 8;
AX_ROLE_BUTTON = 9;
AX_ROLE_CANVAS = 10;
AX_ROLE_CAPTION = 11;
AX_ROLE_CARET = 12;
AX_ROLE_CELL = 13;
AX_ROLE_CHECKBOX = 14;
AX_ROLE_CLIENT = 15;
AX_ROLE_CODE = 16;
AX_ROLE_COLORWELL = 17;
AX_ROLE_COLUMN = 18;
AX_ROLE_COLUMNHEADER = 19;
AX_ROLE_COMBOBOXGROUPING = 20;
AX_ROLE_COMBOBOXMENUBUTTON = 21;
AX_ROLE_COMPLEMENTARY = 22;
AX_ROLE_COMMENT = 23;
AX_ROLE_CONTENTDELETION = 24;
AX_ROLE_CONTENTINSERTION = 25;
AX_ROLE_CONTENTINFO = 26;
AX_ROLE_DATE = 27;
AX_ROLE_DATETIME = 28;
AX_ROLE_DEFINITION = 29;
AX_ROLE_DESCRIPTIONLIST = 30;
AX_ROLE_DESCRIPTIONLISTDETAILDEPRECATED = 31;
AX_ROLE_DESCRIPTIONLISTTERMDEPRECATED = 32;
AX_ROLE_DESKTOP = 33;
AX_ROLE_DETAILS = 34;
AX_ROLE_DIALOG = 35;
AX_ROLE_DIRECTORYDEPRECATED = 36;
AX_ROLE_DISCLOSURETRIANGLE = 37;
AX_ROLE_DOCABSTRACT = 38;
AX_ROLE_DOCACKNOWLEDGMENTS = 39;
AX_ROLE_DOCAFTERWORD = 40;
AX_ROLE_DOCAPPENDIX = 41;
AX_ROLE_DOCBACKLINK = 42;
AX_ROLE_DOCBIBLIOENTRY = 43;
AX_ROLE_DOCBIBLIOGRAPHY = 44;
AX_ROLE_DOCBIBLIOREF = 45;
AX_ROLE_DOCCHAPTER = 46;
AX_ROLE_DOCCOLOPHON = 47;
AX_ROLE_DOCCONCLUSION = 48;
AX_ROLE_DOCCOVER = 49;
AX_ROLE_DOCCREDIT = 50;
AX_ROLE_DOCCREDITS = 51;
AX_ROLE_DOCDEDICATION = 52;
AX_ROLE_DOCENDNOTE = 53;
AX_ROLE_DOCENDNOTES = 54;
AX_ROLE_DOCEPIGRAPH = 55;
AX_ROLE_DOCEPILOGUE = 56;
AX_ROLE_DOCERRATA = 57;
AX_ROLE_DOCEXAMPLE = 58;
AX_ROLE_DOCFOOTNOTE = 59;
AX_ROLE_DOCFOREWORD = 60;
AX_ROLE_DOCGLOSSARY = 61;
AX_ROLE_DOCGLOSSREF = 62;
AX_ROLE_DOCINDEX = 63;
AX_ROLE_DOCINTRODUCTION = 64;
AX_ROLE_DOCNOTEREF = 65;
AX_ROLE_DOCNOTICE = 66;
AX_ROLE_DOCPAGEBREAK = 67;
AX_ROLE_DOCPAGEFOOTER = 68;
AX_ROLE_DOCPAGEHEADER = 69;
AX_ROLE_DOCPAGELIST = 70;
AX_ROLE_DOCPART = 71;
AX_ROLE_DOCPREFACE = 72;
AX_ROLE_DOCPROLOGUE = 73;
AX_ROLE_DOCPULLQUOTE = 74;
AX_ROLE_DOCQNA = 75;
AX_ROLE_DOCSUBTITLE = 76;
AX_ROLE_DOCTIP = 77;
AX_ROLE_DOCTOC = 78;
AX_ROLE_DOCUMENT = 79;
AX_ROLE_EMBEDDEDOBJECT = 80;
AX_ROLE_EMPHASIS = 81;
AX_ROLE_FEED = 82;
AX_ROLE_FIGCAPTION = 83;
AX_ROLE_FIGURE = 84;
AX_ROLE_FOOTER = 85;
AX_ROLE_SECTIONFOOTER = 86;
AX_ROLE_FORM = 87;
AX_ROLE_GENERICCONTAINER = 88;
AX_ROLE_GRAPHICSDOCUMENT = 89;
AX_ROLE_GRAPHICSOBJECT = 90;
AX_ROLE_GRAPHICSSYMBOL = 91;
AX_ROLE_GRID = 92;
AX_ROLE_GROUP = 93;
AX_ROLE_HEADER = 94;
AX_ROLE_SECTIONHEADER = 95;
AX_ROLE_HEADING = 96;
AX_ROLE_IFRAME = 97;
AX_ROLE_IFRAMEPRESENTATIONAL = 98;
AX_ROLE_IMAGE = 99;
AX_ROLE_IMECANDIDATE = 100;
AX_ROLE_INLINETEXTBOX = 101;
AX_ROLE_INPUTTIME = 102;
AX_ROLE_KEYBOARD = 103;
AX_ROLE_LABELTEXT = 104;
AX_ROLE_LAYOUTTABLE = 105;
AX_ROLE_LAYOUTTABLECELL = 106;
AX_ROLE_LAYOUTTABLEROW = 107;
AX_ROLE_LEGEND = 108;
AX_ROLE_LINEBREAK = 109;
AX_ROLE_LINK = 110;
AX_ROLE_LIST = 111;
AX_ROLE_LISTBOX = 112;
AX_ROLE_LISTBOXOPTION = 113;
AX_ROLE_LISTGRID = 114;
AX_ROLE_LISTITEM = 115;
AX_ROLE_LISTMARKER = 116;
AX_ROLE_LOG = 117;
AX_ROLE_MAIN = 118;
AX_ROLE_MARK = 119;
AX_ROLE_MARQUEE = 120;
AX_ROLE_MATH = 121;
AX_ROLE_MENU = 122;
AX_ROLE_MENUBAR = 123;
AX_ROLE_MENUITEM = 124;
AX_ROLE_MENUITEMCHECKBOX = 125;
AX_ROLE_MENUITEMRADIO = 126;
AX_ROLE_MENULISTOPTION = 127;
AX_ROLE_MENULISTPOPUP = 128;
AX_ROLE_METER = 129;
AX_ROLE_NAVIGATION = 130;
AX_ROLE_NOTE = 131;
AX_ROLE_PANE = 132;
AX_ROLE_PARAGRAPH = 133;
AX_ROLE_PDFACTIONABLEHIGHLIGHT = 134;
AX_ROLE_PDFROOT = 135;
AX_ROLE_PLUGINOBJECT = 136;
AX_ROLE_POPUPBUTTON = 137;
AX_ROLE_PORTALDEPRECATED = 138;
AX_ROLE_PREDEPRECATED = 139;
AX_ROLE_PROGRESSINDICATOR = 140;
AX_ROLE_RADIOBUTTON = 141;
AX_ROLE_RADIOGROUP = 142;
AX_ROLE_REGION = 143;
AX_ROLE_ROOTWEBAREA = 144;
AX_ROLE_ROW = 145;
AX_ROLE_ROWGROUP = 146;
AX_ROLE_ROWHEADER = 147;
AX_ROLE_RUBY = 148;
AX_ROLE_RUBYANNOTATION = 149;
AX_ROLE_SCROLLBAR = 150;
AX_ROLE_SCROLLVIEW = 151;
AX_ROLE_SEARCH = 152;
AX_ROLE_SEARCHBOX = 153;
AX_ROLE_SECTION = 154;
AX_ROLE_SLIDER = 155;
AX_ROLE_SPINBUTTON = 156;
AX_ROLE_SPLITTER = 157;
AX_ROLE_STATICTEXT = 158;
AX_ROLE_STATUS = 159;
AX_ROLE_STRONG = 160;
AX_ROLE_SUGGESTION = 161;
AX_ROLE_SVGROOT = 162;
AX_ROLE_SWITCH = 163;
AX_ROLE_TAB = 164;
AX_ROLE_TABLIST = 165;
AX_ROLE_TABPANEL = 166;
AX_ROLE_TABLE = 167;
AX_ROLE_TABLEHEADERCONTAINER = 168;
AX_ROLE_TERM = 169;
AX_ROLE_TEXTFIELD = 170;
AX_ROLE_TEXTFIELDWITHCOMBOBOX = 171;
AX_ROLE_TIME = 172;
AX_ROLE_TIMER = 173;
AX_ROLE_TITLEBAR = 174;
AX_ROLE_TOGGLEBUTTON = 175;
AX_ROLE_TOOLBAR = 176;
AX_ROLE_TOOLTIP = 177;
AX_ROLE_TREE = 178;
AX_ROLE_TREEGRID = 179;
AX_ROLE_TREEITEM = 180;
AX_ROLE_UNKNOWN = 181;
AX_ROLE_VIDEO = 182;
AX_ROLE_WEBVIEW = 183;
AX_ROLE_WINDOW = 184;
AX_ROLE_SUBSCRIPT = 185;
AX_ROLE_SUPERSCRIPT = 186;
AX_ROLE_MATHMLMATH = 187;
AX_ROLE_MATHMLFRACTION = 188;
AX_ROLE_MATHMLIDENTIFIER = 189;
AX_ROLE_MATHMLMULTISCRIPTS = 190;
AX_ROLE_MATHMLNONESCRIPT = 191;
AX_ROLE_MATHMLNUMBER = 192;
AX_ROLE_MATHMLOPERATOR = 193;
AX_ROLE_MATHMLOVER = 194;
AX_ROLE_MATHMLPRESCRIPTDELIMITER = 195;
AX_ROLE_MATHMLROOT = 196;
AX_ROLE_MATHMLROW = 197;
AX_ROLE_MATHMLSQUAREROOT = 198;
AX_ROLE_MATHMLSTRINGLITERAL = 199;
AX_ROLE_MATHMLSUB = 200;
AX_ROLE_MATHMLSUBSUP = 201;
AX_ROLE_MATHMLSUP = 202;
AX_ROLE_MATHMLTABLE = 203;
AX_ROLE_MATHMLTABLECELL = 204;
AX_ROLE_MATHMLTABLEROW = 205;
AX_ROLE_MATHMLTEXT = 206;
AX_ROLE_MATHMLUNDER = 207;
AX_ROLE_MATHMLUNDEROVER = 208;
AX_ROLE_COMBOBOXSELECT = 209;
AX_ROLE_DISCLOSURETRIANGLEGROUPED = 210;
AX_ROLE_SECTIONWITHOUTNAME = 211;
AX_ROLE_GRIDCELL = 212;
}
// AX String attribute enum.
// Next ID: 43
enum AXStringAttribute {
AX_SA_NONE = 0;
AX_SA_ACCESSKEY = 1;
AX_SA_APPID = 2;
AX_SA_ARIAINVALIDVALUEDEPRECATED = 3;
AX_SA_AUTOCOMPLETE = 4;
AX_SA_CHECKEDSTATEDESCRIPTION = 5;
AX_SA_CHILDTREEID = 6;
AX_SA_CHILDTREENODEAPPID = 7;
AX_SA_CLASSNAME = 8;
AX_SA_CONTAINERLIVERELEVANT = 9;
AX_SA_CONTAINERLIVESTATUS = 10;
AX_SA_DESCRIPTION = 11;
AX_SA_DISPLAY = 12;
AX_SA_FONTFAMILY = 13;
AX_SA_HTMLTAG = 14;
AX_SA_IMAGEANNOTATION = 15;
AX_SA_IMAGEDATAURL = 16;
AX_SA_MATHCONTENT = 17;
AX_SA_INPUTTYPE = 18;
AX_SA_KEYSHORTCUTS = 19;
AX_SA_LANGUAGE = 20;
AX_SA_NAME = 21;
AX_SA_LIVERELEVANT = 22;
AX_SA_LIVESTATUS = 23;
AX_SA_PLACEHOLDER = 24;
AX_SA_ROLE = 25;
AX_SA_ROLEDESCRIPTION = 26;
AX_SA_TOOLTIP = 27;
AX_SA_URL = 28;
AX_SA_VALUE = 29;
AX_SA_VIRTUALCONTENT = 30;
AX_SA_DODEFAULTLABEL = 31;
AX_SA_LONGCLICKLABEL = 32;
AX_SA_ARIABRAILLELABEL = 33;
AX_SA_ARIABRAILLEROLEDESCRIPTION = 34;
AX_SA_LINKTARGET = 35;
AX_SA_ARIANOTIFICATIONANNOUNCEMENTDEPRECATED = 36;
AX_SA_ARIANOTIFICATIONIDDEPRECATED = 37;
AX_SA_HTMLID = 38;
AX_SA_ARIACELLCOLUMNINDEXTEXT = 39;
AX_SA_ARIACELLROWINDEXTEXT = 40;
AX_SA_DATETIME = 41;
AX_SA_HTMLINPUTNAME = 42;
}
// AX Int attribute enum.
// Next ID: 68
enum AXIntAttribute {
AX_IA_NONE = 0;
AX_IA_DEFAULTACTIONVERB = 1;
AX_IA_SCROLLX = 2;
AX_IA_SCROLLXMIN = 3;
AX_IA_SCROLLXMAX = 4;
AX_IA_SCROLLY = 5;
AX_IA_SCROLLYMIN = 6;
AX_IA_SCROLLYMAX = 7;
AX_IA_TEXTSELSTART = 8;
AX_IA_TEXTSELEND = 9;
AX_IA_ARIACOLUMNCOUNT = 10;
AX_IA_ARIACELLCOLUMNINDEX = 11;
AX_IA_ARIACELLCOLUMNSPAN = 12;
AX_IA_ARIAROWCOUNT = 13;
AX_IA_ARIACELLROWINDEX = 14;
AX_IA_ARIACELLROWSPAN = 15;
AX_IA_TABLEROWCOUNT = 16;
AX_IA_TABLECOLUMNCOUNT = 17;
AX_IA_TABLEHEADERID = 18;
AX_IA_TABLEROWINDEX = 19;
AX_IA_TABLEROWHEADERID = 20;
AX_IA_TABLECOLUMNINDEX = 21;
AX_IA_TABLECOLUMNHEADERID = 22;
AX_IA_TABLECELLCOLUMNINDEX = 23;
AX_IA_TABLECELLCOLUMNSPAN = 24;
AX_IA_TABLECELLROWINDEX = 25;
AX_IA_TABLECELLROWSPAN = 26;
AX_IA_SORTDIRECTION = 27;
AX_IA_HIERARCHICALLEVEL = 28;
AX_IA_NAMEFROM = 29;
AX_IA_DESCRIPTIONFROM = 30;
AX_IA_ACTIVEDESCENDANTID = 31;
AX_IA_ERRORMESSAGEIDDEPRECATED = 32;
AX_IA_INPAGELINKTARGETID = 33;
AX_IA_MEMBEROFID = 34;
AX_IA_NEXTONLINEID = 35;
AX_IA_POPUPFORID = 36;
AX_IA_PREVIOUSONLINEID = 37;
AX_IA_RESTRICTION = 38;
AX_IA_SETSIZE = 39;
AX_IA_POSINSET = 40;
AX_IA_COLORVALUE = 41;
AX_IA_ARIACURRENTSTATE = 42;
AX_IA_BACKGROUNDCOLOR = 43;
AX_IA_COLOR = 44;
AX_IA_HASPOPUP = 45;
AX_IA_IMAGEANNOTATIONSTATUS = 46;
AX_IA_INVALIDSTATE = 47;
AX_IA_CHECKEDSTATE = 48;
AX_IA_LISTSTYLE = 49;
AX_IA_TEXTALIGN = 50;
AX_IA_TEXTDIRECTION = 51;
AX_IA_TEXTPOSITION = 52;
AX_IA_TEXTSTYLE = 53;
AX_IA_TEXTOVERLINESTYLE = 54;
AX_IA_TEXTSTRIKETHROUGHSTYLE = 55;
AX_IA_TEXTUNDERLINESTYLE = 56;
AX_IA_PREVIOUSFOCUSID = 57;
AX_IA_NEXTFOCUSID = 58;
AX_IA_DROPEFFECTDEPRECATED = 59;
AX_IA_DOMNODEIDDEPRECATED = 60;
AX_IA_ISPOPUP = 61;
AX_IA_NEXTWINDOWFOCUSID = 62;
AX_IA_PREVIOUSWINDOWFOCUSID = 63;
AX_IA_ARIANOTIFICATIONINTERRUPTDEPRECATED = 64;
AX_IA_ARIANOTIFICATIONPRIORITYDEPRECATED = 65;
AX_IA_DETAILSFROM = 66;
AX_IA_MAXLENGTH = 67;
}
// AX Float attribute enum.
// Next ID: 9
enum AXFloatAttribute {
AX_FA_NONE = 0;
AX_FA_VALUEFORRANGE = 1;
AX_FA_MINVALUEFORRANGE = 2;
AX_FA_MAXVALUEFORRANGE = 3;
AX_FA_STEPVALUEFORRANGE = 4;
AX_FA_FONTSIZE = 5;
AX_FA_FONTWEIGHT = 6;
AX_FA_TEXTINDENT = 7;
AX_FA_CHILDTREESCALE = 8;
}
// AX Bool attribute enum.
// Next ID: 23
enum AXBoolAttribute {
AX_BA_NONE = 0;
AX_BA_BUSY = 1;
AX_BA_NONATOMICTEXTFIELDROOT = 2;
AX_BA_CONTAINERLIVEATOMIC = 3;
AX_BA_CONTAINERLIVEBUSY = 4;
AX_BA_LIVEATOMIC = 5;
AX_BA_MODAL = 6;
AX_BA_UPDATELOCATIONONLY = 7;
AX_BA_CANVASHASFALLBACK = 8;
AX_BA_SCROLLABLE = 9;
AX_BA_CLICKABLE = 10;
AX_BA_CLIPSCHILDREN = 11;
AX_BA_NOTUSERSELECTABLESTYLE = 12;
AX_BA_SELECTED = 13;
AX_BA_SELECTEDFROMFOCUS = 14;
AX_BA_SUPPORTSTEXTLOCATION = 15;
AX_BA_GRABBEDDEPRECATED = 16;
AX_BA_ISLINEBREAKINGOBJECT = 17;
AX_BA_ISPAGEBREAKINGOBJECT = 18;
AX_BA_HASARIAATTRIBUTE = 19;
AX_BA_TOUCHPASSTHROUGHDEPRECATED = 20;
AX_BA_LONGCLICKABLE = 21;
AX_BA_HASHIDDENOFFSCREENNODES = 22;
}
// AX IntList attribute enum.
// Next ID: 30
enum AXIntListAttribute {
AX_ILA_NONE = 0;
AX_ILA_INDIRECTCHILDIDS = 1;
AX_ILA_ACTIONSIDS = 29;
AX_ILA_CONTROLSIDS = 2;
AX_ILA_DETAILSIDS = 3;
AX_ILA_DESCRIBEDBYIDS = 4;
AX_ILA_FLOWTOIDS = 5;
AX_ILA_LABELLEDBYIDS = 6;
AX_ILA_RADIOGROUPIDS = 7;
AX_ILA_MARKERTYPES = 8;
AX_ILA_MARKERSTARTS = 9;
AX_ILA_MARKERENDS = 10;
AX_ILA_CHARACTEROFFSETS = 11;
AX_ILA_LINESTARTS = 12;
AX_ILA_WORDSTARTS = 13;
AX_ILA_WORDENDS = 14;
AX_ILA_CUSTOMACTIONIDS = 15;
AX_ILA_CARETBOUNDS = 16;
AX_ILA_LINEENDS = 17;
AX_ILA_SENTENCESTARTS = 18;
AX_ILA_SENTENCEENDS = 19;
AX_ILA_HIGHLIGHTTYPES = 20;
AX_ILA_TEXTOPERATIONSTARTANCHORIDS = 21;
AX_ILA_TEXTOPERATIONSTARTOFFSETS = 22;
AX_ILA_TEXTOPERATIONENDANCHORIDS = 23;
AX_ILA_TEXTOPERATIONENDOFFSETS = 24;
AX_ILA_TEXTOPERATIONS = 25;
AX_ILA_ERRORMESSAGEIDS = 26;
AX_ILA_ARIANOTIFICATIONINTERRUPTPROPERTIES = 27;
AX_ILA_ARIANOTIFICATIONPRIORITYPROPERTIES = 28;
}
// AX StringList attribute enum.
// Next ID: 4
enum AXStringListAttribute {
AX_SLA_NONE = 0;
AX_SLA_CUSTOMACTIONDESCRIPTIONS = 1;
AX_SLA_ARIANOTIFICATIONANNOUNCEMENTS = 2;
AX_SLA_ARIANOTIFICATIONTYPES = 3;
}
// This will be updated when there is a significant change in the parsing logic.
// Next ID: 3
enum AnnotatedPageContentVersion {
ANNOTATED_PAGE_CONTENT_VERSION_UNKNOWN = 0;
ANNOTATED_PAGE_CONTENT_VERSION_1_0 = 1;
// DEPRECATED: Use AnnotatedPageContentMode mode instead.
// TODO(khushalsagar): Maintain both on the client until all users have been
// switched over.
ANNOTATED_PAGE_CONTENT_VERSION_ONLY_ACTIONABLE_ELEMENTS_1_0 = 2 [deprecated = true];
}
// The extraction on the client can be configured to a specific mode. This
// tracks the mode used to extract this proto.
enum AnnotatedPageContentMode {
ANNOTATED_PAGE_CONTENT_MODE_DEFAULT = 0;
// This mode is strictly a superset of the default mode. It includes
// additional information to understand which content a user can interact
// with.
//
// Note: This mode is under active development and backwards incompatible
// changes are expected.
ANNOTATED_PAGE_CONTENT_MODE_ACTIONABLE_ELEMENTS = 1;
}
// Indicates the structure of the ContentNode. Suggests which type of
// content_data will be found in the ContentNode.
// When adding new types, please also update AIPageContentAttributeType in
// third_party/blink/public/mojom/content_extraction/ai_page_content.mojom.
// See crrev.com/c/6072788 for an example.
// Next ID: 28
enum ContentAttributeType {
// Unknown is not a valid attribute type and should never be used by the
// client. You can consider discarding ContentNodes with this attribute type.
CONTENT_ATTRIBUTE_UNKNOWN = 0;
CONTENT_ATTRIBUTE_ROOT = 1;
CONTENT_ATTRIBUTE_CONTAINER = 2;
CONTENT_ATTRIBUTE_IFRAME = 3;
// Text chunks.
CONTENT_ATTRIBUTE_PARAGRAPH = 4;
CONTENT_ATTRIBUTE_HEADING = 5;
CONTENT_ATTRIBUTE_TEXT = 20;
CONTENT_ATTRIBUTE_ANCHOR = 22;
// Image chunks.
CONTENT_ATTRIBUTE_IMAGE = 9;
CONTENT_ATTRIBUTE_SVG = 25;
CONTENT_ATTRIBUTE_CANVAS = 26;
CONTENT_ATTRIBUTE_VIDEO = 27;
// Structured chunks.
CONTENT_ATTRIBUTE_ORDERED_LIST = 6;
CONTENT_ATTRIBUTE_UNORDERED_LIST = 7;
CONTENT_ATTRIBUTE_LIST_ITEM = 23;
CONTENT_ATTRIBUTE_FORM = 8;
CONTENT_ATTRIBUTE_FORM_CONTROL = 24;
CONTENT_ATTRIBUTE_TABLE = 10;
CONTENT_ATTRIBUTE_TABLE_ROW = 21;
CONTENT_ATTRIBUTE_TABLE_CELL = 11;
reserved 12, 13, 14, 15, 16, 17, 18, 19;
}
// The reason why a node is clickable.
// Next ID: 7
enum ClickabilityReason {
// The node is a native form control.
CLICKABILITY_REASON_CLICKABLE_CONTROL = 0;
// The node has a click event handler.
CLICKABILITY_REASON_CLICK_HANDLER = 1;
// The node has mouse event handlers like mouseup, mousedown, mouseover and
// mouseenter.
CLICKABILITY_REASON_MOUSE_EVENTS = 2;
// The node has keyboard event handlers like keydown, keypress, keyup.
CLICKABILITY_REASON_KEY_EVENTS = 3;
// The node's text can be edited.
CLICKABILITY_REASON_EDITABLE = 4;
// The node uses cursor css to indicate the element is interactive.
CLICKABILITY_REASON_CURSOR_POINTER = 5;
// The node has a clickable aria role.
CLICKABILITY_REASON_ARIA_ROLE = 6;
}
// Next ID: 5
enum TextSize {
TEXT_SIZE_M_DEFAULT = 0;
TEXT_SIZE_XS = 1;
TEXT_SIZE_S = 2;
TEXT_SIZE_L = 3;
TEXT_SIZE_XL = 4;
}
// The relationship between the linked URL and the current document.
// https://html.spec.whatwg.org/multipage/links.html#linkTypes
enum AnchorRel {
ANCHOR_REL_UNKNOWN = 0;
ANCHOR_REL_NO_REFERRER = 1;
ANCHOR_REL_NO_OPENER = 2;
ANCHOR_REL_OPENER = 3;
ANCHOR_REL_PRIVACY_POLICY = 4;
ANCHOR_REL_TERMS_OF_SERVICE = 5;
}
// Matches FormControlType in mojo, but off by one, because this list contains
// an "UNSPECIFIED" value at 0.
// https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/common/mojom/autofill_types.mojom;l=17;drc=105770df485ace262780d95126bb60b1a16ec340;bpv=1;bpt=1
// Next ID: 34
enum FormControlType {
FORM_CONTROL_TYPE_UNSPECIFIED = 0;
FORM_CONTROL_TYPE_CONTENT_EDITABLE = 1;
FORM_CONTROL_TYPE_INPUT_CHECKBOX = 2;
FORM_CONTROL_TYPE_INPUT_EMAIL = 3;
FORM_CONTROL_TYPE_INPUT_MONTH = 4;
FORM_CONTROL_TYPE_INPUT_NUMBER = 5;
FORM_CONTROL_TYPE_INPUT_PASSWORD = 6;
FORM_CONTROL_TYPE_INPUT_RADIO = 7;
FORM_CONTROL_TYPE_INPUT_SEARCH = 8;
FORM_CONTROL_TYPE_INPUT_TELEPHONE = 9;
FORM_CONTROL_TYPE_INPUT_TEXT = 10;
FORM_CONTROL_TYPE_INPUT_URL = 11;
FORM_CONTROL_TYPE_SELECT_ONE = 12;
FORM_CONTROL_TYPE_SELECT_MULTIPLE = 13;
FORM_CONTROL_TYPE_TEXT_AREA = 15;
FORM_CONTROL_TYPE_BUTTON_BUTTON = 16;
FORM_CONTROL_TYPE_BUTTON_SUBMIT = 17;
FORM_CONTROL_TYPE_BUTTON_RESET = 18;
FORM_CONTROL_TYPE_BUTTON_POPOVER = 19;
FORM_CONTROL_TYPE_FIELDSET = 20;
FORM_CONTROL_TYPE_INPUT_BUTTON = 21;
FORM_CONTROL_TYPE_INPUT_COLOR = 22;
FORM_CONTROL_TYPE_INPUT_DATE = 23;
FORM_CONTROL_TYPE_INPUT_DATETIME_LOCAL = 24;
FORM_CONTROL_TYPE_INPUT_FILE = 25;
FORM_CONTROL_TYPE_INPUT_HIDDEN = 26;
FORM_CONTROL_TYPE_INPUT_IMAGE = 27;
FORM_CONTROL_TYPE_INPUT_RANGE = 28;
FORM_CONTROL_TYPE_INPUT_RESET = 29;
FORM_CONTROL_TYPE_INPUT_SUBMIT = 30;
FORM_CONTROL_TYPE_INPUT_TIME = 31;
FORM_CONTROL_TYPE_INPUT_WEEK = 32;
FORM_CONTROL_TYPE_OUTPUT = 33;
}
enum TableRowType {
TABLE_ROW_TYPE_UNKNOWN = 0;
TABLE_ROW_TYPE_HEADER = 1;
TABLE_ROW_TYPE_BODY = 2;
TABLE_ROW_TYPE_FOOTER = 3;
}
// Indicates the semantic role of the content. These can come from the aria
// role, the html tag, or are assumed from some properties of the page.
// When adding new roles, please also update AIPageContentAnnotatedRole in
// third_party/blink/public/mojom/content_extraction/ai_page_content.mojom.
// Next ID: 15
enum AnnotatedRole {
ANNOTATED_ROLE_UNKNOWN = 0;
// Landmark/section chunks.
ANNOTATED_ROLE_HEADER = 5;
ANNOTATED_ROLE_NAV = 6;
ANNOTATED_ROLE_SEARCH = 7;
ANNOTATED_ROLE_MAIN = 8;
ANNOTATED_ROLE_ARTICLE = 9;
ANNOTATED_ROLE_SECTION = 10;
ANNOTATED_ROLE_ASIDE = 11;
ANNOTATED_ROLE_FOOTER = 12;
// Indicates that the subtree for this ContentNode is hidden from the user but
// accessible via features like find-in-page. See `hidden=until-found` in
// https://developer.mozilla.org/en-US/docs/Wecrbug.com/HTML/Global_attributes/hidden
// for details.
//
// Note: This is different from Geometry.visible_bounding_box being empty
// which indicates whether the content is offscreen. The visible_bounding_box
// for nodes in a hidden subtree may be non-empty, depending on whether the
// content would be in the viewport if the user searched for it.
ANNOTATED_ROLE_CONTENT_HIDDEN = 13;
// Indicates that the subtree for this ContentNode contains content marked as
// isAccessibleForFree=false by a schema.org CreativeWork declaration, as
// described at
// https://developers.google.com/search/docs/appearance/structured-data/paywalled-content.
ANNOTATED_ROLE_PAID_CONTENT = 14;
reserved 1 to 4;
}
// Whether or not status of the model's output is a success (i.e "is good") or
// is a failure (i.e "is bad").
// Next ID: 3
enum FinalModelStatus {
FINAL_MODEL_STATUS_UNSPECIFIED = 0;
FINAL_MODEL_STATUS_SUCCESS = 1;
FINAL_MODEL_STATUS_FAILURE = 2;
}
// Next ID: 3
enum UserFeedback {
USER_FEEDBACK_UNSPECIFIED = 0;
USER_FEEDBACK_THUMBS_DOWN = 1;
USER_FEEDBACK_THUMBS_UP = 2;
}
|